Commit 715d107a authored by Sean Christopherson's avatar Sean Christopherson Committed by Aichun Shi
Browse files

KVM: Fix references to non-existent KVM_CAP_TRIPLE_FAULT_EVENT

mainline inclusion
from mainline-v6.0-rc1
commit 8deb03e7
category: feature
feature: Notify VM exit
bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I5PAJ5
CVE: N/A
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/


commit/?id=8deb03e7

Intel-SIG: commit 8deb03e7 ("KVM: Fix references to non-existent KVM_CAP_TRIPLE_FAULT_EVENT")

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

KVM: Fix references to non-existent KVM_CAP_TRIPLE_FAULT_EVENT

The x86-only KVM_CAP_TRIPLE_FAULT_EVENT was (appropriately) renamed to
KVM_CAP_X86_TRIPLE_FAULT_EVENT when the patches were applied, but the
docs and selftests got left behind.  Fix them.

Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarAichun Shi <aichun.shi@intel.com>
parent 0cbdfd9b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1086,7 +1086,7 @@ The following bits are defined in the flags field:

- KVM_VCPUEVENT_VALID_TRIPLE_FAULT may be set to signal that the
  triple_fault_pending field contains a valid state. This bit will
  be set whenever KVM_CAP_TRIPLE_FAULT_EVENT is enabled.
  be set whenever KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled.

ARM/ARM64:
^^^^^^^^^^
@@ -1183,7 +1183,7 @@ can be set in the flags field to signal that the
exception_has_payload, exception_payload, and exception.pending fields
contain a valid state and shall be written into the VCPU.

If KVM_CAP_TRIPLE_FAULT_EVENT is enabled, KVM_VCPUEVENT_VALID_TRIPLE_FAULT
If KVM_CAP_X86_TRIPLE_FAULT_EVENT is enabled, KVM_VCPUEVENT_VALID_TRIPLE_FAULT
can be set in flags field to signal that the triple_fault field contains
a valid state and shall be written into the VCPU.

+3 −3
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ int main(void)
	struct ucall uc;

	struct kvm_enable_cap cap = {
		.cap = KVM_CAP_TRIPLE_FAULT_EVENT,
		.cap = KVM_CAP_X86_TRIPLE_FAULT_EVENT,
		.args = {1}
	};

@@ -56,8 +56,8 @@ int main(void)
		exit(KSFT_SKIP);
	}

	if (!kvm_check_cap(KVM_CAP_TRIPLE_FAULT_EVENT)) {
		print_skip("KVM_CAP_TRIPLE_FAULT_EVENT not supported");
	if (!kvm_check_cap(KVM_CAP_X86_TRIPLE_FAULT_EVENT)) {
		print_skip("KVM_CAP_X86_TRIPLE_FAULT_EVENT not supported");
		exit(KSFT_SKIP);
	}