From: Paolo Bonzini <pbonzini@redhat.com>
To: "Wu, Feng" <feng.wu@intel.com>,
"gleb@redhat.com" <gleb@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH v4 0/4] KVM: enable Intel SMAP for KVM
Date: Fri, 04 Apr 2014 09:27:31 +0200 [thread overview]
Message-ID: <533E5EE3.4030708@redhat.com> (raw)
In-Reply-To: <E959C4978C3B6342920538CF579893F001EA02BF@SHSMSX104.ccr.corp.intel.com>
Il 04/04/2014 04:22, Wu, Feng ha scritto:
> Thank you for providing these test cases. I tested it in related hardware
> (both 32- and 64-bits) with both ept=1 and ept=0, they all pass.
>
> I also did some similar testing before posting the patch set. Since SMAP
> has been already supported in Linux kernel, in which, stac() and clac() are
> added in functions like copy_from_user(), copy_to_user(), etc.. From my
> previous test, Linux guest can run well on top of KVM with SMAP enabled.
> I think this covers the AC bit logic for testing. I also tested whether it can
> induce an SMAP violation when accessing user pages in kernel mode with
> AC bit cleared, I successfully got the SMAP violation fault in guest in that case.
Thanks, that is useful to know. Knowing that you tried the failure path
is good (next time point it out when submitting the patch).
I made unit tests because I'm not sure how much the new code is
stimulated in normal runs of Linux with ept=1. After the EPT tables are
built on the first access, the processor will take care of doing SMAP
checks. With ept=0, more page faults should happen on the first access
to a page. Still, it seemed safer to have unit tests and have them try
both without and with invlpg.
Even though the tests do not cover the CPL=3/implicit access case, the
logic to compute PFERR_RSVD_MASK dynamically is already covered by AC=1.
So I'm quite happy with the coverage. Series is
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
next prev parent reply other threads:[~2014-04-04 7:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-01 9:46 [PATCH v4 0/4] KVM: enable Intel SMAP for KVM Feng Wu
2014-04-01 9:46 ` [PATCH v4 1/4] KVM: Remove SMAP bit from CR4_RESERVED_BITS Feng Wu
2014-04-01 9:46 ` [PATCH v4 2/4] KVM: Add SMAP support when setting CR4 Feng Wu
2014-04-10 20:12 ` Marcelo Tosatti
2014-04-12 0:14 ` Paolo Bonzini
2014-04-01 9:46 ` [PATCH v4 3/4] KVM: Disable SMAP for guests in EPT realmode and EPT unpaging mode Feng Wu
2014-04-01 9:46 ` [PATCH v4 4/4] KVM: expose SMAP feature to guest Feng Wu
2014-04-03 16:46 ` [PATCH v4 0/4] KVM: enable Intel SMAP for KVM Paolo Bonzini
2014-04-04 2:22 ` Wu, Feng
2014-04-04 7:27 ` Paolo Bonzini [this message]
2014-04-08 1:06 ` Wu, Feng
2014-04-08 20:38 ` Paolo Bonzini
2014-04-10 20:01 ` Marcelo Tosatti
2014-04-12 0:16 ` Paolo Bonzini
2014-04-12 0:17 ` Paolo Bonzini
2014-04-13 21:57 ` Marcelo Tosatti
2014-04-13 22:48 ` H. Peter Anvin
2014-04-10 20:16 ` Marcelo Tosatti
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=533E5EE3.4030708@redhat.com \
--to=pbonzini@redhat.com \
--cc=feng.wu@intel.com \
--cc=gleb@redhat.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.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 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).