[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 15/15] xen: Add a Xen specific ACPI Implementati
From: |
Juan Quintela |
Subject: |
[Qemu-devel] Re: [PATCH 15/15] xen: Add a Xen specific ACPI Implementation to target-xen |
Date: |
Mon, 23 Aug 2010 13:15:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
address@hidden wrote:
> From: Anthony PERARD <address@hidden>
>
> Xen currently uses a different BIOS (hvmloader + rombios) therefore the
> Qemu acpi_piix4 implementation wouldn't work correctly with Xen.
> We plan on fixing this properly but at the moment we are just adding a
> new Xen specific acpi_piix4 implementation.
> This patch is optional; without it the VM boots but it cannot shutdown
> properly or go to S3.
>
> Signed-off-by: Anthony PERARD <address@hidden>
> Signed-off-by: Stefano Stabellini <address@hidden>
> +static void gpe_save(QEMUFile* f, void* opaque)
> +{
> + GPEState *s = (GPEState*)opaque;
> + int i;
> +
> + for ( i = 0; i < ACPI_GPE0_BLK_LEN / 2; i++ ) {
> + qemu_put_8s(f, &s->gpe0_sts[i]);
> + qemu_put_8s(f, &s->gpe0_en[i]);
> + }
> +
> + qemu_put_8s(f, &s->sci_asserted);
> + if ( s->sci_asserted ) {
> + PIIX4ACPI_LOG(PIIX4ACPI_LOG_INFO, "gpe_save with sci asserted!\n");
> + }
> +}
> +
> +static int gpe_load(QEMUFile* f, void* opaque, int version_id)
> +{
> + GPEState *s = (GPEState*)opaque;
> + int i;
> + if (version_id != 1)
> + return -EINVAL;
> +
> + for ( i = 0; i < ACPI_GPE0_BLK_LEN / 2; i++ ) {
> + qemu_get_8s(f, &s->gpe0_sts[i]);
> + qemu_get_8s(f, &s->gpe0_en[i]);
> + }
> +
> + qemu_get_8s(f, &s->sci_asserted);
> + return 0;
> +}
....
> + register_savevm(NULL, "gpe", 0, 1, gpe_save, gpe_load, s);
Please port this to VMSTATE.
If possible (i.e. not problems with backwards compatibility), something like:
> + for ( i = 0; i < ACPI_GPE0_BLK_LEN / 2; i++ ) {
> + qemu_get_8s(f, &s->gpe0_sts[i]);
> + }
> + for ( i = 0; i < ACPI_GPE0_BLK_LEN / 2; i++ ) {
> + qemu_get_8s(f, &s->gpe0_en[i]);
> + }
Would be easier to put in vmstate.
Later, Juan.
- [Qemu-devel] [PATCH 07/15] xen: handle xenstore events, (continued)
- [Qemu-devel] [PATCH 07/15] xen: handle xenstore events, stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 08/15] xen: Read and write the state of the VM in xenstore, stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 09/15] xen: Initialize event channels and io rings, stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 11/15] xen: Introduce --enable-xen command options., stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 10/15] xen: Introduce the Xen mapcache, stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 12/15] piix_pci: Introduces Xen specific call for irq., stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 13/15] vl.c: Introduce getter for shutdown_requested and reset_requested., stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 14/15] xen: destroy the VM when shutdown is requested, stefano . stabellini, 2010/08/23
- [Qemu-devel] [PATCH 15/15] xen: Add a Xen specific ACPI Implementation to target-xen, stefano . stabellini, 2010/08/23
- [Qemu-devel] Re: [PATCH 15/15] xen: Add a Xen specific ACPI Implementation to target-xen,
Juan Quintela <=