On Fri, Sep 13, 2024 at 05:06:53PM +0530, Neeraj Upadhyay wrote: > @@ -61,8 +65,30 @@ static void x2apic_savic_send_IPI_mask_allbutself(const struct cpumask *mask, in > __send_IPI_mask(mask, vector, APIC_DEST_ALLBUT); > } > > +static void x2apic_savic_setup(void) > +{ > + void *backing_page; > + enum es_result ret; > + unsigned long gpa; > + > + if (this_cpu_read(savic_setup_done)) I'm sure you can get rid of that silly bool. Like check the apic_backing_page pointer instead and use that pointer to verify whether the per-CPU setup has been done successfully. > + return; > + > + backing_page = this_cpu_read(apic_backing_page); > + gpa = __pa(backing_page); > + ret = sev_notify_savic_gpa(gpa); > + if (ret != ES_OK) > + snp_abort(); > + this_cpu_write(savic_setup_done, true); > +} -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette