mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
x86/svm: Don't unconditionally use a new ASID in svm_invlpg_intercept()
paging_invlpg() already returns a boolean indicating whether an invalidation is necessary or not. A return value of 0 indicates that the specified virtual address wasn't shadowed (or has already been flushed), cannot currently be cached in the TLB. This is a performance optimisation. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Reviewed-by: Tim Deegan <tim@xen.org> Release-acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
a373db28ea
commit
eee511dec9
1 file changed
+2
-2
@@ -2224,8 +2224,8 @@ static void svm_invlpg_intercept(unsigned long vaddr)
|
||||
{
|
||||
struct vcpu *curr = current;
|
||||
HVMTRACE_LONG_2D(INVLPG, 0, TRC_PAR_LONG(vaddr));
|
||||
paging_invlpg(curr, vaddr);
|
||||
svm_asid_g_invlpg(curr, vaddr);
|
||||
if ( paging_invlpg(curr, vaddr) )
|
||||
svm_asid_g_invlpg(curr, vaddr);
|
||||
}
|
||||
|
||||
static struct hvm_function_table __initdata svm_function_table = {
|
||||
|
||||