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.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -485,6 +485,9 @@ struct kvm_run { · 484 unmodified lines | ||
| 485 | 485 | #define KVM_MSR_EXIT_REASON_INVAL (1 << 0) |
| 486 | 486 | #define KVM_MSR_EXIT_REASON_UNKNOWN (1 << 1) |
| 487 | 487 | #define KVM_MSR_EXIT_REASON_FILTER (1 << 2) |
| 488 | +#define KVM_MSR_EXIT_REASON_VALID_MASK (KVM_MSR_EXIT_REASON_INVAL | \ | |
| 489 | + KVM_MSR_EXIT_REASON_UNKNOWN | \ | |
| 490 | + KVM_MSR_EXIT_REASON_FILTER) | |
| 488 | 491 | __u32 reason; /* kernel -> user */ |
| 489 | 492 | __u32 index; /* kernel -> user */ |
| 490 | 493 | __u64 data; /* kernel <-> user */ |