OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio] [PATCH] ccw: split descriptor/available/used rings


On Tue, Oct 08, 2013 at 03:39:25PM +0200, Cornelia Huck wrote:
> On Tue, 8 Oct 2013 16:07:18 +0300
> "Michael S. Tsirkin" <mst@redhat.com> wrote:
> 
> > On Tue, Oct 08, 2013 at 02:53:26PM +0200, Cornelia Huck wrote:
> > > On Tue, 8 Oct 2013 15:26:38 +0300
> > > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > > 
> > > > On Tue, Oct 08, 2013 at 02:16:06PM +0200, Cornelia Huck wrote:
> > > > > On Tue, 8 Oct 2013 15:12:39 +0300
> > > > > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > > > > 
> > > > > > This reminds me - our use of the SenseID format for device
> > > > > > identification is not in the spec, is it?
> > > > > > We should probably add it - want to do this?
> > > > > 
> > > > > I don't think there's a need to do so, as it is a standard channel
> > > > > command. Every control unit/device since 1973 supports it :)
> > > > 
> > > > The format of the command is standard, yes.
> > > > But I really meant which virtio field goes into which field
> > > > and how does a driver match.
> > > > 
> > > > Linux guest does: CCW_DEVICE(0x3832, 0)
> > > > so it ignores device type and model, and
> > > > matches controller model against virtio device ID.
> > > > 
> > > > This really should be documented in spec - it's not good
> > > > that people need to look at guest code to write hypervisors.
> > > 
> > > Ah, I see what you mean. It is already there in 2.3.3.1., but we could
> > > it more explicit:
> > > 
> > > ===
> > > 
> > > SenseID will return the following information for a virtio-ccw proxy
> > > device:
> > > 
> > > ----------------------------------------------
> > > | control unit type     | 0x3832             |
> > > |-----------------------|--------------------|
> > > | control unit model    | <virtio device id> |
> > > |-----------------------|--------------------|
> > > | device type           | zeroes (unset)     |
> > > |-----------------------|--------------------|
> > > | device model          | zeroes (unset)     |
> > > |-----------------------|--------------------|
> > > | extended SenseId data | zeroes (unset)     |
> > > ----------------------------------------------
> > > 
> > > A driver for virtio-ccw devices should look for a control unit type of
> > > 0x3832 and ignore the device type.
> > > 
> > > ===
> > > 
> > > I think ignoring the device type is obvious, though.
> > 
> > I think it's a MUST, not a should, right?
> 
> Hm, ok.
> 
> > It's not really obvious - if you just describe what hardware
> > does then drivers just think they can make assumptions.
> 
> I'm perhaps assuming too much from my architecture background. Well,
> spelling it out doesn't hurt.

What can be misunderstood will be.
You only need to look at windows driver sources if you want
to see this Murphy's law in action.

> > 
> > If we want drivers to do something we really must write it
> > explicitly.
> > 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]