File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -3738,7 +3738,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
3738
3738
* page setup; it could incur locking paths which are not expected
3739
3739
* if userspace sets the MSR in an unusual location.
3740
3740
*/
3741
- if (msr && msr == vcpu -> kvm -> arch . xen_hvm_config . msr &&
3741
+ if (kvm_xen_is_hypercall_page_msr ( vcpu -> kvm , msr ) &&
3742
3742
!msr_info -> host_initiated )
3743
3743
return kvm_xen_write_hypercall_page (vcpu , data );
3744
3744
Original file line number Diff line number Diff line change @@ -56,6 +56,11 @@ static inline bool kvm_xen_msr_enabled(struct kvm *kvm)
56
56
kvm -> arch .xen_hvm_config .msr ;
57
57
}
58
58
59
+ static inline bool kvm_xen_is_hypercall_page_msr (struct kvm * kvm , u32 msr )
60
+ {
61
+ return msr && msr == kvm -> arch .xen_hvm_config .msr ;
62
+ }
63
+
59
64
static inline bool kvm_xen_hypercall_enabled (struct kvm * kvm )
60
65
{
61
66
return static_branch_unlikely (& kvm_xen_enabled .key ) &&
@@ -124,6 +129,11 @@ static inline bool kvm_xen_msr_enabled(struct kvm *kvm)
124
129
return false;
125
130
}
126
131
132
+ static inline bool kvm_xen_is_hypercall_page_msr (struct kvm * kvm , u32 msr )
133
+ {
134
+ return false;
135
+ }
136
+
127
137
static inline bool kvm_xen_hypercall_enabled (struct kvm * kvm )
128
138
{
129
139
return false;
You can’t perform that action at this time.
0 commit comments