On Sun, December 17, 2017 11:59 am, awokd wrote:
> On Sun, December 17, 2017 11:44 am, Holger Levsen wrote:
>
>> On Sat, Dec 16, 2017 at 02:21:30PM -0000, 'awokd' via qubes-users
>> wrote:
>>
>>
>>> Getting crashes on domU boot with an assigned Atheros wireless PCIe
>>> card under Qubes 4.0rc3 with both PV and HVM. Any suggestions how to
>>> accomplish it? Some of the posts/threads I find go back to 2010 but
>>> I'm
>>> still stumped.
>> [...]
>>
>>
>
>> I cannot really help you, but for me it's good to see someone else has
>> this problem with an Atheros AR928X card as well. I was testing it on
>> Qubes
>> 3.2 with coreboot and wasnt 100% sure this was due to Qubes/Xen,
>> or coreboot or hardware… still need to try that hw with pure Debian to
>> rule out that it's a hw problem.
>
> Thanks for taking a look! It works with no problems under pure Debian on
> the same machine. If I swap drives I can also test it on a plain Xen
> 4.8.2/Fedora 26 setup but since Qubes tweaks Xen I'm not sure a success
> or failure there would provide any useful information...

So I got around to testing under Xen 4.8.2/Fedora 26 on the same machine
and pass-through to a Stretch HVM worked! Hit it with a bunch of iw
commands and couldn't make it crash.

Main difference I could find between Fedora's Xen and Qubes' was that
Fedora's had CONFIG_SHADOW_PAGING=y. I know it's off in Qubes
intentionally, but shouldn't matter since I'm using HAP HVM?

An AR9565 does work in pass-through under Q4.0rc3 on here.

Attached debug log for the Personal HVM. Xen/apic.c has multiple traces,
and why does it seem to be randomly assigning registers?

{"execute": "device_add", "arguments": {"driver": "xen-pci-passthrough",
"id": "xen-pci-pt_0000-02-00.0", "hostaddr": "0000:00:00.00",
"machine_addr": "0000:02:00.0", "permissive": false}}
[00:05.0] xen_pt_realize: Assigning real physical device 00:00.0 to devfn
0x28
[00:05.0] xen_pt_register_regions: IO region 0 registered (size=0x00010000
base_addr=0xf0100000 type: 0x4)
[00:05.0] xen_pt_config_reg_init: Offset 0x000e mismatch! Emulated=0x0080,
host=0x0000, syncing to 0x0000.
[00:05.0] xen_pt_config_reg_init: Offset 0x0010 mismatch! Emulated=0x0000,
host=0xf0100004, syncing to 0xf0100004.
[00:05.0] xen_pt_config_reg_init: Offset 0x0042 mismatch! Emulated=0x0000,
host=0x03c2, syncing to 0x0202.
[00:05.0] xen_pt_config_reg_init: Offset 0x0064 mismatch! Emulated=0x0000,
host=0x0cc0, syncing to 0x0cc0.
[00:05.0] xen_pt_config_reg_init: Offset 0x0072 mismatch! Emulated=0x0000,
host=0x1011, syncing to 0x1011.
[00:05.0] xen_pt_pci_intx: intx=1
[00:05.0] xen_pt_realize: Real physical device 00:00.0 registered
successfully


-- 
You received this message because you are subscribed to the Google Groups 
"qubes-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to qubes-users+unsubscr...@googlegroups.com.
To post to this group, send email to qubes-users@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-users/842362b1de6324590160b3e3ca245ce5.squirrel%40tt3j2x4k5ycaa5zt.onion.
For more options, visit https://groups.google.com/d/optout.
Linux version 4.9.65-xen-stubdom (user@build-fedora4) (gcc version 6.4.1 20170727 (Red Hat 6.4.1-1) (GCC) ) #1 Sat Dec 23 02:26:04 UTC 2017
Command line: debug console=hvc0
x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
x86/fpu: Using 'eager' FPU context switches.
Released 0 page(s)
e820: BIOS-provided physical RAM map:
Xen: [mem 0x0000000000000000-0x000000000009ffff] usable
Xen: [mem 0x00000000000a0000-0x00000000000fffff] reserved
Xen: [mem 0x0000000000100000-0x0000000008ffffff] usable
NX (Execute Disable) protection: active
Hypervisor detected: Xen
e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
e820: remove [mem 0x000a0000-0x000fffff] usable
e820: last_pfn = 0x9000 max_arch_pfn = 0x400000000
x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WC  WP  UC  UC  
Base memory trampoline at [ffff88000009a000] 9a000 size 24576
BRK [0x01516000, 0x01516fff] PGTABLE
RAMDISK: [mem 0x01800000-0x028befff]
Zone ranges:
  DMA32    [mem 0x0000000000001000-0x0000000008ffffff]
  Normal   empty
Movable zone start for each node
Early memory node ranges
  node   0: [mem 0x0000000000001000-0x000000000009ffff]
  node   0: [mem 0x0000000000100000-0x0000000008ffffff]
Initmem setup node 0 [mem 0x0000000000001000-0x0000000008ffffff]
On node 0 totalpages: 36767
  DMA32 zone: 504 pages used for memmap
  DMA32 zone: 21 pages reserved
  DMA32 zone: 36767 pages, LIFO batch:7
p2m virtual area at ffffc90000000000, size is 200000
Remapped 0 page(s)
e820: [mem 0x09000000-0xffffffff] available for PCI devices
Booting paravirtualized kernel on Xen
Xen version: 4.8.2 (preserve-AD)
clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
pcpu-alloc: [0] 0 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 36242
Kernel command line: debug console=hvc0
PID hash table entries: 1024 (order: 1, 8192 bytes)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode-cache hash table entries: 16384 (order: 5, 131072 bytes)
Memory: 119948K/147068K available (1910K kernel code, 300K rwdata, 344K rodata, 512K init, 292K bss, 27120K reserved, 0K cma-reserved)
Using NULL legacy PIC
NR_IRQS:4352 nr_irqs:24 0
xen:events: Using FIFO-based ABI
console [hvc0] enabled
clocksource: xen: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
Xen: using vcpuop timer interface
installing Xen timer for CPU 0
tsc: Fast TSC calibration failed
tsc: Unable to calibrate against PIT
tsc: No reference (HPET/PMTIMER) available
tsc: Detected 2495.532 MHz processor
Calibrating delay loop (skipped), value calculated using timer frequency.. 4991.06 BogoMIPS (lpj=9982128)
pid_max: default: 4096 minimum: 301
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
Last level iTLB entries: 4KB 512, 2MB 1024, 4MB 512
Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 512, 1GB 0
CPU: AMD A10-5750M APU with Radeon(tm) HD Graphics (family: 0x15, model: 0x13, stepping: 0x1)
Performance Events: PMU not available due to virtualization, using software events only.
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:35 0xffffffff81011386
CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 0000000000000000 0000000000000020
 0000000000000000 ffffffff8144d706 0000000000000000 0000000000000000
 ffffffff81011386 0000000000000000 ffffffff8145b20a 0000000000000030
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff81011386>] ? 0xffffffff81011386
 [<ffffffff8145b20a>] ? 0xffffffff8145b20a
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b31552714 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:82 0xffffffff8145b216
register: 20, value: 0
CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 0000000000000000 ffff88000002bef8
 0000000000000000 ffffffff8144d706 0000000000000000 0000000000000000
 ffffffff8102a70f ffffffff8122fc32 0000000000000028 ffff88000002bf08
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8102a70f>] ? 0xffffffff8102a70f
 [<ffffffff8145b216>] ? 0xffffffff8145b216
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b31552715 ]---
pmu_apic_update: pmudata not initialized
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:82 0xffffffff8101dcc5
register: 80, value: 0
CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 000000000026142c ffff88000002beb8
 0000000000000000 ffffffff8144d706 0000000000000001 0000000000000000
 ffffffff8102a70f ffffffff8122fc32 ffff880000000028 ffff88000002bec8
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8102a70f>] ? 0xffffffff8102a70f
 [<ffffffff8101dcc5>] ? 0xffffffff8101dcc5
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8145b23d>] ? 0xffffffff8145b23d
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b31552716 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:82 0xffffffff8101ddb8
register: f0, value: 1ff
CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 000000000026142c ffff88000002beb8
 0000000000000000 0000000000000000 0000000000000001 00000000000000f0
 ffffffff8102a70f ffffffff8122fc32 ffff880000000028 ffff88000002bec8
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8102a70f>] ? 0xffffffff8102a70f
 [<ffffffff8101ddb8>] ? 0xffffffff8101ddb8
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8145b23d>] ? 0xffffffff8145b23d
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b31552717 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:82 0xffffffff8101de12
register: 350, value: 700
CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 0000000000000700 ffff88000002beb8
 0000000000000000 0000000000000000 0000000000000001 00000000000000f0
 ffffffff8102a70f ffffffff8122fc32 ffff880000000028 ffff88000002bec8
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8102a70f>] ? 0xffffffff8102a70f
 [<ffffffff8101de12>] ? 0xffffffff8101de12
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8145b23d>] ? 0xffffffff8145b23d
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b31552718 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:82 0xffffffff8145b23d
register: 360, value: 400
CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 0000000000000000 ffff88000002bef8
 0000000000000000 ffffffff8144d706 0000000000000000 0000000000000000
 ffffffff8102a70f ffffffff8122fc32 ffffffff00000028 ffff88000002bf08
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8102a70f>] ? 0xffffffff8102a70f
 [<ffffffff8101de12>] ? 0xffffffff8101de12
 [<ffffffff8145b23d>] ? 0xffffffff8145b23d
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b31552719 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at arch/x86/xen/apic.c:82 0xffffffff8101d671
register: 370, value: fe
CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.9.65-xen-stubdom #1
 0000000000000000 ffffffff8102a6b0 0000000000000000 ffff88000002bee0
 0000000000000000 ffffffff8144d706 0000000000000000 0000000000000000
 ffffffff8102a70f ffffffff8122fc32 0000000000000028 ffff88000002bef0
Call Trace:
 [<ffffffff8102a6b0>] ? 0xffffffff8102a6b0
 [<ffffffff8144d706>] ? 0xffffffff8144d706
 [<ffffffff8102a70f>] ? 0xffffffff8102a70f
 [<ffffffff8101d671>] ? 0xffffffff8101d671
 [<ffffffff8145b255>] ? 0xffffffff8145b255
 [<ffffffff8145b2ca>] ? 0xffffffff8145b2ca
 [<ffffffff8144df24>] ? 0xffffffff8144df24
 [<ffffffff811d847c>] ? 0xffffffff811d847c
 [<ffffffff811d8481>] ? 0xffffffff811d8481
 [<ffffffff811dbff5>] ? 0xffffffff811dbff5
---[ end trace fef9930b3155271a ]---
devtmpfs: initialized
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 16 (order: -4, 384 bytes)
NET: Registered protocol family 16
xen:grant_table: Grant tables using version 1 layout
Grant table initialized
PCI: setting up Xen PCI frontend stub
PCI: pci_cache_line_size set to 64 bytes
xen:balloon: Initialising balloon driver
PCI: System does not support PCI
PCI: System does not support PCI
clocksource: Switched to clocksource xen
NET: Registered protocol family 2
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 128 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
Unpacking initramfs...
Freeing initrd memory: 17148K
workingset: timestamp_bits=62 max_order=16 bucket_order=0
io scheduler noop registered (default)
xen:xen_evtchn: Event-channel device installed
Invalid max_queues (4), will use default max: 1.
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <m...@qualcomm.com>
xen_netfront: Initialising Xen virtual ethernet driver
NET: Registered protocol family 17
random: fast init done
blkfront: xvda: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled;
 xvda: xvda1 xvda2 xvda3
blkfront: xvdb: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled;
blkfront: xvdc: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled;
blkfront: xvdd: flush diskcache: enabled; persistent grants: enabled; indirect descriptors: enabled;
Freeing unused kernel memory: 512K
Write protecting the kernel read-only data: 4096k
Freeing unused kernel memory: 132K
Freeing unused kernel memory: 1704K
+ mount -t devtmpfs none /dev
+ mount -t sysfs /sys /sys
+ mount -t proc /proc /proc
+ echo 1
+ test -e /sys/class/net/eth0
+ echo No network interface named eth0.
No network interface named eth0.
+ ls -l /sys/class/net/
total 0
lrwxrwxrwx    1 0        0                0 Dec 29 19:26 .[1;36mlo.[0m -> .[1;34m../../devices/virtual/net/lo.[0m
+ /bin/xenstore-read target
+ domid=46
+ xenstore-read /local/domain/46/vm
+ vm_path=/vm/81128dbe-9242-48ad-a8a2-e508ff6153cf
+ xenstore-read -R /vm/81128dbe-9242-48ad-a8a2-e508ff6153cf/image/dmargs
+ dm_args=-xen-domid.46.-nodefaults.-no-user-config.-name.personal.-display.none.-append.root=/dev/mapper/dmroot ro nomodeset console=hvc0 rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 nopat maxcpus=0.-device.VGA,vgamem_mb=16.-boot.order=dc.-usb.-usbdevice.tablet.-net.none.-display.qubes-gui.-machine.xenfv.-m.4080.-device.mptsas1068,id=scsi0.-drive.file=/dev/xvda,if=none,id=disk0,format=host_device,cache=writeback,readonly=on.-device.scsi-hd,bus=scsi0.0,drive=disk0,wwn=0x3525400051756265.-drive.file=/dev/xvdb,if=none,id=disk1,format=host_device,cache=writeback,readonly=off.-device.scsi-hd,bus=scsi0.0,drive=disk1,wwn=0x3525400051756266.-drive.file=/dev/xvdc,if=none,id=disk2,format=host_device,cache=writeback,readonly=off.-device.scsi-hd,bus=scsi0.0,drive=disk2,wwn=0x3525400051756267.-drive.file=/dev/xvdd,if=none,id=disk3,format=host_device,cache=writeback,readonly=on.-device.scsi-hd,bus=scsi0.0,drive=disk3,wwn=0x3525400051756268
+ mkdir /tmp/qmp
+ mkdir /tmp/qmp/req
+ mkdir /tmp/qmp/res
+ kernel=
+ [ -b /dev/xvdd ]
+ mkdir /tmp/boot
+ mount /dev/xvdd /tmp/boot -o ro
EXT4-fs (xvdd): mounting ext3 file system using the ext4 subsystem
EXT4-fs (xvdd): mounted filesystem with ordered data mode. Opts: (null)
+ [ -f /tmp/boot/vmlinuz ]
+ kernel=-kernel./tmp/boot/vmlinuz
+ [ -f /tmp/boot/initramfs ]
+ kernel=-kernel./tmp/boot/vmlinuz.-initrd./tmp/boot/initramfs
+ mkfifo /tmp/qmp/qemu.in /tmp/qmp/qemu.out
+ IFS=.
+ set -f
+ set +f
+ unset IFS
+ qemu_pid=37
+ true
+ printf ==== Press enter for shell ====\n
==== Press enter for shell ====
+ read
+ qemu -chardev pipe,path=/tmp/qmp/qemu,id=m -mon chardev=m,mode=control -xen-domid 46 -nodefaults -no-user-config -name personal -display none -append root=/dev/mapper/dmroot ro nomodeset console=hvc0 rd_NO_PLYMOUTH rd.plymouth.enable=0 plymouth.enable=0 nopat maxcpus=0 -device VGA,vgamem_mb=16 -boot order=dc -usb -usbdevice tablet+ xenstore-read target
 -net none -display qubes-gui -machine xenfv -m 4080 -device mptsas1068,id=scsi0 -drive file=/dev/xvda,if=none,id=disk0,format=host_device,cache=writeback,readonly=on -device scsi-hd,bus=scsi0.0,drive=disk0,wwn=0x3525400051756265 -drive file=/dev/xvdb,if=none,id=disk1,format=host_device,cache=writeback,readonly=off -device scsi-hd,bus=scsi0.0,drive=disk1,wwn=0x3525400051756266 -drive file=/dev/xvdc,if=none,id=disk2,format=host_device,cache=writeback,readonly=off -device scsi-hd,bus=scsi0.0,drive=disk2,wwn=0x3525400051756267 -drive file=/dev/xvdd,if=none,id=disk3,format=host_device,cache=writeback,readonly=on -device scsi-hd,bus=scsi0.0,drive=disk3,wwn=0x3525400051756268 -kernel /tmp/boot/vmlinuz -initrd /tmp/boot/initramfs+ target=46
+ device_model=device-model/46
+ true
+ xenstore-watch -n 2 device-model/46/command

qemu: -usbdevice tablet: '-usbdevice' is deprecated, please use '-device usb-...' instead
device-model/46/command
+ set +x
{"QMP": {"version": {"qemu": {"micro": 1, "minor": 10, "major": 2}, "package": ""}, "capabilities": []}}

{"execute": "qmp_capabilities"}
qubes_gui/init: 592
qubes_gui/init: 607
qubes_gui/init: 609
qubes_gui/init[639]: version sent, waiting for xorg conf
{"return": {}}

pcifront pci-0: Installing PCI frontend
xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB
software IO TLB [mem 0x02800000-0x02c00000] (4MB) mapped at [ffff880002800000-ffff880002bfffff]
pcifront pci-0: Creating PCI Frontend Bus 0000:00
pcifront pci-0: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffffffff]
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: [168c:002a] type 00 class 0x028000
pci 0000:00:00.0: reg 0x10: [mem 0xf0100000-0xf010ffff 64bit]
pci 0000:00:00.0: supports D1
pcifront pci-0: claiming resource 0000:00:00.0/0
device-model/46/command
+ xenstore-read device-model/46/command
+ cmd=pci-ins
+ [ pci-ins != pci-ins ]
+ xenstore-read device-model/46/parameter
+ para=0000:02:00.0,msitranslate=0,power_mgmt=0
+ cut -b 1-12
+ printf %s 0000:02:00.0,msitranslate=0,power_mgmt=0
+ dev=0000:02:00.0
+ tr : -
+ printf %s 0000:02:00.0
+ qdev_id=xen-pci-pt_0000-02-00.0
+ [ pci-ins = pci-rem ]
+ xenstore-read device/pci/0/backend
+ be=/local/domain/0/backend/pci/47/0
+ xenstore-read /local/domain/0/backend/pci/47/0/num_devs
+ devs=1
+ dev_n=
+ seq 0 0
+ sed s/\.0\([0-9]\)$/.\1/
+ xenstore-read /local/domain/0/backend/pci/47/0/dev-0
+ [ 0000:02:00.0 = 0000:02:00.0 ]
+ dev_n=0
+ break
+ [ -z 0 ]
+ xenstore-read /local/domain/0/backend/pci/47/0/vdev-0
+ vdev=0000:00:00.00
+ addr_arg=
+ xenstore-read /local/domain/0/backend/pci/47/0/vdevfn-0
xenstore-read: couldn't read path /local/domain/0/backend/pci/47/0/vdevfn-0
+ true
+ vdevfn=
+ [ -n  ]
+ permissive=false
+ grep -q \<permissive=1\>
+ xenstore-read /local/domain/0/backend/pci/47/0/opts-0
+ cat
+ qmp_req {"execute": "device_add", "arguments": {"driver": "xen-pci-passthrough", "id": "xen-pci-pt_0000-02-00.0", "hostaddr": "0000:00:00.00", "machine_addr": "0000:02:00.0", "permissive": false}}
+ cat /proc/sys/kernel/random/uuid
+ local id=3ca42ff5-978b-4bd6-a807-f0e70b750ad0
+ echo {"execute": "device_add", "arguments": {"driver": "xen-pci-passthrough", "id": "xen-pci-pt_0000-02-00.0", "hostaddr": "0000:00:00.00", "machine_addr": "0000:02:00.0", "permissive": false}}
+ mv /tmp/qmp/new-req_3ca42ff5-978b-4bd6-a807-f0e70b750ad0 /tmp/qmp/req/3ca42ff5-978b-4bd6-a807-f0e70b750ad0
+ [ -f /tmp/qmp/res/3ca42ff5-978b-4bd6-a807-f0e70b750ad0 ]
+ sleep 0.1
3ca42ff5-978b-4bd6-a807-f0e70b750ad0
{"execute": "device_add", "arguments": {"driver": "xen-pci-passthrough", "id": "xen-pci-pt_0000-02-00.0", "hostaddr": "0000:00:00.00", "machine_addr": "0000:02:00.0", "permissive": false}}
[00:05.0] xen_pt_realize: Assigning real physical device 00:00.0 to devfn 0x28
[00:05.0] xen_pt_register_regions: IO region 0 registered (size=0x00010000 base_addr=0xf0100000 type: 0x4)
[00:05.0] xen_pt_config_reg_init: Offset 0x000e mismatch! Emulated=0x0080, host=0x0000, syncing to 0x0000.
[00:05.0] xen_pt_config_reg_init: Offset 0x0010 mismatch! Emulated=0x0000, host=0xf0100004, syncing to 0xf0100004.
[00:05.0] xen_pt_config_reg_init: Offset 0x0042 mismatch! Emulated=0x0000, host=0x03c2, syncing to 0x0202.
[00:05.0] xen_pt_config_reg_init: Offset 0x0064 mismatch! Emulated=0x0000, host=0x0cc0, syncing to 0x0cc0.
[00:05.0] xen_pt_config_reg_init: Offset 0x0072 mismatch! Emulated=0x0000, host=0x1011, syncing to 0x1011.
[00:05.0] xen_pt_pci_intx: intx=1
[00:05.0] xen_pt_realize: Real physical device 00:00.0 registered successfully
{"return": {}}

+ [ -f /tmp/qmp/res/3ca42ff5-978b-4bd6-a807-f0e70b750ad0 ]
+ cat /tmp/qmp/res/3ca42ff5-978b-4bd6-a807-f0e70b750ad0
+ rm /tmp/qmp/res/3ca42ff5-978b-4bd6-a807-f0e70b750ad0
+ sed -n /"qdev_id": "xen-pci-pt_0000-02-00.0"/{s/.*"slot": \([0-9]\+\),.*"function": \([0-9]\+\),.*/\1,\2/;p}
+ sed s/"qdev_id"/\n\0/g
+ qmp_req {"execute": "query-pci"}
+ cat /proc/sys/kernel/random/uuid
+ local id=2b31a56c-d3a5-4513-a809-1466e0a00260
+ echo {"execute": "query-pci"}
+ mv /tmp/qmp/new-req_2b31a56c-d3a5-4513-a809-1466e0a00260 /tmp/qmp/req/2b31a56c-d3a5-4513-a809-1466e0a00260
+ [ -f /tmp/qmp/res/2b31a56c-d3a5-4513-a809-1466e0a00260 ]
+ sleep 0.1
2b31a56c-d3a5-4513-a809-1466e0a00260
{"execute": "query-pci"}
+ [ -f /tmp/qmp/res/2b31a56c-d3a5-4513-a809-1466e0a00260 ]
+ sleep 0.1
{"return": [{"bus": 0, "devices": [{"bus": 0, "qdev_id": "", "slot": 0, "class_info": {"class": 1536, "desc": "Host bridge"}, "id": {"device": 4663, "vendor": 32902}, "function": 0, "regions": []}, {"bus": 0, "qdev_id": "", "slot": 1, "class_info": {"class": 1537, "desc": "ISA bridge"}, "id": {"device": 28672, "vendor": 32902}, "function": 0, "regions": []}, {"bus": 0, "qdev_id": "", "slot": 1, "class_info": {"class": 257, "desc": "IDE controller"}, "id": {"device": 28688, "vendor": 32902}, "function": 1, "regions": [{"bar": 4, "size": 16, "address": -1, "type": "io"}]}, {"bus": 0, "qdev_id": "", "irq": 0, "slot": 1, "class_info": {"class": 3075, "desc": "USB controller"}, "id": {"device": 28704, "vendor": 32902}, "function": 2, "regions": [{"bar": 4, "size": 32, "address": -1, "type": "io"}]}, {"bus": 0, "qdev_id": "", "irq": 0, "slot": 1, "class_info": {"class": 1664, "desc": "Bridge"}, "id": {"device": 28947, "vendor": 32902}, "function": 3, "regions": []}, {"bus": 0, "qdev_id": "", "irq": 0, "slot": 2, "class_info": {"class": 65408}, "id": {"device": 1, "vendor": 22611}, "function": 0, "regions": [{"bar": 0, "size": 256, "address": -1, "type": "io"}, {"prefetch": true, "mem_type_64": false, "bar": 1, "size": 16777216, "address": -1, "type": "memory"}]}, {"bus": 0, "qdev_id": "", "slot": 3, "class_info": {"class": 768, "desc": "VGA controller"}, "id": {"device": 4369, "vendor": 4660}, "function": 0, "regions": [{"prefetch": true, "mem_type_64": false, "bar": 0, "size": 16777216, "address": -1, "type": "memory"}, {"prefetch": false, "mem_type_64": false, "bar": 2, "size": 4096, "address": -1, "type": "memory"}, {"prefetch": false, "mem_type_64": false, "bar": 6, "size": 65536, "address": -1, "type": "memory"}]}, {"bus": 0, "qdev_id": "scsi0", "irq": 0, "slot": 4, "class_info": {"class": 256, "desc": "SCSI controller"}, "id": {"device": 84, "vendor": 4096}, "function": 0, "regions": [{"bar": 0, "size": 256, "address": -1, "type": "io"}, {"prefetch": false, "mem_type_64": false, "bar": 1, "size": 16384, "address": -1, "type": "memory"}, {"prefetch": false, "mem_type_64": false, "bar": 2, "size": 65536, "address": -1, "type": "memory"}]}, {"bus": 0, "qdev_id": "xen-pci-pt_0000-02-00.0", "irq": 0, "slot": 5, "class_info": {"class": 0}, "id": {"device": 42, "vendor": 5772}, "function": 0, "regions": [{"prefetch": false, "mem_type_64": true, "bar": 0, "size": 65536, "address": -1, "type": "memory"}]}]}]}

+ [ -f /tmp/qmp/res/2b31a56c-d3a5-4513-a809-1466e0a00260 ]
+ cat /tmp/qmp/res/2b31a56c-d3a5-4513-a809-1466e0a00260
+ rm /tmp/qmp/res/2b31a56c-d3a5-4513-a809-1466e0a00260
+ slot_func=5,0
+ cut -d , -f 1
+ printf %s 5,0
+ slot=5
+ cut -d , -f 2
+ printf %s 5,0
+ func=0
+ vdevfn=40
+ printf 0x%02x 40
+ xenstore-write device-model/46/parameter 0x28
+ xenstore-write device-model/46/state pci-inserted
+ true
+ xenstore-watch -n 2 device-model/46/command
device-model/46/command
clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x23f8bcd25ad, max_idle_ns: 440795231328 ns
qubes_gui/init[650]: got xorg conf, creating window
qubes_gui/init: 660
dumping mfns: n=301, w=640, h=480
configure msg, x/y 4 55 (was 0 0), w/h 640 480
dumping mfns: n=282, w=720, h=400
configure msg, x/y 4 55 (was 4 55), w/h 640 480
random: crng init done
dumping mfns: n=768, w=1024, h=768
configure msg, x/y 4 55 (was 4 55), w/h 720 400
[00:05.0] Write-back to unknown field 0x40 (partially) inhibited (0x00000000)
[00:05.0] If the device doesn't work, try enabling permissive mode
[00:05.0] (unsafe) and if it helps report the problem to xen-devel
pcifront pci-0: Rescanning PCI Frontend Bus 0000:00

Reply via email to