virtio — archive
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]
[PATCH] pci: missing documentation for dealing with 64 bit config fields
On Thu, Apr 02, 2015 at 11:01:45AM +0200, Cornelia Huck wrote:
> On Wed, 1 Apr 2015 20:42:13 +0200
> "Michael S. Tsirkin" <[email protected]> wrote:
>
>
> pci spec says what width access to use for 32, 16 and 8
>
> bit fields, but does not explicitly say what to do for
>
> 32 bit fields. As we have text that says driver must
>
> s/32/64/
>
>
> treat 64 bit accesses as non-atomic, this seems
>
> to imply driver should always do two 32 bit wide accesses.
> >
>
> Let's make this an explicit requirement, and require
>
> devices to support this.
> >
>
> VIRTIO-139
> >
>
> Signed-off-by: Michael S. Tsirkin <[email protected]>
> > ---
>
> conformance.tex | 1 +
>
> content.tex
| 19 ++++++++++++++
-----
>
> 2 files changed, 15 insertions(+), 5 deletions(-)
>
> (...)
>
> > +For device configuration access, the driver MUST use 8-bit wide
> > +accesses for 8-bit wide fields, 16-bit wide and aligned accesses
> > +for 16-bit wide fields and 32-bit wide and aligned accesses for
> > +32-bit and 64-bit wide fields. For 64-bit fields, the driver MAY
> > +access each of the high and low 32-bit parts of the field
> > +independently.
>
> Doesn't the last sentence follow from "use 32-bit wide accesses"
> already?
Someone might assume that driver must always access low part,
then high part. Last sentence says it does not have to.
--
MST
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
— [Date Index]
| [Thread Index]
| [Month Index]
| [List Home]