* [PATCH] acpi_piix4: remove bad save/restore of cpus_sts
@ 2011-04-18 8:44 Avi Kivity
2011-04-18 13:56 ` Isaku Yamahata
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2011-04-18 8:44 UTC (permalink / raw)
To: Marcelo Tosatti, kvm, Juan Quintela, Isaku Yamahata
Introduced by a mismerge and segfaults immediately. Still need proper
save/restore of this field.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
hw/acpi.h | 1 -
hw/acpi_piix4.c | 1 -
2 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/hw/acpi.h b/hw/acpi.h
index 96f1d5f..c141e65 100644
--- a/hw/acpi.h
+++ b/hw/acpi.h
@@ -133,7 +133,6 @@ struct ACPIGPE {
uint8_t *sts;
uint8_t *en;
- uint8_t *cpu_sts;
};
typedef struct ACPIGPE ACPIGPE;
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 9dc6f43..b582302 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -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()
}
};
--
1.7.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] acpi_piix4: remove bad save/restore of cpus_sts
2011-04-18 8:44 [PATCH] acpi_piix4: remove bad save/restore of cpus_sts Avi Kivity
@ 2011-04-18 13:56 ` Isaku Yamahata
2011-04-18 14:10 ` Isaku Yamahata
2011-04-20 8:24 ` Avi Kivity
0 siblings, 2 replies; 4+ messages in thread
From: Isaku Yamahata @ 2011-04-18 13:56 UTC (permalink / raw)
To: Avi Kivity; +Cc: Marcelo Tosatti, kvm, Juan Quintela
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,
On Mon, Apr 18, 2011 at 11:44:16AM +0300, Avi Kivity wrote:
> Introduced by a mismerge and segfaults immediately. Still need proper
> save/restore of this field.
>
> Signed-off-by: Avi Kivity <avi@redhat.com>
> ---
> hw/acpi.h | 1 -
> hw/acpi_piix4.c | 1 -
> 2 files changed, 0 insertions(+), 2 deletions(-)
>
> diff --git a/hw/acpi.h b/hw/acpi.h
> index 96f1d5f..c141e65 100644
> --- a/hw/acpi.h
> +++ b/hw/acpi.h
> @@ -133,7 +133,6 @@ struct ACPIGPE {
>
> uint8_t *sts;
> uint8_t *en;
> - uint8_t *cpu_sts;
> };
> typedef struct ACPIGPE ACPIGPE;
>
> diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
> index 9dc6f43..b582302 100644
> --- a/hw/acpi_piix4.c
> +++ b/hw/acpi_piix4.c
> @@ -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()
> }
> };
> --
> 1.7.4.3
>
--
yamahata
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] acpi_piix4: remove bad save/restore of cpus_sts
2011-04-18 13:56 ` Isaku Yamahata
@ 2011-04-18 14:10 ` Isaku Yamahata
2011-04-20 8:24 ` Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Isaku Yamahata @ 2011-04-18 14:10 UTC (permalink / raw)
To: Avi Kivity; +Cc: Marcelo Tosatti, kvm, Juan Quintela
On Mon, Apr 18, 2011 at 10:56:58PM +0900, Isaku Yamahata wrote:
> - enable/disable_processor() manipulates gpe->sts pointer.
> it should be
> gpe->sts[0] |= PIIX4_CPU_HOTPLUG_STATUS
The last one is wrong. enable/diable_processor() looks correct.
--
yamahata
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] acpi_piix4: remove bad save/restore of cpus_sts
2011-04-18 13:56 ` Isaku Yamahata
2011-04-18 14:10 ` Isaku Yamahata
@ 2011-04-20 8:24 ` Avi Kivity
1 sibling, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2011-04-20 8:24 UTC (permalink / raw)
To: Isaku Yamahata; +Cc: Marcelo Tosatti, kvm, Juan Quintela
On 04/18/2011 04:56 PM, Isaku Yamahata wrote:
> This patch would fix the segfaults. But I suppose the followings
> are necessary.
>
> - PIIX4PMState::gpe_cpu needs to be saved/loaded somewhere
Yes. Juan?
> - 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
>
Even before the merge, we didn't handle a write to this address.
Perhaps it's read-only? (that should explain no save/restore).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-20 8:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-18 8:44 [PATCH] acpi_piix4: remove bad save/restore of cpus_sts Avi Kivity
2011-04-18 13:56 ` Isaku Yamahata
2011-04-18 14:10 ` Isaku Yamahata
2011-04-20 8:24 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).