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);
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,
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));
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);
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));
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));
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;