All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Andryuk <jandryuk@gmail.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "James McKenzie" <james.mckenzie@bromium.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	qemu-devel@nongnu.org, "Paul Durrant" <paul.durrant@citrix.com>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 5/6] xen-pt: Hide MSI-X from xen stubdoms
Date: Tue, 12 Mar 2019 22:15:12 -0400	[thread overview]
Message-ID: <CAKf6xpvRZ1=xyz9aAQcjK8q987TPP=M+E_F+4-0mnca7DC0APQ@mail.gmail.com> (raw)
In-Reply-To: <CAKf6xpucF=OAkcZCd9udt3+eQempDtNEsjo+poL6PcQjS1gzZA@mail.gmail.com>

On Tue, Mar 12, 2019 at 11:15 AM Jason Andryuk <jandryuk@gmail.com> wrote:
<snip>
> I'll test to verify whether MSI-X works with
> permissive mode.

Dropping this patch and enabling permissive mode allowed MSI-X to work.

{"execute": "device_add", "arguments": {"driver":
"xen-pci-passthrough", "id": "xen-pci-pt_0000-03-00.0", "hostaddr":
"0000:00:01.00", "machine_addr": "0000:03:00.0", "permissive": true}}
[00:07.0] xen_pt_realize: Assigning real physical device 00:01.0 to devfn 0x38
[00:07.0] xen_pt_register_regions: IO region 0 registered
(size=0x00002000 base_addr=0xe1900000 type: 0x4)
[00:07.0] xen_pt_config_reg_init: Offset 0x000e mismatch!
Emulated=0x0080, host=0x0000, syncing to 0x0000.
[00:07.0] xen_pt_config_reg_init: Offset 0x0010 mismatch!
Emulated=0x0000, host=0xe1900004, syncing to 0xe1900004.
[00:07.0] xen_pt_config_reg_init: Offset 0x0052 mismatch!
Emulated=0x0000, host=0x01c3, syncing to 0x0003.
[00:07.0] xen_pt_config_reg_init: Offset 0x0072 mismatch!
Emulated=0x0000, host=0x0086, syncing to 0x0080.
[00:07.0] xen_pt_config_reg_init: Offset 0x00a4 mismatch!
Emulated=0x0000, host=0x8fc0, syncing to 0x8fc0.
[00:07.0] xen_pt_config_reg_init: Offset 0x00aa mismatch!
Emulated=0x0000, host=0x0010, syncing to 0x0010.
[00:07.0] xen_pt_config_reg_init: Offset 0x00b2 mismatch!
Emulated=0x0000, host=0x1011, syncing to 0x1011.
[00:07.0] xen_pt_msix_init: get MSI-X table BAR base 0xe1900000
[00:07.0] xen_pt_msix_init: table_off = 0x1000, total_entries = 8
[00:07.0] xen_pt_msix_init: mapping physical MSI-X table to 0x7ad6a82e4000
[00:07.0] xen_pt_config_reg_init: Offset 0x0092 mismatch!
Emulated=0x0000, host=0x0007, syncing to 0x0007.
[00:07.0] xen_pt_pci_intx: intx=1
[00:07.0] xen_pt_realize: Real physical device 00:01.0 registered successfully
{"return": {}}

hw/xen/xen_pt_msi.c:xen_pt_msix_init() calls open(/dev/mem) and mmaps
it, so I had to add CONFIG_DEVMEM to the stubdom linux .config.
Without /dev/mem:
[00:07.0] xen_pt_msix_init: get MSI-X table BAR base 0xe1900000
[00:07.0] xen_pt_msix_init: Error: Can't open /dev/mem: No such file
or directory
[00:07.0] xen_pt_msix_size_init: Error: Internal error: Invalid
xen_pt_msix_init.
Failed to initialize 12/15, type = 0x1, rc: -2
[00:07.0] xen_pt_msi_set_enable: disabling MSI.
free(): double free detected in tcache 2

[user@sys-usb ~]$ sudo lspci -v -s 00:07.0
00:07.0 USB controller: NEC Corporation uPD720200 USB 3.0 Host
Controller (rev 04) (prog-if 30 [XHCI])
    Subsystem: Lenovo Device 21d2
    Physical Slot: 7
    Flags: bus master, fast devsel, latency 0, IRQ 44
    Memory at f2024000 (64-bit, non-prefetchable) [size=8K]
    Capabilities: [50] Power Management version 3
    Capabilities: [70] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [90] MSI-X: Enable+ Count=8 Masked-
    Capabilities: [a0] Express Endpoint, MSI 00
    Kernel driver in use: xhci_hcd
    Kernel modules: xhci_pci

Regards,
Jason

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2019-03-13  2:15 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 18:02 [Qemu-devel] [PATCH 0/6] Xen stubdom support Jason Andryuk
2019-03-11 18:02 ` Jason Andryuk
2019-03-11 18:02 ` [Qemu-devel] [PATCH 1/6] xen: Introduce -xen-stubdom option Jason Andryuk
2019-03-11 18:02   ` Jason Andryuk
2019-03-11 18:06   ` [Qemu-devel] " Paolo Bonzini
2019-03-11 18:06     ` Paolo Bonzini
2019-03-11 19:46     ` [Qemu-devel] " Jason Andryuk
2019-03-11 19:46       ` Jason Andryuk
2019-03-11 18:02 ` [Qemu-devel] [PATCH 2/6] xen: Move xenstore initialization to common location Jason Andryuk
2019-03-11 18:02   ` Jason Andryuk
2019-03-13 15:01   ` Paul Durrant
2019-03-13 18:11     ` Jason Andryuk
2019-03-14 14:00       ` Paul Durrant
2019-03-11 18:02 ` [Qemu-devel] [PATCH 3/6] xen: Skip backend initialization for stubdom Jason Andryuk
2019-03-11 18:02   ` Jason Andryuk
2019-03-13 15:04   ` Paul Durrant
2019-03-11 18:02 ` [Qemu-devel] [PATCH 4/6] xen: Set HVM_PARAM_DM_DOMAIN for stubdom on older Xen Jason Andryuk
2019-03-11 18:02   ` Jason Andryuk
2019-03-11 18:02 ` [Qemu-devel] [PATCH 5/6] xen-pt: Hide MSI-X from xen stubdoms Jason Andryuk
2019-03-11 18:02   ` Jason Andryuk
2019-03-12 12:04   ` Roger Pau Monné
2019-03-12 12:38     ` Marek Marczykowski-Górecki
2019-03-12 13:58       ` Jason Andryuk
2019-03-12 14:13         ` Roger Pau Monné
2019-03-12 15:15           ` Jason Andryuk
2019-03-13  2:15             ` Jason Andryuk [this message]
2019-03-12 14:29         ` Marek Marczykowski-Górecki
2019-03-11 18:02 ` [Qemu-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE Jason Andryuk
2019-03-11 18:02   ` Jason Andryuk
2019-03-13 15:09   ` Paul Durrant
2019-03-14 18:15     ` Jason Andryuk
2019-03-14 19:22       ` Simon Gaiser
2019-03-14 19:37         ` Andrew Cooper
2019-03-15  9:12           ` Paul Durrant
2019-03-14 20:45       ` Simon Gaiser
2019-03-15  9:17       ` Paul Durrant
2019-03-15 16:28         ` Andrew Cooper
2019-03-20 17:28           ` Jason Andryuk
2019-03-22  3:09             ` Roger Pau Monné
2019-03-22 19:43               ` Jason Andryuk
2020-01-13 19:01                 ` [Xen-devel] " Jason Andryuk
2020-01-13 19:01                   ` Jason Andryuk
2020-01-14 10:04                   ` Roger Pau Monné
2020-01-14 10:04                     ` Roger Pau Monné
2020-01-14 14:41                     ` Jason Andryuk
2020-01-14 14:41                       ` Jason Andryuk
2020-01-14 18:04                       ` Roger Pau Monné
2020-01-14 18:04                         ` Roger Pau Monné
2020-01-15  8:33                         ` Durrant, Paul
2020-01-15  8:33                           ` Durrant, Paul

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='CAKf6xpvRZ1=xyz9aAQcjK8q987TPP=M+E_F+4-0mnca7DC0APQ@mail.gmail.com' \
    --to=jandryuk@gmail.com \
    --cc=anthony.perard@citrix.com \
    --cc=james.mckenzie@bromium.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=paul.durrant@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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.