| Submitter | Alexander Graf |
|---|---|
| Date | July 21, 2011, 1:27 a.m. |
| Message ID | <1311211654-14326-8-git-send-email-agraf@suse.de> |
| Download | mbox | patch |
| Permalink | /patch/105985/ |
| State | New |
| Headers | show |
Comments
On Thu, 21 Jul 2011 03:27:18 +0200 Alexander Graf <agraf@suse.de> wrote: > The current code treats some bits in IDE as special for critical interrupts. > While there is logic to route interrupts as critical, that happens through > a different register. So for now I'm just removing the check to enable up to 32 > virtual CPUs. This depends on the MPIC version. The behavior should match what we advertise to the guest. -Scott
On 21.07.2011, at 18:49, Scott Wood wrote: > On Thu, 21 Jul 2011 03:27:18 +0200 > Alexander Graf <agraf@suse.de> wrote: > >> The current code treats some bits in IDE as special for critical interrupts. >> While there is logic to route interrupts as critical, that happens through >> a different register. So for now I'm just removing the check to enable up to 32 >> virtual CPUs. > > This depends on the MPIC version. The behavior should match what we > advertise to the guest. Ah, good to know! That's why I couldn't find it in the spec I was looking at :). So we should clearly limit the number of CPUs then to whatever fits into that field. Alex
Patch
diff --git a/hw/openpic.c b/hw/openpic.c index 08a3a65..6630206 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -1278,14 +1278,7 @@ qemu_irq *openpic_init (PCIBus *bus, int *pmem_index, int nb_cpus, static void mpic_irq_raise(openpic_t *mpp, int n_CPU, IRQ_src_t *src) { - int n_ci = IDR_CI0 - n_CPU; - - if(test_bit(&src->ide, n_ci)) { - qemu_irq_raise(mpp->dst[n_CPU].irqs[OPENPIC_OUTPUT_CINT]); - } - else { - qemu_irq_raise(mpp->dst[n_CPU].irqs[OPENPIC_OUTPUT_INT]); - } + qemu_irq_raise(mpp->dst[n_CPU].irqs[OPENPIC_OUTPUT_INT]); } static void mpic_reset (void *opaque)
The current code treats some bits in IDE as special for critical interrupts. While there is logic to route interrupts as critical, that happens through a different register. So for now I'm just removing the check to enable up to 32 virtual CPUs. Signed-off-by: Alexander Graf <agraf@suse.de> --- hw/openpic.c | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-)