summaryrefslogtreecommitdiffstats
path: root/tools/arch
diff options
context:
space:
mode:
authorLiran Alon <liran.alon@oracle.com>2019-06-16 15:03:10 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2019-06-19 16:11:52 +0200
commit6ca00dfafda731d6eafdc164326e7336cdf42d74 (patch)
tree46c8c5ab7c1dc411f1eedb069a2100814f153ff1 /tools/arch
parent76e3bcdb61cad2c58ad88b2e4c70c69769026d37 (diff)
downloadlinux-6ca00dfafda731d6eafdc164326e7336cdf42d74.tar.gz
linux-6ca00dfafda731d6eafdc164326e7336cdf42d74.tar.bz2
linux-6ca00dfafda731d6eafdc164326e7336cdf42d74.zip
KVM: x86: Modify struct kvm_nested_state to have explicit fields for data
Improve the KVM_{GET,SET}_NESTED_STATE structs by detailing the format of VMX nested state data in a struct. In order to avoid changing the ioctl values of KVM_{GET,SET}_NESTED_STATE, there is a need to preserve sizeof(struct kvm_nested_state). This is done by defining the data struct as "data.vmx[0]". It was the most elegant way I found to preserve struct size while still keeping struct readable and easy to maintain. It does have a misfortunate side-effect that now it has to be accessed as "data.vmx[0]" rather than just "data.vmx". Because we are already modifying these structs, I also modified the following: * Define the "format" field values as macros. * Rename vmcs_pa to vmcs12_pa for better readability. Signed-off-by: Liran Alon <liran.alon@oracle.com> [Remove SVM stubs, add KVM_STATE_NESTED_VMX_VMCS12_SIZE. - Paolo] Reviewed-by: Liran Alon <liran.alon@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/arch')
-rw-r--r--tools/arch/x86/include/uapi/asm/kvm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/arch/x86/include/uapi/asm/kvm.h b/tools/arch/x86/include/uapi/asm/kvm.h
index 7a0e64ccd6ff..24a8cd229df6 100644
--- a/tools/arch/x86/include/uapi/asm/kvm.h
+++ b/tools/arch/x86/include/uapi/asm/kvm.h
@@ -392,7 +392,7 @@ struct kvm_sync_regs {
struct kvm_vmx_nested_state {
__u64 vmxon_pa;
- __u64 vmcs_pa;
+ __u64 vmcs12_pa;
struct {
__u16 flags;