qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Elijah Shakkour <elijahsh@mellanox.com>
Cc: Knut Omang <knut.omang@oracle.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] QEMU and vIOMMU support for emulated VF passthrough to nested (L2) VM
Date: Mon, 1 Apr 2019 18:25:15 +0800	[thread overview]
Message-ID: <20190401102515.GD8853@xz-x1> (raw)
In-Reply-To: <AM6PR05MB6616E9F5EE3B3B531266B73DBD550@AM6PR05MB6616.eurprd05.prod.outlook.com>

On Mon, Apr 01, 2019 at 09:12:38AM +0000, Elijah Shakkour wrote:
> 
> 
> > -----Original Message-----
> > From: Peter Xu <peterx@redhat.com>
> > Sent: Monday, April 1, 2019 5:47 AM
> > To: Elijah Shakkour <elijahsh@mellanox.com>
> > Cc: Knut Omang <knut.omang@oracle.com>; Michael S. Tsirkin
> > <mst@redhat.com>; Alex Williamson <alex.williamson@redhat.com>;
> > Marcel Apfelbaum <marcel.apfelbaum@gmail.com>; Stefan Hajnoczi
> > <stefanha@gmail.com>; qemu-devel@nongnu.org
> > Subject: Re: QEMU and vIOMMU support for emulated VF passthrough to
> > nested (L2) VM
> > 
> > On Sun, Mar 31, 2019 at 11:15:00AM +0000, Elijah Shakkour wrote:
> > 
> > [...]
> > 
> > > I didn't have DMA nor MMIO read/write working with my old command
> > line.
> > > But, when I removed all CPU flags and only provided "-cpu host", I see that
> > MMIO works.
> > > Still, DMA read/write from emulated device doesn't work for VF. For
> > example:
> > > Driver provides me a buffer pointer through MMIO write, this address
> > (pointer) is GPA of L2, and when I try to call pci_dma_read() with this address
> > I get:
> > > "
> > > Unassigned mem read 0000000000000000
> > > "
> > 
> > I don't know where this error log was dumped but if it's during DMA then I
> > agree it can probably be related to vIOMMU.
> > 
> 
> This log is dumped from:
> memory.c: unassigned_mem_read()
> 
> > > As I said, my problem now is in translation of L2 GPA provided by driver,
> > when I call DMA read/write for this address from VF.
> > > Any insights?
> > 
> > I just noticed that you were using QEMU 2.12 [1].  If that's the case, please
> > rebase to the latest QEMU, at least >=3.0 because there's major refactor of
> > the shadow logic during 3.0 devel cycle AFAICT.
> > 
> 
> Rebased to QEMU 3.1
> Now I see the address I'm trying to read from in log but still same error:
> "
> Unassigned mem read 00000000f0481000
> "
> What do you suggest?

Would you please answer the questions that Knut asked?  Is it working
for L1 guest?  How about PF?

You can also try to enable VT-d device log by appending:

  -trace enable="vtd_*"

In case it dumps anything useful for you.

-- 
Peter Xu

  reply	other threads:[~2019-04-01 10:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AM6PR05MB6616EE3D161F72A121F5FFEDBD5D0@AM6PR05MB6616.eurprd05.prod.outlook.com>
     [not found] ` <20190324221319-mutt-send-email-mst@kernel.org>
     [not found]   ` <AM6PR05MB66166ED74E2718150F0CBF62BD5F0@AM6PR05MB6616.eurprd05.prod.outlook.com>
     [not found]     ` <20190326085309-mutt-send-email-mst@kernel.org>
     [not found]       ` <AM6PR05MB661611FE4DD494AF9EFB6B8ABD5F0@AM6PR05MB6616.eurprd05.prod.outlook.com>
     [not found]         ` <20190327064143.GP9149@xz-x1>
     [not found]           ` <060498b58287775ce6bd7dd704f13b6d6e185f91.camel@oracle.com>
     [not found]             ` <20190327084255.GR9149@xz-x1>
     [not found]               ` <AM6PR05MB6616E9FDE038EA2B0665DD9CBD540@AM6PR05MB6616.eurprd05.prod.outlook.com>
     [not found]                 ` <20190401024710.GB8853@xz-x1>
2019-04-01  9:12                   ` [Qemu-devel] QEMU and vIOMMU support for emulated VF passthrough to nested (L2) VM Elijah Shakkour
2019-04-01 10:25                     ` Peter Xu [this message]
2019-04-01 14:01                       ` Elijah Shakkour
2019-04-01 14:24                         ` Knut Omang
2019-04-02 15:41                           ` Elijah Shakkour
2019-04-03  2:40                             ` Peter Xu
2019-04-03 21:57                               ` Elijah Shakkour
2019-04-03 22:10                                 ` Elijah Shakkour
2019-04-04  6:59                                   ` Peter Xu
2019-04-04  7:58                                     ` Tian, Kevin
2019-04-07 13:47                                       ` Elijah Shakkour
2019-04-07 13:47                                         ` Elijah Shakkour
2019-04-08  0:32                                         ` Tian, Kevin
2019-04-08  0:32                                           ` Tian, Kevin
2019-04-08  5:56                                           ` Peter Xu
2019-04-08  5:56                                             ` Peter Xu

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=20190401102515.GD8853@xz-x1 \
    --to=peterx@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=elijahsh@mellanox.com \
    --cc=knut.omang@oracle.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).