Bug 592070 - sign extension error in libvirt's parsing of qemu options
sign extension error in libvirt's parsing of qemu options
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity medium
: beta
: ---
Assigned To: Eric Blake
Virtualization Bugs
:
Depends On:
Blocks: LibvirtAIO
  Show dependency treegraph
 
Reported: 2010-05-13 15:22 EDT by Eric Blake
Modified: 2010-09-09 06:30 EDT (History)
8 users (show)

See Also:
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 15:33:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Eric Blake 2010-05-13 15:22:54 EDT
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):
libvirt-0.8.1-2.el6
qemu-kvm-0.12.3

How reproducible:
always

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:
https://www.redhat.com/archives/libvir-list/2010-May/msg00377.html
Comment 2 RHEL Product and Program Management 2010-05-13 17:45:37 EDT
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 17:51:03 EDT
Silly bug bot seeing the word 'feature' and adding the FutureFeature keyword.
Comment 4 RHEL Product and Program Management 2010-05-13 18:54:27 EDT
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
inclusion.
Comment 5 Eric Blake 2010-05-19 17:24:28 EDT
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 19:07:07 EDT
Created attachment 415282 [details]
v2 of patch; fixes 'make distcheck'
Comment 8 Dave Allan 2010-05-26 10:42:35 EDT
libvirt-0.8.1-7.el6 has been built in RHEL-6-candidate with the fix.

Dave
Comment 10 Nan Zhang 2010-06-22 07:35:37 EDT
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 15:33:34 EDT
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 06:30:01 EDT
Verified with libvirt-0.8.1-27.el6.x86_64 & qemu-kvm-0.12.1.2-2.113.el6.x86_64.

# 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.