diff options
author | Kirill A. Shutemov <[email protected]> | 2023-12-05 03:45:01 +0300 |
---|---|---|
committer | Paolo Bonzini <[email protected]> | 2024-01-08 12:14:41 -0500 |
commit | 1c6d984f523f67ecfad1083bb04c55d91977bb15 (patch) | |
tree | eab97f8ec6bcf5c56e448e1e0cfa8a5d62944eba /arch/s390/kvm/kvm-s390.c | |
parent | 7f26fea9bc085290e3731501f4f8fc5b82b9d615 (diff) |
x86/kvm: Do not try to disable kvmclock if it was not enabled
kvm_guest_cpu_offline() tries to disable kvmclock regardless if it is
present in the VM. It leads to write to a MSR that doesn't exist on some
configurations, namely in TDX guest:
unchecked MSR access error: WRMSR to 0x12 (tried to write 0x0000000000000000)
at rIP: 0xffffffff8110687c (kvmclock_disable+0x1c/0x30)
kvmclock enabling is gated by CLOCKSOURCE and CLOCKSOURCE2 KVM paravirt
features.
Do not disable kvmclock if it was not enabled.
Signed-off-by: Kirill A. Shutemov <[email protected]>
Fixes: c02027b5742b ("x86/kvm: Disable kvmclock on all CPUs on shutdown")
Reviewed-by: Sean Christopherson <[email protected]>
Reviewed-by: Vitaly Kuznetsov <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Wanpeng Li <[email protected]>
Cc: [email protected]
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.c')
0 files changed, 0 insertions, 0 deletions