Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-22 Thread Yi Min Zhao
在 2018/8/22 下午4:42, Andrea Bolognani 写道: On Wed, 2018-08-22 at 11:06 +0800, Yi Min Zhao wrote: 在 2018/8/20 下午7:14, Andrea Bolognani 写道: So which is unique: uid, fid, or the combination of the two? Could I have -device zpci,uid=1,fid=1 -device zpci,uid=1,fid=2 or would that not work?

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-22 Thread Andrea Bolognani
On Wed, 2018-08-22 at 11:06 +0800, Yi Min Zhao wrote: > 在 2018/8/20 下午7:14, Andrea Bolognani 写道: > > So which is unique: uid, fid, or the combination of the two? > > Could I have > > > >-device zpci,uid=1,fid=1 > >-device zpci,uid=1,fid=2 > > > > or would that not work? What about > > >

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-21 Thread Yi Min Zhao
在 2018/8/20 下午7:14, Andrea Bolognani 写道: On Mon, 2018-08-20 at 16:45 +0800, Yi Min Zhao wrote: 在 2018/8/17 上午12:31, Andrea Bolognani 写道: On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote: +virBufferAddLit(&buf, "zpci"); +virBufferAsprintf(&buf, ",uid=%u", dev->addr.pci.zpci->zpci_

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-20 Thread Andrea Bolognani
On Mon, 2018-08-20 at 16:45 +0800, Yi Min Zhao wrote: > 在 2018/8/17 上午12:31, Andrea Bolognani 写道: > > On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote: > > > +virBufferAddLit(&buf, "zpci"); > > > +virBufferAsprintf(&buf, ",uid=%u", dev->addr.pci.zpci->zpci_uid); > > > +virBufferAspr

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-20 Thread Yi Min Zhao
在 2018/8/17 上午12:31, Andrea Bolognani 写道: On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote: [...] +char * +qemuBuildZPCIDevStr(virDomainDeviceInfoPtr dev) +{ +virBuffer buf = VIR_BUFFER_INITIALIZER; + +virBufferAddLit(&buf, "zpci"); +virBufferAsprintf(&buf, ",uid=%u", dev->addr

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-17 Thread Andrea Bolognani
On Fri, 2018-08-17 at 08:35 +0200, Boris Fiuczynski wrote: > On 08/16/2018 06:31 PM, Andrea Bolognani wrote: > > Another thing that I forgot to ask earlier and this is as good a > > time as any: once zPCI support has been merged, will users have > > to opt-in to it using > > > > > > > > or wi

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-16 Thread Boris Fiuczynski
On 08/16/2018 06:31 PM, Andrea Bolognani wrote: Another thing that I forgot to ask earlier and this is as good a time as any: once zPCI support has been merged, will users have to opt-in to it using or will they get zPCI devices by default? And if so, will it still be possible for them to g

Re: [libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-16 Thread Andrea Bolognani
On Tue, 2018-08-07 at 17:10 +0800, Yi Min Zhao wrote: [...] > +char * > +qemuBuildZPCIDevStr(virDomainDeviceInfoPtr dev) > +{ > +virBuffer buf = VIR_BUFFER_INITIALIZER; > + > +virBufferAddLit(&buf, "zpci"); > +virBufferAsprintf(&buf, ",uid=%u", dev->addr.pci.zpci->zpci_uid); > +virB

[libvirt] [PATCH v3 09/12] qemu: Generate and use zPCI device in QEMU command line

2018-08-07 Thread Yi Min Zhao
Add new functions to generate zPCI command string and append it to QEMU command line. And the related tests are added. Signed-off-by: Yi Min Zhao Reviewed-by: Boris Fiuczynski Reviewed-by: Stefan Zimmermann Reviewed-by: Bjoern Walk Reviewed-by: Ján Tomko --- src/qemu/qemu_command.c