aboutsummaryrefslogtreecommitdiffstats
path: root/hw/vmport.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2010-02-03 21:16:41 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2010-02-03 19:47:34 -0200
commit03c63b945239dc4abcf3a687beda6eb3b0cd69bc (patch)
tree481cc7a0bb902df8a251daa1aac457229a309dbc /hw/vmport.c
parent19ccb8ea1799f6f29ba5bc37d5f18dc8050d4029 (diff)
KVM: Make vmport KVM-compatible
The vmport "device" accesses the VCPU registers, so it requires proper cpu_synchronize_state. Add it to vmport_ioport_read, which also synchronizes vmport_ioport_write. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'hw/vmport.c')
-rw-r--r--hw/vmport.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/vmport.c b/hw/vmport.c
index 884af3fd9..6c9d7c965 100644
--- a/hw/vmport.c
+++ b/hw/vmport.c
@@ -25,6 +25,7 @@
#include "isa.h"
#include "pc.h"
#include "sysemu.h"
+#include "kvm.h"
//#define VMPORT_DEBUG
@@ -58,6 +59,8 @@ static uint32_t vmport_ioport_read(void *opaque, uint32_t addr)
unsigned char command;
uint32_t eax;
+ cpu_synchronize_state(env);
+
eax = env->regs[R_EAX];
if (eax != VMPORT_MAGIC)
return eax;