Revert "hvmloader, libxl: use the correct ACPI settings depending on device model"
authorWei Liu <wei.liu2@citrix.com>
Tue, 29 Aug 2017 14:02:54 +0000 (15:02 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 29 Aug 2017 14:02:54 +0000 (15:02 +0100)
This reverts commit 149c6bbbf775b5e6dd6beae329fcdaab33a0f8cd.

tools/firmware/hvmloader/hvmloader.c
tools/firmware/hvmloader/ovmf.c
tools/firmware/hvmloader/rombios.c
tools/firmware/hvmloader/seabios.c
tools/firmware/hvmloader/util.c
tools/firmware/hvmloader/util.h
tools/libxl/libxl_create.c

index db11ab185a1b474761406724da72cb37a9eb9830..f603f68dedb957ca37d322de6e2674c7461c5e0e 100644 (file)
@@ -405,6 +405,8 @@ int main(void)
         }
 
         acpi_enable_sci();
+
+        hvm_param_set(HVM_PARAM_ACPI_IOPORTS_LOCATION, 1);
     }
 
     init_vm86_tss();
index 17bd0fe95f38c6ee7b8e79dcdd337f8095b0c0bf..4ff7f1d544d4fdda044063a23710ac69a809fa76 100644 (file)
@@ -41,6 +41,9 @@
 #define LOWCHUNK_MAXOFFSET      0x0000FFFF
 #define OVMF_INFO_PHYSICAL_ADDRESS 0x00001000
 
+extern unsigned char dsdt_anycpu_qemu_xen[];
+extern int dsdt_anycpu_qemu_xen_len;
+
 #define OVMF_INFO_MAX_TABLES 4
 struct ovmf_info {
     char signature[14]; /* XenHVMOVMF\0\0\0\0 */
@@ -124,8 +127,6 @@ static void ovmf_acpi_build_tables(void)
         .dsdt_15cpu_len = 0
     };
 
-    hvm_param_set(HVM_PARAM_ACPI_IOPORTS_LOCATION, 1);
-
     hvmloader_acpi_build_tables(&config, ACPI_PHYSICAL_ADDRESS);
 }
 
index b14d1f2af3f82829c5a296c644a6730ed560126e..56b39b7d585c13fe607d5d9679820c3237139699 100644 (file)
@@ -42,6 +42,9 @@
 #define ROMBIOS_MAXOFFSET      0x0000FFFF
 #define ROMBIOS_END            (ROMBIOS_BEGIN + ROMBIOS_SIZE)
 
+extern unsigned char dsdt_anycpu[], dsdt_15cpu[];
+extern int dsdt_anycpu_len, dsdt_15cpu_len;
+
 static void rombios_setup_e820(void)
 {
     /*
@@ -178,8 +181,6 @@ static void rombios_acpi_build_tables(void)
         .dsdt_15cpu_len = dsdt_15cpu_len,
     };
 
-    hvm_param_set(HVM_PARAM_ACPI_IOPORTS_LOCATION, 0);
-
     hvmloader_acpi_build_tables(&config, ACPI_PHYSICAL_ADDRESS);
 }
 
index c8792cd42b49df70312278d2f0435f664427d70c..870576ae7f8da94c4c8d2f76d236133481c9e82f 100644 (file)
@@ -28,7 +28,9 @@
 
 #include <acpi2_0.h>
 #include <libacpi.h>
-#include <xen/hvm/params.h>
+
+extern unsigned char dsdt_anycpu_qemu_xen[];
+extern int dsdt_anycpu_qemu_xen_len;
 
 struct seabios_info {
     char signature[14]; /* XenHVMSeaBIOS\0 */
@@ -97,8 +99,6 @@ static void seabios_acpi_build_tables(void)
         .dsdt_15cpu_len = 0,
     };
 
-    hvm_param_set(HVM_PARAM_ACPI_IOPORTS_LOCATION, 1);
-
     hvmloader_acpi_build_tables(&config, rsdp);
     add_table(rsdp);
 }
index 934b566a5dbb7f360d7cda14ae6c07eb5129129c..db5f240bb9c7631dc265677e3adf71896266f261 100644 (file)
@@ -897,27 +897,6 @@ void hvmloader_acpi_build_tables(struct acpi_config *config,
     /* Allocate and initialise the acpi info area. */
     mem_hole_populate_ram(ACPI_INFO_PHYSICAL_ADDRESS >> PAGE_SHIFT, 1);
 
-    /* If the device model is specified switch to the corresponding tables */
-    s = xenstore_read("platform/device-model", "");
-    if ( !strncmp(s, "qemu_xen_traditional", 21) )
-    {
-        config->dsdt_anycpu = dsdt_anycpu;
-        config->dsdt_anycpu_len = dsdt_anycpu_len;
-        config->dsdt_15cpu = dsdt_15cpu;
-        config->dsdt_15cpu_len = dsdt_15cpu_len;
-
-        hvm_param_set(HVM_PARAM_ACPI_IOPORTS_LOCATION, 0);
-    }
-    else if ( !strncmp(s, "qemu_xen", 9) )
-    {
-        config->dsdt_anycpu = dsdt_anycpu_qemu_xen;
-        config->dsdt_anycpu_len = dsdt_anycpu_qemu_xen_len;
-        config->dsdt_15cpu = NULL;
-        config->dsdt_15cpu_len = 0;
-
-        hvm_param_set(HVM_PARAM_ACPI_IOPORTS_LOCATION, 1);
-    }
-
     config->lapic_base_address = LAPIC_BASE_ADDRESS;
     config->lapic_id = acpi_lapic_id;
     config->ioapic_base_address = ioapic_base_address;
index 874916c09c2c0966f9c7d5441d6d45a69cc49807..6062f0b8cf2a4e07cb234373b519236c70226508 100644 (file)
@@ -276,9 +276,6 @@ extern struct e820map memory_map;
 bool check_overlap(uint64_t start, uint64_t size,
                    uint64_t reserved_start, uint64_t reserved_size);
 
-extern unsigned char dsdt_anycpu_qemu_xen[], dsdt_anycpu[], dsdt_15cpu[];
-extern int dsdt_anycpu_qemu_xen_len, dsdt_anycpu_len, dsdt_15cpu_len;
-
 struct acpi_config;
 void hvmloader_acpi_build_tables(struct acpi_config *config,
                                  unsigned int physical);
index 1d24209242a35c99c10e449b5a13747fca129b60..1158303e1a03aaecd90bf129dda12213eb266b01 100644 (file)
@@ -451,7 +451,7 @@ int libxl__domain_build(libxl__gc *gc,
         vments[4] = "start_time";
         vments[5] = GCSPRINTF("%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
 
-        localents = libxl__calloc(gc, 13, sizeof(char *));
+        localents = libxl__calloc(gc, 11, sizeof(char *));
         i = 0;
         localents[i++] = "platform/acpi";
         localents[i++] = libxl__acpi_defbool_val(info) ? "1" : "0";
@@ -472,8 +472,6 @@ int libxl__domain_build(libxl__gc *gc,
                                    info->u.hvm.mmio_hole_memkb << 10);
             }
         }
-        localents[i++] = "platform/device-model";
-        localents[i++] = (char *) libxl_device_model_version_to_string(info->device_model_version);
 
         break;
     case LIBXL_DOMAIN_TYPE_PV: