acpi: don't build acpi tables for xen hvm guests
RFC PATCH 1/1 acpi: don't build acpi tables for xen hvm guests
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>
RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)
hw/i386/acpi-build.c +6 -0
@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h"
@@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);acpi_set_pci_info ();
Signature · 1 line
2.1.4
CC'ing maintainers
Quoted 9 lines · Wei Liu
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>
Hi Wei,
thanks for the patch. I think the right fix is to set
pcmc->has_acpi_build = false
for the xenfv machine and for the PC machine when accel=xen.
Thoughts?
Quoted 35 lines
Cc Anthony PERARD <[email protected]>Cc Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);acpi_set_pci_info ();Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
CC'ing maintainers
Quoted 9 lines · Wei Liu
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>
Hi Wei,
thanks for the patch. I think the right fix is to set
pcmc->has_acpi_build = false
for the xenfv machine and for the PC machine when accel=xen.
Thoughts?
Quoted 35 lines
Cc Anthony PERARD <[email protected]>Cc Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);acpi_set_pci_info ();Signature · 1 line
2.1.4
Quoted 13 lines · Stefano Stabellini
CC'ing maintainers
Quoted 9 lines · Wei Liu
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>
Quoted 9 lines
Hi Wei,
thanks for the patch. I think the right fix is to set
pcmc->has_acpi_build= falsefor the xenfv machine and for the PC machine when accel=xen.
Thoughts?
This sounds like a better idea to me.
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 17 lines · Wei Liu
Quoted 16 lines · Stefano Stabellini
CC'ing maintainers
Quoted 9 lines · Wei Liu
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Hi Wei,
thanks for the patch. I think the right fix is to set
Quoted 8 lines
Quoted 6 lines
pcmc->has_acpi_build= falsefor the xenfv machine and for the PC machine when accel=xen.
Thoughts?
This sounds like a better idea to me.
As we shouldn't change PCMachineClass::has_acpi_build outside class_init, to make accel=xen disable it you'll probably need a new PCMachineState field.
Signature · 6 lines
Eduardo _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 17 lines · Wei Liu
Quoted 16 lines · Stefano Stabellini
CC'ing maintainers
Quoted 9 lines · Wei Liu
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Hi Wei,
thanks for the patch. I think the right fix is to set
Quoted 8 lines
Quoted 6 lines
pcmc->has_acpi_build= falsefor the xenfv machine and for the PC machine when accel=xen.
Thoughts?
This sounds like a better idea to me.
As we shouldn't change PCMachineClass::has_acpi_build outside class_init, to make accel=xen disable it you'll probably need a new PCMachineState field.
Signature · 1 line
Eduardo
Quoted 9 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>
Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.
Quoted 23 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +1
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ;
hw/i386/acpi-build.c void acpi_setup(void) · line 2876
Quoted 10 lines
hw/i386/acpi-build.c +5
-0} +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);acpi_set_pci_info ();
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.
It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Direct kernel boot causes fw_cfg to be filled in. pcms->has_acpi_build defaults to true and acpi_enabled is also true. These make all checks in acpi_setup pass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.
Wei.
Quoted 34 lines
Quoted 33 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);acpi_set_pci_info ();
Quoted 25 lines · Wei Liu
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 5 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.
What if libxl passes -no-acpi to QEMU?
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);
Quoted 3 lines
Quoted 2 lines
hw/i386/acpi-build.c void acpi_setup(void) · line 2876
Quoted 1 line
hw/i386/acpi-build.c +0
-0acpi_set_pci_info ();
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 25 lines · Wei Liu
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 5 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.
What if libxl passes -no-acpi to QEMU?
Quoted 35 lines
Quoted 34 lines
Quoted 33 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);acpi_set_pci_info ();
Quoted 26 lines · Stefano Stabellini
Quoted 25 lines · Wei Liu
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Quoted 5 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.What if libxl passes -no-acpi to QEMU?
Of course even if that works, I think we should still fix this properly in QEMU
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
Quoted 32 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
hw/i386/acpi-build.c void acpi_setup(void) · line 2876
Quoted 1 line
hw/i386/acpi-build.c +0
-0acpi_set_pci_info ();
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
would something like this work for you?
hw/i386/pc_piix.c +3 -0
@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; } DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);
Quoted 3 lines
Quoted 2 lines
hw/i386/acpi-build.c void acpi_setup(void) · line 2876
Quoted 1 line
hw/i386/acpi-build.c +0
-0acpi_set_pci_info ();
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3 -0
@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; } DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines
---
Cc: Anthony PERARD <[email protected]>
Cc: Stefano Stabellini <[email protected]>RFC because I'm not sure this is the best way to fix it.
--- hw/i386/acpi-build.c | 6 ++++++ 1 file changed, 6 insertions(+)hw/i386/acpi-build.c +6
-0@@ -45,6 +45,7 @@#include "sysemu/tpm_backend.h" #include "hw/timer/mc146818rtc_regs.h" #include "sysemu/numa.h" +#include "hw/xen/xen.h" /* Supported chipsets: */ #include "hw/acpi/piix4.h" @@ -2865,6 +2866,11 @@ void acpi_setup(void)return ; } +if (xen_enabled ()) { +ACPI_BUILD_DPRINTF ("Xen enabled. Bailing out.\n" ); +return ; + } + build_state =g_malloc0 (sizeof *build_state);
Quoted 3 lines
Quoted 2 lines
hw/i386/acpi-build.c void acpi_setup(void) · line 2876
Quoted 1 line
hw/i386/acpi-build.c +0
-0acpi_set_pci_info ();
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Cc Sander
Quoted 46 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +0
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) {
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 10 lines
hw/i386/pc_piix.c +3
-0+PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; } DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
Yes, it does.
(I have a similar patch in my queue already)
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 57 lines · Wei Liu
Cc Sander
Quoted 54 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; }
Quoted 7 lines
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 2 lines
hw/i386/pc_piix.c +0
-0DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,Yes, it does.
(I have a similar patch in my queue already)
Oh, the reason I didn't send it out is because Eduardo suggested we should use a new field instead of setting has_acpi_build outside of PCMachineClass init function.
I have actually gotten around to investigate this option and what is needed to be done.
Wei.
Quoted 1 line
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 66 lines · On Thu, 27 Oct 2016 12:10:58 +0100 Wei Liu <[email protected]> wrote:
Quoted 57 lines · Wei Liu
Cc Sander
Quoted 54 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; }Quoted 7 lines
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 2 lines
hw/i386/pc_piix.c +0
-0DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,Yes, it does.
(I have a similar patch in my queue already)
Quoted 6 lines
Oh, the reason I didn't send it out is because Eduardo suggested we should use a new field instead of setting
has_acpi_buildoutside of PCMachineClass init function.I have actually gotten around to investigate this option and what is needed to be done.
static void xenfv_machine_options(MachineClass *m) {
...
}
DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
xenfv_machine_options);
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
MachineClass *mc = MACHINE_CLASS(oc); \
optsfn(mc); \
mc->init = initfn; \
} \ ...
So xenfv_machine_options() is a part of pc_machine_xenfv_class_init()
Quoted 90 lines · Igor Mammedov
Quoted 66 lines · On Thu, 27 Oct 2016 12:10:58 +0100 Wei Liu <[email protected]> wrote:
Quoted 57 lines · Wei Liu
Cc Sander
Quoted 54 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; }Quoted 7 lines
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 2 lines
hw/i386/pc_piix.c +0
-0DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,Yes, it does.
(I have a similar patch in my queue already)
Quoted 6 lines
Oh, the reason I didn't send it out is because Eduardo suggested we should use a new field instead of setting
has_acpi_buildoutside of PCMachineClass init function.I have actually gotten around to investigate this option and what is needed to be done.
static void
xenfv_machine_options(MachineClass *m){
...
}DEFINE_PC_MACHINE(xenfv, "xenfv",
pc_xen_hvm_init,xenfv_machine_options);#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ optsfn(mc); \ mc->init = initfn; \ } \
Quoted 3 lines
...
So
xenfv_machine_options()is a part ofpc_machine_xenfv_class_init()
Ah, so your (and mine) patch already fits the bill. Thanks for looking into this.
Are you going to submit a proper patch or do you want me to?
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 90 lines · Igor Mammedov
Quoted 66 lines · On Thu, 27 Oct 2016 12:10:58 +0100 Wei Liu <[email protected]> wrote:
Quoted 57 lines · Wei Liu
Cc Sander
Quoted 54 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; }Quoted 7 lines
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 2 lines
hw/i386/pc_piix.c +0
-0DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,Yes, it does.
(I have a similar patch in my queue already)
Quoted 6 lines
Oh, the reason I didn't send it out is because Eduardo suggested we should use a new field instead of setting
has_acpi_buildoutside of PCMachineClass init function.I have actually gotten around to investigate this option and what is needed to be done.
static void
xenfv_machine_options(MachineClass *m){
...
}DEFINE_PC_MACHINE(xenfv, "xenfv",
pc_xen_hvm_init,xenfv_machine_options);#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ optsfn(mc); \ mc->init = initfn; \ } \
Quoted 3 lines
...
So
xenfv_machine_options()is a part ofpc_machine_xenfv_class_init()
Ah, so your (and mine) patch already fits the bill. Thanks for looking into this.
Are you going to submit a proper patch or do you want me to?
Wei.
Quoted 93 lines · On Thu, 27 Oct 2016 12:29:58 +0100 Wei Liu <[email protected]> wrote:
Quoted 92 lines · Igor Mammedov
Quoted 66 lines · On Thu, 27 Oct 2016 12:10:58 +0100 Wei Liu <[email protected]> wrote:
Quoted 57 lines · Wei Liu
Cc Sander
Quoted 54 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; }Quoted 7 lines
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 2 lines
hw/i386/pc_piix.c +0
-0DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,Yes, it does.
(I have a similar patch in my queue already)
Quoted 6 lines
Oh, the reason I didn't send it out is because Eduardo suggested we should use a new field instead of setting
has_acpi_buildoutside of PCMachineClass init function.I have actually gotten around to investigate this option and what is needed to be done.
static void
xenfv_machine_options(MachineClass *m){
...
}DEFINE_PC_MACHINE(xenfv, "xenfv",
pc_xen_hvm_init,xenfv_machine_options);#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ { \ MachineClass *mc = MACHINE_CLASS(oc); \ optsfn(mc); \ mc->init = initfn; \ } \...
Quoted 6 lines
Quoted 1 line
So
xenfv_machine_options()is a part ofpc_machine_xenfv_class_init()Ah, so your (and mine) patch already fits the bill. Thanks for looking into this.
Are you going to submit a proper patch or do you want me to?
Please submit your version of patch.
Quoted 7 lines
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 66 lines · On Thu, 27 Oct 2016 12:10:58 +0100 Wei Liu <[email protected]> wrote:
Quoted 57 lines · Wei Liu
Cc Sander
Quoted 54 lines · Igor Mammedov
Quoted 25 lines · On Wed, 26 Oct 2016 16:22:34 +0100 Wei Liu <[email protected]> wrote:
Quoted 10 lines · Igor Mammedov
Quoted 7 lines · On Tue, 25 Oct 2016 18:28:04 +0100 Wei Liu <[email protected]> wrote:
Xen's toolstack is in charge of building ACPI tables. Skip acpi table building if running on Xen.
This issue is discovered due to direct kernel boot on Xen doesn't boot anymore, because the new ACPI tables cause the guest to exceed its memory allocation limit.
Quoted 8 lines
Quoted 2 lines
Reported-by Sander Eikelenboom <[email protected]>Signed-off-by Wei Liu <[email protected]>Question is:
Why does xen guest get ACPI tables from QEMU instead of using Xen provided ones.
Maybe it's firmware issue i.e. firmware side shouldn't load ACPI tables from QEMU provided fwcfg file and load Xen provided instead.It hasn't come to the point that the guest is booted. QEMU exits when trying to populate some pages for the guest, at which point the guest has not yet been started. In a sense, Xen guest doesn't get ACPI from QEMU because it never gets to that point.
Quoted 7 lines
Direct kernel boot causes
fw_cfgto be filled in.pcms->has_acpi_builddefaults to true andacpi_enabledis also true. These make all checks inacpi_setuppass. QEMU proceeds to build and load ACPI tables (which are never going to be used by Xen guests), causing the guest to exceeds its limit.Wei.
Would something like this fix issue for you?
hw/i386/pc_piix.c +3
-0@@ -1094,10 +1094,13 @@ DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa,#ifdef CONFIG_XEN static void xenfv_machine_options (MachineClass *m) { +PCMachineClass *pcmc =PC_MACHINE_CLASS (m); + m->desc ="Xen Fully-virtualized PC" ; m->max_cpus =HVM_MAX_VCPUS ; m->default_machine_opts ="accel=xen" ; m->hot_add_cpu = pc_hot_add_cpu; + pcmc->has_acpi_build = false; }Quoted 7 lines
hw/i386/pc_piix.c DEFINE_PC_MACHINE(isapc, "isapc", pc_init_isa, · line 1106
Quoted 2 lines
hw/i386/pc_piix.c +0
-0DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,Yes, it does.
(I have a similar patch in my queue already)
Quoted 6 lines
Oh, the reason I didn't send it out is because Eduardo suggested we should use a new field instead of setting
has_acpi_buildoutside of PCMachineClass init function.I have actually gotten around to investigate this option and what is needed to be done.
static void xenfv_machine_options(MachineClass *m) {
...
}
DEFINE_PC_MACHINE(xenfv, "xenfv", pc_xen_hvm_init,
xenfv_machine_options);
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
MachineClass *mc = MACHINE_CLASS(oc); \
optsfn(mc); \
mc->init = initfn; \
} \ ...
So xenfv_machine_options() is a part of pc_machine_xenfv_class_init()
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel