[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e5f0ffa362ef8731a61c03882738956bb9f4c13b.camel@gmail.com>
Date: Fri, 21 Mar 2025 17:32:51 +0100
From: Francesco Lavra <francescolavra.fl@...il.com>
To: neeraj.upadhyay@....com
Cc: David.Kaplan@....com, Santosh.Shukla@....com,
Suravee.Suthikulpanit@....com, Thomas.Lendacky@....com,
Vasant.Hegde@....com, bp@...en8.de, dave.hansen@...ux.intel.com,
hpa@...or.com, huibo.wang@....com, kirill.shutemov@...ux.intel.com,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org, mingo@...hat.com,
naveen.rao@....com, nikunj@....com, pbonzini@...hat.com,
peterz@...radead.org, seanjc@...gle.com, tglx@...utronix.de, x86@...nel.org
Subject: Re: [RFC v2 02/17] x86/apic: Initialize Secure AVIC APIC backing
page
On 2025-02-26 at 9:05, Neeraj Upadhyay wrote:
> diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c
> index 82492efc5d94..300bc8f6eb6f 100644
> --- a/arch/x86/coco/sev/core.c
> +++ b/arch/x86/coco/sev/core.c
> @@ -1504,6 +1504,38 @@ static enum es_result vc_handle_msr(struct
> ghcb *ghcb, struct es_em_ctxt *ctxt)
> return ret;
> }
>
> +/*
> + * Register GPA of the Secure AVIC backing page.
> + *
> + * @apic_id: APIC ID of the vCPU. Use -1ULL for the current vCPU
> + * doing the call.
> + * @gpa : GPA of the Secure AVIC backing page.
> + */
> +enum es_result savic_register_gpa(u64 apic_id, u64 gpa)
> +{
> + struct ghcb_state state;
> + struct es_em_ctxt ctxt;
> + unsigned long flags;
> + struct ghcb *ghcb;
> + int ret = 0;
This should be an enum es_result, and there is no need to zero-
initialize it.
The same applies to savic_unregister_gpa() in patch 14.
Powered by blists - more mailing lists