[PATCH v4 5/5] whpx: move whpx_lapic_state from header to c file

Yonggang Luo posted 5 patches 5 years, 1 month ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <ehabkost@redhat.com>, Ed Maste <emaste@freebsd.org>, Paolo Bonzini <pbonzini@redhat.com>, Li-Wen Hsu <lwhsu@freebsd.org>, Sunil Muthuswamy <sunilmut@microsoft.com>
[PATCH v4 5/5] whpx: move whpx_lapic_state from header to c file
Posted by Yonggang Luo 5 years, 1 month ago
This struct only used in whpx-apic.c, there is no need
expose it in whpx.h.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 include/sysemu/whpx.h        | 7 -------
 target/i386/whpx/whpx-apic.c | 7 +++++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
index 4f38784d7e..bfbcaa25d8 100644
--- a/include/sysemu/whpx.h
+++ b/include/sysemu/whpx.h
@@ -25,13 +25,6 @@ struct whpx_state {
     bool apic_in_platform;
 };
 
-struct whpx_lapic_state {
-    struct {
-        uint32_t data;
-        uint32_t padding[3];
-    } fields[256];
-};
-
 extern struct whpx_state whpx_global;
 int whpx_enabled(void);
 
diff --git a/target/i386/whpx/whpx-apic.c b/target/i386/whpx/whpx-apic.c
index b127a3cb8a..dd60fb0996 100644
--- a/target/i386/whpx/whpx-apic.c
+++ b/target/i386/whpx/whpx-apic.c
@@ -20,6 +20,13 @@
 #include "sysemu/whpx.h"
 #include "whp-dispatch.h"
 
+struct whpx_lapic_state {
+    struct {
+        uint32_t data;
+        uint32_t padding[3];
+    } fields[256];
+};
+
 static void whpx_put_apic_state(APICCommonState *s,
                                 struct whpx_lapic_state *kapic)
 {
-- 
2.29.2.windows.3


Re: [PATCH v4 5/5] whpx: move whpx_lapic_state from header to c file
Posted by Marc-André Lureau 5 years, 1 month ago
Hi

On Thu, Jan 7, 2021 at 2:26 PM Yonggang Luo <luoyonggang@gmail.com> wrote:

> This struct only used in whpx-apic.c, there is no need
> expose it in whpx.h.
>
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
>

Similar patch pending:
https://patchew.org/QEMU/20201219090637.1700900-1-pbonzini@redhat.com/20201219090637.1700900-3-pbonzini@redhat.com/

---
>  include/sysemu/whpx.h        | 7 -------
>  target/i386/whpx/whpx-apic.c | 7 +++++++
>  2 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/include/sysemu/whpx.h b/include/sysemu/whpx.h
> index 4f38784d7e..bfbcaa25d8 100644
> --- a/include/sysemu/whpx.h
> +++ b/include/sysemu/whpx.h
> @@ -25,13 +25,6 @@ struct whpx_state {
>      bool apic_in_platform;
>  };
>
> -struct whpx_lapic_state {
> -    struct {
> -        uint32_t data;
> -        uint32_t padding[3];
> -    } fields[256];
> -};
> -
>  extern struct whpx_state whpx_global;
>  int whpx_enabled(void);
>
> diff --git a/target/i386/whpx/whpx-apic.c b/target/i386/whpx/whpx-apic.c
> index b127a3cb8a..dd60fb0996 100644
> --- a/target/i386/whpx/whpx-apic.c
> +++ b/target/i386/whpx/whpx-apic.c
> @@ -20,6 +20,13 @@
>  #include "sysemu/whpx.h"
>  #include "whp-dispatch.h"
>
> +struct whpx_lapic_state {
> +    struct {
> +        uint32_t data;
> +        uint32_t padding[3];
> +    } fields[256];
> +};
> +
>  static void whpx_put_apic_state(APICCommonState *s,
>                                  struct whpx_lapic_state *kapic)
>  {
> --
> 2.29.2.windows.3
>
>
>

-- 
Marc-André Lureau
Re: [PATCH v4 5/5] whpx: move whpx_lapic_state from header to c file
Posted by Paolo Bonzini 5 years, 1 month ago
On 07/01/21 11:28, Marc-André Lureau wrote:
> Hi
> 
> On Thu, Jan 7, 2021 at 2:26 PM Yonggang Luo <luoyonggang@gmail.com 
> <mailto:luoyonggang@gmail.com>> wrote:
> 
>     This struct only used in whpx-apic.c, there is no need
>     expose it in whpx.h.
> 
>     Signed-off-by: Yonggang Luo <luoyonggang@gmail.com
>     <mailto:luoyonggang@gmail.com>>
> 
> 
> Similar patch pending:
> https://patchew.org/QEMU/20201219090637.1700900-1-pbonzini@redhat.com/20201219090637.1700900-3-pbonzini@redhat.com/ 
> <https://patchew.org/QEMU/20201219090637.1700900-1-pbonzini@redhat.com/20201219090637.1700900-3-pbonzini@redhat.com/>

This one could still be applied before or after mine, it makes sense.

Paolo


Re: [PATCH v4 5/5] whpx: move whpx_lapic_state from header to c file
Posted by 罗勇刚 (Yonggang Luo) 5 years, 1 month ago
On Thu, Jan 7, 2021 at 2:55 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 07/01/21 11:28, Marc-André Lureau wrote:
> > Hi
> >
> > On Thu, Jan 7, 2021 at 2:26 PM Yonggang Luo <luoyonggang@gmail.com
> > <mailto:luoyonggang@gmail.com>> wrote:
> >
> >     This struct only used in whpx-apic.c, there is no need
> >     expose it in whpx.h.
> >
> >     Signed-off-by: Yonggang Luo <luoyonggang@gmail.com
> >     <mailto:luoyonggang@gmail.com>>
> >
> >
> > Similar patch pending:
> >
https://patchew.org/QEMU/20201219090637.1700900-1-pbonzini@redhat.com/20201219090637.1700900-3-pbonzini@redhat.com/
> > <
https://patchew.org/QEMU/20201219090637.1700900-1-pbonzini@redhat.com/20201219090637.1700900-3-pbonzini@redhat.com/
>
>
> This one could still be applied before or after mine, it makes sense.
>
> Paolo
>
OK, prefer yours:) I am trying to green the CI,

--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo