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>
This commit is contained in:
Jan Kiszka 2010-02-03 21:16:41 +01:00 committed by Marcelo Tosatti
parent 19ccb8ea17
commit 03c63b9452
1 changed files with 3 additions and 0 deletions

View File

@ -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;