diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2018-05-16 11:21:26 -0400 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-05-26 08:14:33 -0400 |
commit | 142c95da92e847312f4d32cc8870719fe335d121 (patch) | |
tree | 580d9abd77e526f5fbf45a433744fc161f78f77b | |
parent | c9c92bee533073e2c3999200cfcff2a606ac8534 (diff) |
KVM: x86: hyperv: use defines when parsing hypercall parameters
Avoid open-coding offsets for hypercall input parameters, we already
have defines for them.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
-rw-r--r-- | arch/x86/kvm/hyperv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 5708e951a5c6..dcfeae2deafa 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c | |||
@@ -1341,9 +1341,9 @@ int kvm_hv_hypercall(struct kvm_vcpu *vcpu) | |||
1341 | #endif | 1341 | #endif |
1342 | 1342 | ||
1343 | code = param & 0xffff; | 1343 | code = param & 0xffff; |
1344 | fast = (param >> 16) & 0x1; | 1344 | fast = !!(param & HV_HYPERCALL_FAST_BIT); |
1345 | rep_cnt = (param >> 32) & 0xfff; | 1345 | rep_cnt = (param >> HV_HYPERCALL_REP_COMP_OFFSET) & 0xfff; |
1346 | rep_idx = (param >> 48) & 0xfff; | 1346 | rep_idx = (param >> HV_HYPERCALL_REP_START_OFFSET) & 0xfff; |
1347 | 1347 | ||
1348 | trace_kvm_hv_hypercall(code, fast, rep_cnt, rep_idx, ingpa, outgpa); | 1348 | trace_kvm_hv_hypercall(code, fast, rep_cnt, rep_idx, ingpa, outgpa); |
1349 | 1349 | ||