qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] whpx: fix compilation


From: Paolo Bonzini
Subject: Re: [PATCH] whpx: fix compilation
Date: Fri, 18 Dec 2020 11:28:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 18/12/20 11:08, Marc-André Lureau wrote:
     >   #ifdef CONFIG_WHPX
     >
     > -#include "whp-dispatch.h"
     > +#include <windows.h>
     > +#include <WinHvPlatform.h>
     > +#include <WinHvEmulation.h>
     >
     >   struct whpx_state {
     >       uint64_t mem_quota;
     >

    This is wrong, just "git mv target/i386/whpx/whp-dispatch.h
    include/sysemu" instead (and possibly change the #include line to
    sysemu/whp-dispatch.h).


Wrong? It fixes the build. So whatever is in whp-dispatch, it's not exactly necessary. Why should it be included?

Did you read the code that initializes whp-dispatch, or even easier try to find the patch the introduced it ("git log --follow target/i386/whpx/whp-dispatch.h")? Marc-André, I expect you to know better than "it fixes the build, ergo it is correct"...

Furthermore, I tried your suggestion first. But it fails with other include issues. I can probably solve them differently, but why should whp-dispatch be in include/sysemu?

It shouldn't indeed, hence the second suggestion:

    But I wonder if whp-dispatch.h is needed at all in this file.  If we
    can just include it in whpx-all.c and whpx-apic.c, that would be much
    better.

May be, but how does this solve the issue with include/sysemu/whpx.h ?

Because "just" including it in those two .c files implies removing it from include/sysemu/whpx.h. I was a bit concise, I admit.

Thanks,

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]