Re: [PATCH v2 1/2] KVM: x86: Add helper to retrieve current value of user return MSR
From: Xiaoyao Li
Date: Mon Sep 22 2025 - 23:59:00 EST
On 9/20/2025 5:38 AM, Sean Christopherson wrote:
From: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
In the user return MSR support, the cached value is always the hardware
value of the specific MSR. Therefore, add a helper to retrieve the
cached value, which can replace the need for RDMSR, for example, to
allow SEV-ES guests to restore the correct host hardware value without
using RDMSR.
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
[sean: drop "cache" from the name, make it a one-liner, tag for stable]
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Reviewed-by: Xiaoyao Li <xiaoyao.li@xxxxxxxxx>