From: Peter Xu <peterx@redhat.com>
To: "Zhang, Qi1" <qi1.zhang@intel.com>
Cc: "ehabkost@redhat.com" <ehabkost@redhat.com>,
"mst@redhat.com" <mst@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"Qi, Yadong" <yadong.qi@intel.com>,
"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [PATCH V2] intel_iommu: TM field should not be in reserved bits
Date: Sun, 29 Sep 2019 10:02:20 +0800 [thread overview]
Message-ID: <20190929020220.GA8286@xz-x1> (raw)
In-Reply-To: <215440059103624D9AD9D1DCACBF45DD3E853A42@shsmsx102.ccr.corp.intel.com>
On Sun, Sep 29, 2019 at 01:11:12AM +0000, Zhang, Qi1 wrote:
>
>
> > -----Original Message-----
> > From: Peter Xu <peterx@redhat.com>
> > Sent: Friday, September 27, 2019 5:32 PM
> > To: Zhang, Qi1 <qi1.zhang@intel.com>
> > Cc: qemu-devel@nongnu.org; ehabkost@redhat.com; mst@redhat.com;
> > pbonzini@redhat.com; rth@twiddle.net; Qi, Yadong <yadong.qi@intel.com>
> > Subject: Re: [PATCH V2] intel_iommu: TM field should not be in reserved bits
> >
> > On Fri, Sep 27, 2019 at 08:03:21AM +0000, Zhang, Qi1 wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Peter Xu <peterx@redhat.com>
> > > > Sent: Friday, September 27, 2019 2:10 PM
> > > > To: Zhang, Qi1 <qi1.zhang@intel.com>
> > > > Cc: qemu-devel@nongnu.org; ehabkost@redhat.com; mst@redhat.com;
> > > > pbonzini@redhat.com; rth@twiddle.net
> > > > Subject: Re: [PATCH V2] intel_iommu: TM field should not be in
> > > > reserved bits
> > > >
> > > > On Fri, Sep 27, 2019 at 12:58:38PM +0800, qi1.zhang@intel.com wrote:
> > > > > From: "Zhang, Qi" <qi1.zhang@intel.com>
> > > > >
> > > > > When dt is supported, TM field should not be Reserved(0).
> > > > >
> > > > > Refer to VT-d Spec 9.8
> > > > >
> > > > > Signed-off-by: Zhang, Qi <qi1.zhang@intel.com>
> > > > > Signed-off-by: Qi, Yadong <yadong.qi@intel.com>
> > > > > ---
> > > > > hw/i386/intel_iommu.c | 12 ++++++------
> > > > > hw/i386/intel_iommu_internal.h | 25 +++++++++++++++++++------
> > > > > 2 files changed, 25 insertions(+), 12 deletions(-)
> > > > > ---
> > VTD_SPTE_PAGE_L2_RSVD_MASK(s-
> > > > >aw_bits);
> > > > > - vtd_paging_entry_rsvd_field[3] =
> > > > >aw_bits);
> > > > > + vtd_paging_entry_rsvd_field[5] =
> > > > VTD_SPTE_LPAGE_L1_RSVD_MASK(s->aw_bits, x86_iommu-
> > > > >dt_supported);
> > > > > + vtd_paging_entry_rsvd_field[6] =
> > > > VTD_SPTE_LPAGE_L2_RSVD_MASK(s->aw_bits, x86_iommu-
> > > > >dt_supported);
> > > > > + vtd_paging_entry_rsvd_field[7] =
> > > > > + VTD_SPTE_LPAGE_L3_RSVD_MASK(s->aw_bits, x86_iommu-
> > > > >dt_supported);
> > > > > vtd_paging_entry_rsvd_field[8] =
> > > > >VTD_SPTE_LPAGE_L4_RSVD_MASK(s->aw_bits);
> > > >
> > > > Should this TM bit only affects leaves? Say, entry 1 (4K), 5 (2M), 6 (1G).
[1]
> > > > While this reminded me that I'm totally confused on why we have had
> > > > entry 7, 8 after all... Are they really used?
> > > Yes. TM bit only affects. To this array, index 1, 5,6,7 may be leaf. Will update
> > a new patchset for it.
> >
> > Could I ask why index 7 may be leaf?
> Index 7 is PDPE 1G GB leaf.
I thought 1G was index 6. I've listed my understanding above [1].
Would you please double confirm? Thanks,
--
Peter Xu
next prev parent reply other threads:[~2019-09-29 2:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-27 4:58 [PATCH V2] intel_iommu: TM field should not be in reserved bits qi1.zhang
2019-09-27 6:10 ` Peter Xu
2019-09-27 8:03 ` Zhang, Qi1
2019-09-27 9:32 ` Peter Xu
2019-09-29 1:11 ` Zhang, Qi1
2019-09-29 2:02 ` Peter Xu [this message]
2019-09-29 2:10 ` Zhang, Qi1
2019-09-29 2:19 ` Peter Xu
2019-09-27 9:33 ` Michael S. Tsirkin
2019-09-27 20:44 ` no-reply
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=20190929020220.GA8286@xz-x1 \
--to=peterx@redhat.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qi1.zhang@intel.com \
--cc=rth@twiddle.net \
--cc=yadong.qi@intel.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).