Bug 592070 - sign extension error in libvirt's parsing of qemu options
Summary: sign extension error in libvirt's parsing of qemu options
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: beta
: ---
Assignee: Eric Blake
QA Contact: Virtualization Bugs
Depends On:
Blocks: LibvirtAIO
TreeView+ depends on / blocked
Reported: 2010-05-13 19:22 UTC by Eric Blake
Modified: 2010-09-09 10:30 UTC (History)
8 users (show)

Fixed In Version: libvirt-0.8.1-7.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2010-07-02 19:33:34 UTC
Target Upstream Version:

Attachments (Terms of Use)
qemu_conf: fix flag value (16.46 KB, patch)
2010-05-19 21:24 UTC, Eric Blake
no flags Details | Diff
v2 of patch; fixes 'make distcheck' (16.91 KB, patch)
2010-05-19 23:07 UTC, Eric Blake
no flags Details | Diff

Description Eric Blake 2010-05-13 19:22:54 UTC
Description of problem:
An incorrect enum value causes extra bits to be set in the qemu capabilities mask of libvirt.  It is possible to write an XML file that tries to use the capabilities that the bug said were present, but which are not supported by the system's qemu.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Use libvirt to set up a domain run by a version of qemu-kvm that supports virtio networking (corresponding to QEMUD_CMD_FLAG_VNET_HOST in libvirt 0.8.1 qemu_conf.h).
Actual results:
Because the vnet-host bit was improperly defined with sign-extension, higher  bits like QEMUD_CMD_FLAG_RTC_TD_HACK will be set, even if qemu does not support -rtc-td-hack.

Expected results:
Detecting vnet-host support should not detect unrelated qemu features.

Additional info:
Proposed upstream patch:

Comment 2 RHEL Program Management 2010-05-13 21:45:37 UTC
This feature request did not get resolved in time for Feature Freeze
for the current Red Hat Enterprise Linux release and has now been
denied. You may re-open your request by requesting your support
representative to propose it for the next release.

Comment 3 Cole Robinson 2010-05-13 21:51:03 UTC
Silly bug bot seeing the word 'feature' and adding the FutureFeature keyword.

Comment 4 RHEL Program Management 2010-05-13 22:54:27 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for

Comment 5 Eric Blake 2010-05-19 21:24:28 UTC
Created attachment 415268 [details]
qemu_conf: fix flag value

Upstream patch had merge conflicts with RHEL-6 spice patches; this attachment applies cleanly to 0.8.1-6.el6 sources.

Comment 6 Eric Blake 2010-05-19 23:07:07 UTC
Created attachment 415282 [details]
v2 of patch; fixes 'make distcheck'

Comment 8 Dave Allan 2010-05-26 14:42:35 UTC
libvirt-0.8.1-7.el6 has been built in RHEL-6-candidate with the fix.


Comment 10 Nan Zhang 2010-06-22 11:35:37 UTC
Verified with libvirt-0.8.1-9.el6.x86_64. Moving to VERIFIED.

# virsh start rhel6
Domain rhel6 started

# ps -ef|grep qemu-kvm
-netdev tap,fd=25,id=hostnet1,vhost=on,vhostfd=26

Comment 11 releng-rhel@redhat.com 2010-07-02 19:33:34 UTC
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Comment 12 Nan Zhang 2010-09-09 10:30:01 UTC
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-

# ps -ef|grep qemu-kvm
-netdev tap,fd=23,id=hostnet0,vhost=on,vhostfd=24 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:21:85:a9,bus=pci.0,addr=0x3

Note You need to log in before you can comment on or make changes to this bug.