[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] hvmloader: Move acpi_enabled out of hvm_info_table into xenstore
# HG changeset patch # User Paul Durrant <paul.durrant@xxxxxxxxxx> # Date 1321623103 0 # Node ID 4fa1c13f8bb1286c5090b8260e12e67ef7618f5f # Parent 7b5e1cb94bfa43a9268479b9a255fb88c07e4ce2 hvmloader: Move acpi_enabled out of hvm_info_table into xenstore Since hvmloader has a xentore client, use a platform key in xenstore to indicate whether ACPI is enabled or not rather than the shared hvm_info_table structure. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> Committed-by: Keir Fraser <keir@xxxxxxx> --- diff -r 7b5e1cb94bfa -r 4fa1c13f8bb1 tools/firmware/hvmloader/hvmloader.c --- a/tools/firmware/hvmloader/hvmloader.c Fri Nov 18 09:22:45 2011 +0100 +++ b/tools/firmware/hvmloader/hvmloader.c Fri Nov 18 13:31:43 2011 +0000 @@ -423,6 +423,7 @@ const struct bios_config *bios; int option_rom_sz = 0, vgabios_sz = 0, etherboot_sz = 0; uint32_t etherboot_phys_addr = 0, option_rom_phys_addr = 0; + int acpi_enabled; /* Initialise hypercall stubs with RET, rendering them no-ops. */ memset((void *)HYPERCALL_PHYSICAL_ADDRESS, 0xc3 /* RET */, PAGE_SIZE); @@ -506,7 +507,9 @@ option_rom_phys_addr); } - if ( hvm_info->acpi_enabled ) + acpi_enabled = !strncmp(xenstore_read("platform/acpi", "1"), "1", 1); + + if ( acpi_enabled ) { struct xen_hvm_param p = { .domid = DOMID_SELF, diff -r 7b5e1cb94bfa -r 4fa1c13f8bb1 tools/libxc/xc_hvm_build.c --- a/tools/libxc/xc_hvm_build.c Fri Nov 18 09:22:45 2011 +0100 +++ b/tools/libxc/xc_hvm_build.c Fri Nov 18 13:31:43 2011 +0000 @@ -67,7 +67,6 @@ hvm_info->length = sizeof(struct hvm_info_table); /* Sensible defaults: these can be overridden by the caller. */ - hvm_info->acpi_enabled = 1; hvm_info->apic_mode = 1; hvm_info->nr_vcpus = 1; memset(hvm_info->vcpu_online, 0xff, sizeof(hvm_info->vcpu_online)); diff -r 7b5e1cb94bfa -r 4fa1c13f8bb1 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Fri Nov 18 09:22:45 2011 +0100 +++ b/tools/libxl/libxl_create.c Fri Nov 18 13:31:43 2011 +0000 @@ -188,6 +188,11 @@ vments[3] = "hvm"; vments[4] = "start_time"; vments[5] = libxl__sprintf(gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000); + + localents = libxl__calloc(gc, 3, sizeof(char *)); + localents[0] = "platform/acpi"; + localents[1] = (info->u.hvm.acpi) ? "1" : "0"; + break; case LIBXL_DOMAIN_TYPE_PV: ret = libxl__build_pv(gc, domid, info, state); diff -r 7b5e1cb94bfa -r 4fa1c13f8bb1 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Fri Nov 18 09:22:45 2011 +0100 +++ b/tools/libxl/libxl_dom.c Fri Nov 18 13:31:43 2011 +0000 @@ -248,7 +248,6 @@ return -1; va_hvm = (struct hvm_info_table *)(va_map + HVM_INFO_OFFSET); - va_hvm->acpi_enabled = info->u.hvm.acpi; va_hvm->apic_mode = info->u.hvm.apic; va_hvm->nr_vcpus = info->max_vcpus; memcpy(va_hvm->vcpu_online, &info->cur_vcpus, sizeof(info->cur_vcpus)); diff -r 7b5e1cb94bfa -r 4fa1c13f8bb1 tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c Fri Nov 18 09:22:45 2011 +0100 +++ b/tools/python/xen/lowlevel/xc/xc.c Fri Nov 18 13:31:43 2011 +0000 @@ -996,7 +996,6 @@ if ( va_map == NULL ) return PyErr_SetFromErrno(xc_error_obj); va_hvm = (struct hvm_info_table *)(va_map + HVM_INFO_OFFSET); - va_hvm->acpi_enabled = acpi; va_hvm->apic_mode = apic; va_hvm->nr_vcpus = vcpus; memcpy(va_hvm->vcpu_online, vcpu_avail, sizeof(vcpu_avail)); diff -r 7b5e1cb94bfa -r 4fa1c13f8bb1 xen/include/public/hvm/hvm_info_table.h --- a/xen/include/public/hvm/hvm_info_table.h Fri Nov 18 09:22:45 2011 +0100 +++ b/xen/include/public/hvm/hvm_info_table.h Fri Nov 18 13:31:43 2011 +0000 @@ -37,9 +37,6 @@ uint32_t length; uint8_t checksum; - /* Should firmware build ACPI tables? */ - uint8_t acpi_enabled; - /* Should firmware build APIC descriptors (APIC MADT / MP BIOS)? */ uint8_t apic_mode; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |