git: b48d1066d54b - stable/13 - madt_setup_local: skip further checks if ACPI DMAR table already disabled x2APIC

Konstantin Belousov kib at FreeBSD.org
Thu Jun 10 00:48:13 UTC 2021


The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=b48d1066d54b1a134cbf64f86c0bc2035fd08251

commit b48d1066d54b1a134cbf64f86c0bc2035fd08251
Author:     Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-06-02 22:01:28 +0000
Commit:     Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-06-10 00:47:50 +0000

    madt_setup_local: skip further checks if ACPI DMAR table already disabled x2APIC
    
    (cherry picked from commit a603d41aca48ff21df59967c55ddef181e16ec14)
---
 sys/x86/acpica/madt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c
index 5683f7eb321d..11c7b9de52d7 100644
--- a/sys/x86/acpica/madt.c
+++ b/sys/x86/acpica/madt.c
@@ -158,7 +158,9 @@ madt_setup_local(void)
 				reason = "by DMAR table";
 			acpi_unmap_table(dmartbl);
 		}
-		if (vm_guest == VM_GUEST_VMWARE) {
+		if (reason != NULL) {
+			/* Already disabled */
+		} else if (vm_guest == VM_GUEST_VMWARE) {
 			vmware_hvcall(VMW_HVCMD_GETVCPU_INFO, p);
 			if ((p[0] & VMW_VCPUINFO_VCPU_RESERVED) != 0 ||
 			    (p[0] & VMW_VCPUINFO_LEGACY_X2APIC) == 0)


More information about the dev-commits-src-all mailing list