PCMachineState: introduce acpi_build_enabled field
PATCH v2 1/1 PCMachineState: introduce acpi_build_enabled field
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
---
Cc: Igor Mammedov <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Sander Eikelenboom <[email protected]>
v2:
1. drop acpi-build property
2. set acpi_build_enabled to acpi_has_build
3. replace acpi_has_build check in acpi_build()
--- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 2 ++ include/hw/i386/pc.h | 2 ++ xen-common.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-)
hw/i386/acpi-build.c +1 -1
@@ -2953,7 +2953,7 @@ void acpi_setup(void)return ; } -if (!pcmc->has_acpi_build) { +if (!pcms->acpi_build_enabled) {ACPI_BUILD_DPRINTF ("ACPI build disabled. Bailing out.\n" );return ; }
hw/i386/pc.c +2 -0
@@ -2159,6 +2159,8 @@ static void pc_machine_initfn(Object *obj) pcms->vmport =ON_OFF_AUTO_AUTO ;/* nvdimm is disabled on default. */ pcms->acpi_nvdimm_state.is_enabled = false; +/* acpi build is enabled by default if machine supports it */ + pcms->acpi_build_enabled =PC_MACHINE_GET_CLASS (pcms)->has_acpi_build; }static void pc_machine_reset (void )
include/hw/i386/pc.h +2 -0
@@ -62,6 +62,8 @@ struct PCMachineState {AcpiNVDIMMState acpi_nvdimm_state; +bool acpi_build_enabled; +/* RAM information (sizes, addresses, configuration): */ ram_addr_t below_4g_mem_size, above_4g_mem_size;
xen-common.c +6 -0
@@ -9,6 +9,7 @@*/ #include "qemu/osdep.h" +#include "hw/i386/pc.h" #include "hw/xen/xen_backend.h" #include "qmp-commands.h" #include "sysemu/char.h"
@@ -114,6 +115,11 @@ static void xen_change_state_handler(void *opaque, int running,static int xen_init (MachineState *ms) { +PCMachineState *pcms =PC_MACHINE (ms); + +/* Disable ACPI build because Xen handles it */ + pcms->acpi_build_enabled = false; + xen_xc =xc_interface_open (0 ,0 ,0 );if (xen_xc ==NULL ) {xen_pv_printf (NULL ,0 ,"can't open xen interface\n" );
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>
Hi Wei,
Just gave it a spin (backporting for xen-unstable wasn't too hard), and this also works for me !
--
Sander
Quoted 82 lines
---
Cc: Igor Mammedov <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Sander Eikelenboom <[email protected]>v2:
1. drop acpi-build property
2. setacpi_build_enabledtoacpi_has_build
3. replaceacpi_has_buildcheck inacpi_build()--- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 2 ++ include/hw/i386/pc.h | 2 ++ xen-common.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-)hw/i386/acpi-build.c +1
-1@@ -2953,7 +2953,7 @@ void acpi_setup(void)return ; } -if (!pcmc->has_acpi_build) { +if (!pcms->acpi_build_enabled) {ACPI_BUILD_DPRINTF ("ACPI build disabled. Bailing out.\n" );return ; }hw/i386/pc.c +2
-0@@ -2159,6 +2159,8 @@ static void pc_machine_initfn(Object *obj) pcms->vmport =ON_OFF_AUTO_AUTO ;/* nvdimm is disabled on default. */ pcms->acpi_nvdimm_state.is_enabled = false; +/* acpi build is enabled by default if machine supports it */ + pcms->acpi_build_enabled =PC_MACHINE_GET_CLASS (pcms)->has_acpi_build; }static void
pc_machine_reset(void)include/hw/i386/pc.h +2
-0@@ -62,6 +62,8 @@ struct PCMachineState {AcpiNVDIMMState acpi_nvdimm_state; +bool acpi_build_enabled; +/* RAM information (sizes, addresses, configuration): */ ram_addr_t below_4g_mem_size, above_4g_mem_size;xen-common.c +6
-0@@ -9,6 +9,7 @@*/ #include "qemu/osdep.h" +#include "hw/i386/pc.h" #include "hw/xen/xen_backend.h" #include "qmp-commands.h" #include "sysemu/char.h" @@ -114,6 +115,11 @@ static void xen_change_state_handler(void *opaque, int running, static int xen_init(MachineState *ms) { +PCMachineState *pcms =PC_MACHINE (ms); + +/* Disable ACPI build because Xen handles it */ + pcms->acpi_build_enabled = false; + xen_xc =xc_interface_open (0 ,0 ,0 );if (xen_xc ==NULL ) {
Quoted 1 line
xen_pv_printf(NULL, 0, "can't open xen interface\n");
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>
Hi Wei,
Just gave it a spin (backporting for xen-unstable wasn't too hard), and this also works for me !
--
Sander
Quoted 83 lines
---
Cc: Igor Mammedov <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Sander Eikelenboom <[email protected]>v2:
1. drop acpi-build property
2. setacpi_build_enabledtoacpi_has_build
3. replaceacpi_has_buildcheck inacpi_build()--- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 2 ++ include/hw/i386/pc.h | 2 ++ xen-common.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-)hw/i386/acpi-build.c +1
-1@@ -2953,7 +2953,7 @@ void acpi_setup(void)return ; } -if (!pcmc->has_acpi_build) { +if (!pcms->acpi_build_enabled) {ACPI_BUILD_DPRINTF ("ACPI build disabled. Bailing out.\n" );return ; }hw/i386/pc.c +2
-0@@ -2159,6 +2159,8 @@ static void pc_machine_initfn(Object *obj) pcms->vmport =ON_OFF_AUTO_AUTO ;/* nvdimm is disabled on default. */ pcms->acpi_nvdimm_state.is_enabled = false; +/* acpi build is enabled by default if machine supports it */ + pcms->acpi_build_enabled =PC_MACHINE_GET_CLASS (pcms)->has_acpi_build; }static void
pc_machine_reset(void)include/hw/i386/pc.h +2
-0@@ -62,6 +62,8 @@ struct PCMachineState {AcpiNVDIMMState acpi_nvdimm_state; +bool acpi_build_enabled; +/* RAM information (sizes, addresses, configuration): */ ram_addr_t below_4g_mem_size, above_4g_mem_size;xen-common.c +6
-0@@ -9,6 +9,7 @@*/ #include "qemu/osdep.h" +#include "hw/i386/pc.h" #include "hw/xen/xen_backend.h" #include "qmp-commands.h" #include "sysemu/char.h" @@ -114,6 +115,11 @@ static void xen_change_state_handler(void *opaque, int running, static int xen_init(MachineState *ms) { +PCMachineState *pcms =PC_MACHINE (ms); + +/* Disable ACPI build because Xen handles it */ + pcms->acpi_build_enabled = false; + xen_xc =xc_interface_open (0 ,0 ,0 );if (xen_xc ==NULL ) {xen_pv_printf(NULL, 0, "can't open xen interface\n");
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>
Quoted 83 lines
Cc Igor Mammedov <[email protected]>Cc Eduardo Habkost <[email protected]>Cc Anthony PERARD <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Sander Eikelenboom <[email protected]>v2:
1. drop acpi-build property
2. setacpi_build_enabledtoacpi_has_build
3. replaceacpi_has_buildcheck inacpi_build()--- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 2 ++ include/hw/i386/pc.h | 2 ++ xen-common.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-)hw/i386/acpi-build.c +1
-1@@ -2953,7 +2953,7 @@ void acpi_setup(void)return ; } -if (!pcmc->has_acpi_build) { +if (!pcms->acpi_build_enabled) {ACPI_BUILD_DPRINTF ("ACPI build disabled. Bailing out.\n" );return ; }hw/i386/pc.c +2
-0@@ -2159,6 +2159,8 @@ static void pc_machine_initfn(Object *obj) pcms->vmport =ON_OFF_AUTO_AUTO ;/* nvdimm is disabled on default. */ pcms->acpi_nvdimm_state.is_enabled = false; +/* acpi build is enabled by default if machine supports it */ + pcms->acpi_build_enabled =PC_MACHINE_GET_CLASS (pcms)->has_acpi_build; }static void pc_machine_reset (void )include/hw/i386/pc.h +2
-0@@ -62,6 +62,8 @@ struct PCMachineState {AcpiNVDIMMState acpi_nvdimm_state; +bool acpi_build_enabled; +/* RAM information (sizes, addresses, configuration): */ ram_addr_t below_4g_mem_size, above_4g_mem_size;xen-common.c +6
-0@@ -9,6 +9,7 @@*/ #include "qemu/osdep.h" +#include "hw/i386/pc.h" #include "hw/xen/xen_backend.h" #include "qmp-commands.h" #include "sysemu/char.h" @@ -114,6 +115,11 @@ static void xen_change_state_handler(void *opaque, int running,static int xen_init (MachineState *ms) { +PCMachineState *pcms =PC_MACHINE (ms); + +/* Disable ACPI build because Xen handles it */ + pcms->acpi_build_enabled = false; + xen_xc =xc_interface_open (0 ,0 ,0 );if (xen_xc ==NULL ) {xen_pv_printf (NULL ,0 ,"can't open xen interface\n" );Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>
Quoted 83 lines
Cc Igor Mammedov <[email protected]>Cc Eduardo Habkost <[email protected]>Cc Anthony PERARD <[email protected]>Cc Stefano Stabellini <[email protected]>Cc Sander Eikelenboom <[email protected]>v2:
1. drop acpi-build property
2. setacpi_build_enabledtoacpi_has_build
3. replaceacpi_has_buildcheck inacpi_build()--- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 2 ++ include/hw/i386/pc.h | 2 ++ xen-common.c | 6 ++++++ 4 files changed, 11 insertions(+), 1 deletion(-)hw/i386/acpi-build.c +1
-1@@ -2953,7 +2953,7 @@ void acpi_setup(void)return ; } -if (!pcmc->has_acpi_build) { +if (!pcms->acpi_build_enabled) {ACPI_BUILD_DPRINTF ("ACPI build disabled. Bailing out.\n" );return ; }hw/i386/pc.c +2
-0@@ -2159,6 +2159,8 @@ static void pc_machine_initfn(Object *obj) pcms->vmport =ON_OFF_AUTO_AUTO ;/* nvdimm is disabled on default. */ pcms->acpi_nvdimm_state.is_enabled = false; +/* acpi build is enabled by default if machine supports it */ + pcms->acpi_build_enabled =PC_MACHINE_GET_CLASS (pcms)->has_acpi_build; }static void pc_machine_reset (void )include/hw/i386/pc.h +2
-0@@ -62,6 +62,8 @@ struct PCMachineState {AcpiNVDIMMState acpi_nvdimm_state; +bool acpi_build_enabled; +/* RAM information (sizes, addresses, configuration): */ ram_addr_t below_4g_mem_size, above_4g_mem_size;xen-common.c +6
-0@@ -9,6 +9,7 @@*/ #include "qemu/osdep.h" +#include "hw/i386/pc.h" #include "hw/xen/xen_backend.h" #include "qmp-commands.h" #include "sysemu/char.h" @@ -114,6 +115,11 @@ static void xen_change_state_handler(void *opaque, int running,static int xen_init (MachineState *ms) { +PCMachineState *pcms =PC_MACHINE (ms); + +/* Disable ACPI build because Xen handles it */ + pcms->acpi_build_enabled = false; + xen_xc =xc_interface_open (0 ,0 ,0 );if (xen_xc ==NULL ) {xen_pv_printf (NULL ,0 ,"can't open xen interface\n" );Signature · 1 line
2.1.4
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>
Signature · 6 lines
Eduardo _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>
Signature · 1 line
Eduardo
Quoted 11 lines · Eduardo Habkost
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>
Thank you Eduardo. I can queue it up unless you have other stuff in progress.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Eduardo Habkost
Quoted 8 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by Wei Liu <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>
Thank you Eduardo. I can queue it up unless you have other stuff in progress.
Quoted 9 lines · Stefano Stabellini
Quoted 8 lines · Eduardo Habkost
Quoted 7 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>Thank you Eduardo. I can queue it up unless you have other stuff in progress.
I would like to backport this to qemu-xen tree, so it would be great if this patch can be merged in the next two weeks. Thanks!
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Eduardo Habkost
Acked-byQuoted 9 lines · Stefano Stabellini
Quoted 8 lines · Eduardo Habkost
Quoted 7 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>Thank you Eduardo. I can queue it up unless you have other stuff in progress.
In case you didn't queue it yet, please go ahead.
Signature · 6 lines
Eduardo _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Eduardo Habkost
Acked-byQuoted 9 lines · Stefano Stabellini
Quoted 8 lines · Eduardo Habkost
Quoted 7 lines · Wei Liu
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Wei Liu <[email protected]>Reviewed-by Eduardo Habkost <[email protected]>Thank you Eduardo. I can queue it up unless you have other stuff in progress.
In case you didn't queue it yet, please go ahead.
Signature · 1 line
Eduardo