On Fri, Dec 15, 2017 at 06:33:14PM +0800, Wei Wang wrote: > On 12/14/2017 11:06 PM, Stefan Hajnoczi wrote: > > On Wed, Dec 13, 2017 at 10:59:10PM +0200, Michael S. Tsirkin wrote: > > > > * VHOST_USER_SET_VRING_KICK > > > > > > > > Set up vring kick doorbell (unless bit 8 is set) before sending > > > > VHOST_USER_SET_VRING_KICK to the guest. > > > But guest can't use it, now can it? > > > > > > What guest needs is a mapping to interrupts. > > ... > > > > * VHOST_USER_SET_VRING_CALL > > > > > > > > Set up the vring call doorbell (unless bit 8 is set) before sending > > > > VHOST_USER_SET_VRING_CALL to the guest. > > > Same here. what guest needs is mapping from io to notifications, > > > right? > > The PCI device should contain a BAR with doorbell registers. I don't > > think a fancy mapping is necessary, instead the device spec should > > define the BAR layout. > > > > When the guest vhost-user slave receives this message it knows it can > > now begin using the doorbell register. > > Not really. A doorbell will cause an interrupt to be injected to the master > device driver, which is not ready to work at that time. The slave driver > isn't expected to use the doorbell until the master is ready by sending the > last message VHOST_USER_SET_VHOST_PCI to link UP the slave device. > > So I think passing the fd msg to guest doesn't have a value in terms of > functionality.
The new VHOST_USER_SET_VHOST_PCI device message is something you defined in this patch series. This email sub-thread is about the vhost-user protocol specification as it exist today. The VHOST_USER_SET_VRING_CALL is the message that allows the guest to begin using the doorbell when VHOST_USER_F_PROTOCOL_FEATURES wasn't negotiated (i.e. the vring is enabled right away). Stefan
signature.asc
Description: PGP signature