On Tue, 8 Oct 2013 15:26:38 +0300
"Michael S. Tsirkin" <> 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" <> 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.