All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Sylwester Sosnowski <syso@datanoise.net>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6
Date: Thu, 2 Jun 2016 16:06:06 -0400	[thread overview]
Message-ID: <20160602200606.GA5106@char.us.oracle.com> (raw)
In-Reply-To: <57509021.1060506@datanoise.net>

On Thu, Jun 02, 2016 at 09:59:29PM +0200, Sylwester Sosnowski wrote:
> 
> Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6
> =====================================================
> 
> Background
> ----------
> 
> I am trying to passthrough an Industrial Ethernet Interface
> (Hilscher GmbH CIFX 50E-DP(M/S)) on a HVM DomU running the
> Xen 4.6 Hypervisor. The card is being pass-trough to the HVM
> using the PCI permissive mode and VT-d is active on this platform.
> 
> The Linux driver of the card (available only with NDA) at first
> sight seems to work properly (e.g. no system stability problems,
> no call traces in dmesg).
> 
> Hilscher provides the libcifx, which is an user-level library
> for accessing the card. libcfix uses the generic UIO interface
> and some card-specific interfaces to communicate.
> 
> Issue
> -----
> 
> Whenever libcifx tries perform a reset sequence initializing
> the card peripherals, we get an empty / invalid result.
> 
> I digged deeper into this by adding some debug hooks into the
> xen-pciback kernel module.
> 
> The card performs writes to offset 0x10 and 0x30 at card
> initialization (mostly writing dwords and words).
> 
> To verify if the writes were performed successfully, I read
> back the values after writing and can see that the read data
> differs from the written one.
> 
> Temporary Fix
> -------------
> 
> After checking the source[1] of the PCI configuration space
> handling in xen-pciback, I found out that changing line 258
> to read
> 
>     if (handled && !err) {
> 
> instead of:
> 
>     if (!handled && !err) {
> 
> solves the issue and I can successfully write to the interface.
> 
> I am unsure why this works and if it's the right way to do it
> or possibly a Xen bug, so I would like to ask for feedback
> for this.

did you try the permissive module parameter?
> 
> 
> Please let me know whenever I can supply additional logfiles or
> info. I'd be happy if we can resolve whenever this is a hardware-
> specific, driver-specific or Xen issue.
> 
> Thank you,
> Sylwester
> 
> PS: I tried to CC Ryan Wilson and Konrad Rzeszutek Wilk, but the
> E-Mail seems to be no longer active. This is where the changes
> originated.
> 
> Refereces
> ---------
> 1.
> https://github.com/google/kasan/blob/master/drivers/xen/xen-pciback/conf_space.c

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-06-02 20:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 19:59 Issues with PCI-Passtrough (VT-d) in HVM with Xen 4.6 Sylwester Sosnowski
2016-06-02 20:06 ` Konrad Rzeszutek Wilk [this message]
2016-06-02 20:11   ` Sylwester Sosnowski
2016-06-03  7:24 ` Sylwester Sosnowski
2016-06-03 11:52 ` Jan Beulich
2016-06-03 12:02   ` Jürgen Walter
2016-06-03 13:26     ` Jan Beulich
2016-06-03 14:20       ` Jan Beulich
2016-06-04 14:36         ` Jürgen Walter
2016-06-06  7:59           ` Jan Beulich
2016-06-04 15:15       ` Jürgen Walter
2016-06-06  8:41         ` Jan Beulich
2016-06-06  9:09           ` Jürgen Walter
2016-06-06  9:43             ` Jan Beulich
2016-06-06 14:01           ` Boris Ostrovsky
2016-06-06 14:21             ` Jan Beulich
2016-06-06 14:45               ` Boris Ostrovsky
  -- strict thread matches above, loose matches on Subject: below --
2016-06-15 10:45 Andrey Grodzovsky
2016-06-15 13:14 ` Jan Beulich
2016-06-18  3:24   ` Andrey Grodzovsky
2016-06-20  6:57     ` Jan Beulich
2016-06-02 19:49 Sylwester Sosnowski

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=20160602200606.GA5106@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=syso@datanoise.net \
    --cc=xen-devel@lists.xen.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.