RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1231284 - [virtio-1] QEMU Virtio-1 Support (libvirt)
Summary: [virtio-1] QEMU Virtio-1 Support (libvirt)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: All
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 1227343
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-12 14:53 UTC by Jaroslav Suchanek
Modified: 2016-11-04 07:45 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of: 1227343
Environment:
Last Closed: 2016-11-04 07:45:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jaroslav Suchanek 2015-06-12 14:53:17 UTC
$subj$

Comment 2 Xuesong Zhang 2016-09-09 07:12:23 UTC
hi, Jiri,

As you know, the depend on libvirt BZ 1227354 is moved to RHEL7.4, so this libvirt bug should be moved to RHEL7.4 also, right?

Comment 3 Jiri Denemark 2016-09-09 07:26:28 UTC
Jardiku, why do we even have this bug? The only thing that libvirt may eventually do about virtio-1 is already covered by bug 1227354.

Comment 4 dyuan 2016-09-09 08:52:10 UTC
Hi Jirka, I think this bug is used for tracking the full test status of virtio-1 support from libvirt, and bug 1227354 is only for the switch implementation.

Because the default behaviour of qemu-kvm-rhev is changed, so we also tested the xml for virtio devices without the mode switch in BZ 1227354. And also find the bug 1365823.

Comment 5 Xuesong Zhang 2016-09-09 11:06:51 UTC
Sorry for introducing the misunderstanding, I'd like to explain my concerns more clearly:

Actually, QE always use the default virtio mode in the current RHEL7.3 daily testing, since the virtio switch is not implemented till now. One bug 1365823 was found in the daily testing, which is mentioned in above comment by dyuan@.

QE can test and verify this testonly bug in RHEL7.3, then need to remove depend on RHEL7.4 BZ 1227354.
QE can test and verify this testonly bug in RHEL7.4 also, test together with BZ 1227354, then need to move the flag to RHEL7.4.

So, What's your suggestion? Should QE test and verify this bug in RHEL7.3 or RHEL7.4, then we can choose to remove the depend on bug or change flag.

Comment 6 Jaroslav Suchanek 2016-09-09 11:54:20 UTC
Please verify this for rhel-7.3. I am removing the bug 1227354 dependency. Thanks.

Comment 7 Han Han 2016-09-21 01:43:59 UTC
Verified it on libvirt-2.0.0-9.el7.x86_64 qemu-kvm-rhev-2.6.0-25.el7.x86_64
1. Start a VM with virtio block/scsi/net/mem-balloon/rng/serial/video/mouse/tablet/keyboard devices. Define the VM as following xml:
```
 <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/NEW.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>
...
 <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/tmp/sda'/>
      <target dev='sda' bus='scsi'/>
    </disk>
 <controller type='scsi' index='0'/>
...
    <interface type='network'>
      <mac address='52:54:00:db:b3:3d'/>
      <source network='default'/>
      <model type='virtio'/>
    </interface>
...
<memballoon model='virtio'/>
...
<rng model='virtio'>
      <backend model='random'>/dev/urandom</backend>
    </rng>
...
  <controller type='virtio-serial' index='0'/>
 <console type='pty'>
      <target type='serial' port='0'/>
    </console>
...
<input type='tablet' bus='virtio'/>
    <input type='mouse' bus='virtio'/>
    <input type='keyboard' bus='virtio'/>
...
 <video>
      <model type='virtio'/>
    </video>
``` 

2. Check feature bit(the 32th bit) of virtio devices
In VM, run the following script. The result of third column is the virtio feature bit: 1 for virtio 1, 0 for virtio 0.9. 
# for i in `find /sys/devices -name 'virtio[0-9]*'`;do
>     echo -e $(lspci -s $(echo $i|egrep -o  '[0-9a-fA-F]{4}:[0-9a-fA-F]{2}:[01][0-9a-fA-F]\.[0-7]'))'\t'$(cat  $i/features|cut -c 33)
> done
00:02.0 VGA compatible controller: Red Hat, Inc Virtio GPU (rev 01)     1
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device 1
00:05.0 Communication controller: Red Hat, Inc Virtio console   1
00:07.0 SCSI storage controller: Red Hat, Inc Virtio block device       1
00:08.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon  1
00:09.0 Mouse controller: Red Hat, Inc Virtio input (rev 01)    1
00:0a.0 Keyboard controller: Red Hat, Inc Virtio input (rev 01) 1
00:0b.0 Unclassified device [00ff]: Red Hat, Inc Virtio RNG     1
00:0c.0 SCSI storage controller: Red Hat, Inc Virtio SCSI       1
00:0d.0 Mouse controller: Red Hat, Inc Virtio input (rev 01)    1
00:0e.0 Keyboard controller: Red Hat, Inc Virtio input (rev 01) 1
00:0f.0 Input device controller: Red Hat, Inc Virtio input (rev 01)     1


All devices are virtio1 devices.

3. Check if devices work well.
1. Do some read/write on vda,sda. No problem on virtio-blk and virtio-scsi device.
2. Ping external IP to check if network works well. Virtio-net device is OK.
3. Read from /dev/hwrng and it works:
# dd if=/dev/hwrng of=/tmp/a bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes (1.0 MB) copied, 1.7575 s, 597 kB/s
	
4. Check GUI in VM. VGA works well.
5. Check input devices(mouse,keyboard,tablet). All is well.
6. Check memballoon device
# virsh setmaxmem RH7-GUI 4G --config
# virsh start RH7-GUI
In VM:
# free -m
              total        used        free      shared  buff/cache   available
Mem:            719         253         136           8         328         216
Swap:          1023    
In host:
# virsh setmem RH7-GUI 2G 
In VM:
# # free -m
              total        used        free      shared  buff/cache   available
Mem:           1743         252        1162           8         328        1242
Swap:          1023           0        1023
Total memory increased. The memballoon device works.


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