[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 00/16] x86: indirect call overhead reduction



>>> On 13.07.18 at 15:39, <julien.grall@xxxxxxx> wrote:
> On 13/07/18 14:27, Jan Beulich wrote:
>>>>> On 13.07.18 at 15:00, <julien.grall@xxxxxxx> wrote:
>>> What would be the generic interface here? I saw it was based on
>>> alternative for the plumbing.
>> 
>> Yes, I'd prefer to use the same mechanism as presented in the series.
>> As per above for the IOMMU case we'd then need another abstraction
>> layer put in the middle (to produce a patch site on x86, but a normal
>> [indirect] call on ARM).
> 
> I will have a look. Could you point to the patch adding the abstraction?

Patch 9 is where the x86 side infrastructure gets added. Typical uses
would then be (taken from patch 10)

 hvm_guest_x86_mode(struct vcpu *v)
 {
     ASSERT(v == current);
-    return hvm_funcs.guest_x86_mode(v);
+    return alternative_call1(hvm_funcs.guest_x86_mode, v);
 }
 
 static inline void
 hvm_update_host_cr3(struct vcpu *v)
 {
     if ( hvm_funcs.update_host_cr3 )
-        hvm_funcs.update_host_cr3(v);
+        alternative_vcall1(hvm_funcs.update_host_cr3, v);
 }

And actually there was one more question I meant to ask: Are all
locations within Xen reachable by direct calls on ARM? I.e. can an
indirect call, when we know its target, always be replaced, no
matter at what address (within Xen) it lives?

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.