All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Geiger <tobias.geiger@vido.info>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: xen-devel@lists.xensource.com, QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH V7 00/11] Xen PCI Passthrough
Date: Mon, 20 Feb 2012 20:58:57 +0100	[thread overview]
Message-ID: <4F42A601.7000701@vido.info> (raw)
In-Reply-To: <CAJJyHj+5NJsHRESxn=socWA_bum3O19trhYUZE9+qdAji8hxwg@mail.gmail.com>

Hi

With the patch you mentioned, xl create looks more familiar:

libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to 
/sys/bus/pci/devices/0000:03:00.0/reset returned -1: Invalid argument
libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to 
/sys/bus/pci/devices/0000:03:00.1/reset returned -1: Invalid argument


This is actually "normal", at least compared to traditional qemu-dm - i 
guess due to missing FLR (Bios is capable, but Card not i assume).

Anyhow - the downside of the patch is, qemu doesnt even start :)

This is qemu-dm.log (with debugging enabled):

[00:06.0] pci_intx: intx=1
[00:06.0] pt_initfn: Real physical device 03:00.0 registered successfuly!
[00:07.0] pt_initfn: Assigning real physical device 03:00.1 to devfn 0x38
[00:07.0] pt_register_regions: IO region 0 registered (size=0x00004000 
base_addr=0xc3120000 type: 0)
[00:07.0] pci_intx: intx=2
[00:07.0] pt_initfn: Real physical device 03:00.1 registered successfuly!
[00:08.0] pt_initfn: Assigning real physical device 00:1d.0 to devfn 0x40
[00:08.0] pt_register_regions: IO region 4 registered (size=0x00000020 
base_addr=0x00005080 type: 0x1)
[00:08.0] pci_intx: intx=1
[00:08.0] pt_initfn: Real physical device 00:1d.0 registered successfuly!
[00:09.0] pt_initfn: Assigning real physical device 00:1d.1 to devfn 0x48
[00:09.0] pt_register_regions: IO region 4 registered (size=0x00000020 
base_addr=0x00005060 type: 0x1)
[00:09.0] pci_intx: intx=2
[00:09.0] pt_initfn: Real physical device 00:1d.1 registered successfuly!
[00:0a.0] pt_initfn: Assigning real physical device 00:1d.2 to devfn 0x50
[00:0a.0] pt_register_regions: IO region 4 registered (size=0x00000020 
base_addr=0x00005040 type: 0x1)
[00:0a.0] pci_intx: intx=3
[00:0a.0] pt_initfn: Real physical device 00:1d.2 registered successfuly!
[00:0b.0] pt_initfn: Assigning real physical device 00:1d.7 to devfn 0x58
[00:0b.0] pt_register_regions: IO region 0 registered (size=0x00000400 
base_addr=0xc3321000 type: 0)
[00:0b.0] pci_intx: intx=1
[00:0b.0] pt_initfn: Real physical device 00:1d.7 registered successfuly!
[00:06.0] pt_pci_read_config: address=0x000a val=0x00000300 len=2
[00:06.0] pt_pci_read_config: address=0x0000 val=0x00001002 len=2
[00:06.0] pt_pci_read_config: address=0x0002 val=0x00006718 len=2
[00:06.0] pt_pci_read_config: address=0x0010 val=0x0000000c len=4
[00:06.0] pt_pci_write_config: address=0x0010 val=0xffffffff len=4
[00:06.0] pt_iomem_map: BAR 0, e_phys=0xffffffffffffffff 
maddr=0xe0000000 len=0x10000000 first_map=1
[00:06.0] pt_pci_read_config: address=0x0010 val=0xf000000c len=4
[00:06.0] pt_pci_write_config: address=0x0010 val=0x0000000c len=4
[00:06.0] pt_iomem_map: BAR 0, e_phys=0xffffffffffffffff 
maddr=0xe0000000 len=0x10000000 first_map=0
[00:06.0] pt_pci_read_config: address=0x0018 val=0x00000004 len=4
[00:06.0] pt_pci_write_config: address=0x0018 val=0xffffffff len=4
[00:06.0] pt_iomem_map: BAR 2, e_phys=0xffffffffffffffff 
maddr=0xc3100000 len=0x20000 first_map=1
[00:06.0] pt_pci_read_config: address=0x0018 val=0xfffe0004 len=4
[00:06.0] pt_pci_write_config: address=0x0018 val=0x00000004 len=4
[00:06.0] pt_iomem_map: BAR 2, e_phys=0xffffffffffffffff 
maddr=0xc3100000 len=0x20000 first_map=0
[00:06.0] pt_pci_read_config: address=0x0020 val=0x00000001 len=4
[00:06.0] pt_pci_write_config: address=0x0020 val=0xffffffff len=4
[00:06.0] pt_ioport_map: BAR 4, e_phys=0xffffffffffffffff 
pio_base=0x2000 len=256 first_map=1
[00:06.0] pt_pci_read_config: address=0x0020 val=0xffffff01 len=4
[00:06.0] pt_pci_write_config: address=0x0020 val=0x00000001 len=4
[00:06.0] pt_ioport_map: BAR 4, e_phys=0xffffffffffffffff 
pio_base=0x2000 len=256 first_map=0
[00:06.0] pt_pci_read_config: address=0x0024 val=0x00000000 len=4
[00:06.0] pt_pci_write_config: address=0x0024 val=0xffffffff len=4
[00:06.0] pt_pci_read_config: address=0x0024 val=0x00000000 len=4
[00:06.0] pt_pci_write_config: address=0x0024 val=0x00000000 len=4
[00:06.0] pt_pci_read_config: address=0x0030 val=0x00000000 len=4
[00:06.0] pt_pci_write_config: address=0x0030 val=0xffffffff len=4
[00:06.0] pt_iomem_map: BAR 6, e_phys=0xffffffffffffffff 
maddr=0xc3140000 len=0x20000 first_map=1
[00:06.0] pt_pci_read_config: address=0x0030 val=0xfffe0001 len=4
[00:06.0] pt_pci_write_config: address=0x0030 val=0x00000000 len=4
[00:06.0] pt_iomem_map: BAR 6, e_phys=0xffffffffffffffff 
maddr=0xc3140000 len=0x20000 first_map=0
[00:06.0] pt_pci_read_config: address=0x003d val=0x00000001 len=1
[00:06.0] pt_pci_write_config: address=0x003c val=0x0000000b len=1
[00:06.0] pt_pci_read_config: address=0x0004 val=0x00000000 len=2
[00:06.0] pt_pci_write_config: address=0x0004 val=0x00000004 len=2
qemu-system-x86_64: 
/usr/src/xen-with-upstream-qemu-patch/upstream-qemu/qemu/memory.c:1378: 
memory_region_del_subregion: Assertion `subregion->parent == mr' failed.
Waiting for data...



Am 20.02.2012 18:08, schrieb Anthony PERARD:
> On Mon, Feb 20, 2012 at 16:11, Tobias Geiger<tobias.geiger@vido.info>  wrote:
>> My Domu (Win7_64) boots fine, but 2 of my 6 passed-through pcidevices dont get
>> passed through at all:
>>
>> libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to
>> /sys/bus/pci/devices/0000:03:00.0/reset returned -1: Invalid argument
>> libxl: error: libxl_qmp.c:239:qmp_handle_error_response: received an error
>> message from QMP server: Device 'xen-pci-passthrough' could not be initialized
>> libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to
>> /sys/bus/pci/devices/0000:03:00.1/reset returned -1: Invalid argument
>> libxl: error: libxl_qmp.c:239:qmp_handle_error_response: received an error
>> message from QMP server: Device 'xen-pci-passthrough' could not be initialized
> These two errors are probably because my patch series depend on one
> other patch sent earlier:
> http://lists.xen.org/archives/html/xen-devel/2012-02/msg01027.html
>
>> The other 4 PCI-Ids (USB Controller) get passed through, but the USB-Devices
>> attached to them are "Not Working" according to Windows Device-Manager.
>>
>> All Devices worked with the old qemu-dm (traditional).
>>
>> Anything i can do to debug this further?
> You can send the log of qemu ( /var/log/xen/qemu-dm-$vm_name.log ).
> There is also a way to have more from QEMU by decommenting this two lines:
> /* #define PT_LOGGING_ENABLED */
> /* #define PT_DEBUG_PCI_CONFIG_ACCESS */
> in hw/xen_pci_passthrough.h
>
> Thanks for the testing,
>

WARNING: multiple messages have this Message-ID (diff)
From: Tobias Geiger <tobias.geiger@vido.info>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: xen-devel@lists.xensource.com, QEMU-devel <qemu-devel@nongnu.org>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH V7 00/11] Xen PCI Passthrough
Date: Mon, 20 Feb 2012 20:58:57 +0100	[thread overview]
Message-ID: <4F42A601.7000701@vido.info> (raw)
In-Reply-To: <CAJJyHj+5NJsHRESxn=socWA_bum3O19trhYUZE9+qdAji8hxwg@mail.gmail.com>

Hi

With the patch you mentioned, xl create looks more familiar:

libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to 
/sys/bus/pci/devices/0000:03:00.0/reset returned -1: Invalid argument
libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to 
/sys/bus/pci/devices/0000:03:00.1/reset returned -1: Invalid argument


This is actually "normal", at least compared to traditional qemu-dm - i 
guess due to missing FLR (Bios is capable, but Card not i assume).

Anyhow - the downside of the patch is, qemu doesnt even start :)

This is qemu-dm.log (with debugging enabled):

[00:06.0] pci_intx: intx=1
[00:06.0] pt_initfn: Real physical device 03:00.0 registered successfuly!
[00:07.0] pt_initfn: Assigning real physical device 03:00.1 to devfn 0x38
[00:07.0] pt_register_regions: IO region 0 registered (size=0x00004000 
base_addr=0xc3120000 type: 0)
[00:07.0] pci_intx: intx=2
[00:07.0] pt_initfn: Real physical device 03:00.1 registered successfuly!
[00:08.0] pt_initfn: Assigning real physical device 00:1d.0 to devfn 0x40
[00:08.0] pt_register_regions: IO region 4 registered (size=0x00000020 
base_addr=0x00005080 type: 0x1)
[00:08.0] pci_intx: intx=1
[00:08.0] pt_initfn: Real physical device 00:1d.0 registered successfuly!
[00:09.0] pt_initfn: Assigning real physical device 00:1d.1 to devfn 0x48
[00:09.0] pt_register_regions: IO region 4 registered (size=0x00000020 
base_addr=0x00005060 type: 0x1)
[00:09.0] pci_intx: intx=2
[00:09.0] pt_initfn: Real physical device 00:1d.1 registered successfuly!
[00:0a.0] pt_initfn: Assigning real physical device 00:1d.2 to devfn 0x50
[00:0a.0] pt_register_regions: IO region 4 registered (size=0x00000020 
base_addr=0x00005040 type: 0x1)
[00:0a.0] pci_intx: intx=3
[00:0a.0] pt_initfn: Real physical device 00:1d.2 registered successfuly!
[00:0b.0] pt_initfn: Assigning real physical device 00:1d.7 to devfn 0x58
[00:0b.0] pt_register_regions: IO region 0 registered (size=0x00000400 
base_addr=0xc3321000 type: 0)
[00:0b.0] pci_intx: intx=1
[00:0b.0] pt_initfn: Real physical device 00:1d.7 registered successfuly!
[00:06.0] pt_pci_read_config: address=0x000a val=0x00000300 len=2
[00:06.0] pt_pci_read_config: address=0x0000 val=0x00001002 len=2
[00:06.0] pt_pci_read_config: address=0x0002 val=0x00006718 len=2
[00:06.0] pt_pci_read_config: address=0x0010 val=0x0000000c len=4
[00:06.0] pt_pci_write_config: address=0x0010 val=0xffffffff len=4
[00:06.0] pt_iomem_map: BAR 0, e_phys=0xffffffffffffffff 
maddr=0xe0000000 len=0x10000000 first_map=1
[00:06.0] pt_pci_read_config: address=0x0010 val=0xf000000c len=4
[00:06.0] pt_pci_write_config: address=0x0010 val=0x0000000c len=4
[00:06.0] pt_iomem_map: BAR 0, e_phys=0xffffffffffffffff 
maddr=0xe0000000 len=0x10000000 first_map=0
[00:06.0] pt_pci_read_config: address=0x0018 val=0x00000004 len=4
[00:06.0] pt_pci_write_config: address=0x0018 val=0xffffffff len=4
[00:06.0] pt_iomem_map: BAR 2, e_phys=0xffffffffffffffff 
maddr=0xc3100000 len=0x20000 first_map=1
[00:06.0] pt_pci_read_config: address=0x0018 val=0xfffe0004 len=4
[00:06.0] pt_pci_write_config: address=0x0018 val=0x00000004 len=4
[00:06.0] pt_iomem_map: BAR 2, e_phys=0xffffffffffffffff 
maddr=0xc3100000 len=0x20000 first_map=0
[00:06.0] pt_pci_read_config: address=0x0020 val=0x00000001 len=4
[00:06.0] pt_pci_write_config: address=0x0020 val=0xffffffff len=4
[00:06.0] pt_ioport_map: BAR 4, e_phys=0xffffffffffffffff 
pio_base=0x2000 len=256 first_map=1
[00:06.0] pt_pci_read_config: address=0x0020 val=0xffffff01 len=4
[00:06.0] pt_pci_write_config: address=0x0020 val=0x00000001 len=4
[00:06.0] pt_ioport_map: BAR 4, e_phys=0xffffffffffffffff 
pio_base=0x2000 len=256 first_map=0
[00:06.0] pt_pci_read_config: address=0x0024 val=0x00000000 len=4
[00:06.0] pt_pci_write_config: address=0x0024 val=0xffffffff len=4
[00:06.0] pt_pci_read_config: address=0x0024 val=0x00000000 len=4
[00:06.0] pt_pci_write_config: address=0x0024 val=0x00000000 len=4
[00:06.0] pt_pci_read_config: address=0x0030 val=0x00000000 len=4
[00:06.0] pt_pci_write_config: address=0x0030 val=0xffffffff len=4
[00:06.0] pt_iomem_map: BAR 6, e_phys=0xffffffffffffffff 
maddr=0xc3140000 len=0x20000 first_map=1
[00:06.0] pt_pci_read_config: address=0x0030 val=0xfffe0001 len=4
[00:06.0] pt_pci_write_config: address=0x0030 val=0x00000000 len=4
[00:06.0] pt_iomem_map: BAR 6, e_phys=0xffffffffffffffff 
maddr=0xc3140000 len=0x20000 first_map=0
[00:06.0] pt_pci_read_config: address=0x003d val=0x00000001 len=1
[00:06.0] pt_pci_write_config: address=0x003c val=0x0000000b len=1
[00:06.0] pt_pci_read_config: address=0x0004 val=0x00000000 len=2
[00:06.0] pt_pci_write_config: address=0x0004 val=0x00000004 len=2
qemu-system-x86_64: 
/usr/src/xen-with-upstream-qemu-patch/upstream-qemu/qemu/memory.c:1378: 
memory_region_del_subregion: Assertion `subregion->parent == mr' failed.
Waiting for data...



Am 20.02.2012 18:08, schrieb Anthony PERARD:
> On Mon, Feb 20, 2012 at 16:11, Tobias Geiger<tobias.geiger@vido.info>  wrote:
>> My Domu (Win7_64) boots fine, but 2 of my 6 passed-through pcidevices dont get
>> passed through at all:
>>
>> libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to
>> /sys/bus/pci/devices/0000:03:00.0/reset returned -1: Invalid argument
>> libxl: error: libxl_qmp.c:239:qmp_handle_error_response: received an error
>> message from QMP server: Device 'xen-pci-passthrough' could not be initialized
>> libxl: error: libxl_pci.c:756:libxl__device_pci_reset: write to
>> /sys/bus/pci/devices/0000:03:00.1/reset returned -1: Invalid argument
>> libxl: error: libxl_qmp.c:239:qmp_handle_error_response: received an error
>> message from QMP server: Device 'xen-pci-passthrough' could not be initialized
> These two errors are probably because my patch series depend on one
> other patch sent earlier:
> http://lists.xen.org/archives/html/xen-devel/2012-02/msg01027.html
>
>> The other 4 PCI-Ids (USB Controller) get passed through, but the USB-Devices
>> attached to them are "Not Working" according to Windows Device-Manager.
>>
>> All Devices worked with the old qemu-dm (traditional).
>>
>> Anything i can do to debug this further?
> You can send the log of qemu ( /var/log/xen/qemu-dm-$vm_name.log ).
> There is also a way to have more from QEMU by decommenting this two lines:
> /* #define PT_LOGGING_ENABLED */
> /* #define PT_DEBUG_PCI_CONFIG_ACCESS */
> in hw/xen_pci_passthrough.h
>
> Thanks for the testing,
>

  reply	other threads:[~2012-02-20 19:59 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-17 17:08 [Qemu-devel] [PATCH V7 00/11] Xen PCI Passthrough Anthony PERARD
2012-02-17 17:08 ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 01/11] pci_ids: Add INTEL_82599_VF id Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 02/11] pci_regs: Fix value of PCI_EXP_TYPE_RC_EC Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-20 20:27   ` [Qemu-devel] " Michael S. Tsirkin
2012-02-20 20:27     ` Michael S. Tsirkin
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 03/11] pci_regs: Add PCI_EXP_TYPE_PCIE_BRIDGE Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-20 20:30   ` [Qemu-devel] " Michael S. Tsirkin
2012-02-20 20:30     ` Michael S. Tsirkin
2012-02-21 16:07     ` [Qemu-devel] " Anthony PERARD
2012-02-21 16:07       ` Anthony PERARD
2012-02-23 20:20   ` [Qemu-devel] " Michael S. Tsirkin
2012-02-23 20:20     ` Michael S. Tsirkin
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 04/11] configure: Introduce --enable-xen-pci-passthrough Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 05/11] Introduce HostPCIDevice to access a pci device on the host Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 06/11] pci.c: Add pci_check_bar_overlap Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-19 13:35   ` [Qemu-devel] " Michael S. Tsirkin
2012-02-19 13:35     ` Michael S. Tsirkin
2012-02-28 11:19     ` [Qemu-devel] " Anthony PERARD
2012-02-28 11:19       ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 07/11] Introduce Xen PCI Passthrough, qdevice (1/3) Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 08/11] Introduce Xen PCI Passthrough, PCI config space helpers (2/3) Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-19 13:32   ` [Qemu-devel] " Michael S. Tsirkin
2012-02-19 13:32     ` Michael S. Tsirkin
2012-02-20 20:35   ` [Qemu-devel] " Michael S. Tsirkin
2012-02-20 20:35     ` Michael S. Tsirkin
2012-02-21 10:18     ` [Qemu-devel] " Stefano Stabellini
2012-02-21 10:18       ` Stefano Stabellini
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 09/11] Introduce apic-msidef.h Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 10/11] Introduce Xen PCI Passthrough, MSI (3/3) Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-17 17:08 ` [Qemu-devel] [PATCH V7 11/11] xen passthrough: clean up MSI-X table handling Anthony PERARD
2012-02-17 17:08   ` Anthony PERARD
2012-02-21  9:34   ` [Qemu-devel] " Jan Beulich
2012-02-21  9:34     ` Jan Beulich
2012-02-21 16:15     ` [Qemu-devel] " Anthony PERARD
2012-02-21 16:15       ` Anthony PERARD
2012-02-20 10:51 ` [Qemu-devel] [Xen-devel] [PATCH V7 00/11] Xen PCI Passthrough Tobias Geiger
2012-02-20 10:51   ` Tobias Geiger
2012-02-20 11:31   ` [Qemu-devel] [Xen-devel] " Anthony PERARD
2012-02-20 11:31     ` Anthony PERARD
2012-02-20 16:11     ` [Qemu-devel] " Tobias Geiger
2012-02-20 16:11       ` Tobias Geiger
2012-02-20 17:08       ` [Qemu-devel] " Anthony PERARD
2012-02-20 17:08         ` Anthony PERARD
2012-02-20 19:58         ` Tobias Geiger [this message]
2012-02-20 19:58           ` Tobias Geiger
2012-02-20 23:31           ` [Qemu-devel] " Anthony PERARD
2012-02-20 23:31             ` Anthony PERARD
2012-02-22 14:56             ` [Qemu-devel] " Anthony PERARD
2012-02-22 14:56               ` Anthony PERARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F42A601.7000701@vido.info \
    --to=tobias.geiger@vido.info \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.