[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 15/16] pc: Move PcGuestInfo.apic_xrupt_override fiel
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PATCH 15/16] pc: Move PcGuestInfo.apic_xrupt_override field to PCMachineState |
Date: |
Tue, 1 Dec 2015 23:47:10 -0200 |
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/i386/acpi-build.c | 7 ++++---
hw/i386/pc.c | 2 +-
include/hw/i386/pc.h | 2 +-
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 7771be7..cdbe5b9 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -366,8 +366,9 @@ build_fadt(GArray *table_data, GArray *linker, AcpiPmInfo
*pm,
static void
build_madt(GArray *table_data, GArray *linker, AcpiCpuInfo *cpu,
- PcGuestInfo *guest_info)
+ PCMachineState *pcms)
{
+ PcGuestInfo *guest_info = &pcms->acpi_guest_info;
int madt_start = table_data->len;
AcpiMultipleApicTable *madt;
@@ -400,7 +401,7 @@ build_madt(GArray *table_data, GArray *linker, AcpiCpuInfo
*cpu,
io_apic->address = cpu_to_le32(IO_APIC_DEFAULT_ADDRESS);
io_apic->interrupt = cpu_to_le32(0);
- if (guest_info->apic_xrupt_override) {
+ if (pcms->apic_xrupt_override) {
intsrcovr = acpi_data_push(table_data, sizeof *intsrcovr);
intsrcovr->type = ACPI_APIC_XRUPT_OVERRIDE;
intsrcovr->length = sizeof(*intsrcovr);
@@ -1740,7 +1741,7 @@ void acpi_build(PCMachineState *pcms, AcpiBuildTables
*tables)
aml_len += tables_blob->len - ssdt;
acpi_add_table(table_offsets, tables_blob);
- build_madt(tables_blob, tables->linker, &cpu, guest_info);
+ build_madt(tables_blob, tables->linker, &cpu, pcms);
if (misc.has_hpet) {
acpi_add_table(table_offsets, tables_blob);
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index cdfdd52..f399d14 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1188,7 +1188,7 @@ PcGuestInfo *pc_guest_info_init(PCMachineState *pcms)
int i, j;
guest_info->apic_id_limit = pc_apic_id_limit(max_cpus);
- guest_info->apic_xrupt_override = kvm_allows_irq0_override();
+ pcms->apic_xrupt_override = kvm_allows_irq0_override();
guest_info->numa_nodes = nb_numa_nodes;
guest_info->node_mem = g_malloc0(guest_info->numa_nodes *
sizeof *guest_info->node_mem);
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index a175131..5ded182 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -23,7 +23,6 @@
/* Machine info for ACPI build: */
struct PcGuestInfo {
unsigned apic_id_limit;
- bool apic_xrupt_override;
uint64_t numa_nodes;
uint64_t *node_mem;
uint64_t *node_cpu;
@@ -51,6 +50,7 @@ struct PCMachineState {
PcGuestInfo acpi_guest_info;
Notifier machine_done;
FWCfgState *fw_cfg;
+ bool apic_xrupt_override;
};
#define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device"
--
2.1.0
- Re: [Qemu-devel] [PATCH 06/16] acpi: Save PCMachineState on AcpiBuildState, (continued)
- [Qemu-devel] [PATCH 07/16] acpi: Make acpi_build() get PCMachineState as argument, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 09/16] acpi: Remove ram size fields fron PcGuestInfo, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 08/16] acpi: Make build_srat() get PCMachineState as argument, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 10/16] pc: Move PcGuestInfo.fw_cfg field to PCMachineState, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 11/16] pc: Simplify signature of xen_load_linux(), Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 12/16] pc: Remove PcGuestInfo.isapc_ram_fw field, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 13/16] q35: Remove MCHPCIState.guest_info field, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 14/16] acpi: Use PCMachineClass fields directly, Eduardo Habkost, 2015/12/01
- [Qemu-devel] [PATCH 15/16] pc: Move PcGuestInfo.apic_xrupt_override field to PCMachineState,
Eduardo Habkost <=
- [Qemu-devel] [PATCH 16/16] pc: Move APIC and NUMA data from PcGuestInfo to PCMachineState, Eduardo Habkost, 2015/12/01
- Re: [Qemu-devel] [PATCH 00/16] pc: Eliminate struct PcGuestInfo, Marcel Apfelbaum, 2015/12/07