qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 14/16] docs: add documentation for vfio-ccw


From: Dong Jia Shi
Subject: Re: [Qemu-devel] [PATCH v4 14/16] docs: add documentation for vfio-ccw
Date: Wed, 22 Mar 2017 10:34:22 +0800
User-agent: Mutt/1.7.0 (2016-08-17)

* Alex Williamson <address@hidden> [2017-03-21 12:47:16 -0600]:

[...]

> > +vfio-ccw I/O region
> > +-------------------
> > +
> > +An I/O region is used to accept channel program request from user
> > +space and store I/O interrupt result for user space to retrieve. The
> > +defination of the region is:
> > +
> > +struct ccw_io_region {
> > +#define ORB_AREA_SIZE 12
> > +   __u8    orb_area[ORB_AREA_SIZE];
> > +#define SCSW_AREA_SIZE 12
> > +   __u8    scsw_area[SCSW_AREA_SIZE];
> > +#define IRB_AREA_SIZE 96
> > +   __u8    irb_area[IRB_AREA_SIZE];
> > +   __u32   ret_code;
> > +} __packed;
> > +
> > +While starting an I/O request, orb_area should be filled with the
> > +guest ORB, and scsw_area should be filled with the SCSW of the Virtual
> > +Subchannel.
> > +
> > +irb_area stores the I/O result.
> > +
> > +ret_code stores a return code for each access of the region.
Hi Alex,

> 
> Pardon if these questions expose my lack of familiarity with S390:
> 
> So I/O requests are asynchronous, the user is notified via interrupt
> when completed, can more than one request be queued at a time?
The answer is no. The subchannel will stay in a state that prohibiting
from a new request if there is processing for a previous request
ongoing. And we need to issue an explit I/O instruction to retrieve and
(or) clear the pending interruption before issue another I/O request.

> The communication format doesn't seem like it'd easily support that.
> Is it possible?  A future enhancement that we should design for now?
As the above statements said, it's not possible.

> 
> I'm also a little unclear what sort of I/O a user has access to via
> this interface and how the kernel polices that access. For instance,
> are multiple tape or disk devices available through a single I/O
> channel?
No. An I/O subchannel is dedicated to one device, and...

> How does the user configure which devices a user has access to when
> creating the vfio-ccw device?
...this mapping is usually determined/configured before the machine
startup by the administrtor of the upper level hypervisor. So when
creating the vfio-ccw device, we do not configure/modify this mapping.
When the guest I/O subchannel driver probing, it will issue a SENSE
command on the subchannel to recognize/find what kind of device is
behind the subchannel, and then it uses corresponding CCW device driver
serving the I/O device.

@Conny, please correct me if my understanding is not right.

> 
> Otherwise I think the interface looks great.  Thanks,
This is good news. :>

Thanks!
> 
> Alex
> 

-- 
Dong Jia Shi




reply via email to

[Prev in Thread] Current Thread [Next in Thread]