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

Reply via email to