Re: [virtio-dev] Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-06 Thread Siwei Liu
(click the wrong reply button again, sorry) On Thu, Apr 5, 2018 at 8:31 AM, Paolo Bonzini wrote: > On 04/04/2018 10:02, Siwei Liu wrote: >>> pci_bus_num is almost always a bug if not done within >>> a context of a PCI host, bridge, etc. >>> >>> In particular this will not

Re: [virtio-dev] Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-05 Thread Paolo Bonzini
On 04/04/2018 10:02, Siwei Liu wrote: >> pci_bus_num is almost always a bug if not done within >> a context of a PCI host, bridge, etc. >> >> In particular this will not DTRT if run before guest assigns bus >> numbers. >> > I was seeking means to reserve a specific pci bus slot from drivers, > and

Re: [virtio-dev] Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-04 Thread Siwei Liu
On Tue, Apr 3, 2018 at 5:25 AM, Michael S. Tsirkin wrote: > On Sun, Apr 01, 2018 at 05:13:08AM -0400, Si-Wei Liu wrote: >> @@ -896,6 +898,68 @@ void qmp_device_del(const char *id, Error **errp) >> } >> } >> >> +int pci_get_busdevfn_by_id(const char *id, uint16_t *busnr, >>

Re: [RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-03 Thread Michael S. Tsirkin
On Sun, Apr 01, 2018 at 05:13:08AM -0400, Si-Wei Liu wrote: > @@ -896,6 +898,68 @@ void qmp_device_del(const char *id, Error **errp) > } > } > > +int pci_get_busdevfn_by_id(const char *id, uint16_t *busnr, > + uint16_t *devfn, Error **errp) > +{ > +uint16_t

[RFC PATCH 1/3] qemu: virtio-bypass should explicitly bind to a passthrough device

2018-04-01 Thread Si-Wei Liu
The new backup option allows guest virtio-bypass driver to explicitly bind to a corresponding passthrough instance, which is identifiable by the :. notation. MAC address is still validated in the guest but not the only criteria for pairing two devices. MAC address is more a matter of network