[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Some questions about virtio-net on Xen x86


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiamei Xie <Jiamei.Xie@xxxxxxx>
  • Date: Thu, 19 Aug 2021 10:38:49 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RoCj1wwPs2hEM26IIYkd/0xdN5zLl4laNPR0ZuLI+58=; b=NhKl+uqabBMQr4kB1Eqn4OMeyfdNbkeARw9QagXRJIcO38asraASl0GIFkVzf3iiy5a+vVpd89jQMnmUHws42NsO/Wh5IrixvNcLJLMFRjZ4p7c2ySs6/eRQJU+ng52TSG0isps9nW58x14yziIO7kmekQ6GWaN3dZwlixnztqdLFWssyhSkJJBp4BTVY2GVY0XWZLKYUaifZ9Dbmz2FBSt6ddTOgx1BlNpJZPP1bK5G67SO8KZwumrlv0FbDFAhlD/5BcFdFghgsqRpjnECUCgnSVlp+4S8rN4qo8kGUqv7S5OYHNukW06uPh2IyV238AfYh4qnTzPpv/ZSLKf3zw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bTgb8o8b8JEWChLVD7AgsFOwgmdl2iMe91DEg6K/F2/WmRY1jwJau/5s6djeQs8vdfUfO1X5XIdvb09nxhyDtrBgf0gGxVSf/Wc60Qqq5YvBQQgiXGhLePo7aZptjXiDxKWRXKsEEY56GD36AieMpVAhuZECIwHfazuqlBWq20m6W8Czi90M+5ivc+T//ku+5bqqjVCVqmCb2RvSrOIg6bAQ0Zgd2P3Yfnz5SSewUTLyX1hrglo4gYtpUS5faaCs7yNFipZCSm0/7KaR3e2hoBasBR/Bqi1VI/7IDK+2fpuHXEP3ZCixsogTGEL2Lxqkv8UBY0Bx+lIIn39ZR+1lLg==
  • Authentication-results-original: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Wei Chen <Wei.Chen@xxxxxxx>, nd <nd@xxxxxxx>
  • Delivery-date: Thu, 19 Aug 2021 10:39:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Thread-index: AdeU5cKJ2Iuh63HAShmSu85qvWY46g==
  • Thread-topic: Some questions about virtio-net on Xen x86

Hi all,
I tried to run virtio-net on X86 machine according to the Wiki page 
https://wiki.xenproject.org/wiki/Virtio_On_Xen. 
And I Encountered some confusing problems.

The Qemu version I used is QEMU emulator version 4.2.1 (Debian 
1:4.2-3ubuntu6.17)

The content of guest.cfg is as below:
type = "hvm"
name = "g1"
memory = 512
vcpus = 2
vif = [ 'model=virtio-net' ]
disk = [ 'file:xxx/rootfs.image,xvda1,rw,backendtype=qdisk' ] kernel = 
"/boot/vmlinuz-5.4.0-80-generic"
ramdisk = "/boot/initrd.img-5.4.0-80-generic"
root = "/dev/xvda1 ro"
extra = 'console=hvc0 xencons=tty'

I enter the guest shell. Use ps command to get the running qemu command as 
below:

/usr/local/lib/xen/bin/qemu-system-i386
-xen-domid 31
-no-shutdown
-chardev socket,id=libxl-cmd,path=/var/run/xen/qmp-libxl-31,server=on,wait=off
-mon chardev=libxl-cmd,mode=control
-chardev 
socket,id=libxenstat-cmd,path=/var/run/xen/qmp-libxenstat-31,server=on,wait=off
-mon chardev=libxenstat-cmd,mode=control
-nodefaults -no-user-config
-name g1
-vnc 127.0.0.1:0,to=99
-display none
-kernel /boot/vmlinuz-5.4.0-80-generic
-initrd /boot/initrd.img-5.4.0-80-generic -append root=/dev/xvda1 ro 
console=hvc0 xencons=tty -device cirrus-vga,vgamem_mb=8 -boot order=cda -smp 
2,maxcpus=2 -device virtio-net,id=nic0,netdev=net0,mac=00:16:3e:30:1a:6e
-netdev type=tap,id=net0,ifname=vif31.0-emu,br=xenbr0,script=no,downscript=no
-machine xenfv,suppress-vmdesc=on -m 504 -drive 
file=xxx/rootfs.image,if=ide,index=0,media=disk,format=raw,cache=writeback

The network-related parameters are
" 
-device virtio-net,id=nic0,netdev=net0,mac=00:16:3e:30:1a:6e
-netdev type=tap,id=net0,ifname=vif31.0-emu,br=xenbr0,script=no,downscript=no
"

Get the interface info as below using command 'ip a'. The mac address of eth0 is
00:16:3e:30:1a:6e, the same as in the qemu command, which made me think
 virto-net has run successfully.
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group 
default qlen 1000
    link/ether 00:16:3e:30:1a:6e brd ff:ff:ff:ff:ff:ff
    inet 192.168.200.3/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fe30:1a6e/64 scope link
       valid_lft forever preferred_lft forever

I made further check. 
1. I run command 'lspci' and got below message. But there is no virtio devices.
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 03)
00:02.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01)
00:03.0 VGA compatible controller: Cirrus Logic GD 5446

2. Run "ls /sys/class/net/ -l", what I got is as below:
lrwxrwxrwx  1 root root 0 Aug 19 08:15 eth0 -> ../../devices/vif-0/net/eth0 
lrwxrwxrwx  1 root root 0 Aug 19 08:15 lo -> ../../devices/virtual/net/lo

Run "ls /sys/bus/xen/devices/vif-0/net/ -l", what I got is as below:
total 0 drwxr-xr-x 5
root root 0 Aug 19 08:15 eth0

It seems eth0 is not virtio-net, properly a pv-net. I am really confused.

 I have the following questions:
1. Does Xen x86 still support virtio-net based on QEMU backend?
2. If yes, is there anything wrong in my guest config file?
3. Is my way to check virtio-net in guest is right?

It is highly appreciated if you kindly tell me about these.

Best wishes
Jiamei Xie




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.