diff mbox

[RFC,02/38] hw/i386/kvmvapic: add missing include of tcg.h

Message ID 1440375847-17603-3-git-send-email-cota@braap.org
State New
Headers show

Commit Message

Emilio Cota Aug. 24, 2015, 12:23 a.m. UTC
So that the declaration of tb_lock can be found.

Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 hw/i386/kvmvapic.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Alex Bennée Sept. 7, 2015, 3:49 p.m. UTC | #1
Emilio G. Cota <cota@braap.org> writes:

> So that the declaration of tb_lock can be found.

OK this confused me somewhat as exposing TCG details to the hardware
emulation seems broken. However I notice the code your adding to isn't
in Fred's latest series although the tb_gen_code ugliness is in master
so will need addressing.

I'm not sure why x86 is the special snowflake in this case. It looks
like a performance hack for emulation which I guess the other guests
don't do.

>
> Signed-off-by: Emilio G. Cota <cota@braap.org>
> ---
>  hw/i386/kvmvapic.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
> index 1c3b5b6..a9a33fd 100644
> --- a/hw/i386/kvmvapic.c
> +++ b/hw/i386/kvmvapic.c
> @@ -13,6 +13,7 @@
>  #include "sysemu/kvm.h"
>  #include "hw/i386/apic_internal.h"
>  #include "hw/sysbus.h"
> +#include "tcg/tcg.h"
>  
>  #define VAPIC_IO_PORT           0x7e
Paolo Bonzini Sept. 7, 2015, 4:11 p.m. UTC | #2
On 07/09/2015 17:49, Alex Bennée wrote:
> I'm not sure why x86 is the special snowflake in this case. It looks
> like a performance hack for emulation which I guess the other guests
> don't do.

Yes, upon MMIO accesses it modifies the instruction that caused the MMIO
itself, and then re-executes it.  Nice, huh?

Paolo
diff mbox

Patch

diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 1c3b5b6..a9a33fd 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -13,6 +13,7 @@ 
 #include "sysemu/kvm.h"
 #include "hw/i386/apic_internal.h"
 #include "hw/sysbus.h"
+#include "tcg/tcg.h"
 
 #define VAPIC_IO_PORT           0x7e