diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-05-02 16:46:02 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-05-02 16:46:02 +0200 |
commit | d1222afda4d27916580c28533762e362d64ace22 (patch) | |
tree | bb948d8c28906c1ad2fc11d80f64748631352052 /xen/arch/x86/io_apic.c | |
parent | b8efae696c9a2d46e91fa0eda739427efc16c250 (diff) | |
download | xen-d1222afda4d27916580c28533762e362d64ace22.tar.gz xen-d1222afda4d27916580c28533762e362d64ace22.tar.bz2 xen-d1222afda4d27916580c28533762e362d64ace22.zip |
x86: allow Dom0 read-only access to IO-APICs
There are BIOSes that want to map the IO-APIC MMIO region from some
ACPI method(s), and there is at least one BIOS flavor that wants to
use this mapping to clear an RTE's mask bit. While we can't allow the
latter, we can permit reads and simply drop write attempts, leveraging
the already existing infrastructure introduced for dealing with AMD
IOMMUs' representation as PCI devices.
This fixes an interrupt setup problem on a system where _CRS evaluation
involved the above described BIOS/ACPI behavior, and is expected to
also deal with a boot time crash of pv-ops Linux upon encountering the
same kind of system.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/io_apic.c')
-rw-r--r-- | xen/arch/x86/io_apic.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index b5c4c5b732..66c532a047 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2507,6 +2507,11 @@ void __init init_ioapic_mappings(void) reg_01.raw = io_apic_read(i, 1); nr_ioapic_entries[i] = reg_01.bits.entries + 1; nr_irqs_gsi += nr_ioapic_entries[i]; + + if ( rangeset_add_singleton(mmio_ro_ranges, + ioapic_phys >> PAGE_SHIFT) ) + printk(KERN_ERR "Failed to mark IO-APIC page %lx read-only\n", + ioapic_phys); } } |