[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] ide: Split error status from status registe
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] ide: Split error status from status register |
Date: |
Thu, 09 Jun 2011 16:07:14 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10 |
Am 09.06.2011 15:27, schrieb Paolo Bonzini:
> 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?
I think you're right. We could enable it unconditionally (and change the
bm->status line from = to |=), but anyway it's redundant if the
subsections are present, so it wouldn't make a difference.
Kevin