Re: [PATCH 2/2] qemu: Support booting from hostdev PCI devices

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

 



On 02/03/2011 07:13 AM, Jiri Denemark wrote:
> ---
>  src/qemu/qemu_capabilities.c |    5 ++++-
>  src/qemu/qemu_capabilities.h |    1 +
>  src/qemu/qemu_command.c      |   17 +++++++++++++++++
>  3 files changed, 22 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
> index 37a97aa..fd46557 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -1088,8 +1088,11 @@ qemuCapsParseDeviceStr(const char *str, unsigned long long *flags)
>      /* Features of given devices. */
>      if (strstr(str, "pci-assign.configfd"))
>          *flags |= QEMUD_CMD_FLAG_PCI_CONFIGFD;
> -    if (strstr(str, "virtio-blk-pci.bootindex"))
> +    if (strstr(str, "virtio-blk-pci.bootindex")) {
>          *flags |= QEMUD_CMD_FLAG_BOOTINDEX;
> +        if (strstr(str, "pci-assign.bootindex"))
> +            *flags |= QEMUD_CMD_FLAG_PCI_BOOTINDEX;
> +    }

Nice that you avoid the strstr() if you can't even use per-device boot
ordering, and also nice that qemu lets us query both pci-assign and
virtio-blk-pci in one invocation.

> +++ b/src/qemu/qemu_capabilities.h
> @@ -87,6 +87,7 @@ enum qemuCapsFlags {
>      QEMUD_CMD_FLAG_HDA_DUPLEX    = (1LL << 50), /* -device hda-duplex */
>      QEMUD_CMD_FLAG_DRIVE_AIO     = (1LL << 51), /* -drive aio= supported */
>      QEMUD_CMD_FLAG_PCI_MULTIBUS  = (1LL << 52), /* bus=pci.0 vs bus=pci */
> +    QEMUD_CMD_FLAG_PCI_BOOTINDEX = (1LL << 53), /* pci-assign.bootindex */

Boy, this file has been hot lately!  (note to self, I get to rebase this
line for smartcard yet again).

ACK.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]