qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Linu Cherian <linu.cherian@cavium.com>
To: Auger Eric <eric.auger@redhat.com>
Cc: Bharat Bhushan <bharat.bhushan@nxp.com>,
	Linu Cherian <linuc.decode@gmail.com>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"kevin.tian@intel.com" <kevin.tian@intel.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"marc.zyngier@arm.com" <marc.zyngier@arm.com>,
	"tn@semihalf.com" <tn@semihalf.com>,
	"will.deacon@arm.com" <will.deacon@arm.com>,
	"drjones@redhat.com" <drjones@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
	"eric.auger.pro@gmail.com" <eric.auger.pro@gmail.com>,
	"robin.murphy@arm.com" <robin.murphy@arm.com>,
	"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>,
	"bharatb.yadav@gmail.com" <bharatb.yadav@gmail.com>
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH v4 0/5] virtio-iommu: VFIO integration
Date: Fri, 6 Oct 2017 14:11:29 +0530	[thread overview]
Message-ID: <20171006084129.GA9318@virtx40> (raw)
In-Reply-To: <807c8076-af7b-da24-66d5-2c823dc1da34@redhat.com>

On Fri Oct 06, 2017 at 09:24:20AM +0200, Auger Eric wrote:
> Hi Bharat,
> 
> On 06/10/2017 05:46, Bharat Bhushan wrote:
> > 
> > 
> >>>> Thanks
> >>>>
> >>>> Eric
> >>>>>
> >>>>> However you should be allowed to map 1 sg element of 5 pages and
> >>>>> then notify the host about this event I think. Still looking at the code...
> >>>>>
> >>>>> I still can't reproduce the issue at the moment. What kind of device
> >>>>> are you assigning?
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>> Eric
> >>>>>>
> >>>>>> Atleast vfio_get_vaddr called from vfio_iommu_map_notify in Qemu
> >>>>>> expects the map size to be a power of 2.
> >>>
> >>> Actually I missed the most important here ;-)
> >>>>>>
> >>>>>>  if (len & iotlb->addr_mask) {
> >>> This check looks suspiscious to me. In our case the len is not
> >>> modified by the previous translation and it fails, I don't see why. It
> >>> should be valid to be able to notify 5 granules.
> >>
> >> So after discussion with Alex, looks the way we notify the host currently is
> >> wrong. we set the addr_mask to the mapping/unmapping size
> >> -1 whereas this should be a page mask instead (granule size or block size?).
> >> So if the guest maps 5 x 4kB pages we should send 5 notifications for each
> >> page and not a single one. It is unclear to me if we can notify with
> >> hugepage/block page size mask. Peter may confirm/infirm this. in vsmmuv3
> >> code I notify by granule or block size.
> >>
> >> Bharat, please can you add this to your TODO list?
> >>
> >> Linu, thanks a lot for the time you spent debugging this issue.
> >> Curiously on my side, it is really seldom hit but it is ...
> > 
> > Thanks Linu and Eric, I added this to my todo list.
> > While I am still not able to reproduce the issue.  I tried with e1000 and now try with ixgbe device. May I know which device can be used to reproduce this issue?
> 
> On my side I used an i350T2 device (igb) to reproduce the issue.

Myself used a Thunderx NIC which is an on chip PCI device.


-- 
Linu cherian

  reply	other threads:[~2017-10-06  8:42 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27  6:33 [Qemu-devel] [PATCH v4 0/5] virtio-iommu: VFIO integration Bharat Bhushan
2017-09-27  6:33 ` [Qemu-devel] [PATCH v4 1/5] target/arm/kvm: Translate the MSI doorbell in kvm_arch_fixup_msi_route Bharat Bhushan
2017-09-27  6:33 ` [Qemu-devel] [PATCH v4 2/5] virtio-iommu: Add iommu notifier for map/unmap Bharat Bhushan
2017-09-27  6:33 ` [Qemu-devel] [PATCH v4 3/5] virtio-iommu: Call iommu notifier for attach/detach Bharat Bhushan
2017-09-27  6:33 ` [Qemu-devel] [PATCH v4 4/5] virtio-iommu: add iommu replay Bharat Bhushan
2017-09-27  6:33 ` [Qemu-devel] [PATCH v4 5/5] virtio-iommu: add iommu notifier memory-region Bharat Bhushan
2017-09-27  6:46 ` [Qemu-devel] [PATCH v4 0/5] virtio-iommu: VFIO integration Bharat Bhushan
2017-09-27  7:01   ` Peter Xu
2017-09-27  8:32     ` Bharat Bhushan
2017-09-27  7:41 ` [Qemu-devel] [Qemu-arm] " Linu Cherian
2017-09-27  8:30   ` Bharat Bhushan
2017-09-27  8:55     ` Auger Eric
2017-09-27  9:05       ` Linu Cherian
2017-09-27  9:21       ` Linu Cherian
2017-09-27  9:24         ` Auger Eric
2017-10-04 11:49           ` Linu Cherian
2017-10-05 10:46             ` Auger Eric
2017-10-05 11:54               ` Auger Eric
2017-10-05 12:13                 ` Auger Eric
2017-10-05 17:02                   ` Auger Eric
2017-10-06  3:46                     ` Bharat Bhushan
2017-10-06  7:24                       ` Auger Eric
2017-10-06  8:41                         ` Linu Cherian [this message]
2017-10-10  6:42                       ` Bharat Bhushan
2017-10-11  9:42                         ` Auger Eric
2017-09-27  8:58     ` Linu Cherian

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=20171006084129.GA9318@virtx40 \
    --to=linu.cherian@cavium.com \
    --cc=alex.williamson@redhat.com \
    --cc=bharat.bhushan@nxp.com \
    --cc=bharatb.yadav@gmail.com \
    --cc=christoffer.dall@linaro.org \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=kevin.tian@intel.com \
    --cc=linuc.decode@gmail.com \
    --cc=marc.zyngier@arm.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robin.murphy@arm.com \
    --cc=tn@semihalf.com \
    --cc=will.deacon@arm.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).