Benjamin Schweikert
2011-Sep-06 10:36 UTC
[Xen-devel] Problems with xen 4.1.x + passthrough + pvonhvm
Stefano Stabellini
2011-Sep-07 10:49 UTC
Re: [Xen-devel] Problems with xen 4.1.x + passthrough + pvonhvm
On Tue, 6 Sep 2011, Benjamin Schweikert wrote:> Hi, > I have a Gigabyte 890FXA-UD5 Mainboard with Debian Squeeze (with Debians > Xen Kernel-2.6.32) and xen 4.0.2 running. I am able to use PV Domains > with passthrough and HVM Domains (Kernel 2.6.38 with pvonhvm) with pci > and vga passthroug without any problems. > > If I upgrade xen to 4.1.x I can still use my pv domains with pci > passthrough. I can also use a Win 7 HVM domain with pci passthrough. But > if I want to use a Ubuntu Natty HVM domain with pci and vga passthrough > I am running into some errors. Remember, this setup was running with xen > 4.0.2. > I attached some log files for every case I tested. > > Things that work with the Ubuntu Natty HVM wit Xen 4.1.x: > - Without passthroughing anything, everything is working > - Using a Kernel older than 2.6.36 everything is wirking incl. pci and > vga passthrough > > Things I tried without success: > - Kernel 2.6.38 and 3.0.4 with pvonhvm > - xen_platform_pci=0 > - hda instead of xvda in the config file > > I hope somebody got a good idea how to fix this problem.There are some known issues with pv on hvm and xen 4.1.1, they should be fixed in 4.1.2 (not out yet). The patches you are looking for are: http://marc.info/?l=xen-devel&m=131478605912076 http://marc.info/?l=xen-devel&m=131478611612127 if you clone the xen-4.1-testing tree (http://xenbits.xen.org/hg/xen-4.1-testing.hg) they should be there. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hi Stefano, I''m also using ubuntu 11.04 HVM domain with xen 4.1.0. If I enable xen_platform_pci then I get busybox error. If I say xen_platform_pci=0 then it boots fine. I make passthrough devices available by using pci-stub module as pci_back is ntworking for me. [CONFIG_XEN_PCIDEV_BACKEND=y instead of m] When I provide these pci devices either by config file or by pci-attach my system turns blank. I read your post and tried with ubuntu 10.04 as guest. But I run into same problem. Should I have to create a kernel image inside d guest wid al configurations enabled in domu as mentioned in http://wiki.xensource.com/xenwiki/XenParavirtOps Let me know where I''m going wrong or else let me know the solution to get it working on 11.04. FYI: PCI devices are nvidia graphics card
Stefano Stabellini
2012-May-03 18:42 UTC
Re: Problems with xen 4.1.x + passthrough + pvonhvm
On Thu, 3 May 2012, Vinaya M S wrote:> Hi Stefano, > > I''m also using ubuntu 11.04 HVM domain with xen 4.1.0. > If I enable xen_platform_pci then I get busybox error. > If I say xen_platform_pci=0 then it boots fine.Can you post the boot logs please?> I make passthrough devices available by using pci-stub > module as pci_back is ntworking for me. > [CONFIG_XEN_PCIDEV_BACKEND=y instead of m]Are you using xm or xl? Why do you say that CONFIG_XEN_PCIDEV_BACKEND is not working for you?> When I provide these pci devices either by > config file or by pci-attach my system turns blank. > I read your post and tried with ubuntu 10.04 as guest. > But I run into same problem.Try assigning something that is not a graphic card, do you see the device if you execute lspci?> Should I have to create a kernel image inside d guest > wid al configurations enabled in domu as > mentioned in http://wiki.xensource.com/xenwiki/XenParavirtOpsit should not be necessary> Let me know where I''m going wrong or else > let me know the solution to get it working on 11.04. > FYI: PCI devices are nvidia graphics cardIs it your primary graphic card?
Stefano Stabellini <stefano.stabellini <at> eu.citrix.com> writes:> Are you using xm or xl?I''m using xm.> Why do you say that CONFIG_XEN_PCIDEV_BACKEND is not working for you?modprobe pciback says fatal error. xen-pciback.hide does not hide pci device.> Try assigning something that is not a graphic card, do you see the > device if you execute lspci?Nope. I get a error Error: Timed out waiting for device model action> Is it your primary graphic card?Yes it was a primary card.Now I inserted another card [quadro 570] which is acting as primary card. Now, i''m able to passthrough c2050 card. But on assigning them I get a msg Error: Timed out waiting for device model action log: [2012-05-04 12:51:09 2006] DEBUG (XendDomainInfo:2498) XendDomainInfo.constructDomain [2012-05-04 12:51:09 2006] DEBUG (balloon:187) Balloon: 1048700 KiB free; need 16384; done. [2012-05-04 12:51:09 2006] DEBUG (XendDomain:476) Adding Domain: 2 [2012-05-04 12:51:09 2006] DEBUG (XendDomainInfo:2836) XendDomainInfo.initDomain: 2 256 [2012-05-04 12:51:09 2006] DEBUG (image:337) Stored a VNC password for vfb access [2012-05-04 12:51:09 2006] DEBUG (image:891) args: boot, val: c [2012-05-04 12:51:09 2006] DEBUG (image:891) args: fda, val: None [2012-05-04 12:51:09 2006] DEBUG (image:891) args: fdb, val: None [2012-05-04 12:51:09 2006] DEBUG (image:891) args: soundhw, val: None [2012-05-04 12:51:09 2006] DEBUG (image:891) args: localtime, val: 0 [2012-05-04 12:51:09 2006] DEBUG (image:891) args: serial, val: [''pty''] [2012-05-04 12:51:09 2006] DEBUG (image:891) args: std-vga, val: 0 [2012-05-04 12:51:09 2006] DEBUG (image:891) args: isa, val: 0 [2012-05-04 12:51:09 2006] DEBUG (image:891) args: acpi, val: 1 [2012-05-04 12:51:09 2006] DEBUG (image:891) args: usb, val: 0 [2012-05-04 12:51:09 2006] DEBUG (image:891) args: usbdevice, val: None [2012-05-04 12:51:09 2006] DEBUG (image:891) args: gfx_passthru, val: None [2012-05-04 12:51:09 2006] INFO (image:822) Need to create platform device.[domid:2] [2012-05-04 12:51:09 2006] DEBUG (XendDomainInfo:2863) _initDomain:shadow_memory=0x0, memory_static_max=0x20000000, memory_static_min=0x0. [2012-05-04 12:51:09 2006] INFO (image:182) buildDomain os=hvm dom=2 vcpus=1 [2012-05-04 12:51:09 2006] DEBUG (image:949) domid = 2 [2012-05-04 12:51:09 2006] DEBUG (image:950) image /usr/lib/xen/boot/hvmloader [2012-05-04 12:51:09 2006] DEBUG (image:951) store_evtchn = 2 [2012-05-04 12:51:09 2006] DEBUG (image:952) memsize = 512 [2012-05-04 12:51:09 2006] DEBUG (image:953) target = 512 [2012-05-04 12:51:09 2006] DEBUG (image:954) vcpus = 1 [2012-05-04 12:51:09 2006] DEBUG (image:955) vcpu_avail = 1 [2012-05-04 12:51:09 2006] DEBUG (image:956) acpi = 1 [2012-05-04 12:51:09 2006] DEBUG (image:957) apic = 1 [2012-05-04 12:51:09 2006] INFO (XendDomainInfo:2357) createDevice: vfb : {''vncpasswd'': ''XXXXXXXX'', ''vncunused'': 1, ''other_config'': {''vncunused'': 1, ''vncpasswd'': ''XXXXXXXX'', ''vnc'': ''1''}, ''vnc'': ''1'', ''uuid'': ''686bf850-485f-2089-4207-fe4cce4a55d4''} [2012-05-04 12:51:09 2006] DEBUG (DevController:95) DevController: writing {''state'': ''1'', ''backend-id'': ''0'', ''backend'': ''/local/domain/0/backend/vfb/2/0''} to /local/domain/2/device/vfb/0. [2012-05-04 12:51:09 2006] DEBUG (DevController:97) DevController: writing {''vncunused'': ''1'', ''domain'': ''xen10_04'', ''frontend'': ''/local/domain/2/device/vfb/0'', ''uuid'': ''686bf850-485f-2089-4207-fe4cce4a55d4'', ''frontend-id'': ''2'', ''vncpasswd'': ''XXXXXXXX'', ''state'': ''1'', ''online'': ''1'', ''vnc'':''1''} to /local/domain/0/backend/vfb/2/0. [2012-05-04 12:51:09 2006] INFO (XendDomainInfo:2357) createDevice: vbd : {''uuid'': ''7e43a0f7-9c76-d2c5-86eb-66e599b19b7e'', ''bootable'': 1, ''driver'': ''ioemu'', ''dev'': ''ioemu:xvda'', ''uname'': ''file:/home/gpu/XenGuest.img'', ''mode'': ''w''} [2012-05-04 12:51:09 2006] DEBUG (DevController:95) DevController: writing {''backend-id'': ''0'', ''virtual-device'': ''51712'', ''device-type'': ''disk'', ''state'': ''1'', ''backend'': ''/local/domain/0/backend/vbd/2/51712''} to /local/domain/2/device/vbd/51712. [2012-05-04 12:51:09 2006] DEBUG (DevController:97) DevController: writing {''domain'': ''xen10_04'', ''frontend'': ''/local/domain/2/device/vbd/51712'', ''uuid'': ''7e43a0f7-9c76-d2c5-86eb-66e599b19b7e'', ''bootable'': ''1'', ''dev'': ''xvda'', ''state'': ''1'', ''params'': ''/home/gpu/XenGuest.img'', ''mode'': ''w'', ''online'': ''1'', ''frontend-id'': ''2'', ''type'': ''file''} to /local/domain/0/backend/vbd/2/51712. [2012-05-04 12:51:09 2006] INFO (XendDomainInfo:2357) createDevice: pci : {''devs'': [{''slot'': ''0x00'', ''domain'': ''0x0000'', ''key'': ''42:00.0'', ''bus'': ''0x42'', ''vdevfn'': ''0x100'', ''func'': ''0x0'', ''uuid'': ''92c19814-33ea-4094-a391-e958c5ff8b39''}, {''slot'': ''0x00'', ''domain'': ''0x0000'', ''key'': ''42:00.1'', ''bus'': ''0x42'', ''vdevfn'': ''0x100'', ''func'': ''0x1'', ''uuid'': ''7ab51e57-6c63-14fb-ea42-eee3c6aaedac''}], ''uuid'': ''503788f2-e43d-1869-ad44-347a7a735bc6''} [2012-05-04 12:51:12 2006] INFO (image:418) spawning device models: /usr/lib/xen/bin/qemu-dm [''/usr/lib/xen/bin/qemu-dm'', ''-d'', ''2'', ''-domain-name'', ''xen10_04'', ''-videoram'', ''4'', ''-vnc'', ''127.0.0.1:0,password'', ''-vncunused'', ''-vcpus'', ''1'', ''-vcpu_avail'', ''0x1'', ''-boot'', ''c'', ''-serial'', ''pty'', ''-acpi'', ''-net'', ''none'', ''-M'', ''xenfv''] [2012-05-04 12:51:12 2006] INFO (image:467) device model pid: 2849 [2012-05-04 12:51:12 2006] DEBUG (XendDomainInfo:893) XendDomainInfo.pci_device_configure: [''pci'', [''dev'', [''slot'', ''0x00''], [''domain'', ''0x0000''], [''key'', ''42:00.0''], [''bus'', ''0x42''], [''vdevfn'', ''0x100''], [''func'', ''0x0''], [''uuid'', ''92c19814-33ea-4094-a391-e958c5ff8b39'']], [''state'', ''Initialising''], [''sub_state'', ''Booting'']] [2012-05-04 12:51:12 2006] INFO (image:590) waiting for sentinel_fifo [2012-05-04 12:51:12 2006] DEBUG (XendDomainInfo:779) XendDomainInfo.hvm_pci_device_insert: {''devs'': [{''slot'': ''0x00'', ''domain'': ''0x0000'', ''key'': ''42:00.0'', ''bus'': ''0x42'', ''vdevfn'': ''0x100'', ''func'': ''0x0'', ''uuid'': ''92c19814-33ea-4094-a391-e958c5ff8b39''}], ''states'': [''Initialising'']} [2012-05-04 12:51:12 2006] DEBUG (XendDomainInfo:790) XendDomainInfo.hvm_pci_device_insert_dev: {''slot'': ''0x00'', ''domain'': ''0x0000'', ''key'': ''42:00.0'', ''bus'': ''0x42'', ''vdevfn'': ''0x100'', ''func'': ''0x0'', ''uuid'': ''92c19814-33ea-4094-a391-e958c5ff8b39''} [2012-05-04 12:51:12 2006] DEBUG (XendDomainInfo:811) XendDomainInfo.hvm_pci_device_insert_dev: 0000:42:00.0@100,msitranslate=1,power_mgmt=0 [2012-05-04 12:51:12 2006] DEBUG (XendDomainInfo:815) pci: assign device 0000:42:00.0@100,msitranslate=1,power_mgmt=0 [2012-05-04 12:51:12 2006] DEBUG (image:508) signalDeviceModel: orig_state is None, retrying [2012-05-04 12:51:22 2006] ERROR (XendDomainInfo:2922) XendDomainInfo.initDomain: exception occurred Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 2914, in _initDomain self._createDevices() File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 2395, in _createDevices self.pci_device_configure_boot() File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 627, in pci_device_configure_boot self.pci_device_configure(dev_sxp, first_dev = first) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 921, in pci_device_configure vdevfn = self.hvm_pci_device_insert(dev_config) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 786, in hvm_pci_device_insert return self.hvm_pci_device_insert_dev(new_dev) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 816, in hvm_pci_device_insert_dev self.image.signalDeviceModel(''pci-ins'', ''pci-inserted'', bdf_str) File "/usr/local/lib/python2.7/dist-packages/xen/xend/image.py", line 533, in signalDeviceModel raise VmError(''Timed out waiting for device model action'') VmError: Timed out waiting for device model action [2012-05-04 12:51:22 2006] ERROR (XendDomainInfo:488) VM start failed Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 474, in start XendTask.log_progress(31, 60, self._initDomain) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendTask.py", line 209, in log_progress retval = func(*args, **kwds) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 2925, in _initDomain raise exn VmError: Timed out waiting for device model action [2012-05-04 12:51:22 2006] DEBUG (XendDomainInfo:3071) XendDomainInfo.destroy: domid=2 [2012-05-04 12:51:22 2006] DEBUG (XendDomainInfo:2401) Destroying device model [2012-05-04 12:51:22 2006] INFO (image:615) xen10_04 device model terminated [2012-05-04 12:51:22 2006] DEBUG (XendDomainInfo:2408) Releasing devices [2012-05-04 12:51:22 2006] DEBUG (XendDomainInfo:2414) Removing vbd/51712 [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/51712 [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:2414) Removing vfb/0 [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vfb, device = vfb/0 [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:2406) No device model [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:2408) Releasing devices [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:2414) Removing vbd/51712 [2012-05-04 12:51:23 2006] DEBUG (XendDomainInfo:1276) XendDomainInfo.destroyDevice: deviceClass = vbd, device = vbd/51712 [2012-05-04 12:51:23 2006] ERROR (XendDomainInfo:108) Domain construction failed Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 106, in create vm.start() File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 474, in start XendTask.log_progress(31, 60, self._initDomain) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendTask.py", line 209, in log_progress retval = func(*args, **kwds) File "/usr/local/lib/python2.7/dist-packages/xen/xend/XendDomainInfo.py", line 2925, in _initDomain raise exn VmError: Timed out waiting for device model action
Stefano Stabellini
2012-May-04 09:54 UTC
Re: Problems with xen 4.1.x + passthrough + pvonhvm
On Fri, 4 May 2012, Vinaya MS (MT2010166) wrote:> Stefano Stabellini <stefano.stabellini <at> eu.citrix.com> writes: > > > Are you using xm or xl? > I''m using xm. > > > Why do you say that CONFIG_XEN_PCIDEV_BACKEND is not working for you? > modprobe pciback says fatal error. > xen-pciback.hide does not hide pci device.If I am not mistaken Ubuntu 11.04 comes with Linux 2.6.38 that is too old to have CONFIG_XEN_PCIDEV_BACKEND: if you are using the default Ubuntu 11.04 kernel as dom0 kernel CONFIG_XEN_PCIDEV_BACKEND is not going to work.> > Try assigning something that is not a graphic card, do you see the > > device if you execute lspci? > Nope. I get a error Error: Timed out waiting for device model action > > > Is it your primary graphic card? > Yes it was a primary card.Now I inserted another card [quadro 570] > which is acting as primary card. > > Now, i''m able to passthrough c2050 card. But on assigning them I get a msg > Error: Timed out waiting for device model actionCould you please post QEMU''s logs (/var/log/xen/qemu-dm-name*.log)?
If I am not mistaken Ubuntu 11.04 comes with Linux 2.6.38 that is too old to have CONFIG_XEN_PCIDEV_BACKEND: if you are using the default Ubuntu 11.04 kernel as dom0 kernel CONFIG_XEN_PCIDEV_BACKEND is not going to work. I''m not using default kernel. I have downloaded kernel 2.6.32.40 pv from http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git;a=commit;h=2b494f184d3337d10d59226e3632af56ea66629a and have followed http://wiki.xensource.com/xenwiki/XenParavirtOps to configure the kernel. I had grub2 issue which I resolved by installing legacy grub.
Stefano Stabellini
2012-May-04 11:15 UTC
Re: Problems with xen 4.1.x + passthrough + pvonhvm
On Fri, 4 May 2012, Vinaya MS (MT2010166) wrote:> /var/log/xen/qemu-dm-xen10_04.log.2 > > domid: 3 > Using xvda for guest''s hda > Using file /home/gpu/XenGuest.img in read-write mode > Watching /local/domain/0/device-model/3/logdirty/cmd > Watching /local/domain/0/device-model/3/command > Watching /local/domain/3/cpu > char device redirected to /dev/pts/2 > qemu_map_cache_init nr_buckets = 10000 size 4194304 > shared page at pfn feffd > buffered io page at pfn feffb > Guest uuid = ca8e8bb1-7b8f-13ae-9e67-2feac93b6989 > Time offset set 0 > populating video RAM at ff000000 > mapping video RAM from ff000000 > Register xen platform. > Done register platform. > platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state. > xs_read(/local/domain/0/device-model/3/xen_extended_power_mgmt): read error > Log-dirty: no command yet. > I/O request not ready: 0, ptr: 0, port: 0, data: 0, count: 0, size: 0 > vcpu-set: watch node error. > xs_read(/local/domain/3/log-throttling): read error > qemu: ignoring not-understood drive `/local/domain/3/log-throttling'' > medium change watch on `/local/domain/3/log-throttling'' - unknown device, ignored > char device redirected to /dev/pts/3 > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > xen be: console-0: xen be: console-0: initialise() failed > initialise() failed > cirrus vga map change while on lfb mode > mapping vram to f0000000 - f0400000 > platform_fixed_ioport: changed ro/rw state of ROM memory area. now is rw state. > platform_fixed_ioport: changed ro/rw state of ROM memory area. now is ro state. > dm-command: unknown command"pci-ins"I think that your qemu-dm has been compiled without CONFIG_PASSTHROUGH. Maybe you didn''t have pciutils-dev installed?