Skip to content

Commit 8ac6067

Browse files
committed
Merge tag 'x86-sev-2025-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 SEV updates from Ingo Molnar: - Improve sme_enable() PIC build robustness (Kevin Loughlin) - Simplify vc_handle_msr() a bit (Peng Hao) [ Just reminding myself and everybody else about the endless stream of x86 TLAs: "SEV" is AMD's Secure Encrypted Virtualization - Linus ] * tag 'x86-sev-2025-03-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Simplify the code by removing unnecessary 'else' statement x86/sev: Add missing RIP_REL_REF() invocations during sme_enable()
2 parents a49a879 + f0373cc commit 8ac6067

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

arch/x86/coco/sev/core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,8 +1480,7 @@ static enum es_result vc_handle_msr(struct ghcb *ghcb, struct es_em_ctxt *ctxt)
14801480
case MSR_AMD64_GUEST_TSC_FREQ:
14811481
if (sev_status & MSR_AMD64_SNP_SECURE_TSC)
14821482
return __vc_handle_secure_tsc_msrs(regs, write);
1483-
else
1484-
break;
1483+
break;
14851484
default:
14861485
break;
14871486
}

arch/x86/mm/mem_encrypt_identity.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ void __head sme_enable(struct boot_params *bp)
563563
}
564564

565565
RIP_REL_REF(sme_me_mask) = me_mask;
566-
physical_mask &= ~me_mask;
567-
cc_vendor = CC_VENDOR_AMD;
566+
RIP_REL_REF(physical_mask) &= ~me_mask;
567+
RIP_REL_REF(cc_vendor) = CC_VENDOR_AMD;
568568
cc_set_mask(me_mask);
569569
}

0 commit comments

Comments
 (0)