qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: stefanha@gmail.com, armbru@redhat.com, qemu-devel@nongnu.org,
	quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/3] ide: Split error status from status register
Date: Thu, 09 Jun 2011 15:27:30 +0200	[thread overview]
Message-ID: <4DF0CA42.1080503@redhat.com> (raw)
In-Reply-To: <1307625358-20040-2-git-send-email-kwolf@redhat.com>

On 06/09/2011 03:15 PM, Kevin Wolf wrote:
> +/* This function accesses bm->bus->error_status which is loaded only after
> + * BMDMA itself. This is why the function is called from ide_pci_post_load
> + * instead of being registered with VMState where it would run too early. */
> +static int ide_bmdma_post_load(void *opaque, int version_id)
> +{
> +    BMDMAState *bm = opaque;
> +    uint8_t abused_bits = BM_MIGRATION_COMPAT_STATUS_BITS;
> +
> +    if (bm->status == 0) {
> +        bm->status = bm->migration_compat_status&  ~abused_bits;
> +        bm->bus->error_status |= bm->migration_compat_status&  abused_bits;
> +    }
> +
> +    return 0;
> +}
> +

Why the if?

Otherwise looks good.

Paolo

  reply	other threads:[~2011-06-09 13:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-09 13:15 [Qemu-devel] [PATCH 0/3] IDE and live migration fun Kevin Wolf
2011-06-09 13:15 ` [Qemu-devel] [PATCH 1/3] ide: Split error status from status register Kevin Wolf
2011-06-09 13:27   ` Paolo Bonzini [this message]
2011-06-09 14:07     ` Kevin Wolf
2011-06-09 14:26       ` Paolo Bonzini
2011-06-09 13:15 ` [Qemu-devel] [PATCH 2/3] ide: Fix ide_drive_pio_state_needed() Kevin Wolf
2011-06-09 13:15 ` [Qemu-devel] [PATCH 3/3] ide: Add forgotten VMSTATE_END_OF_LIST in subsection Kevin Wolf

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=4DF0CA42.1080503@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@gmail.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 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).