Re: [PATCH v3 02/17] x86/apic: Initialize Secure AVIC APIC backing page
From: Neeraj Upadhyay
Date: Thu Apr 03 2025 - 07:45:12 EST
On 4/3/2025 5:07 PM, Thomas Gleixner wrote:
> 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)();
>
Ok
>> + 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
>
Ok, will align with "ghcb" arg on previous line.
- Neeraj