|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 for-4.7 5/5] x86/hvm: Fix invalidation for emulated invlpg instructions
>>> On 10.05.16 at 12:41, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 10/05/16 11:15, Andrew Cooper wrote:
>> On 10/05/16 08:51, Jan Beulich wrote:
>>>>>> On 09.05.16 at 20:27, <andrew.cooper3@xxxxxxxxxx> 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...
>
> Actually, this isn't trivial. svm_asid_g_invlpg() is a static inline in
> a header file, and svm_invlpg() is its sole user.
>
> I will fold the static inline into svm_invlpg(), which also makes the
> VT-x and SVM code symmetric.
That's an option (which I'm fine with), but I don't think a requirement:
Marked inline or not the compiler should produce an out of line instance
when its address is taken.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |