From: "Han, Huaitong" <huaitong.han@intel.com>
To: "JBeulich@suse.com" <JBeulich@suse.com>
Cc: "george.dunlap@eu.citrix.com" <george.dunlap@eu.citrix.com>,
"andrew.cooper3@citrix.com" <andrew.cooper3@citrix.com>,
"keir@xen.org" <keir@xen.org>,
"wei.liu2@citrix.com" <wei.liu2@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH V6 2/5] x86/hvm: pkeys, add pkeys support for guest_walk_tables
Date: Wed, 27 Jan 2016 03:18:47 +0000 [thread overview]
Message-ID: <1453864735.4038.4.camel@intel.com> (raw)
In-Reply-To: <56A6515602000078000CABC4@prv-mh.provo.novell.com>
On Mon, 2016-01-25 at 08:46 -0700, Jan Beulich wrote:
> > > > On 19.01.16 at 08:30, <huaitong.han@intel.com> wrote:
>
>
> > + write_cr4(cr4 | X86_CR4_PKE);
> > + asm volatile (".byte 0x0f,0x01,0xee"
> > + : "=a" (pkru) : "c" (0) : "dx");
> > + write_cr4(cr4);
>
> I think you will want to abstract out the actual writing of CR4 from
> write_cr4(), as updating this_cpu(cr4) back and forth is quite
> pointless here.
>
Updating this_cpu(cr4) back and forth is pointless, but using
"asm volatile ( "mov %0,%%cr4" : : "r" (val) )" directly here is also
bad code style, as there are two places you can update cr4 directly.
next prev parent reply other threads:[~2016-01-27 3:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-19 7:30 [PATCH V6 0/5] x86/hvm: pkeys, add memory protection-key support Huaitong Han
2016-01-19 7:30 ` [PATCH V6 1/5] x86/hvm: pkeys, disable pkeys for guests in non-paging mode Huaitong Han
2016-01-19 7:30 ` [PATCH V6 2/5] x86/hvm: pkeys, add pkeys support for guest_walk_tables Huaitong Han
2016-01-25 15:46 ` Jan Beulich
2016-01-27 3:18 ` Han, Huaitong [this message]
2016-01-27 10:20 ` Jan Beulich
2016-01-19 7:30 ` [PATCH V6 3/5] x86/hvm: pkeys, add xstate support for pkeys Huaitong Han
2016-01-25 15:48 ` Jan Beulich
2016-01-19 7:30 ` [PATCH V6 4/5] xen/mm: Clean up pfec handling in gva_to_gfn Huaitong Han
2016-01-25 15:56 ` Jan Beulich
2016-01-26 14:30 ` Tim Deegan
2016-01-27 7:22 ` Han, Huaitong
2016-01-27 9:34 ` Tim Deegan
2016-01-27 10:13 ` Han, Huaitong
2016-01-19 7:30 ` [PATCH V6 5/5] x86/hvm: pkeys, add pkeys support for cpuid handling Huaitong Han
2016-01-19 9:19 ` Wei Liu
2016-01-25 16:04 ` Jan Beulich
2016-01-25 15:25 ` [PATCH V6 0/5] x86/hvm: pkeys, add memory protection-key support Jan Beulich
2016-01-26 8:06 ` Han, Huaitong
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=1453864735.4038.4.camel@intel.com \
--to=huaitong.han@intel.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=keir@xen.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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.