qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] xics: Don't call icp_kvm_realize() from icp_realize()
@ 2019-06-17 13:25 Greg Kurz
  2019-06-17 13:46 ` Cédric Le Goater
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Kurz @ 2019-06-17 13:25 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, Cédric Le Goater, qemu-devel

kvm_kernel_irqchip is set by xics_kvm_init() which is always called after
icp_realize() since commit 3f777abc7107 "spapr/irq: add KVM support to the
'dual' machine".

This is thus dead code. Drop it.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 hw/intc/xics.c |    8 --------
 1 file changed, 8 deletions(-)

diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 29f7d397813e..1dc3a0f12280 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -351,14 +351,6 @@ static void icp_realize(DeviceState *dev, Error **errp)
         return;
     }
 
-    if (kvm_irqchip_in_kernel()) {
-        icp_kvm_realize(dev, &err);
-        if (err) {
-            error_propagate(errp, err);
-            return;
-        }
-    }
-
     qemu_register_reset(icp_reset_handler, dev);
     vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
 }



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] xics: Don't call icp_kvm_realize() from icp_realize()
  2019-06-17 13:25 [Qemu-devel] [PATCH] xics: Don't call icp_kvm_realize() from icp_realize() Greg Kurz
@ 2019-06-17 13:46 ` Cédric Le Goater
  2019-06-17 13:59   ` Greg Kurz
  0 siblings, 1 reply; 3+ messages in thread
From: Cédric Le Goater @ 2019-06-17 13:46 UTC (permalink / raw)
  To: Greg Kurz, David Gibson; +Cc: qemu-ppc, qemu-devel

On 17/06/2019 15:25, Greg Kurz wrote:
> kvm_kernel_irqchip is set by xics_kvm_init() which is always called after
> icp_realize() since commit 3f777abc7107 "spapr/irq: add KVM support to the
> 'dual' machine".

I think we still need it for CPU hotplug.

C.


> This is thus dead code. Drop it.
> 
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  hw/intc/xics.c |    8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> index 29f7d397813e..1dc3a0f12280 100644
> --- a/hw/intc/xics.c
> +++ b/hw/intc/xics.c
> @@ -351,14 +351,6 @@ static void icp_realize(DeviceState *dev, Error **errp)
>          return;
>      }
>  
> -    if (kvm_irqchip_in_kernel()) {
> -        icp_kvm_realize(dev, &err);
> -        if (err) {
> -            error_propagate(errp, err);
> -            return;
> -        }
> -    }
> -
>      qemu_register_reset(icp_reset_handler, dev);
>      vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
>  }
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] xics: Don't call icp_kvm_realize() from icp_realize()
  2019-06-17 13:46 ` Cédric Le Goater
@ 2019-06-17 13:59   ` Greg Kurz
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kurz @ 2019-06-17 13:59 UTC (permalink / raw)
  To: Cédric Le Goater; +Cc: qemu-ppc, qemu-devel, David Gibson

On Mon, 17 Jun 2019 15:46:14 +0200
Cédric Le Goater <clg@kaod.org> wrote:

> On 17/06/2019 15:25, Greg Kurz wrote:
> > kvm_kernel_irqchip is set by xics_kvm_init() which is always called after
> > icp_realize() since commit 3f777abc7107 "spapr/irq: add KVM support to the
> > 'dual' machine".  
> 
> I think we still need it for CPU hotplug.
> 

Yes you're right of course... a comment would probably help

> C.
> 
> 
> > This is thus dead code. Drop it.
> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---
> >  hw/intc/xics.c |    8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/hw/intc/xics.c b/hw/intc/xics.c
> > index 29f7d397813e..1dc3a0f12280 100644
> > --- a/hw/intc/xics.c
> > +++ b/hw/intc/xics.c
> > @@ -351,14 +351,6 @@ static void icp_realize(DeviceState *dev, Error **errp)
> >          return;
> >      }
> >  
> > -    if (kvm_irqchip_in_kernel()) {
> > -        icp_kvm_realize(dev, &err);
> > -        if (err) {
> > -            error_propagate(errp, err);
> > -            return;
> > -        }
> > -    }
> > -
> >      qemu_register_reset(icp_reset_handler, dev);
> >      vmstate_register(NULL, icp->cs->cpu_index, &vmstate_icp_server, icp);
> >  }
> >   
> 



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-17 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-17 13:25 [Qemu-devel] [PATCH] xics: Don't call icp_kvm_realize() from icp_realize() Greg Kurz
2019-06-17 13:46 ` Cédric Le Goater
2019-06-17 13:59   ` Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).