Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Adding breaktrace & disabling timer migration"
[kvmfornfv.git]
/
qemu
/
hw
/
i386
/
kvmvapic.c
diff --git
a/qemu/hw/i386/kvmvapic.c
b/qemu/hw/i386/kvmvapic.c
index
c6d34b2
..
c69f374
100644
(file)
--- a/
qemu/hw/i386/kvmvapic.c
+++ b/
qemu/hw/i386/kvmvapic.c
@@
-8,6
+8,7
@@
* (at your option) any later version. See the COPYING file in the
* top-level directory.
*/
* (at your option) any later version. See the COPYING file in the
* top-level directory.
*/
+#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "sysemu/cpus.h"
#include "sysemu/kvm.h"
#include "sysemu/sysemu.h"
#include "sysemu/cpus.h"
#include "sysemu/kvm.h"
@@
-634,13
+635,18
@@
static int vapic_prepare(VAPICROMState *s)
static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
unsigned int size)
{
static void vapic_write(void *opaque, hwaddr addr, uint64_t data,
unsigned int size)
{
- CPUState *cs = current_cpu;
- X86CPU *cpu = X86_CPU(cs);
- CPUX86State *env = &cpu->env;
- hwaddr rom_paddr;
VAPICROMState *s = opaque;
VAPICROMState *s = opaque;
+ X86CPU *cpu;
+ CPUX86State *env;
+ hwaddr rom_paddr;
- cpu_synchronize_state(cs);
+ if (!current_cpu) {
+ return;
+ }
+
+ cpu_synchronize_state(current_cpu);
+ cpu = X86_CPU(current_cpu);
+ env = &cpu->env;
/*
* The VAPIC supports two PIO-based hypercalls, both via port 0x7E.
/*
* The VAPIC supports two PIO-based hypercalls, both via port 0x7E.