Re: [Xen-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests

2016-10-26 Thread Eduardo Habkost
On Wed, Oct 26, 2016 at 11:32:56AM +0100, Wei Liu wrote:
> On Tue, Oct 25, 2016 at 04:33:03PM -0700, Stefano Stabellini wrote:
> > CC'ing maintainers
> > 
> > On Tue, 25 Oct 2016, Wei Liu 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 
> > > Signed-off-by: Wei Liu 
> > 
> > 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?
> > 
> 
> 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.

-- 
Eduardo

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests

2016-10-26 Thread Wei Liu
On Tue, Oct 25, 2016 at 04:33:03PM -0700, Stefano Stabellini wrote:
> CC'ing maintainers
> 
> On Tue, 25 Oct 2016, Wei Liu 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 
> > Signed-off-by: Wei Liu 
> 
> 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?
> 

This sounds like a better idea to me.

Wei.

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


Re: [Xen-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests

2016-10-25 Thread Stefano Stabellini
CC'ing maintainers

On Tue, 25 Oct 2016, Wei Liu 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 
> Signed-off-by: Wei Liu 

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?


> Cc: Anthony PERARD 
> Cc: Stefano Stabellini 
> 
> 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(+)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index a26a4bb..2cdff12 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -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();
> -- 
> 2.1.4
> 

___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH RFC] acpi: don't build acpi tables for xen hvm guests

2016-10-25 Thread 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 
Signed-off-by: Wei Liu 
---
Cc: Anthony PERARD 
Cc: Stefano Stabellini 

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(+)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index a26a4bb..2cdff12 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -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();
-- 
2.1.4


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel