Bug 1264749 - any_layout does not work if the peer netdev is vhost-user. [NEEDINFO]
any_layout does not work if the peer netdev is vhost-user.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev (Show other bugs)
7.2
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: jason wang
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-21 02:54 EDT by Qian Guo
Modified: 2016-03-28 05:32 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-22 21:05:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
qiguo: needinfo? (jasowang)


Attachments (Terms of Use)

  None (edit)
Description Qian Guo 2015-09-21 02:54:31 EDT
Description of problem:
When set any_layout=on, it is not enabled inside guest and via "info qtree"

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.3.0-24.el7.x86_64

guest&host kernel-3.10.0-316.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Boot guest with vhost-user, and set any_layout enabled:

/usr/libexec/qemu-kvm \
-name rhel71-br0-1 \
-S \
-machine pc-i440fx-rhel7.2.0,accel=kvm,usb=off \
-cpu IvyBridge \
-m 4096 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 \
-object memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/qemu,share=on,size=4096M,id=ram-node0 \
-numa node,nodeid=0,cpus=0-3,memdev=ram-node0 \
-uuid 7907dc99-aa2d-4a3e-9fca-6087f3cfbbe6 \
-no-user-config -nodefaults  \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=discard \
-no-hpet -no-shutdown -boot menu=on \
-drive file=/home/rhel72cp1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2 \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-chardev socket,id=charnet0,path=/var/run/openvswitch/vhost-user1 \
-netdev type=vhost-user,id=hostnet0,chardev=charnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:01:0b:11,bus=pci.0,addr=0x9,any_layout=on  \
-chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 \
-spice port=5901,disable-ticketing,seamless-migration=on \
-device qxl,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,addr=0xe  \
-msg timestamp=on -monitor stdio \


2. Check info qtree
(qemu) info qtree

3.Check inside guest.

Actual results:
(qemu) info qtree
...
            any_layout = false

Guest # cat /sys/class/net/ens9/device/features 
0000010000000001011001000000000000000000000000000000000000000000

The 27th bit is "0"

Expected results:
any_layout should be enabled if it is set on in qemu cli

Additional info:
1.This bug is not regression, I tried with qemu-kvm-rhev-2.1.2-23.el7.x86_64(7.1GA), can hit such issue too.

2.With tun/tap, works well.
Comment 1 jason wang 2015-09-22 21:05:02 EDT
(In reply to Qian Guo from comment #0)
> Description of problem:
> When set any_layout=on, it is not enabled inside guest and via "info qtree"
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-rhev-2.3.0-24.el7.x86_64
> 
> guest&host kernel-3.10.0-316.el7.x86_64
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.Boot guest with vhost-user, and set any_layout enabled:
> 
> /usr/libexec/qemu-kvm \
> -name rhel71-br0-1 \
> -S \
> -machine pc-i440fx-rhel7.2.0,accel=kvm,usb=off \
> -cpu IvyBridge \
> -m 4096 -realtime mlock=off -smp 4,sockets=4,cores=1,threads=1 \
> -object
> memory-backend-file,prealloc=yes,mem-path=/dev/hugepages/qemu,share=on,
> size=4096M,id=ram-node0 \
> -numa node,nodeid=0,cpus=0-3,memdev=ram-node0 \
> -uuid 7907dc99-aa2d-4a3e-9fca-6087f3cfbbe6 \
> -no-user-config -nodefaults  \
> -rtc base=utc,driftfix=slew \
> -global kvm-pit.lost_tick_policy=discard \
> -no-hpet -no-shutdown -boot menu=on \
> -drive file=/home/rhel72cp1.qcow2,if=none,id=drive-virtio-disk0,format=qcow2
> \
> -device
> virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,
> id=virtio-disk0,bootindex=1 \
> -chardev socket,id=charnet0,path=/var/run/openvswitch/vhost-user1 \
> -netdev type=vhost-user,id=hostnet0,chardev=charnet0 \
> -device
> virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:01:0b:11,bus=pci.0,
> addr=0x9,any_layout=on  \
> -chardev pty,id=charserial0 -device
> isa-serial,chardev=charserial0,id=serial0 \
> -spice port=5901,disable-ticketing,seamless-migration=on \
> -device
> qxl,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16,bus=pci.0,
> addr=0xe  \
> -msg timestamp=on -monitor stdio \
> 
> 
> 2. Check info qtree
> (qemu) info qtree
> 
> 3.Check inside guest.
> 
> Actual results:
> (qemu) info qtree
> ...
>             any_layout = false
> 
> Guest # cat /sys/class/net/ens9/device/features 
> 0000010000000001011001000000000000000000000000000000000000000000
> 
> The 27th bit is "0"
> 
> Expected results:
> any_layout should be enabled if it is set on in qemu cli

It was actually done through negotiation which mean if backend (vhost-user) does not support this, it was still disabled. You may need to check the features that supported by your backend. Anyway, it was not a bug of qemu. So I will close this as not a bug :)

> 
> Additional info:
> 1.This bug is not regression, I tried with
> qemu-kvm-rhev-2.1.2-23.el7.x86_64(7.1GA), can hit such issue too.
> 
> 2.With tun/tap, works well.

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