Tommi Airikka
2016-Jan-30 13:18 UTC
[Pkg-xen-devel] Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
On Wed, Jan 27, 2016 at 7:30 PM, Konrad Rzeszutek Wilk < konrad.wilk at oracle.com> wrote:> On Sat, Jan 23, 2016 at 05:12:04PM +0100, Tommi Airikka wrote: > > Xen developers, > > > > After an upgrade of my Debian Jessie dom0 and domUs, my passthroughed > > NIC stopped working. > > This bug was probably introduced in Debian Jessie sometime > > between 2015-12-30 and 2016-01-08 as 2015-12-30 as 2015-12-30 was the > > last time I upgraded without any problems according to my dpkg.log. > > This upgrade looks to only have upgraded the hypervisor? > > As in I see: > > domU "bug" "uname -a": > Linux bug 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) > x86_64 GNU/Linux > > domU "working" "uname -a": > Linux working 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 > (2016-01-02) x86_64 GNU/Linux > > So same version? What was the earlier version of the hypervisor? >I forgot to mention that I use apt-dater to upgrade both dom0 and domUs at the same time. domU "bug" was created for debugging purposes just a couple of hours after I used apt-dater and realized that there's something wrong with the pci passthrough. domU "bug" and domU "working" should have relatively similar software state. According to dom0 dpkg.log, the xen-hypervisor-4.4-amd64 (version "4.4.1-9+deb8u3") has been untouched since 2015-12-21. linux-image-3.16.0-4-amd64 was upgraded from "3.16.7-ckt20-1+deb8u1" to "3.16.7-ckt20-1+deb8u2" at the point of time when pci passthrough stopped working.> > The Xen version you have says: > > (XEN) I/O virtualisation disabled > > Which is not very healthy for PCI passthrough. Albeit you can do > it with PV without IOMMU. Did the previous version of Xen have the same > message? >I downgraded linux-image on dom0: dpkg -i linux-image-3.16.0-4-amd64_3.16.7-ckt20-1+deb8u1_amd64.deb and now the pci passthrough seems to work! dom0 'uname -a': Linux dom0 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) x86_64 GNU/Linux domU bug 'uname -a': Linux bug 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) x86_64 GNU/Linux But I still have the "(XEN) I/O virtualisation disabled". dom0 'xl dmesg': (XEN) Xen version 4.4.1 (Debian 4.4.1-9+deb8u3) (ultrotter at debian.org) (gcc (Debian 4.9.2-10) 4.9.2) debug=n Wed Nov 25 15:46:22 EET 2015 (XEN) Bootloader: GRUB 2.02~beta2-22+deb8u1 (XEN) Command line: placeholder dom0_mem=1024M,max:1024M (XEN) Video information: (XEN) VGA is text mode 80x25, font 8x16 (XEN) VBE/DDC methods: none; EDID transfer time: 0 seconds (XEN) EDID info not retrieved because no DDC retrieval method detected (XEN) Disc information: (XEN) Found 4 MBR signatures (XEN) Found 2 EDD information structures (XEN) Xen-e820 RAM map: (XEN) 0000000000000000 - 0000000000099800 (usable) (XEN) 0000000000099800 - 0000000000099c00 (reserved) (XEN) 000000000009e000 - 00000000000a0000 (reserved) (XEN) 00000000000f0000 - 0000000000100000 (reserved) (XEN) 0000000000100000 - 00000000f1de4000 (usable) (XEN) 00000000f1de4000 - 00000000f1dee000 (ACPI data) (XEN) 00000000f1dee000 - 00000000f8000000 (reserved) (XEN) 00000000fec00000 - 00000000fee10000 (reserved) (XEN) 00000000ff800000 - 0000000100000000 (reserved) (XEN) 0000000100000000 - 000000028bfff000 (usable) (XEN) ACPI: RSDP 000F4F00, 0024 (r2 HP ) (XEN) ACPI: XSDT F1DE6400, 00B4 (r1 HP ProLiant 2 ? 162E) (XEN) ACPI: FACP F1DE6540, 00F4 (r3 HP ProLiant 2 ? 162E) (XEN) ACPI: DSDT F1DE6640, 1C1A (r1 HP DSDT 1 INTL 20030228) (XEN) ACPI: FACS F1DE4140, 0040 (XEN) ACPI: SPCR F1DE4180, 0050 (r1 HP SPCRRBSU 1 ? 162E) (XEN) ACPI: MCFG F1DE4200, 003C (r1 HP ProLiant 1 0) (XEN) ACPI: HPET F1DE4240, 0038 (r1 HP ProLiant 2 ? 162E) (XEN) ACPI: FFFF F1DE4280, 0064 (r2 HP ProLiant 2 ? 162E) (XEN) ACPI: SPMI F1DE4300, 0040 (r5 HP ProLiant 1 ? 162E) (XEN) ACPI: ERST F1DE4340, 0230 (r1 HP ProLiant 1 ? 162E) (XEN) ACPI: APIC F1DE4580, 0252 (r1 HP ProLiant 2 0) (XEN) ACPI: FFFF F1DE4800, 0176 (r1 HP ProLiant 1 ? 162E) (XEN) ACPI: BERT F1DE4980, 0030 (r1 HP ProLiant 1 ? 162E) (XEN) ACPI: HEST F1DE49C0, 00BC (r1 HP ProLiant 1 ? 162E) (XEN) ACPI: FFFF F1DE4A80, 1914 (r1 HP ProLiant 1 ? 162E) (XEN) ACPI: FFFF F1DE63C0, 002D (r1 HP ProLiant 1 0) (XEN) ACPI: SSDT F1DE8280, 0137 (r3 HP CRSPCI0 2 HP 1) (XEN) ACPI: SSDT F1DE83C0, 0177 (r3 HP riser0 2 INTL 20030228) (XEN) ACPI: SSDT F1DE8540, 01E1 (r1 HP pcc 1 INTL 20090625) (XEN) ACPI: SSDT F1DE8740, 0377 (r1 HP pmab 1 INTL 20090625) (XEN) ACPI: SSDT F1DE8AC0, 0504 (r1 INTEL PPM RCM 80000001 INTL 20061109) (XEN) System RAM: 10205MB (10450416kB) (XEN) Domain heap initialised (XEN) Processor #0 7:10 APIC version 21 (XEN) Processor #2 7:10 APIC version 21 (XEN) IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23 (XEN) Enabling APIC mode: Flat. Using 1 I/O APICs (XEN) Using scheduler: SMP Credit Scheduler (credit) (XEN) Detected 2294.859 MHz processor. (XEN) Initing memory sharing. (XEN) xstate_init: using cntxt_size: 0x240 and states: 0x3 (XEN) I/O virtualisation disabled (XEN) Enabled directed EOI with ioapic_ack_old on! (XEN) ENABLING IO-APIC IRQs (XEN) -> Using old ACK method (XEN) Platform timer is 14.318MHz HPET (XEN) Allocated console ring of 16 KiB. (XEN) VMX: Supported advanced features: (XEN) - APIC MMIO access virtualisation (XEN) - APIC TPR shadow (XEN) - Extended Page Tables (EPT) (XEN) - Virtual-Processor Identifiers (VPID) (XEN) - Virtual NMI (XEN) - MSR direct-access bitmap (XEN) - Unrestricted Guest (XEN) HVM: ASIDs enabled. (XEN) HVM: VMX enabled (XEN) HVM: Hardware Assisted Paging (HAP) detected (XEN) HVM: HAP page sizes: 4kB, 2MB (XEN) Brought up 2 CPUs (XEN) *** LOADING DOMAIN 0 *** (XEN) Xen kernel: 64-bit, lsb, compat32 (XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x1000000 -> 0x1f18000 (XEN) PHYSICAL MEMORY ARRANGEMENT: (XEN) Dom0 alloc.: 000000023c000000->0000000240000000 (241836 pages to be allocated) (XEN) Init. ramdisk: 000000028aeac000->000000028bdff9af (XEN) VIRTUAL MEMORY ARRANGEMENT: (XEN) Loaded kernel: ffffffff81000000->ffffffff81f18000 (XEN) Init. ramdisk: ffffffff81f18000->ffffffff82e6b9af (XEN) Phys-Mach map: ffffffff82e6c000->ffffffff8306c000 (XEN) Start info: ffffffff8306c000->ffffffff8306c4b4 (XEN) Page tables: ffffffff8306d000->ffffffff8308a000 (XEN) Boot stack: ffffffff8308a000->ffffffff8308b000 (XEN) TOTAL: ffffffff80000000->ffffffff83400000 (XEN) ENTRY ADDRESS: ffffffff819021f0 (XEN) Dom0 has maximum 2 VCPUs (XEN) Scrubbing Free RAM: ..........................................................................................done. (XEN) Initial low memory virq threshold set at 0x4000 pages. (XEN) Std. Loglevel: Errors and warnings (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) (XEN) Xen is relinquishing VGA console. (XEN) *** Serial input -> DOM0 (type 'CTRL-a' three times to switch input to Xen) (XEN) Freed 284kB init memory. (XEN) mm.c:812: d13: Forcing read-only access to MFN fbff1 (XEN) mm.c:812: d13: Forcing read-only access to MFN fbff1 (XEN) mm.c:812: d13: Forcing read-only access to MFN fbff1 (XEN) mm.c:812: d0: Forcing read-only access to MFN fbff1 (XEN) mm.c:812: d13: Forcing read-only access to MFN faba0 (XEN) mm.c:812: d0: Forcing read-only access to MFN faba0 domU "bug" 'dmesg': [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 3.16.0-4-amd64 (debian-kernel at lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) [ 0.000000] Command line: root=/dev/xvda2 ro elevator=noop root=/dev/xvda2 ro [ 0.000000] ACPI in unprivileged domain disabled [ 0.000000] 1-1 mapping on 8000->100000 [ 0.000000] Set 1015808 page(s) to 1-1 mapping [ 0.000000] 1-1 mapping on 100000->8000000 [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] Xen: [mem 0x0000000000000000-0x000000000009ffff] usable [ 0.000000] Xen: [mem 0x00000000000a0000-0x00000000000fffff] reserved [ 0.000000] Xen: [mem 0x0000000000100000-0x0000000007ffffff] usable [ 0.000000] Xen: [mem 0x0000000008000000-0x00000000f1de3fff] unusable [ 0.000000] Xen: [mem 0x00000000f1de4000-0x00000000f1dedfff] ACPI data [ 0.000000] Xen: [mem 0x00000000f1dee000-0x00000000f7ffffff] reserved [ 0.000000] Xen: [mem 0x00000000fec00000-0x00000000feefffff] reserved [ 0.000000] Xen: [mem 0x00000000ff800000-0x00000000ffffffff] reserved [ 0.000000] NX (Execute Disable) protection: active [ 0.000000] DMI not present or invalid. [ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved [ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable [ 0.000000] AGP: No AGP bridge found [ 0.000000] e820: last_pfn = 0x8000 max_arch_pfn = 0x400000000 [ 0.000000] Base memory trampoline at [ffff88000009a000] 9a000 size 24576 [ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff] [ 0.000000] [mem 0x00000000-0x000fffff] page 4k [ 0.000000] init_memory_mapping: [mem 0x07e00000-0x07ffffff] [ 0.000000] [mem 0x07e00000-0x07ffffff] page 4k [ 0.000000] BRK [0x01b02000, 0x01b02fff] PGTABLE [ 0.000000] init_memory_mapping: [mem 0x04000000-0x07dfffff] [ 0.000000] [mem 0x04000000-0x07dfffff] page 4k [ 0.000000] BRK [0x01b03000, 0x01b03fff] PGTABLE [ 0.000000] BRK [0x01b04000, 0x01b04fff] PGTABLE [ 0.000000] BRK [0x01b05000, 0x01b05fff] PGTABLE [ 0.000000] BRK [0x01b06000, 0x01b06fff] PGTABLE [ 0.000000] BRK [0x01b07000, 0x01b07fff] PGTABLE [ 0.000000] init_memory_mapping: [mem 0x00100000-0x03ffffff] [ 0.000000] [mem 0x00100000-0x03ffffff] page 4k [ 0.000000] RAMDISK: [mem 0x01f18000-0x049bffff] [ 0.000000] NUMA turned off [ 0.000000] Faking a node at [mem 0x0000000000000000-0x0000000007ffffff] [ 0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff] [ 0.000000] NODE_DATA [mem 0x07fe7000-0x07febfff] [ 0.000000] Zone ranges: [ 0.000000] DMA [mem 0x00001000-0x00ffffff] [ 0.000000] DMA32 [mem 0x01000000-0xffffffff] [ 0.000000] Normal empty [ 0.000000] Movable zone start for each node [ 0.000000] Early memory node ranges [ 0.000000] node 0: [mem 0x00001000-0x0009ffff] [ 0.000000] node 0: [mem 0x00100000-0x07ffffff] [ 0.000000] On node 0 totalpages: 32671 [ 0.000000] DMA zone: 56 pages used for memmap [ 0.000000] DMA zone: 21 pages reserved [ 0.000000] DMA zone: 3999 pages, LIFO batch:0 [ 0.000000] DMA32 zone: 392 pages used for memmap [ 0.000000] DMA32 zone: 28672 pages, LIFO batch:7 [ 0.000000] SFI: Simple Firmware Interface v0.81 http://simplefirmware.org [ 0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs [ 0.000000] nr_irqs_gsi: 16 [ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000fffff] [ 0.000000] e820: [mem 0xf8000000-0xfebfffff] available for PCI devices [ 0.000000] Booting paravirtualized kernel on Xen [ 0.000000] Xen version: 4.4.1 (preserve-AD) [ 0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:1 nr_node_ids:1 [ 0.000000] PERCPU: Embedded 27 pages/cpu @ffff880007c00000 s80896 r8192 d21504 u2097152 [ 0.000000] pcpu-alloc: s80896 r8192 d21504 u2097152 alloc=1*2097152 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 32202 [ 0.000000] Policy zone: DMA32 [ 0.000000] Kernel command line: root=/dev/xvda2 ro elevator=noop root=/dev/xvda2 ro [ 0.000000] PID hash table entries: 512 (order: 0, 4096 bytes) [ 0.000000] xsave: enabled xstate_bv 0x3, cntxt size 0x240 [ 0.000000] AGP: Checking aperture... [ 0.000000] AGP: No AGP bridge found [ 0.000000] Calgary: detecting Calgary via BIOS EBDA area [ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing! [ 0.000000] Memory: 72968K/130684K available (5219K kernel code, 947K rwdata, 1836K rodata, 1204K init, 840K bss, 57716K reserved) [ 0.000000] Hierarchical RCU implementation. [ 0.000000] RCU dyntick-idle grace-period acceleration is enabled. [ 0.000000] RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=1. [ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1 [ 0.000000] NR_IRQS:33024 nr_irqs:256 16 [ 0.000000] xen:events: Using FIFO-based ABI [ 0.000000] Console: colour dummy device 80x25 [ 0.000000] console [tty0] enabled [ 0.000000] console [hvc0] enabled [ 0.000000] Xen: using vcpuop timer interface [ 0.000000] installing Xen timer for CPU 0 [ 0.000000] tsc: Detected 2294.858 MHz processor [ 0.004000] Calibrating delay loop (skipped), value calculated using timer frequency.. 4589.71 BogoMIPS (lpj=9179432) [ 0.004000] pid_max: default: 32768 minimum: 301 [ 0.004000] Security Framework initialized [ 0.004000] AppArmor: AppArmor disabled by boot time parameter [ 0.004000] Yama: disabled by default; enable with sysctl kernel.yama.* [ 0.004000] Dentry cache hash table entries: 16384 (order: 5, 131072 bytes) [ 0.004000] Inode-cache hash table entries: 8192 (order: 4, 65536 bytes) [ 0.004000] Mount-cache hash table entries: 512 (order: 0, 4096 bytes) [ 0.004000] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes) [ 0.004000] Initializing cgroup subsys memory [ 0.004000] Initializing cgroup subsys devices [ 0.004000] Initializing cgroup subsys freezer [ 0.004000] Initializing cgroup subsys net_cls [ 0.004000] Initializing cgroup subsys blkio [ 0.004000] Initializing cgroup subsys perf_event [ 0.004000] Initializing cgroup subsys net_prio [ 0.004000] ENERGY_PERF_BIAS: Set to 'normal', was 'performance' ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8) [ 0.004000] CPU: Physical Processor ID: 0 [ 0.004000] CPU: Processor Core ID: 1 [ 0.004000] Last level iTLB entries: 4KB 512, 2MB 8, 4MB 8 Last level dTLB entries: 4KB 512, 2MB 32, 4MB 32, 1GB 0 tlb_flushall_shift: 2 [ 0.025772] Freeing SMP alternatives memory: 20K (ffffffff81a1b000 - ffffffff81a20000) [ 0.028385] ftrace: allocating 21679 entries in 85 pages [ 0.036140] Performance Events: unsupported p6 CPU model 58 no PMU driver, software events only. [ 0.037591] x86: Booted up 1 node, 1 CPUs [ 0.037647] NMI watchdog: disabled (cpu0): hardware events not enabled [ 0.037724] devtmpfs: initialized [ 0.041230] pinctrl core: initialized pinctrl subsystem [ 0.041317] NET: Registered protocol family 16 [ 0.041334] xen:grant_table: Grant tables using version 1 layout [ 0.041353] Grant table initialized [ 0.041615] PCI: setting up Xen PCI frontend stub [ 0.041615] PCI: pci_cache_line_size set to 64 bytes [ 0.041615] ACPI: Interpreter disabled. [ 0.041615] xen:balloon: Initialising balloon driver [ 0.044041] xen_balloon: Initialising balloon driver [ 0.044067] vgaarb: loaded [ 0.044134] PCI: System does not support PCI [ 0.044138] PCI: System does not support PCI [ 0.044274] Switched to clocksource xen [ 0.049387] pnp: PnP ACPI: disabled [ 0.053177] NET: Registered protocol family 2 [ 0.053357] TCP established hash table entries: 1024 (order: 1, 8192 bytes) [ 0.053368] TCP bind hash table entries: 1024 (order: 2, 16384 bytes) [ 0.053373] TCP: Hash tables configured (established 1024 bind 1024) [ 0.053389] TCP: reno registered [ 0.053394] UDP hash table entries: 256 (order: 1, 8192 bytes) [ 0.053402] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) [ 0.053439] NET: Registered protocol family 1 [ 0.053454] PCI: CLS 0 bytes, default 64 [ 0.053501] Unpacking initramfs... [ 0.091622] Freeing initrd memory: 43680K (ffff880001f18000 - ffff8800049c0000) [ 0.093485] platform rtc_cmos: registered platform RTC device (no PNP device found) [ 0.093788] RAPL PMU detected, hw unit 2^-16 Joules, API unit is 2^-32 Joules, 3 fixed counters 163840 ms ovfl timer [ 0.093845] microcode: CPU0 sig=0x306a9, pf=0x2, revision=0x19 [ 0.093925] microcode: Microcode Update Driver: v2.00 < tigran at aivazian.fsnet.co.uk>, Peter Oruba [ 0.094168] futex hash table entries: 256 (order: 2, 16384 bytes) [ 0.094197] audit: initializing netlink subsys (disabled) [ 0.094217] audit: type=2000 audit(1454158364.375:1): initialized [ 0.094532] HugeTLB registered 2 MB page size, pre-allocated 0 pages [ 0.094557] zbud: loaded [ 0.094700] VFS: Disk quotas dquot_6.5.2 [ 0.094714] Dquot-cache hash table entries: 512 (order 0, 4096 bytes) [ 0.094771] msgmni has been set to 227 [ 0.095221] alg: No test for stdrng (krng) [ 0.095249] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252) [ 0.095292] io scheduler noop registered (default) [ 0.095297] io scheduler deadline registered [ 0.095324] io scheduler cfq registered [ 0.095389] pci_hotplug: PCI Hot Plug PCI Core version: 0.5 [ 0.095407] pciehp: PCI Express Hot Plug Controller Driver version: 0.4 [ 0.095437] intel_idle: does not run on family 6 model 58 [ 0.095735] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.095989] Linux agpgart interface v0.103 [ 0.096104] i8042: PNP: No PS/2 controller found. Probing ports directly. [ 1.270619] i8042: No controller found [ 1.270793] mousedev: PS/2 mouse device common for all mice [ 1.348656] rtc_cmos rtc_cmos: rtc core: registered rtc_cmos as rtc0 [ 1.348710] rtc_cmos: probe of rtc_cmos failed with error -38 [ 1.348741] ledtrig-cpu: registered to indicate activity on CPUs [ 1.348760] AMD IOMMUv2 driver by Joerg Roedel <joerg.roedel at amd.com> [ 1.348763] AMD IOMMUv2 functionality not available on this system [ 1.348859] TCP: cubic registered [ 1.348876] NET: Registered protocol family 10 [ 1.349056] mip6: Mobile IPv6 [ 1.349064] NET: Registered protocol family 17 [ 1.349073] mpls_gso: MPLS GSO support [ 1.349080] mce: Unable to init device /dev/mcelog (rc: -5) [ 1.349225] registered taskstats version 1 [ 1.349283] xenbus_probe_frontend: Device with no driver: device/vbd/51714 [ 1.349288] xenbus_probe_frontend: Device with no driver: device/vbd/51713 [ 1.349291] xenbus_probe_frontend: Device with no driver: device/vif/0 [ 1.349294] xenbus_probe_frontend: Device with no driver: device/pci/0 [ 1.349331] rtc_hctosys: unable to open rtc device (rtc0) [ 1.349380] PM: Hibernation image not present or could not be loaded. [ 1.349896] Freeing unused kernel memory: 1204K (ffffffff818ee000 - ffffffff81a1b000) [ 1.349907] Write protecting the kernel read-only data: 8192k [ 1.352430] Freeing unused kernel memory: 912K (ffff88000151c000 - ffff880001600000) [ 1.352541] Freeing unused kernel memory: 212K (ffff8800017cb000 - ffff880001800000) [ 1.372341] systemd-udevd[58]: starting version 215 [ 1.372888] random: systemd-udevd urandom read with 3 bits of entropy available [ 1.395569] xen_netfront: Initialising Xen virtual ethernet driver [ 1.443740] blkfront: xvda2: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled; [ 1.445979] blkfront: xvda1: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled; [ 8.862010] EXT4-fs (xvda2): mounted filesystem with ordered data mode. Opts: (null) [ 9.351477] random: nonblocking pool is initialized [ 10.447043] systemd[1]: systemd 215 running in system mode. (+PAM +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ -SECCOMP -APPARMOR) [ 10.447128] systemd[1]: Detected virtualization 'xen'. [ 10.447139] systemd[1]: Detected architecture 'x86-64'. [ 10.912912] systemd[1]: Inserted module 'autofs4' [ 10.971682] systemd[1]: Set hostname to <bug>. [ 15.114090] systemd[1]: Cannot add dependency job for unit dbus.socket, ignoring: Unit dbus.socket failed to load: No such file or directory. [ 15.114125] systemd[1]: Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service failed to load: No such file or directory. [ 15.114652] systemd[1]: Starting Forward Password Requests to Wall Directory Watch. [ 15.114803] systemd[1]: Started Forward Password Requests to Wall Directory Watch. [ 15.114834] systemd[1]: Expecting device dev-hvc0.device... [ 15.115023] systemd[1]: Starting Remote File Systems (Pre). [ 15.115131] systemd[1]: Reached target Remote File Systems (Pre). [ 15.115185] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point. [ 15.115422] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point. [ 15.115463] systemd[1]: Starting Dispatch Password Requests to Console Directory Watch. [ 15.115547] systemd[1]: Started Dispatch Password Requests to Console Directory Watch. [ 15.115571] systemd[1]: Starting Paths. [ 15.115669] systemd[1]: Reached target Paths. [ 15.115692] systemd[1]: Starting Encrypted Volumes. [ 15.115785] systemd[1]: Reached target Encrypted Volumes. [ 15.115808] systemd[1]: Expecting device dev-xvda1.device... [ 15.115899] systemd[1]: Starting Root Slice. [ 15.116040] systemd[1]: Created slice Root Slice. [ 15.116064] systemd[1]: Starting User and Session Slice. [ 15.116207] systemd[1]: Created slice User and Session Slice. [ 15.116231] systemd[1]: Starting Delayed Shutdown Socket. [ 15.116365] systemd[1]: Listening on Delayed Shutdown Socket. [ 15.116389] systemd[1]: Starting /dev/initctl Compatibility Named Pipe. [ 15.116524] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe. [ 15.116548] systemd[1]: Starting Journal Socket (/dev/log). [ 15.116688] systemd[1]: Listening on Journal Socket (/dev/log). [ 15.116721] systemd[1]: Starting udev Kernel Socket. [ 15.116829] systemd[1]: Listening on udev Kernel Socket. [ 15.116859] systemd[1]: Starting udev Control Socket. [ 15.116970] systemd[1]: Listening on udev Control Socket. [ 15.116997] systemd[1]: Starting Journal Socket. [ 15.117135] systemd[1]: Listening on Journal Socket. [ 15.117170] systemd[1]: Starting System Slice. [ 15.117300] systemd[1]: Created slice System Slice. [ 15.117341] systemd[1]: Starting File System Check on Root Device... [ 15.118784] systemd[1]: Starting system-getty.slice. [ 15.118980] systemd[1]: Created slice system-getty.slice. [ 15.119005] systemd[1]: Starting system-serial\x2dgetty.slice. [ 15.119146] systemd[1]: Created slice system-serial\x2dgetty.slice. [ 15.119224] systemd[1]: Starting Increase datagram queue length... [ 15.120664] systemd[1]: Mounting POSIX Message Queue File System... [ 15.315723] systemd[1]: Mounting Debug File System... [ 15.376731] systemd[1]: Started Set Up Additional Binary Formats. [ 15.376795] systemd[1]: Mounting Huge Pages File System... [ 15.378081] systemd[1]: Starting Create list of required static device nodes for the current kernel... [ 15.422179] systemd[1]: Starting Load Kernel Modules... [ 15.423348] systemd[1]: Starting udev Coldplug all Devices... [ 15.424454] systemd[1]: Starting Slices. [ 15.424548] systemd[1]: Reached target Slices. [ 15.425330] systemd[1]: Started Increase datagram queue length. [ 15.426545] systemd[1]: Starting Syslog Socket. [ 15.426671] systemd[1]: Listening on Syslog Socket. [ 15.426694] systemd[1]: Starting Sockets. [ 15.426763] systemd[1]: Reached target Sockets. [ 15.426783] systemd[1]: Starting Journal Service... [ 15.429296] systemd[1]: Started Journal Service. [ 16.279394] systemd-udevd[137]: starting version 215 [ 16.420090] EXT4-fs (xvda2): re-mounted. Opts: errors=remount-ro [ 16.640700] systemd-journald[123]: Received request to flush runtime journal from PID 1 [ 17.378097] input: PC Speaker as /devices/platform/pcspkr/input/input0 [ 17.384721] pcifront pci-0: Installing PCI frontend [ 17.384741] xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB [ 17.387512] software IO TLB [mem 0x02400000-0x02800000] (4MB) mapped at [ffff880002400000-ffff8800027fffff] [ 17.388459] pcifront pci-0: Creating PCI Frontend Bus 0000:00 [ 17.388562] pcifront pci-0: PCI host bridge to bus 0000:00 [ 17.388569] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] [ 17.388573] pci_bus 0000:00: root bus resource [mem 0x00000000-0xfffffffff] [ 17.388578] pci_bus 0000:00: root bus resource [bus 00-ff] [ 17.401449] pci 0000:00:01.0: [1912:0014] type 00 class 0x0c0330 [ 17.401911] pci 0000:00:01.0: reg 0x10: [mem 0xfbff0000-0xfbff1fff 64bit] [ 17.431844] alg: No test for crc32 (crc32-pclmul) [ 17.435526] pci 0000:00:00.1: [14e4:165f] type 00 class 0x020000 [ 17.435907] pci 0000:00:00.1: reg 0x10: [mem 0xfabc0000-0xfabcffff 64bit pref] [ 17.436227] pci 0000:00:00.1: reg 0x18: [mem 0xfabb0000-0xfabbffff 64bit pref] [ 17.436481] pci 0000:00:00.1: reg 0x20: [mem 0xfaba0000-0xfabaffff 64bit pref] [ 17.437994] pcifront pci-0: New device on 0000:00:00.1 found. [ 17.439770] pcifront pci-0: claiming resource 0000:00:01.0/0 [ 17.439778] pcifront pci-0: claiming resource 0000:00:00.1/0 [ 17.439782] pcifront pci-0: claiming resource 0000:00:00.1/2 [ 17.439785] pcifront pci-0: claiming resource 0000:00:00.1/4 [ 17.439875] pci 0000:00:01.0: Xen PCI mapped GSI18 to IRQ29 [ 17.742850] intel_rapl: Found RAPL domain package [ 17.742864] intel_rapl: Found RAPL domain core [ 18.330425] pps_core: LinuxPPS API ver. 1 registered [ 18.330438] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti at linux.it> [ 18.335293] PTP clock support registered [ 18.382328] tg3.c:v3.137 (May 11, 2014) [ 18.383508] tg3 0000:00:00.1: Xen PCI mapped GSI17 to IRQ30 [ 18.394807] usbcore: registered new interface driver usbfs [ 18.395074] usbcore: registered new interface driver hub [ 18.395796] usbcore: registered new device driver usb [ 18.413270] tg3 0000:00:00.1 eth1: Tigon3 [partno(N/A) rev 5720000] (PCI Express) MAC address 34:64:a9:9a:a8:b1 [ 18.413288] tg3 0000:00:00.1 eth1: attached PHY is 5720C (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1]) [ 18.413297] tg3 0000:00:00.1 eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] TSOcap[1] [ 18.413304] tg3 0000:00:00.1 eth1: dma_rwctrl[00000001] dma_mask[64-bit] [ 18.430176] xen:events: xen_bind_pirq_gsi_to_irq: returning irq 29 for gsi 18 [ 18.430192] xhci_hcd 0000:00:01.0: Xen PCI mapped GSI18 to IRQ29 [ 18.434698] xhci_hcd 0000:00:01.0: xHCI Host Controller [ 18.434723] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 1 [ 18.445842] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 [ 18.445856] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 18.445862] usb usb1: Product: xHCI Host Controller [ 18.445867] usb usb1: Manufacturer: Linux 3.16.0-4-amd64 xhci_hcd [ 18.445872] usb usb1: SerialNumber: 0000:00:01.0 [ 18.449363] hub 1-0:1.0: USB hub found [ 18.449392] hub 1-0:1.0: 2 ports detected [ 18.449530] xhci_hcd 0000:00:01.0: xHCI Host Controller [ 18.449540] xhci_hcd 0000:00:01.0: new USB bus registered, assigned bus number 2 [ 18.450543] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM. [ 18.450584] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003 [ 18.450591] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 [ 18.450596] usb usb2: Product: xHCI Host Controller [ 18.450602] usb usb2: Manufacturer: Linux 3.16.0-4-amd64 xhci_hcd [ 18.450606] usb usb2: SerialNumber: 0000:00:01.0 [ 18.450904] hub 2-0:1.0: USB hub found [ 18.450925] hub 2-0:1.0: 2 ports detected [ 18.532710] Adding 262140k swap on /dev/xvda1. Priority:-1 extents:1 across:262140k SSFS> Looking at the code (in Linux) I see: > 516 /* NB. We are happy to share unless we are probing. */ > 517 bind_pirq.flags = info->u.pirq.flags & PIRQ_SHAREABLE ? > 518 BIND_PIRQ__WILL_SHARE : 0; > 519 rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_pirq, > &bind_pirq); > 520 if (rc != 0) { > 521 pr_warn("Failed to obtain physical IRQ %d\n", irq); > 522 return 0; > 523 } > > It would be nice if I we had included the return code :-( > > Anyhow for PV guests in the hypervisor there is a check: > 414 if ( !is_hvm_domain(d) && !pirq_access_permitted(d, pirq) ) > 415 return -EPERM; > 416 > > And I wonder if the XEN_DOMCTL_irq_permission aka, xc_domain_irq_permission > had been called. I remember that at some point we missed it for Xend.. > > Could you enable Xend debugging (if you are using that): >I'm using xl. Is there a similar setting for that?> > export XEND_DEBUG=1 > /etc/init.d/xend start > > And try starting the guest. Then grep in /var/log/xen/xend.log for > "pci: enabling irq " > > You should see 18, 17 and 21. > > Also if you do 'xl debug-keys i && xl dmesg' > > You should see that the IRQ 17, 18, 21 are assigned to the domain. > ? >Br, Tommi Airikka -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20160130/3140c0c7/attachment-0001.html>
Ian Campbell
2016-Feb-01 10:43 UTC
[Pkg-xen-devel] Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
On Sat, 2016-01-30 at 14:18 +0100, Tommi Airikka wrote:> > > On Wed, Jan 27, 2016 at 7:30 PM, Konrad Rzeszutek Wilk <konrad.wilk at oracl > e.com> wrote: > > On Sat, Jan 23, 2016 at 05:12:04PM +0100, Tommi Airikka wrote: > > > Xen developers, > > > > > > After an upgrade of my Debian Jessie dom0 and domUs, my passthroughed > > > NIC stopped working. > > > This bug was probably introduced in Debian Jessie sometime > > > between 2015-12-30 and 2016-01-08 as 2015-12-30 as 2015-12-30 was the > > > last time I upgraded without any problems according to my dpkg.log. > > > > This upgrade looks to only have upgraded the hypervisor? > > > > As in I see: > > > > domU "bug" "uname -a": > > Linux bug 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01- > > 02) > > x86_64 GNU/Linux > > > > domU "working" "uname -a": > > Linux working 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 > > (2016-01-02) x86_64 GNU/Linux > > > > So same version? What was the earlier version of the hypervisor? > I forgot to mention that I use apt-dater to upgrade both dom0 and domUs > at the same time. domU "bug" was created for debugging purposes just a > couple of hours after I used apt-dater and realized that there's > something wrong with the pci passthrough. domU "bug" and domU "working" > should have relatively similar software state. > > According to dom0 dpkg.log, the xen-hypervisor-4.4-amd64 (version "4.4.1- > 9+deb8u3") has been untouched since 2015-12-21. > linux-image-3.16.0-4-amd64 was upgraded from "3.16.7-ckt20-1+deb8u1" to > "3.16.7-ckt20-1+deb8u2" at the point of time when pci passthrough stopped > working. > ? > > ? > > The Xen version you have says: > > > (XEN) I/O virtualisation disabled > > > > Which is not very healthy for PCI passthrough. Albeit you can do > > it with PV without IOMMU. Did the previous version of Xen have the same > > message? > I downgraded linux-image on dom0: > dpkg -i linux-image-3.16.0-4-amd64_3.16.7-ckt20-1+deb8u1_amd64.deb > > and now the pci passthrough seems to work!The Debian changelog entry for the update says: linux (3.16.7-ckt20-1+deb8u2) jessie-security; urgency=medium ??* [xen] Fix race conditions in back-end drivers (CVE-2015-8550, XSA-155) ??* [xen] pciback: Fix state validation in MSI control operations ????(CVE-2015-8551, CVE-2015-8852, XSA-157) ??* pptp: verify sockaddr_len in pptp_bind() and pptp_connect() (CVE-2015-8569) ??* bluetooth: Validate socket address length in sco_sock_bind() (CVE-2015-8575) ??* ptrace: being capable wrt a process requires mapped uids/gids ????(CVE-2015-8709) ??* KEYS: Fix race between read and revoke (CVE-2015-7550) ??* [x86] KVM: Reload pit counters for all channels when restoring state ????(CVE-2015-7513) ??* udp: properly support MSG_PEEK with truncated buffers ????(Closes: #808293, regression in 3.16.7-ckt17) ??* Revert "xhci: don't finish a TD if we get a short transfer event mid TD" ????(Closes: #808602, #808953, regression in 3.16.7-ckt20) The second bullet looks at first pretty interesting from this PoV, see?http://xenbits.xen.org/xsa/advisory-157.html?for info on the XSA and the various patches. Konrad is on the CC already so hopefully he has some ideas. I've attached the full Debian package diff from deb8u1 to u2, which has the backported patches in it. Most of them (and all the Xen ones) have an Origin header pointing to the upstream commit, looks like all of XSA-157 was applied and all but one (scsiback, not in this kernel) of XSA-155: +Subject: [1/7] xen: Add RING_COPY_REQUEST() +Origin: https://git.kernel.org/linus/454d5d882c7e412b840e3c99010fe81a9862f6fb +Subject: [2/7] xen-netback: don't use last request to determine minimum Tx +Origin: https://git.kernel.org/linus/0f589967a73f1f30ab4ac4dd9ce0bb399b4d6357 +Subject: [3/7] xen-netback: use RING_COPY_REQUEST() throughout +Origin: https://git.kernel.org/linus/68a33bfd8403e4e22847165d149823a2e0e67c9c +Subject: [4/7] xen-blkback: only read request operation from shared ring once +Origin: https://git.kernel.org/linus/1f13d75ccb806260079e0679d55d9253e370ec8a +Subject: [5/7] xen-blkback: read from indirect descriptors only once +Origin: https://git.kernel.org/linus/18779149101c0dd43ded43669ae2a92d21b6f9cb +Subject: [7/7] xen/pciback: Save xen_pci_op commands before processing it +Origin: https://git.kernel.org/linus/8135cf8b092723dbfcc611fe6fdcb3a36c9951c5 +Subject: [1/5] xen/pciback: Return error on XEN_PCI_OP_enable_msi when device +Origin: https://git.kernel.org/linus/56441f3c8e5bd45aab10dd9f8c505dd4bec03b0d +Subject: [2/5] xen/pciback: Return error on XEN_PCI_OP_enable_msix when device +Origin: https://git.kernel.org/linus/5e0ce1455c09dd61d029b8ad45d82e1ac0b6c4c9 +Subject: [3/5] xen/pciback: Do not install an IRQ handler for MSI interrupts. +Origin: https://git.kernel.org/linus/a396f3a210c3a61e94d6b87ec05a75d0be2a60d0 +Subject: [4/5] xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if +Origin: https://git.kernel.org/linus/7cfb905b9638982862f0331b36ccaaca5d383b49 +Subject: [5/5] xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not +Origin: https://git.kernel.org/linus/408fb0e5aa7fda0059db282ff58c3b2a4278baa0 Ian. -------------- next part -------------- A non-text attachment was scrubbed... Name: 3.16.7-ckt20-1+deb8u1-to-3.16.7-ckt20-1+deb8u2.diff Type: text/x-patch Size: 56983 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20160201/e0474220/attachment-0001.bin>
Marek Marczykowski-Górecki
2016-Feb-03 14:22 UTC
[Pkg-xen-devel] Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
On Mon, Feb 01, 2016 at 09:50:53AM -0500, Konrad Rzeszutek Wilk wrote:> > The second bullet looks at first pretty interesting from this PoV, > > see?http://xenbits.xen.org/xsa/advisory-157.html?for info on the XSA and > > the various patches. Konrad is on the CC already so hopefully he has some > > ideas. > > Thanks. I will try to reproduce this with the upstream kernel first as > those patches are there.According to one Qubes OS user report[1], the bug was introduced between version, which differs only by XSA-155 patches (including one for pciback), especially not XSA-157. Maybe on some code path, some value is not copied back to pdev->sh_info->op? [1] https://groups.google.com/d/msgid/qubes-devel/e64792c5-b9af-42ac-8d67-adce426b9dcb%40googlegroups.com -- Best Regards, Marek Marczykowski-G?recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20160203/939a71c6/attachment.sig>
Marek Marczykowski-Górecki
2016-Feb-08 17:39 UTC
[Pkg-xen-devel] Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
On Wed, Feb 03, 2016 at 10:26:58AM -0500, Konrad Rzeszutek Wilk wrote:> On Wed, Feb 03, 2016 at 03:22:30PM +0100, Marek Marczykowski-G?recki wrote: > > On Mon, Feb 01, 2016 at 09:50:53AM -0500, Konrad Rzeszutek Wilk wrote: > > > > The second bullet looks at first pretty interesting from this PoV, > > > > see?http://xenbits.xen.org/xsa/advisory-157.html?for info on the XSA and > > > > the various patches. Konrad is on the CC already so hopefully he has some > > > > ideas. > > > > > > Thanks. I will try to reproduce this with the upstream kernel first as > > > those patches are there. > > > > According to one Qubes OS user report[1], the bug was introduced between > > version, which differs only by XSA-155 patches (including one for > > pciback), especially not XSA-157. > > Maybe on some code path, some value is not copied back to pdev->sh_info->op? > > I found two bugs (attached the draft not-compiled patches). Upstream > wise I seem to be tripping over another issue. > > There is also some more work required in there to fix the MSI-x enable op.What exactly do you have in mind here? That four patches in your next email? Or something not yet fixed? -- Best Regards, Marek Marczykowski-G?recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/pkg-xen-devel/attachments/20160208/b28a755f/attachment.sig>
Konrad Rzeszutek Wilk
2016-Feb-09 04:59 UTC
[Pkg-xen-devel] Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
On Mon, Feb 08, 2016 at 06:39:17PM +0100, Marek Marczykowski-G?recki wrote:> On Wed, Feb 03, 2016 at 10:26:58AM -0500, Konrad Rzeszutek Wilk wrote: > > On Wed, Feb 03, 2016 at 03:22:30PM +0100, Marek Marczykowski-G?recki wrote: > > > On Mon, Feb 01, 2016 at 09:50:53AM -0500, Konrad Rzeszutek Wilk wrote: > > > > > The second bullet looks at first pretty interesting from this PoV, > > > > > see?http://xenbits.xen.org/xsa/advisory-157.html?for info on the XSA and > > > > > the various patches. Konrad is on the CC already so hopefully he has some > > > > > ideas. > > > > > > > > Thanks. I will try to reproduce this with the upstream kernel first as > > > > those patches are there. > > > > > > According to one Qubes OS user report[1], the bug was introduced between > > > version, which differs only by XSA-155 patches (including one for > > > pciback), especially not XSA-157. > > > Maybe on some code path, some value is not copied back to pdev->sh_info->op? > > > > I found two bugs (attached the draft not-compiled patches). Upstream > > wise I seem to be tripping over another issue. > > > > There is also some more work required in there to fix the MSI-x enable op. > > What exactly do you have in mind here? That four patches in your next > email? Or something not yet fixed?I posted it at some point. It was that the MSI-X enable op stashes the error value in op->value. But 'op->value' is an unsigned int so the value ends up being 0xfffffe or such. And the other PV frontends only check for !0 - and manufacture their own value (-EINVAL). Hence I want to update the pciff.h .. Oh here is the patch: Oh man. A year?! Anyhow this can be posted as a cleanup patch seperately of the bug-fixes. commit 393be47782bca7a24d3e365448d4d3d1a303abfe Author: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com> Date: Wed Apr 1 17:01:26 2015 -0400 xen/pcifront/pciback: Update pciif.h with ->err and ->result values. The '->err' should contain only the XEN_PCI_ERR_* type values. The '->result' may contain -EXX values or any other value that the XEN_PCI_OP_* deems appropiate. As such update the header and also the implementations. Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com> Conflicts: drivers/xen/xen-pciback/pciback_ops.c Conflicts: drivers/xen/xen-pciback/pciback_ops.c diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index b1ffebe..353c8a2 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c @@ -297,7 +297,7 @@ static int pci_frontend_enable_msix(struct pci_dev *dev, } else { dev_err(&dev->dev, "enable msix get err %x\n", err); } - return err; + return err ? -EINVAL : 0; } static void pci_frontend_disable_msix(struct pci_dev *dev) diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c index fa2b222..4db6c19 100644 --- a/drivers/xen/xen-pciback/pciback_ops.c +++ b/drivers/xen/xen-pciback/pciback_ops.c @@ -266,7 +266,7 @@ error: pr_warn_ratelimited("%s: error enabling MSI-X for guest %u: err %d!\n", pci_name(dev), pdev->xdev->otherend_id, result); - return result > 0 ? 0 : result; + return result >= 0 ? 0 : XEN_PCI_ERR_op_failed; } #endif diff --git a/include/xen/interface/io/pciif.h b/include/xen/interface/io/pciif.h index d9922ae..c8b674f 100644 --- a/include/xen/interface/io/pciif.h +++ b/include/xen/interface/io/pciif.h @@ -70,7 +70,7 @@ struct xen_pci_op { /* IN: what action to perform: XEN_PCI_OP_* */ uint32_t cmd; - /* OUT: will contain an error number (if any) from errno.h */ + /* OUT: will contain an XEN_PCI_ERR_* number. */ int32_t err; /* IN: which device to touch */ @@ -82,7 +82,9 @@ struct xen_pci_op { int32_t offset; int32_t size; - /* IN/OUT: Contains the result after a READ or the value to WRITE */ + /* IN/OUT: Contains the result after a READ or the value to WRITE. + * If the err does not have XEN_PCI_ERR_success, depending on + * XEN_PCI_OP_* might have the errno value. */ uint32_t value; /* IN: Contains extra infor for this operation */ uint32_t info;> > -- > Best Regards, > Marek Marczykowski-G?recki > Invisible Things Lab > A: Because it messes up the order in which people normally read text. > Q: Why is top-posting such a bad thing?
Reasonably Related Threads
- Bug#810379: [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
- Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices
- ETOOMANYREFS related errors
- Too many references: cannot splice
- Bug#810379: [Xen-devel] [BUG] pci-passthrough generates "xen:events: Failed to obtain physical IRQ" for some devices