svn commit: r264509 - head/sys/amd64/vmm
tychon at FreeBSD.org
Tue Apr 15 17:06:27 UTC 2014
Date: Tue Apr 15 17:06:26 2014
New Revision: 264509
Local APIC access via 32-bit naturally-aligned loads is merely
suggested in the SDM. Since some OSes have implemented otherwise
don't be too rigorous in enforcing it.
Approved by: grehan (co-mentor)
--- head/sys/amd64/vmm/vmm_lapic.c Tue Apr 15 16:31:23 2014 (r264508)
+++ head/sys/amd64/vmm/vmm_lapic.c Tue Apr 15 17:06:26 2014 (r264509)
@@ -230,10 +230,12 @@ lapic_mmio_read(void *vm, int cpu, uint6
off = gpa - DEFAULT_APIC_BASE;
- * Memory mapped local apic accesses must be 4 bytes wide and
- * aligned on a 16-byte boundary.
+ * Memory mapped local apic accesses should be aligned on a
+ * 16-byte boundary. They are also suggested to be 4 bytes
+ * wide, alas not all OSes follow suggestions.
- if (size != 4 || off & 0xf)
+ off &= ~3;
+ if (off & 0xf)
vlapic = vm_lapic(vm, cpu);
More information about the svn-src-head