From: "Jan Beulich" <JBeulich@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: Keir Fraser <keir@xen.org>, Kevin Tian <kevin.tian@intel.com>,
Eddie Dong <eddie.dong@intel.com>,
Jun Nakajima <jun.nakajima@intel.com>, Tim Deegan <tim@xen.org>
Subject: [PATCH 1/4] x86/EPT: consider page order when checking for APIC MFN
Date: Wed, 23 Apr 2014 09:39:50 +0100 [thread overview]
Message-ID: <53579876020000780000B2E2@nat28.tlf.novell.com> (raw)
In-Reply-To: <53579447020000780000B2A9@nat28.tlf.novell.com>
[-- Attachment #1: Type: text/plain, Size: 936 bytes --]
This was overlooked in 3d90d6e6 ("x86/EPT: split super pages upon
mismatching memory types").
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -816,15 +816,18 @@ int epte_get_entry_emt(struct domain *d,
!has_arch_pdevs(d)) )
{
ASSERT(!direct_mmio ||
- mfn_x(mfn) == d->arch.hvm_domain.vmx.apic_access_mfn);
+ !((mfn_x(mfn) ^ d->arch.hvm_domain.vmx.apic_access_mfn) >>
+ order));
*ipat = 1;
return MTRR_TYPE_WRBACK;
}
if ( direct_mmio )
{
- if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+ if ( (mfn_x(mfn) ^ d->arch.hvm_domain.vmx.apic_access_mfn) >> order )
return MTRR_TYPE_UNCACHABLE;
+ if ( order )
+ return -1;
*ipat = 1;
return MTRR_TYPE_WRBACK;
}
[-- Attachment #2: EPT-APIC-access-MFN-order.patch --]
[-- Type: text/plain, Size: 989 bytes --]
x86/EPT: consider page order when checking for APIC MFN
This was overlooked in 3d90d6e6 ("x86/EPT: split super pages upon
mismatching memory types").
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/mtrr.c
+++ b/xen/arch/x86/hvm/mtrr.c
@@ -816,15 +816,18 @@ int epte_get_entry_emt(struct domain *d,
!has_arch_pdevs(d)) )
{
ASSERT(!direct_mmio ||
- mfn_x(mfn) == d->arch.hvm_domain.vmx.apic_access_mfn);
+ !((mfn_x(mfn) ^ d->arch.hvm_domain.vmx.apic_access_mfn) >>
+ order));
*ipat = 1;
return MTRR_TYPE_WRBACK;
}
if ( direct_mmio )
{
- if ( mfn_x(mfn) != d->arch.hvm_domain.vmx.apic_access_mfn )
+ if ( (mfn_x(mfn) ^ d->arch.hvm_domain.vmx.apic_access_mfn) >> order )
return MTRR_TYPE_UNCACHABLE;
+ if ( order )
+ return -1;
*ipat = 1;
return MTRR_TYPE_WRBACK;
}
[-- Attachment #3: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2014-04-23 8:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-23 8:21 [PATCH 0/4] x86/EPT: miscellaneous further fixes to EMT determination Jan Beulich
2014-04-23 8:39 ` Jan Beulich [this message]
2014-04-28 7:38 ` [PATCH 1/4] x86/EPT: consider page order when checking for APIC MFN Tian, Kevin
2014-04-23 8:40 ` [PATCH 2/4] x86/EPT: refine direct MMIO checking when determining EMT Jan Beulich
2014-04-25 12:05 ` [PATCH 2/4 v2] " Jan Beulich
2014-04-28 7:59 ` Tian, Kevin
2014-04-28 8:24 ` Jan Beulich
2014-04-28 9:06 ` Tian, Kevin
2014-04-28 9:51 ` Jan Beulich
2014-04-28 12:02 ` Tian, Kevin
2014-04-28 7:41 ` [PATCH 2/4] " Tian, Kevin
2014-04-23 8:41 ` [PATCH 3/4] x86/EPT: fix pinned cache attribute range checking Jan Beulich
2014-04-28 7:42 ` Tian, Kevin
2014-04-23 8:41 ` [PATCH 4/4] x86/EPT: also force EMT re-evaluation if pinned ranges change Jan Beulich
2014-04-28 7:43 ` Tian, Kevin
2014-05-01 12:44 ` [PATCH 0/4] x86/EPT: miscellaneous further fixes to EMT determination Tim Deegan
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=53579876020000780000B2E2@nat28.tlf.novell.com \
--to=jbeulich@suse.com \
--cc=eddie.dong@intel.com \
--cc=jun.nakajima@intel.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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.