aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/hvm/vioapic.c
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-11-07 13:13:52 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-11-07 13:13:52 +0000
commit25f5b0ff1569004165e5dbdf2872f4e7617a5b60 (patch)
treeef3f256ea42e8f4672a9267ed2bb75bb7f75fb98 /xen/arch/x86/hvm/vioapic.c
parentbcc2aed22acbbe0d319e18f7e06c249c03daf100 (diff)
downloadxen-25f5b0ff1569004165e5dbdf2872f4e7617a5b60.tar.gz
xen-25f5b0ff1569004165e5dbdf2872f4e7617a5b60.tar.bz2
xen-25f5b0ff1569004165e5dbdf2872f4e7617a5b60.zip
[HVM] Replace shared-memory PIC state with a set-irq-level hypercall.
This simplifies the IRQ logic significantly and avoids the bogus hvm_pic_assist() on domain resume path. There is more work to be done here. At least: 1. set-irq-level should really be set-interrupt-wire-level. Wire state needs to be distinguished from PIC (in particular, PIC IRR) state. 2. Hypercalls can be batched in qemu and pushed down in one multicall. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/hvm/vioapic.c')
-rw-r--r--xen/arch/x86/hvm/vioapic.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c
index 0ed6463045..d470475f55 100644
--- a/xen/arch/x86/hvm/vioapic.c
+++ b/xen/arch/x86/hvm/vioapic.c
@@ -526,22 +526,6 @@ static void service_ioapic(hvm_vioapic_t *s)
}
}
-void hvm_vioapic_do_irqs(struct domain *d, uint16_t irqs)
-{
- hvm_vioapic_t *s = &(d->arch.hvm_domain.vioapic);
-
- s->irr |= irqs & ~s->imr;
- service_ioapic(s);
-}
-
-void hvm_vioapic_do_irqs_clear(struct domain *d, uint16_t irqs)
-{
- hvm_vioapic_t *s = &(d->arch.hvm_domain.vioapic);
-
- s->irr &= ~irqs;
- service_ioapic(s);
-}
-
void hvm_vioapic_set_xen_irq(struct domain *d, int irq, int level)
{
hvm_vioapic_t *s = &d->arch.hvm_domain.vioapic;
@@ -565,12 +549,10 @@ void hvm_vioapic_set_irq(struct domain *d, int irq, int level)
HVM_DBG_LOG(DBG_LEVEL_IOAPIC, "ioapic_set_irq "
"irq %x level %x\n", irq, level);
- if (irq < 0 || irq >= IOAPIC_NUM_PINS) {
- printk("ioapic_set_irq irq %x is illegal\n", irq);
- domain_crash_synchronous();
- }
+ if ( (irq < 0) || (irq >= IOAPIC_NUM_PINS) )
+ return;
- if (!IOAPICEnabled(s) || s->redirtbl[irq].RedirForm.mask)
+ if ( !IOAPICEnabled(s) || s->redirtbl[irq].RedirForm.mask )
return;
HVM_DBG_LOG(DBG_LEVEL_IOAPIC, "hvm_vioapic_set_irq entry %x "