From e8524f01b12a101381ebf072c8430e8ce49e383d Mon Sep 17 00:00:00 2001
From: Roger Pau Monne <roger.pau@citrix.com>
Date: Thu, 19 Jun 2014 13:05:54 +0200
Subject: [PATCH v5 05/29] xen: change quality of the MADT ACPI enumerator

Lower the quality of the MADT ACPI enumerator, so on Xen Dom0 we can
force the usage of the Xen mptable enumerator even when ACPI is
detected.

This is needed because Xen might restrict the number of vCPUs
available to Dom0, but the MADT ACPI table parsed in FreeBSD is the
native one (which enumerates all the CPUs available in the system).

Sponsored by: Citrix Systems R&D
Reviewed by: xxx
Approved by: xxx

x86/acpica/madt.c:
 - Lower MADT enumerator quality to -50.

x86/xen/pvcpu_enum.c:
 - Rise Xen PV enumerator to 0.
---
 sys/x86/acpica/madt.c    |    2 +-
 sys/x86/xen/pvcpu_enum.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c
index bf0aba6..d894d14 100644
--- a/sys/x86/acpica/madt.c
+++ b/sys/x86/acpica/madt.c
@@ -102,7 +102,7 @@ madt_probe(void)
 	madt_physaddr = acpi_find_table(ACPI_SIG_MADT);
 	if (madt_physaddr == 0)
 		return (ENXIO);
-	return (0);
+	return (-50);
 }
 
 /*
diff --git a/sys/x86/xen/pvcpu_enum.c b/sys/x86/xen/pvcpu_enum.c
index df092cb..30e6803 100644
--- a/sys/x86/xen/pvcpu_enum.c
+++ b/sys/x86/xen/pvcpu_enum.c
@@ -67,7 +67,7 @@ static struct apic_enumerator xenpv_enumerator = {
 static int
 xenpv_probe(void)
 {
-	return (-100);
+	return (0);
 }
 
 /*
-- 
1.7.7.5 (Apple Git-26)

