On Tue, Sep 15, 2026 at 04:01:06PM -0500, Michael Roth wrote:
> On Thu, Sep 03, 2026 at 01:35:49PM -0600, Mathieu Poirier wrote:
> > From: Jean-Philippe Brucker <[email protected]>
> > 
> > Returning an error to kvm_init() is fatal anyway, no need to continue
> > the initialization.
> > 
> > Leave the `ret` variable in the function scope because it will be reused
> > when adding RME support.
> > 
> > Signed-off-by: Jean-Philippe Brucker <[email protected]>
> > Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
> > Signed-off-by: Mathieu Poirier <[email protected]>
> > ---
> >  target/arm/kvm.c | 9 +++++----
> >  1 file changed, 5 insertions(+), 4 deletions(-)
> > 
> > diff --git a/target/arm/kvm.c b/target/arm/kvm.c
> > index d40a6a985914..ed99be7fd80c 100644
> > --- a/target/arm/kvm.c
> > +++ b/target/arm/kvm.c
> > @@ -596,7 +596,7 @@ int kvm_arch_get_default_type(MachineState *ms)
> >  
> >  int kvm_arch_init(MachineState *ms, KVMState *s)
> >  {
> > -    int ret = 0;
> > +    int ret;
> >      /* For ARM interrupt delivery is always asynchronous,
> >       * whether we are using an in-kernel VGIC or not.
> >       */
> > @@ -618,7 +618,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
> >          !kvm_check_extension(s, KVM_CAP_ARM_IRQ_LINE_LAYOUT_2)) {
> >          error_report("Using more than 256 vcpus requires a host kernel "
> >                       "with KVM_CAP_ARM_IRQ_LINE_LAYOUT_2");
> > -        ret = -EINVAL;
> > +        return -EINVAL;
> >      }
> >  
> >      if (kvm_check_extension(s, KVM_CAP_ARM_NISV_TO_USER)) {
> 
> There's a error_report("Failed to enable KVM_CAP_ARM_NISV_TO_USER cap")
> under here as well that doesn't have a return -EINVAL after this patch.
> Is that intentional?

This patch did not touch the clause that checks KVM_CAP_ARM_NISV_TO_USER.  As
far as I can tell, it is mainline code.

Reply via email to