[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y7/FZpizEyIaL+Su@yzhao56-desk.sh.intel.com>
Date: Thu, 12 Jan 2023 16:31:34 +0800
From: Yan Zhao <yan.y.zhao@...el.com>
To: Sean Christopherson <seanjc@...gle.com>, <kvm@...r.kernel.org>,
<intel-gfx@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
"Zhenyu Wang" <zhenyuw@...ux.intel.com>,
Ben Gardon <bgardon@...gle.com>,
"Paolo Bonzini" <pbonzini@...hat.com>,
<intel-gvt-dev@...ts.freedesktop.org>,
"Zhi Wang" <zhi.a.wang@...el.com>
Subject: Re: [PATCH 03/27] drm/i915/gvt: Incorporate KVM memslot info into
check for 2MiB GTT entry
> > > > Note, KVM may also restrict the mapping size for reasons that aren't
> > > > relevant to KVMGT, e.g. for KVM's iTLB multi-hit workaround or if the gfn
> > > Will iTLB multi-hit affect DMA?
> >
> > I highly doubt it, I can't imagine an IOMMU would have a dedicated instruction
> > TLB :-)
> I can double check it with IOMMU hardware experts.
> But if DMA would tamper instruction TLB, it should have been reported
> as an issue with normal VFIO pass-through?
hi Sean,
This is the feedback:
- CPU Instruction TLB is only filled when CPU fetches an instruction.
- IOMMU uses IOTLB to cache IOVA translation.
A remapping hardware may implement multiple IOTLBs, and some of these may
be for special purposes, e.g., only for instruction fetches.
There is no way for software to be aware that multiple
translations for smaller pages have been used for a large page. If software
modifies the paging structures so that the page size used for a 4-KByte range
of input-addresses changes, the IOTLBs may subsequently contain multiple
translations for the address range (one for each page size).
A reference to a input-address in the address range may use any of these
translations. Which translation is used may vary from one execution to
another, and the choice may be implementation-specific.
- Theres no similar bug related to DMA requests for instruction fetch hitting
multiple IOTLB entries reported in IOMMU side.
The X bit in IOMMU paging structure is to be removed in future and is
currently always unset.
Thanks
Yan
Powered by blists - more mailing lists