aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/libxed.py
diff options
context:
space:
mode:
authorVipin Sharma <[email protected]>2022-09-21 23:24:51 -0700
committerSean Christopherson <[email protected]>2022-09-28 12:47:19 -0700
commitdfb45db43e9f6283a79230c8ea9cb589f14791b0 (patch)
tree17287a356e4a8301a239b7e1d341c23a03080b4b /tools/perf/scripts/python/libxed.py
parentbf3f11581893494a5fb01eb87b99627edc2a85ff (diff)
KVM: selftests: Load RAX with -EFAULT before Hyper-V hypercall
Load RAX with -EFAULT prior to making a Hyper-V hypercall so that tests can't get false negatives due to the compiler coincidentally loading the "right" value into RAX, i.e. to ensure that _KVM_ and not the compiler is correctly clearing RAX on a successful hypercall. Note, initializing *hv_status (in C code) to -EFAULT is not sufficient to avoid false negatives, as the compiler can still "clobber" RAX and thus load garbage into *hv_status if the hypercall faults (or if KVM doesn't set RAX). Suggested-by: Sean Christopherson <[email protected]> Signed-off-by: Vipin Sharma <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Link: https://lore.kernel.org/r/[email protected] [sean: move to separate patch, massage changelog] Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/libxed.py')
0 files changed, 0 insertions, 0 deletions