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

Re: [BUG] problems with NICs pass through to OpenBSD guest


  • To: Adam Szewczyk <szewcson@xxxxxxxxx>, marmarek@xxxxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Fri, 16 Sep 2022 15:09:13 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ODRnY/SE9sVqvYB79YIXmFVMbxNco6oSGy6y/lpmThQ=; b=fzKoJmj+9HVstdDC4mtIkcXRQFu26vfvMxBLJBpFjmozwnu7AjGQCuwv7FwNZKmKrrWTIOHLuVWtjaFEKMv/hMcss8UwWiFuQLsoOjKq/9f+YYrWDpGkEeq8GqtCjlevO0QRiC+1qcArM5v627iKFUvT5cA+4bBM926Ccij+zkdr+/Qp5EUo4ueJljiVW3v68FuA5DvDKxppgipzyef7o0Yec4T+y7/SMrlVpxpsjbDi2w+MG/uCl4w/DEwQPX0vF3vQeyQPwvtVyvc1+p4Pv1sQ6YTTQt0Pwu1+dRew8btpS/vfbJggmTM816dT2/urGu00lCPkPVld5aItcEMZBw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eyU5sXPuAkB3mwgjHo+Pblv7kSUnR1tdiZSh4dEQB7eBKr+z3ExYVLTYLtO51ROxuoBEw+CZusgjEvWtWY5HvP7eUw1KyxJ4cLx9Nh5DQ2YN8tAZnllzYmcZu69cGhkem4gRa+5zjSgfB0Gme2ZdKzoaBb+EAjccwlLEaCZkPdPyIeNLIgqAawDe35FQUmQDdul5XeS4boLYJZM4U+q00s+Ccwn5ooKsDrtiuJaB4jPRAVvkK9iywco7Z4XyMosibjua3hDRrjvDUqA7M1oiUFdxokwmk2I2FNCW19Y/3OaRxdsKGvyQ6SJG5+HrlmK3bosxgmC60RUf0P48aZOM9A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 16 Sep 2022 13:09:51 +0000
  • Ironport-data: A9a23:J5xBfakSvRAl8F3RBB0A9ZLo5gypJ0RdPkR7XQ2eYbSJt1+Wr1Gzt xIbCz3TM/qIMTbxKIgnboy28E5S78ODyoUyQVNtrig8ECMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8vWo4ow/jb8kk37a2s4GpwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8O105wYj8Nuu+TnnwiGtY+DyDX4pZlc/HKbix5jj4zys4G2M80Mi+7vdkrc+dZk 72hvbToIesg0zaldO41C3G0GAkmVUFKFSOuzdFSfqV/wmWfG0YAzcmCA2kLB7Q3/MBnGF1r9 N8VFm9OVRbEpryPlefTpulE3qzPLeHNFaZG4zRK62GcCvwrB5feX6/N+NlUmi8qgdxDFurfY MxfbidzaBPHYFtEPVJ/5JAWxb/0wCWgNWAI7gvL9cLb4ECKpOB1+KLqP9fPPMSDWO1en1qCp 3KA9GP8av0fHIPOmWHdoyLy7gPJtSjVWoUvCZCEzP1npFPQ5146GSZHWlTu9JFVjWb7AbqzM Xc84TgjsqMp80qDQdz0Xhn+q3mB1jYZUsBVGvc36ymMzLTV+AeTAmUYTj9HZ8civcVwTjsvv neZktWsCTFxvbm9TXOG6qzSvT60ITISL2IJeWkDVwRt3jX4iIQ6jxaKRNAzFqew14TxAWupn WDMqzUijbIOi8JNz7+84V3MnzOroN7OUxIx4QLUGGmi62uVebKYWmBh0nCDhd4oEWpTZgXpU KQs8yRG0N0zMA==
  • Ironport-hdrordr: A9a23:7gDpYq/5tqUg49Di05xuk+E9db1zdoMgy1knxilNoENuH/Bwxv rFoB1E73TJYVYqN03IV+rwXZVoZUmsjaKdgLNhRItKOTOLhILGFuFfBOfZsl7d8mjFh5VgPM RbAtRD4b/LfD9HZK/BiWHXcurIguP3lpxA7d2uskuFJjsaD52IgT0JaDpyRSZNNXN77NcCZe 2hz/sCgwDlVWUcb8y9CHVAd+/fp+fTnJajRRIdHRYo5CSHkDvtsdfBYlGl9yZbdwkK7aYp8G DDnQC8zqK/s8ujwhuZ82PI9ZxZlPbo19MGLs2Rjco+LCnql2+TFfJccozHmApwjPCk6V4snt WJixA8P/5r43eURW2xqQuF4XiT7B8er1vZjXOIi3rqpsL0ABggDdBauI5fehzFr2I9odBVys twri+knqsSKSmFsDX25tDOWR0vvFGzu2AenekaiGEaeZcCaYVWsZcU8CpuYd099RrBmc8a+d RVfY/hDK48SyLaU5mZhBgl/DWUZAV+Iv/cKXJy+vB80FBt7QNEJgUjtY8id0w7heMAoql/lp v525tT5c9zp+8tHNdA7bQ6ML+KI12IZy7wG0SvBnmiPJ07Ghv22u7KCfMOlamXRKA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Please keep xen-devel in Cc and avoid top-posting.

On Fri, Sep 16, 2022 at 02:35:17PM +0200, Adam Szewczyk wrote:
> After trying to configure previously disabled iwm0 interface first those
> errors appears:
> 
> > iwm0: fw chunk addr Ox404000 len 712 failed to load
> > iwm0: could not load firmware chunk 0 (error 35)
> > iwm0: failed to load init firmware
> >
> Then after second attempt or if config is set in /etc/hostname.iwm0  during
> boot system panic:
> 
> > panic: kernel diagnostic assertion "sc->task_refs.r_refs == 0" failed:
> > file "/usr/src/sys/dev/pci/if_iwm.c", line 10352
> > Stopped at db_enter+0x10: popq %rbp
> >        TID        PID        UID        PRFLAGS        PFLAGS
> > CPU        COMMAND
> > * 19554    71630            0                   0x3                    0
> >         0K               ifconfig
> > db_enter at db_enter+0x10
> > panic(ffffffff81f1e289) at panic 0xbf
> > assert(ffffffff81f8dd81,ffffffff81f8a6db, 2870,ffffffff81f39e88) at
> > assert+0x25
> > iwm_init(ffff800000211048) at iwm_init+0x2c4
> > iwm_ioctl(ffff800000211048, 80206910, ffff800014bc88c0) at iwm ioctl+0xf9
> > ifioctl(fffffd802900d8c0, 8020699dffff800014bc88c0,ffff800014b1f7a8) at
> > ifioctly+0x92b
> > soo_ioctl(fffffd8030f e0b40,80206990 ,ffff800014bc88c0,ffff800014b1f7a8)
> > at soo_ioctl+0x161
> > sys_ioctl(ffff800014b1f7a8,ffff800014bc8900,ffff800014bc8a20) at
> > sys_ioctl+0x2c
> > syscall(ffff800014bc8a90) at syscall+0x374
> > Xsyscal10 at Xsyscall+Ox128
> > end of kernel
> > end trace frame: Ox7f7fffc3330, count: 5
> > https://www.openbsd.org/ddb.html describes the minimum info required in
> > bug reports. Insufficient info makes it difficult to find and fix bugs.
> > ddb{0}>
> >
> 
> pcidump returns:
> 
> > Domain /dev/pci0:
> >  0:0:0: Intel 82441FX
> > 0x0000: Vendor ID: 8086, Product ID: 1237
> > 0x0004: Command: 0004, Status: 0000
> > 0x0008: Class: 06 Bridge, Subclass: 00 Host,
> > Interface: 00, Revision: 02
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:1:0: Intel 82371SB ISA
> > 0x0000: Vendor ID: 8086, Product ID: 7000
> > 0x0004: Command: 0004, Status: 0200
> > 0x0008: Class: 06 Bridge, Subclass: 01 ISA,
> > Interface: 00, Revision: 00
> > 0x000c: BIST: 00, Header Type: 80, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:1:1: Intel 82371SB IDE
> > 0x0000: Vendor ID: 8086, Product ID: 7010
> > 0x0004: Command: 0005, Status: 0280
> > 0x0008: Class: 01 Mass Storage, Subclass: 01 IDE,
> > Interface: 80, Revision: 00
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR io addr: 0x0000c200/0x0010
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:1:3: Intel 82371AB Power
> > 0x0000: Vendor ID: 8086, Product ID: 7113
> > 0x0004: Command: 0004, Status: 0280
> > 0x0008: Class: 06 Bridge, Subclass: 80 Miscellaneous,
> > Interface: 00, Revision: 03
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR empty (00000000)
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 01 Line: 0a Min Gnt: 00 Max Lat: 00
> >  0:2:0: XenSource Platform Device
> > 0x0000: Vendor ID: 5853, Product ID: 0001
> > 0x0004: Command: 0007, Status: 0000
> > 0x0008: Class: ff (unknown), Subclass: 80 (unknown),
> > Interface: 00, Revision: 01
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR io addr: 0x0000c000/0x0100
> > 0x0014: BAR mem prefetchable 32bit addr: 0xf0000000/0x01000000
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 5853 Product ID: 0001
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
> >  0:3:0: Bochs VGA
> > 0x0000: Vendor ID: 1234, Product ID: 1111
> > 0x0004: Command: 0007, Status: 0000
> > 0x0008: Class: 03 Display, Subclass: 00 VGA,
> > Interface: 00, Revision: 02
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem prefetchable 32bit addr: 0xf1000000/0x01000000
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR mem 32bit addr: 0xf2018000/0x00001000
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: f2000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 00 Line: 00 Min Gnt: 00 Max Lat: 00
> >  0:4:0: Intel 82801DB USB
> > 0x0000: Vendor ID: 8086, Product ID: 24cd
> > 0x0004: Command: 0006, Status: 0000
> > 0x0008: Class: 0c Serial Bus, Subclass: 03 USB,
> > Interface: 20, Revision: 10
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem 32bit addr: 0xf2019000/0x00001000
> > 0x0014: BAR empty (00000000)
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 04 Line: 05 Min Gnt: 00 Max Lat: 00
> >  0:6:0: NEC xHCI
> > 0x0000: Vendor ID: 1033, Product ID: 0194
> > 0x0004: Command: 0006, Status: 0010
> > 0x0008: Class: 0c Serial Bus, Subclass: 03 USB,
> > Interface: 30, Revision: 03
> > 0x000c: BIST: 00, Header Type: 00, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem 64bit addr: 0x00000000f2010000/0x00004000
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 1af4 Product ID: 1100
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000
> > 0x003c: Interrupt Pin: 01 Line: 0b Min Gnt: 00 Max Lat: 00
> > 0x0090: Capability 0x11: Extended Message Signalled Interrupts (MSI-X)
> > Enabled: no; table size 16 (BAR 0:12288)
> > 0x0070: Capability 0x05: Message Signalled Interrupts (MSI)
> > Enabled: yes
> >  0:7:0: Intel AC 9560
> > 0x0000: Vendor ID: 8086, Product ID: a370
> > 0x0004: Command: 0006, Status: 0010
> > 0x0008: Class: 02 Network, Subclass: 80 Miscellaneous,
> > Interface: 00, Revision: 10
> > 0x000c: BIST: 00, Header Type: 80, Latency Timer: 00,
> > Cache Line Size: 00
> > 0x0010: BAR mem 64bit addr: 0x00000000f2014000/0x00004000
> > 0x0018: BAR empty (00000000)
> > 0x001c: BAR empty (00000000)
> > 0x0020: BAR empty (00000000)
> > 0x0024: BAR empty (00000000)
> > 0x0028: Cardbus CIS: 00000000
> > 0x002c: Subsystem Vendor ID: 8086 Product ID: 0034
> > 0x0030: Expansion ROM Base Address: 00000000
> > 0x0038: 00000000

None of the BARs are at 0x404000 which seems to be where OpenBSD is
trying to load the firmware?

I would have to look at the code to figure out exactly what it is
trying to do here (and why it fails).

Can you also paste the output from `lspci -v`?

Just to compare with what is OpenBSD is reporting.

> > 0x003c: Interrupt Pin: 01 Line: 05 Min Gnt: 00 Max Lat: 00
> > 0x00c8: Capability 0x01: Power Management
> > State: D0
> > 0x00d0: Capability 0x05: Message Signalled Interrupts (MSI)
> > Enabled: no
> > 0x0040: Capability 0x10: PCI Express
> > Max Payload Size: 128 / 128 bytes
> > Max Read Request Size: 512 bytes
> >
> 
> As for realtek can You send me some guide for using xl console or some
> marks for xl dump to find those keys?

I'm not sure about QubesOS, but you have to execute:

# xl debug-keys 'Mi'
# xl dmesg

>From the control domain.  I'm adding Marek because he can likely
provide guidance about how to execute those commands from the control
domain.

Regards, Roger.



 


Rackspace

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