aboutsummaryrefslogtreecommitdiff
path: root/hw/i386
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-09-15 18:12:40 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-09-15 18:12:40 +0100
commit5f473241ac595452ae0638dc63e7af2a2294f5ec (patch)
tree1b9f7c7daf2b9866929f5fd6a4812ed1f64c9434 /hw/i386
parent518352b601997723bd03d928d1bb5854648942e8 (diff)
parent39c88f56977f9ad2451444d70dd21d8189d74f99 (diff)
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* Support multiple -d trace:PATTERN arguments (Daniel) * SCSI cleanups/fixes for removable meia (Fam) * SCSI security fixes (Li Qiang, PJP) * qemu-char segfault fix (Lin Ma) * "make help" and qemu-socket cleanups (Marc-André) * end of the buffer_is_zero reword (Richard) * Fix target-i386 syscall segfault (Stanislav) * split irqchip fix/robustification (Wanpeng) * misc cleanups (me, Jiangang) * x86 vmstate fixes (Pavel) # gpg: Signature made Thu 15 Sep 2016 14:11:35 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: pcspk: adding vmstate for save/restore kvmvapic: fix state change handler pc: apic: introduce APIC macro target-i386: Fixed syscall posssible segfault log: fix parsing of multiple trace:PATTERN log args qemu-char: avoid segfault if user lacks of permisson of a given logfile build-sys: add make 'help' target linux-user: complete omission of removing uses of strdup target-i386: fix ordering of fields in CPUX86State pc: apic: fix touch LAPIC when irqchip is split scsi: pvscsi: limit process IO loop to ring size memory: remove memory_region_destructor_rom_device Change net/socket.c to use socket_*() functions cutils: Rewrite x86 buffer zero checking scsi: mptsas: use g_new0 to allocate MPTSASRequest object virtio-scsi: Don't abort when media is ejected scsi-disk: Cleaning up around tray open state Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386')
-rw-r--r--hw/i386/kvmvapic.c1
-rw-r--r--hw/i386/pc.c18
2 files changed, 11 insertions, 8 deletions
diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c
index 3bf1ddd976..a1cd9b5a29 100644
--- a/hw/i386/kvmvapic.c
+++ b/hw/i386/kvmvapic.c
@@ -768,6 +768,7 @@ static void kvmvapic_vm_state_change(void *opaque, int running,
}
qemu_del_vm_change_state_handler(s->vmsentry);
+ s->vmsentry = NULL;
}
static int vapic_post_load(void *opaque, int version_id)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index e31f70f428..2d6d7920ff 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -161,13 +161,15 @@ int cpu_get_pic_interrupt(CPUX86State *env)
X86CPU *cpu = x86_env_get_cpu(env);
int intno;
- intno = apic_get_interrupt(cpu->apic_state);
- if (intno >= 0) {
- return intno;
- }
- /* read the irq from the PIC */
- if (!apic_accept_pic_intr(cpu->apic_state)) {
- return -1;
+ if (!kvm_irqchip_in_kernel()) {
+ intno = apic_get_interrupt(cpu->apic_state);
+ if (intno >= 0) {
+ return intno;
+ }
+ /* read the irq from the PIC */
+ if (!apic_accept_pic_intr(cpu->apic_state)) {
+ return -1;
+ }
}
intno = pic_read_irq(isa_pic);
@@ -180,7 +182,7 @@ static void pic_irq_request(void *opaque, int irq, int level)
X86CPU *cpu = X86_CPU(cs);
DPRINTF("pic_irqs: %s irq %d\n", level? "raise" : "lower", irq);
- if (cpu->apic_state) {
+ if (cpu->apic_state && !kvm_irqchip_in_kernel()) {
CPU_FOREACH(cs) {
cpu = X86_CPU(cs);
if (apic_accept_pic_intr(cpu->apic_state)) {