Skip to contentSkip to conversation

pc: disable acpi info for isapc and old pc machine

PATCH In review Michael S. Tsirkin 4 participants 8 messages Nov 4, 2013 – Nov 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pc: disable acpi info for isapc and old pc machine

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

---
 hw/i386/pc_piix.c | 2 ++
 1 file changed, 2 insertions(+)
hw/i386/pc_piix.c +2 -0
index 24a98cb..4fdb7b6 100644
@@ -309,6 +309,7 @@ static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     disable_kvm_pv_eoi();
     enable_compat_apic_id_mode();
     pc_init1(args, 1, 0);
@@ -317,6 +318,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 static void pc_init_isa(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     if (!args->cpu_model) {
         args->cpu_model = "486";
     }
Signature · 1 line
MST
Reviewed-by on v1 1/1
#1 lore raw

Il 04/11/2013 11:46, Michael S. Tsirkin ha scritto:

Quoted 2 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

Xen is now using "-M pc", so it's okay to remove it from the legacy "-M xenfv".

Quoted 20 lines
---
 hw/i386/pc_piix.c | 2 ++
 1 file changed, 2 insertions(+)
hw/i386/pc_piix.c +1 -0
index 24a98cb..4fdb7b6 100644
@@ -309,6 +309,7 @@ static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     disable_kvm_pv_eoi();
     enable_compat_apic_id_mode();
     pc_init1(args, 1, 0);

hw/i386/pc_piix.c static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args) · line 324

Quoted 7 lines
hw/i386/pc_piix.c +1 -0
@@ -317,6 +318,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 static void pc_init_isa(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     if (!args->cpu_model) {
         args->cpu_model = "486";
     }
#4 lore raw
In reply to Michael S. Tsirkin

Il 04/11/2013 11:46, Michael S. Tsirkin ha scritto:

Quoted 5 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

Wait, Xen is not using pc_init_pci_no_kvmclock. But that's not a problem, we can expose ACPI info via fw_cfg and then Xen hvmloader can decide whether to use it or not. Right now it doesn't, maybe later on it should.

If Xen is broken, we need to patch pc_xen_hvm_init, but Andreas only tested isapc not xenfv. So unless someone reports otherwise, there is no need to exclude ACPI info from "-M xenpv".

So my first review was wrong, but I still agree with the patch.

Paolo

#5 lore raw
Quoted 12 lines · Paolo Bonzini

Il 04/11/2013 11:46, Michael S. Tsirkin ha scritto:

Quoted 5 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

Wait, Xen is not using pc_init_pci_no_kvmclock. But that's not a problem, we can expose ACPI info via fw_cfg and then Xen hvmloader can decide whether to use it or not. Right now it doesn't, maybe later on it should.

Quoted 7 lines

If Xen is broken, we need to patch pc_xen_hvm_init, but Andreas only tested isapc not xenfv. So unless someone reports otherwise, there is no need to exclude ACPI info from "-M xenpv".

So my first review was wrong, but I still agree with the patch.

Paolo

I really went by the comment
/* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)

Clearly pc-0.13 and older should not have acpi :)

Signature · 1 line
MST
#2 lore raw
In reply to Paolo Bonzini
Quoted 6 lines · Paolo Bonzini

Il 04/11/2013 11:46, Michael S. Tsirkin ha scritto:

Quoted 2 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

Xen is now using "-M pc", so it's okay to remove it from the legacy "-M xenfv".

that is correct

Quoted 30 lines
Quoted 20 lines
---
 hw/i386/pc_piix.c | 2 ++
 1 file changed, 2 insertions(+)
hw/i386/pc_piix.c +1 -0
index 24a98cb..4fdb7b6 100644
@@ -309,6 +309,7 @@ static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     disable_kvm_pv_eoi();
     enable_compat_apic_id_mode();
     pc_init1(args, 1, 0);

hw/i386/pc_piix.c static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args) · line 324

Quoted 7 lines
hw/i386/pc_piix.c +1 -0
@@ -317,6 +318,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 static void pc_init_isa(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     if (!args->cpu_model) {
         args->cpu_model = "486";
     }
#3 lore raw
Quoted 9 lines · Stefano Stabellini
Quoted 6 lines · Paolo Bonzini

Il 04/11/2013 11:46, Michael S. Tsirkin ha scritto:

Quoted 2 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

Xen is now using "-M pc", so it's okay to remove it from the legacy "-M xenfv".

that is correct

Partially correct: even xenfv is not using the no_kvmclock init function anymore. So it is certainly OK from Xen POV to remove acpi builds for it, but the commit message is wrong.

Quoted 30 lines
Quoted 30 lines
Quoted 20 lines
---
 hw/i386/pc_piix.c | 2 ++
 1 file changed, 2 insertions(+)
hw/i386/pc_piix.c +1 -0
index 24a98cb..4fdb7b6 100644
@@ -309,6 +309,7 @@ static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     disable_kvm_pv_eoi();
     enable_compat_apic_id_mode();
     pc_init1(args, 1, 0);

hw/i386/pc_piix.c static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args) · line 324

Quoted 7 lines
hw/i386/pc_piix.c +1 -0
@@ -317,6 +318,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 static void pc_init_isa(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     if (!args->cpu_model) {
         args->cpu_model = "486";
     }
#6 lore raw
In reply to Michael S. Tsirkin
Quoted 19 lines · Michael S. Tsirkin
Quoted 18 lines · Paolo Bonzini

Il 04/11/2013 11:46, Michael S. Tsirkin ha scritto:

Quoted 5 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

Wait, Xen is not using pc_init_pci_no_kvmclock. But that's not a problem, we can expose ACPI info via fw_cfg and then Xen hvmloader can decide whether to use it or not. Right now it doesn't, maybe later on it should.

If Xen is broken, we need to patch pc_xen_hvm_init, but Andreas only tested isapc not xenfv. So unless someone reports otherwise, there is no need to exclude ACPI info from "-M xenpv".

So my first review was wrong, but I still agree with the patch.

Quoted 7 lines
Quoted 1 line

Paolo

I really went by the comment
/* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)

Clearly pc-0.13 and older should not have acpi :)

That's fine, it's just that the comment is outdated. Since you are at it you could remove the "and reused by xenfv" :-)

Tested-by on v1 1/1
#7 lore raw
In reply to Michael S. Tsirkin

Am 04.11.2013 11:46, schrieb Michael S. Tsirkin:

Quoted 23 lines

Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci.

---
 hw/i386/pc_piix.c | 2 ++
 1 file changed, 2 insertions(+)
hw/i386/pc_piix.c +1 -0
index 24a98cb..4fdb7b6 100644
@@ -309,6 +309,7 @@ static void pc_init_pci_1_2(QEMUMachineInitArgs *args)
 static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     disable_kvm_pv_eoi();
     enable_compat_apic_id_mode();
     pc_init1(args, 1, 0);

hw/i386/pc_piix.c static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args) · line 324

Quoted 7 lines
hw/i386/pc_piix.c +1 -0
@@ -317,6 +318,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
 static void pc_init_isa(QEMUMachineInitArgs *args)
 {
     has_pci_info = false;
+    has_acpi_build = false;
     if (!args->cpu_model) {
         args->cpu_model = "486";
     }

FWIW I forgot to reply yesterday that it solves my isapc qom-test failure, too

Thanks!

Andreas

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg