Re: [PATCH v5 10/13] qemu: Generate and use zPCI device in QEMU command line

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

 



On Tue, 2018-09-18 at 15:40 +0800, Yi Min Zhao wrote:
> 在 2018/9/17 下午8:33, Andrea Bolognani 写道:
> > On Mon, 2018-09-17 at 13:51 +0800, Yi Min Zhao wrote:
> > > How about using switch? I think extension flag should be check and
> > > then build command for each case although there's only zpci case.
> > 
> > You can't really sensibly use a switch() for flags. Unless I have
> > mistaken what you had in mind...
> 
> Like below simple code,
> 
> if (dev->type != PCI_TYPE || dev->addr.pci.extFlags == NONE)
>      return 0;
> 
> if (dev->addr.pci.extFlags & ZPCI_FLAG)
>      return qemuAppendZPCIDevStr(cmd, dev);
> 
> /* There might be new extensions in future. */

Sure, that works.

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux