]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/sev: Rename sev_es_ghcb_handle_msr() to __vc_handle_msr()
authorBorislav Petkov (AMD) <bp@alien8.de>
Mon, 19 Jan 2026 13:49:13 +0000 (14:49 +0100)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 19 Jan 2026 14:23:48 +0000 (15:23 +0100)
Forgot to do that during the Secure AVIC review. :-\

No functional changes.

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Link: https://patch.msgid.link/20260119141310.29605-1-bp@kernel.org
arch/x86/coco/sev/core.c
arch/x86/coco/sev/internal.h
arch/x86/coco/sev/vc-handle.c

index 379e0c09c7f3621b597ea54d78bf7aac6119b516..a059e004f61bc379e3f34bababb3ba6b0dbcb071 100644 (file)
@@ -989,7 +989,7 @@ u64 savic_ghcb_msr_read(u32 reg)
        ghcb = __sev_get_ghcb(&state);
        vc_ghcb_invalidate(ghcb);
 
-       res = sev_es_ghcb_handle_msr(ghcb, &ctxt, false);
+       res = __vc_handle_msr(ghcb, &ctxt, false);
        if (res != ES_OK) {
                pr_err("Secure AVIC MSR (0x%llx) read returned error (%d)\n", msr, res);
                /* MSR read failures are treated as fatal errors */
@@ -1019,7 +1019,7 @@ void savic_ghcb_msr_write(u32 reg, u64 value)
        ghcb = __sev_get_ghcb(&state);
        vc_ghcb_invalidate(ghcb);
 
-       res = sev_es_ghcb_handle_msr(ghcb, &ctxt, true);
+       res = __vc_handle_msr(ghcb, &ctxt, true);
        if (res != ES_OK) {
                pr_err("Secure AVIC MSR (0x%llx) write returned error (%d)\n", msr, res);
                /* MSR writes should never fail. Any failure is fatal error for SNP guest */
index 039326b5c799eab24fdb4dceb0f5d8cec5ddd24d..b1d0c66a651a607b31f01ba56855e0f77e1dce08 100644 (file)
@@ -85,7 +85,7 @@ static __always_inline void sev_es_wr_ghcb_msr(u64 val)
        native_wrmsr(MSR_AMD64_SEV_ES_GHCB, low, high);
 }
 
-enum es_result sev_es_ghcb_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt, bool write);
+enum es_result __vc_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt, bool write);
 
 u64 get_hv_features(void);
 
index 43f264afd590aef782c568398ac8cd67f0b84d0b..d98b5c08ef00d8a091d30dc78ab3103f7835d631 100644 (file)
@@ -404,7 +404,7 @@ static enum es_result __vc_handle_secure_tsc_msrs(struct es_em_ctxt *ctxt, bool
        return ES_OK;
 }
 
-enum es_result sev_es_ghcb_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt, bool write)
+enum es_result __vc_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt, bool write)
 {
        struct pt_regs *regs = ctxt->regs;
        enum es_result ret;
@@ -448,7 +448,7 @@ enum es_result sev_es_ghcb_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt
 
 static enum es_result vc_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt)
 {
-       return sev_es_ghcb_handle_msr(ghcb, ctxt, ctxt->insn.opcode.bytes[1] == 0x30);
+       return __vc_handle_msr(ghcb, ctxt, ctxt->insn.opcode.bytes[1] == 0x30);
 }
 
 static void __init vc_early_forward_exception(struct es_em_ctxt *ctxt)