From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Tim Deegan <tim@xen.org>, Xen-devel <xen-devel@lists.xen.org>,
Paul Durrant <paul.durrant@citrix.com>,
Jun Nakajima <jun.nakajima@intel.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v2 for-4.7 5/5] x86/hvm: Fix invalidation for emulated invlpg instructions
Date: Tue, 10 May 2016 11:15:03 +0100 [thread overview]
Message-ID: <5731B4A7.40709@citrix.com> (raw)
In-Reply-To: <5731AF1602000078000E9DDE@prv-mh.provo.novell.com>
On 10/05/16 08:51, Jan Beulich wrote:
>>>> On 09.05.16 at 20:27, <andrew.cooper3@citrix.com> wrote:
>> --- a/xen/arch/x86/hvm/svm/svm.c
>> +++ b/xen/arch/x86/hvm/svm/svm.c
>> @@ -2222,10 +2222,13 @@ static void svm_invlpga_intercept(
>>
>> static void svm_invlpg_intercept(unsigned long vaddr)
>> {
>> - struct vcpu *curr = current;
>> HVMTRACE_LONG_2D(INVLPG, 0, TRC_PAR_LONG(vaddr));
>> - if ( paging_invlpg(curr, vaddr) )
>> - svm_asid_g_invlpg(curr, vaddr);
>> + paging_invlpg(current, vaddr);
>> +}
>> +
>> +static void svm_invlpg(struct vcpu *v, unsigned long vaddr)
>> +{
>> + svm_asid_g_invlpg(v, vaddr);
>> }
> I don't see the need for the wrapper: svm_asid_g_invlpg() is itself
> suitable to be used ...
>
>> @@ -2258,12 +2261,12 @@ static struct hvm_function_table __initdata svm_function_table = {
>> .inject_trap = svm_inject_trap,
>> .init_hypercall_page = svm_init_hypercall_page,
>> .event_pending = svm_event_pending,
>> + .invlpg = svm_invlpg,
> ... here.
So it can. I will do this...
>
>> @@ -2137,6 +2137,7 @@ static struct hvm_function_table __initdata vmx_function_table = {
>> .inject_trap = vmx_inject_trap,
>> .init_hypercall_page = vmx_init_hypercall_page,
>> .event_pending = vmx_event_pending,
>> + .invlpg = vmx_invlpg,
> Similarly here, except that the pointer would need zapping if
> !cpu_has_vmx_vpid, requiring ...
but not this. For testing "older" configurations, I have a plan to make
options like vpid configurable per domain, at which point the function
pointer necessarily needs following.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-10 10:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 18:27 [PATCH v2 for-4.7 0/5] Fixes for invlpg handling for HVM guests Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 1/5] x86/hvm: Always return the linear address from hvm_virtual_to_linear_addr() Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 2/5] x86/hvm: Raise #SS faults for %ss-based segmentation violations Andrew Cooper
2016-05-10 7:39 ` Jan Beulich
2016-05-10 7:40 ` Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 3/5] x86/hvm: Correct the emulated interaction of invlpg with segments Andrew Cooper
2016-05-09 18:27 ` [PATCH v2 for-4.7 4/5] x86/svm: Don't unconditionally use a new ASID in svm_invlpg_intercept() Andrew Cooper
2016-05-09 19:35 ` Boris Ostrovsky
2016-05-09 18:27 ` [PATCH v2 for-4.7 5/5] x86/hvm: Fix invalidation for emulated invlpg instructions Andrew Cooper
2016-05-09 19:39 ` Boris Ostrovsky
2016-05-10 7:51 ` Jan Beulich
2016-05-10 10:15 ` Andrew Cooper [this message]
2016-05-10 10:41 ` Andrew Cooper
2016-05-10 11:02 ` Jan Beulich
2016-05-10 11:03 ` Andrew Cooper
2016-05-10 8:50 ` George Dunlap
2016-05-11 6:42 ` Tian, Kevin
2016-05-10 9:52 ` [PATCH v2 for-4.7 0/5] Fixes for invlpg handling for HVM guests Wei Liu
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=5731B4A7.40709@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=george.dunlap@eu.citrix.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=paul.durrant@citrix.com \
--cc=suravee.suthikulpanit@amd.com \
--cc=tim@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.