Commit 24c1663
committed
KVM: x86: Don't bleed PVCLOCK_GUEST_STOPPED across PV clocks
When updating a specific PV clock, make a full copy of KVM's reference
copy/cache so that PVCLOCK_GUEST_STOPPED doesn't bleed across clocks.
E.g. in the unlikely scenario the guest has enabled both kvmclock and Xen
PV clock, a dangling GUEST_STOPPED in kvmclock would bleed into Xen PV
clock.
Using a local copy of the pvclock structure also sets the stage for
eliminating the per-vCPU copy/cache (only the TSC frequency information
actually "needs" to be cached/persisted).
Fixes: aa096aa ("KVM: x86/xen: setup pvclock updates")
Reviewed-by: Paul Durrant <paul@xen.org>
Link: https://lore.kernel.org/r/20250201013827.680235-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent ca28aa6 commit 24c1663
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3123 | 3123 | | |
3124 | 3124 | | |
3125 | 3125 | | |
| 3126 | + | |
3126 | 3127 | | |
3127 | 3128 | | |
| 3129 | + | |
| 3130 | + | |
3128 | 3131 | | |
3129 | 3132 | | |
3130 | 3133 | | |
| |||
3144 | 3147 | | |
3145 | 3148 | | |
3146 | 3149 | | |
3147 | | - | |
| 3150 | + | |
3148 | 3151 | | |
3149 | 3152 | | |
3150 | 3153 | | |
3151 | | - | |
| 3154 | + | |
3152 | 3155 | | |
3153 | | - | |
| 3156 | + | |
3154 | 3157 | | |
3155 | 3158 | | |
3156 | 3159 | | |
3157 | 3160 | | |
3158 | 3161 | | |
3159 | 3162 | | |
3160 | | - | |
| 3163 | + | |
3161 | 3164 | | |
3162 | 3165 | | |
3163 | 3166 | | |
3164 | 3167 | | |
3165 | | - | |
| 3168 | + | |
3166 | 3169 | | |
3167 | 3170 | | |
3168 | 3171 | | |
| |||
0 commit comments