Date: Tue, 15 Apr 2014 17:06:26 +0000 (UTC) From: Tycho Nightingale <tychon@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r264509 - head/sys/amd64/vmm Message-ID: <201404151706.s3FH6Q5f035276@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tychon Date: Tue Apr 15 17:06:26 2014 New Revision: 264509 URL: http://svnweb.freebsd.org/changeset/base/264509 Log: 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) Modified: head/sys/amd64/vmm/vmm_lapic.c Modified: head/sys/amd64/vmm/vmm_lapic.c ============================================================================== --- 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) return (EINVAL); vlapic = vm_lapic(vm, cpu);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404151706.s3FH6Q5f035276>