Bug 592070

Summary: sign extension error in libvirt's parsing of qemu options
Product: Red Hat Enterprise Linux 6 Reporter: Eric Blake <eblake>
Component: libvirtAssignee: Eric Blake <eblake>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: crobinso, dallan, hbrock, mjenner, nzhang, syeghiay, veillard, xen-maint
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: libvirt-0.8.1-7.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 19:33:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 591703    
Description Flags
qemu_conf: fix flag value
v2 of patch; fixes 'make distcheck' none

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 Product and 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 Product and 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