[Pkg-xen-devel] Bug#910961: xen-hypervisor-4.11-amd64: HVM domU fails to start when using PCI passthrough

Stephen Oberholtzer stevie at qrpff.net
Sat Oct 13 21:08:20 BST 2018


Package: xen-hypervisor-4.11-amd64
Version: 4.11.1~pre.20180911.5acdd26fdc+dfsg-3
Severity: normal

Dear Maintainer,

HVM domUs that specify PCI passthrough will not start.  The same configuration file started under Xen 4.8.

The output I am receiving is as follows:

libxl: error: libxl_pci.c:1146:libxl__device_pci_reset: Domain 0:The kernel doesn't support reset from sysfs for PCI device 0000:00:14.0
libxl: error: libxl_qmp.c:292:qmp_handle_error_response: Domain 31:received an error message from QMP server: Binding of interrupt 0 failed: Permission denied
libxl: error: libxl_pci.c:1300:libxl__add_pcidevs: Domain 31:libxl_device_pci_add failed: -3
libxl: error: libxl_create.c:1519:domcreate_attach_devices: Domain 31:unable to add pci devices
libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 31:Non-existant domain
libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 31:Unable to destroy guest
libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 31:Destruction of domain failed

(There are three PCI devices I'm trying to pass through: 00:14.0, 01:00.[01], and 03:00.0. I tried each set individually, and got equivalent results each time.)

With 'log_lvl=all guest_loglvl=all', all I get in xl dmesg is a bunch of lines saying "HVM<domid> save:" for CPU, PIC, IOAPIC, etc.

Google gives me nothing.  I can find a small number of (unanswered) "Binding of interrupt 0 failed" messages, but none about 'Permission denied'.
However, it looks like the message may be incorrect, due to an mismatch between qemu and libxen.  Reading through the source code:

qemu: hw/xen/xen_pt.c line 874 logs the message.
    874             error_setg_errno(errp, errno, "Binding of interrupt %u failed",
    875                              e_intx);

 That's using 'errno'.  However, the failed call was to xc_domain_bind_pt_pci_irq.

libxen: tools/libxc/xc_domain.c:1899, xc_domain_bind_pt_pci_irq forwards to xc_domain_bind_pt_irq
libxen: tools/libxc/xc_domain.c:1827, xc_domain_bind_pt_irq forwards to xc_domain_bind_pt_irq_int
libxen: tools/libxc/xc_domain.c:1783, xc_domain_bind_pt_irq_int
	If an invalid argument is passed, this function returns -1 and sets errno to EINVAL, matching what qemu is expecting.
	If pre-validation passes, the request is forwarded to do_domctl.
lixben: xen/common/domctl.c:380, do_domctl
	This function doesn't seem to set errno. Instead, it returns (-ETHING).

This means that, if the request is handled by do_domctl, errno is unchanged, and so the "Permission denied" message may be
from an EPERM left in errno from an earlier operation.



-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.6 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

xen-hypervisor-4.11-amd64 depends on no packages.

Versions of packages xen-hypervisor-4.11-amd64 recommends:
ii  xen-hypervisor-common  4.11.1~pre.20180911.5acdd26fdc+dfsg-1~exp1
ii  xen-utils-4.11         4.11.1~pre.20180911.5acdd26fdc+dfsg-3

xen-hypervisor-4.11-amd64 suggests no packages.

-- no debconf information


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (900, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.18.6 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

xen-hypervisor-4.11-amd64 depends on no packages.

Versions of packages xen-hypervisor-4.11-amd64 recommends:
ii  xen-hypervisor-common  4.11.1~pre.20180911.5acdd26fdc+dfsg-1~exp1
ii  xen-utils-4.11         4.11.1~pre.20180911.5acdd26fdc+dfsg-3

xen-hypervisor-4.11-amd64 suggests no packages.

-- no debconf information



More information about the Pkg-xen-devel mailing list