[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 1 of 2] Move acpi_enabled out of hvm_info_table into xenstore
# HG changeset patch # User Paul Durrant <paul.durrant@xxxxxxxxxx> # Date 1321612413 0 # Node ID 8a29891d6a98002b299d73253935c161ecf393a1 # Parent dbdc840f8f62db58321b5009e5e0f7833066386f 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> diff -r dbdc840f8f62 -r 8a29891d6a98 tools/firmware/hvmloader/hvmloader.c --- a/tools/firmware/hvmloader/hvmloader.c Wed Nov 16 18:21:14 2011 +0000 +++ b/tools/firmware/hvmloader/hvmloader.c Fri Nov 18 10:33:33 2011 +0000 @@ -423,6 +423,7 @@ int main(void) 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 @@ int main(void) 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 dbdc840f8f62 -r 8a29891d6a98 tools/libxc/xc_hvm_build.c --- a/tools/libxc/xc_hvm_build.c Wed Nov 16 18:21:14 2011 +0000 +++ b/tools/libxc/xc_hvm_build.c Fri Nov 18 10:33:33 2011 +0000 @@ -67,7 +67,6 @@ static void build_hvm_info(void *hvm_inf 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 dbdc840f8f62 -r 8a29891d6a98 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Wed Nov 16 18:21:14 2011 +0000 +++ b/tools/libxl/libxl_create.c Fri Nov 18 10:33:33 2011 +0000 @@ -188,6 +188,11 @@ int libxl__domain_build(libxl__gc *gc, 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 dbdc840f8f62 -r 8a29891d6a98 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Wed Nov 16 18:21:14 2011 +0000 +++ b/tools/libxl/libxl_dom.c Fri Nov 18 10:33:33 2011 +0000 @@ -248,7 +248,6 @@ static int hvm_build_set_params(xc_inter 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 dbdc840f8f62 -r 8a29891d6a98 tools/python/xen/lowlevel/xc/xc.c --- a/tools/python/xen/lowlevel/xc/xc.c Wed Nov 16 18:21:14 2011 +0000 +++ b/tools/python/xen/lowlevel/xc/xc.c Fri Nov 18 10:33:33 2011 +0000 @@ -996,7 +996,6 @@ static PyObject *pyxc_hvm_build(XcObject 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 dbdc840f8f62 -r 8a29891d6a98 xen/include/public/hvm/hvm_info_table.h --- a/xen/include/public/hvm/hvm_info_table.h Wed Nov 16 18:21:14 2011 +0000 +++ b/xen/include/public/hvm/hvm_info_table.h Fri Nov 18 10:33:33 2011 +0000 @@ -37,9 +37,6 @@ struct hvm_info_table { 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-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |