All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergio Lopez <slp@redhat.com>
To: qemu-devel@nongnu.org
Cc: ehabkost@redhat.com, Sergio Lopez <slp@redhat.com>,
	mst@redhat.com, lersek@redhat.com, kraxel@redhat.com,
	pbonzini@redhat.com, imammedo@redhat.com, sgarzare@redhat.com,
	philmd@redhat.com, rth@twiddle.net
Subject: [PATCH v7 08/12] hw/intc/apic: reject pic ints if isa_pic == NULL
Date: Tue,  8 Oct 2019 15:55:34 +0200	[thread overview]
Message-ID: <20191008135537.197867-9-slp@redhat.com> (raw)
In-Reply-To: <20191008135537.197867-1-slp@redhat.com>

In apic_accept_pic_intr(), reject PIC interruptions if a i8259 PIC has
not been instantiated (isa_pic == NULL).

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
---
 hw/intc/apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/intc/apic.c b/hw/intc/apic.c
index bce89911dc..2a74f7b4bf 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
@@ -610,7 +610,7 @@ int apic_accept_pic_intr(DeviceState *dev)
 
     if ((s->apicbase & MSR_IA32_APICBASE_ENABLE) == 0 ||
         (lvt0 & APIC_LVT_MASKED) == 0)
-        return 1;
+        return isa_pic != NULL;
 
     return 0;
 }
-- 
2.21.0



  parent reply	other threads:[~2019-10-08 14:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 13:55 [PATCH v7 00/12] Introduce the microvm machine type Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 01/12] hw/virtio: Factorize virtio-mmio headers Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 02/12] hw/i386/pc: rename functions shared with non-PC machines Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 03/12] hw/i386/pc: fix code style issues on functions that will be moved out Sergio Lopez
2019-10-10 11:40   ` Philippe Mathieu-Daudé
2019-10-08 13:55 ` [PATCH v7 04/12] hw/i386/pc: move shared x86 functions to x86.c and export them Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 05/12] hw/i386: split PCMachineState deriving X86MachineState from it Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 06/12] hw/i386: make x86.c independent from PCMachineState Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 07/12] fw_cfg: add "modify" functions for all types Sergio Lopez
2019-10-08 13:55 ` Sergio Lopez [this message]
2019-10-08 13:55 ` [PATCH v7 09/12] roms: add microvm-bios (qboot) as binary and git submodule Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 10/12] docs/microvm.rst: document the new microvm machine type Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 11/12] hw/i386: Introduce the " Sergio Lopez
2019-10-08 13:55 ` [PATCH v7 12/12] MAINTAINERS: add microvm related files Sergio Lopez
2019-10-10 11:40   ` Philippe Mathieu-Daudé
2019-10-09 19:26 ` [PATCH v7 00/12] Introduce the microvm machine type Michael S. Tsirkin
2019-10-09 21:13   ` Paolo Bonzini
2019-10-10  9:15   ` Sergio Lopez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191008135537.197867-9-slp@redhat.com \
    --to=slp@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sgarzare@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.