All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: stefano.stabellini@eu.citrix.com
Cc: Anthony.Perard@citrix.com, xen-devel@lists.xensource.com,
	qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <m3zkwdpolk.fsf@trasno.org> (raw)
In-Reply-To: <1282557052-14285-15-git-send-email-stefano.stabellini@eu.citrix.com> (stefano stabellini's message of "Mon, 23 Aug 2010 10:50:52 +0100")

stefano.stabellini@eu.citrix.com wrote:
> From: Anthony PERARD <anthony.perard@citrix.com>
>
> 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 <anthony.perard@citrix.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

> +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.

WARNING: multiple messages have this Message-ID (diff)
From: Juan Quintela <quintela@redhat.com>
To: stefano.stabellini@eu.citrix.com
Cc: Anthony.Perard@citrix.com, xen-devel@lists.xensource.com,
	qemu-devel@nongnu.org
Subject: Re: [PATCH 15/15] xen: Add a Xen specific ACPI Implementation to target-xen
Date: Mon, 23 Aug 2010 13:15:03 +0200	[thread overview]
Message-ID: <m3zkwdpolk.fsf@trasno.org> (raw)
In-Reply-To: <1282557052-14285-15-git-send-email-stefano.stabellini@eu.citrix.com> (stefano stabellini's message of "Mon, 23 Aug 2010 10:50:52 +0100")

stefano.stabellini@eu.citrix.com wrote:
> From: Anthony PERARD <anthony.perard@citrix.com>
>
> 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 <anthony.perard@citrix.com>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>

> +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.

  reply	other threads:[~2010-08-23 11:24 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23  9:49 [Qemu-devel] [PATCH 00/15] v2: RFC xen device model support Stefano Stabellini
2010-08-23  9:49 ` Stefano Stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 01/15] xen: Support new libxc calls from xen unstable stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 02/15] xen: Add xen_machine_fv stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 03/15] xen: Add a new target to qemu: target-xen stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23 11:09   ` [Qemu-devel] " Juan Quintela
2010-08-23 11:09     ` Juan Quintela
2010-08-23 11:16     ` [Qemu-devel] " Stefano Stabellini
2010-08-23 11:16       ` Stefano Stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 04/15] xen: xen_machine_fv, initialize xenctrl stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 05/15] xen: add a 8259 Interrupt Controller stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 06/15] xen: Add the Xen platform pci device stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 07/15] xen: handle xenstore events stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 08/15] xen: Read and write the state of the VM in xenstore stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 09/15] xen: Initialize event channels and io rings stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 10/15] xen: Introduce the Xen mapcache stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 11/15] xen: Introduce --enable-xen command options stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 12/15] piix_pci: Introduces Xen specific call for irq stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-24 11:20   ` [Qemu-devel] " Isaku Yamahata
2010-08-23  9:50 ` [Qemu-devel] [PATCH 13/15] vl.c: Introduce getter for shutdown_requested and reset_requested stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 14/15] xen: destroy the VM when shutdown is requested stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23  9:50 ` [Qemu-devel] [PATCH 15/15] xen: Add a Xen specific ACPI Implementation to target-xen stefano.stabellini
2010-08-23  9:50   ` stefano.stabellini
2010-08-23 11:15   ` Juan Quintela [this message]
2010-08-23 11:15     ` Juan Quintela
2010-08-23 13:15     ` [Qemu-devel] " Stefano Stabellini
2010-08-23 13:15       ` Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2010-08-12 14:08 [Qemu-devel] [PATCH 00/15] RFC xen device model support Stefano Stabellini
2010-08-12 14:10 ` [Qemu-devel] [PATCH 15/15] xen: Add a Xen specific ACPI Implementation to target-xen stefano.stabellini
2010-08-13 18:57   ` [Qemu-devel] " Anthony Liguori
2010-08-13 19:37     ` Stefano Stabellini
2010-08-13 20:51       ` Anthony Liguori
2010-08-16 11:10         ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3zkwdpolk.fsf@trasno.org \
    --to=quintela@redhat.com \
    --cc=Anthony.Perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.