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)
This commit is contained in:
parent
e9d7536fae
commit
bbe78c2d72
@ -230,10 +230,12 @@ lapic_mmio_read(void *vm, int cpu, uint64_t gpa, uint64_t *rval, int size,
|
||||
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)
|
||||
return (EINVAL);
|
||||
|
||||
vlapic = vm_lapic(vm, cpu);
|
||||
|
Loading…
x
Reference in New Issue
Block a user