[PATCH 1/6] firmware/smccc: Call arch-specific hook on discovering KVM services

Catalin Marinas catalin.marinas at arm.com
Fri Aug 2 08:13:59 PDT 2024


On Wed, Jul 31, 2024 at 08:11:16PM +0530, Aneesh Kumar K.V wrote:
> Will Deacon <will at kernel.org> writes:
> > diff --git a/drivers/firmware/smccc/kvm_guest.c b/drivers/firmware/smccc/kvm_guest.c
> > index 89a68e7eeaa6..f3319be20b36 100644
> > --- a/drivers/firmware/smccc/kvm_guest.c
> > +++ b/drivers/firmware/smccc/kvm_guest.c
> > @@ -39,6 +39,8 @@ void __init kvm_init_hyp_services(void)
> >  
> >  	pr_info("hypervisor services detected (0x%08lx 0x%08lx 0x%08lx 0x%08lx)\n",
> >  		 res.a3, res.a2, res.a1, res.a0);
> > +
> > +	kvm_arch_init_hyp_services();
> >  }
> 
> That is a bit late to detect RMM?

It may be late for RMM but I'm not sure that's relevant. This function
is about KVM services provided to a guest. The RMM is meant (in theory
at least) to be hypervisor-agnostic. We shouldn't place any realm guest
initialisation in the kvm_guest.c file.

-- 
Catalin



More information about the linux-arm-kernel mailing list