acpi_piix4: remove bad save/restore of cpus_sts
PATCH 1/1 acpi_piix4: remove bad save/restore of cpus_sts
Introduced by a mismerge and segfaults immediately. Still need proper save/restore of this field.
--- hw/acpi.h | 1 - hw/acpi_piix4.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)
hw/acpi.h +0 -1
@@ -133,7 +133,6 @@ struct ACPIGPE {uint8_t *sts;uint8_t *en; -uint8_t *cpu_sts; };typedef struct ACPIGPE ACPIGPE ;
hw/acpi_piix4.c +0 -1
@@ -235,7 +235,6 @@ static const VMStateDescription vmstate_gpe = { .fields = (VMStateField []) {VMSTATE_GPE_ARRAY (sts,ACPIGPE ),VMSTATE_GPE_ARRAY (en,ACPIGPE ), - VMSTATE_UINT8_ARRAY(cpus_sts, struct gpe_regs, 32),VMSTATE_END_OF_LIST () } };
Signature · 1 line
1.7.4.3
This patch would fix the segfaults. But I suppose the followings are necessary.
- PIIX4PMState::gpe_cpu needs to be saved/loaded somewhere
- gpe_writeb() needs to handle PROC_BASE ... PROC_BASE+31 like gpe_readb(). To be honest, I don't see why gpe_readb/writeb() are used for PROC_BASE...PROC_BASE + 31
- enable/disable_processor() manipulates gpe->sts pointer. it should be
gpe->sts[0] |= PIIX4_CPU_HOTPLUG_STATUS
thanks,
Quoted 36 lines · Avi Kivity
Introduced by a mismerge and segfaults immediately. Still need proper save/restore of this field.
Signed-off-by Avi Kivity <[email protected]>--- hw/acpi.h | 1 - hw/acpi_piix4.c | 1 - 2 files changed, 0 insertions(+), 2 deletions(-)hw/acpi.h +0
-1@@ -133,7 +133,6 @@ struct ACPIGPE {uint8_t *sts;uint8_t *en; -uint8_t *cpu_sts; };typedef struct ACPIGPE ACPIGPE ;hw/acpi_piix4.c +0
-1@@ -235,7 +235,6 @@ static const VMStateDescription vmstate_gpe = { .fields = (VMStateField []) {VMSTATE_GPE_ARRAY (sts,ACPIGPE ),VMSTATE_GPE_ARRAY (en,ACPIGPE ), - VMSTATE_UINT8_ARRAY(cpus_sts, struct gpe_regs, 32),VMSTATE_END_OF_LIST () } };Signature · 1 line
1.7.4.3
Signature · 1 line
yamahata
Quoted 3 lines · Isaku Yamahata
- enable/disable_processor() manipulates
gpe->stspointer. it should be
gpe->sts[0] |=PIIX4_CPU_HOTPLUG_STATUS
The last one is wrong. enable/diable_processor() looks correct.
Signature · 1 line
yamahata
Quoted 4 lines · Isaku Yamahata
This patch would fix the segfaults. But I suppose the followings are necessary.
-
PIIX4PMState::gpe_cpuneeds to be saved/loaded somewhere
Yes. Juan?
Quoted 4 lines
-
gpe_writeb()needs to handlePROC_BASE... PROC_BASE+31 likegpe_readb(). To be honest, I don't see why gpe_readb/writeb() are used for PROC_BASE...PROC_BASE + 31
Even before the merge, we didn't handle a write to this address. Perhaps it's read-only? (that should explain no save/restore).
Signature · 1 line
error compiling committee.c: too many arguments to function