aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/uapi/linux/kvm.h
diff options
context:
space:
mode:
authorAaron Lewis <aaronlewis@google.com>2022-09-21 15:15:22 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2022-11-09 12:31:29 -0500
commitdb205f7e1edc8d8f0880f0218d3a03b13fe94af3 (patch)
tree7a8f9287b5b89d839660cef305079cca2b4f0e79 /include/uapi/linux/kvm.h
parentKVM: x86: Disallow the use of KVM_MSR_FILTER_DEFAULT_ALLOW in the kernel (diff)
downloadwireguard-linux-db205f7e1edc8d8f0880f0218d3a03b13fe94af3.tar.xz
wireguard-linux-db205f7e1edc8d8f0880f0218d3a03b13fe94af3.zip
KVM: x86: Add a VALID_MASK for the MSR exit reason flags
Add the mask KVM_MSR_EXIT_REASON_VALID_MASK for the MSR exit reason flags. This simplifies checks that validate these flags, and makes it easier to introduce new flags in the future. No functional change intended. Signed-off-by: Aaron Lewis <aaronlewis@google.com> Message-Id: <20220921151525.904162-3-aaronlewis@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/uapi/linux/kvm.h')
-rw-r--r--include/uapi/linux/kvm.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 0d5d4419139a..7fea12369245 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -485,6 +485,9 @@ struct kvm_run {
#define KVM_MSR_EXIT_REASON_INVAL (1 << 0)
#define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1)
#define KVM_MSR_EXIT_REASON_FILTER (1 << 2)
+#define KVM_MSR_EXIT_REASON_VALID_MASK (KVM_MSR_EXIT_REASON_INVAL | \
+ KVM_MSR_EXIT_REASON_UNKNOWN | \
+ KVM_MSR_EXIT_REASON_FILTER)
__u32 reason; /* kernel -> user */
__u32 index; /* kernel -> user */
__u64 data; /* kernel <-> user */