Re: [virtio] [OASIS Issue Tracker] Created: (VIRTIO-35) race condition with multi-dword config accesses

From
Rusty Russell <>
Date
2013-10-11T05:09:14+00:00
ID
Thread
Re: [virtio] [OASIS Issue Tracker] Created: (VIRTIO-35) race condition with multi-dword config accesses
Pawel Moll <> writes:
> On Fri, 2013-10-04 at 04:36 +0100, Rusty Russell wrote:
>> +• 0x018 | R | ConfigGeneration
>> + Configuration atomicity value.
>> + Changes every time the configuration noticeably changes.  This means the
>> + device may only change the value after a configuration read operation,
>> + but it must change if there is any risk of a device seeing an inconsistent
>> + configuration state.
>
> How about moving it closer to the config space? Something like 0x0f0 or
> even 0x0fc?

Sure... I tried to be mininally disruptive.  Seems like you're proposing
a heavily revised non-legacy format anyway, so slot it wherever.

>> +2.3.2.2.1. Legacy Interface: MMIO Device Layout
>> +--------------------------
>> +The ConfigGeneration field does not exist in legacy devices; fortunately
>> +it would return 0 if accessed.  
>
> Not on "my" models, no. It would result in external abort (think
> SIGBUS).
>
> Not a big problem - the device version number will be bumped to 2 anyway
> (working on it right now).

Ah, OK.

Cheers,
Rusty.