Re: [PATCH v3 02/17] x86/apic: Initialize Secure AVIC APIC backing page
From: Thomas Gleixner
Date: Thu Apr 03 2025 - 07:38:22 EST
On Tue, Apr 01 2025 at 17:06, Neeraj Upadhyay wrote:
> +enum es_result savic_register_gpa(u64 gpa)
> +{
> + struct ghcb_state state;
> + struct es_em_ctxt ctxt;
> + unsigned long flags;
> + enum es_result res;
> + struct ghcb *ghcb;
> +
> + local_irq_save(flags);
guard(irqsave)();
> + ghcb = __sev_get_ghcb(&state);
> +
> + vc_ghcb_invalidate(ghcb);
> +
> + /* Register GPA for the local CPU */
> + ghcb_set_rax(ghcb, -1ULL);
> + ghcb_set_rbx(ghcb, gpa);
> + res = sev_es_ghcb_hv_call(ghcb, &ctxt, SVM_VMGEXIT_SECURE_AVIC,
> + SVM_VMGEXIT_SECURE_AVIC_REGISTER_GPA, 0);
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#line-breaks