summaryrefslogtreecommitdiffstats
path: root/kernel/utsname_sysctl.c
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2022-01-12 18:01:33 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2022-01-28 07:38:26 -0500
commit892a42c10ddb945d3a4dcf07dccdf9cb98b21548 (patch)
tree1e0ef7923f90ca66eaed8aa6ace9fa5fa6c31d60 /kernel/utsname_sysctl.c
parent2423a4c0d17418eca1ba1e3f48684cb2ab7523d5 (diff)
downloadlinux-892a42c10ddb945d3a4dcf07dccdf9cb98b21548.tar.bz2
KVM: nVMX: Implement evmcs_field_offset() suitable for handle_vmread()
In preparation to allowing reads from Enlightened VMCS from handle_vmread(), implement evmcs_field_offset() to get the correct read offset. get_evmcs_offset(), which is being used by KVM-on-Hyper-V, is almost what's needed but a few things need to be adjusted. First, WARN_ON() is unacceptable for handle_vmread() as any field can (in theory) be supplied by the guest and not all fields are defined in eVMCS v1. Second, we need to handle 'holes' in eVMCS (missing fields). It also sounds like a good idea to WARN_ON() if such fields are ever accessed by KVM-on-Hyper-V. Implement dedicated evmcs_field_offset() helper. No functional change intended. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <20220112170134.1904308-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'kernel/utsname_sysctl.c')
0 files changed, 0 insertions, 0 deletions