Commit c7cc4d56 authored by Sean Christopherson's avatar Sean Christopherson Committed by Lin Wang
Browse files

KVM: x86: Add a helper to retrieve userspace address from kvm_device_attr

mainline inclusion
from mainline-v5.17-rc2
commit 56f289a8
category: feature
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5RQLJ


CVE: NA

Intel-SIG: commit 56f289a8 KVM: x86: Add a helper to retrieve userspace address from kvm_device_attr.

--------------------------------

Add a helper to handle converting the u64 userspace address embedded in
struct kvm_device_attr into a userspace pointer, it's all too easy to
forget the intermediate "unsigned long" cast as well as the truncation
check.

No functional change intended.

Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarLin Wang <lin.x.wang@intel.com>
parent d108c31b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment