linux/tools/testing/selftests/kvm
Liran Alon 6ca00dfafd 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>
2019-06-19 16:11:52 +02:00
..
include KVM: selftests: Wrap vcpu_nested_state_get/set functions with x86 guard 2019-05-24 21:27:17 +02:00
lib KVM: selftests: Wrap vcpu_nested_state_get/set functions with x86 guard 2019-05-24 21:27:17 +02:00
x86_64 KVM: x86: Modify struct kvm_nested_state to have explicit fields for data 2019-06-19 16:11:52 +02:00
.gitignore tests: kvm: Add tests for KVM_SET_NESTED_STATE 2019-05-08 14:12:09 +02:00
clear_dirty_log_test.c kvm: introduce manual dirty log reprotect 2018-12-14 12:34:19 +01:00
dirty_log_test.c kvm: selftests: aarch64: dirty_log_test: fix unaligned memslot size 2019-05-24 21:27:15 +02:00
Makefile The usual smattering of fixes and tunings that came in too late for the 2019-05-26 13:45:15 -07:00