All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types
       [not found] ` <20160802050434.GC16350@in.ibm.com>
@ 2016-08-02  6:20   ` David Gibson
  2016-08-02  6:24     ` Peter Krempa
  2016-08-02  8:13     ` Igor Mammedov
  0 siblings, 2 replies; 4+ messages in thread
From: David Gibson @ 2016-08-02  6:20 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: imammedo, qemu-devel, qemu-ppc, agraf, pkrempa

[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]

On Tue, Aug 02, 2016 at 10:34:34AM +0530, Bharata B Rao wrote:
> On Tue, Aug 02, 2016 at 02:25:08PM +1000, David Gibson wrote:
> > On Power, support for vCPU hotplug is new in qemu 2.7.  However, we
> > currently implement the query_hotpluggable_cpus hook the same for all
> > pseries machine type versions.
> > 
> > However, the old-style CPU initialization doesn't work with the new query
> > code, meaning that attempting to use query-hotpluggable-cpus on a
> > pseries-2.6 or earlier VM will cause qemu to SEGV.
> > 
> > This fixes the problem by simply disabling the hook for earlier machine
> > types.
> 
> I had sent a patch to fix this and a couple of other related issues
> some time back and it indeed was accepted into your ppc-for-2.7 branch.
> 
> https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
> 
> Only now I am realizing that somehow that patch didn't make it to mainline.

Oh.. good point.  Sorry, that one somehow slipped through the cracks.

So, the remaining question is, what's the preferred behaviour for
older machine types:

  1) should query-hotpluggable-cpus give an error, the same as it does
     on machine types which have never supported it (this is what my
     patch does)

or

  2) Should query-hotpluggable-cpus succeed, but return an empty list?
     (this is what Bharata's patch does)

Igor and / or Peter, do you have an opinion on which behaviour is preferable?

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types
  2016-08-02  6:20   ` [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types David Gibson
@ 2016-08-02  6:24     ` Peter Krempa
  2016-08-03  2:15       ` David Gibson
  2016-08-02  8:13     ` Igor Mammedov
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Krempa @ 2016-08-02  6:24 UTC (permalink / raw)
  To: David Gibson; +Cc: Bharata B Rao, imammedo, qemu-devel, qemu-ppc, agraf

On Tue, Aug 02, 2016 at 16:20:50 +1000, David Gibson wrote:
> On Tue, Aug 02, 2016 at 10:34:34AM +0530, Bharata B Rao wrote:
> > On Tue, Aug 02, 2016 at 02:25:08PM +1000, David Gibson wrote:
> > > On Power, support for vCPU hotplug is new in qemu 2.7.  However, we
> > > currently implement the query_hotpluggable_cpus hook the same for all
> > > pseries machine type versions.
> > > 
> > > However, the old-style CPU initialization doesn't work with the new query
> > > code, meaning that attempting to use query-hotpluggable-cpus on a
> > > pseries-2.6 or earlier VM will cause qemu to SEGV.
> > > 
> > > This fixes the problem by simply disabling the hook for earlier machine
> > > types.
> > 
> > I had sent a patch to fix this and a couple of other related issues
> > some time back and it indeed was accepted into your ppc-for-2.7 branch.
> > 
> > https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
> > 
> > Only now I am realizing that somehow that patch didn't make it to mainline.
> 
> Oh.. good point.  Sorry, that one somehow slipped through the cracks.
> 
> So, the remaining question is, what's the preferred behaviour for
> older machine types:
> 
>   1) should query-hotpluggable-cpus give an error, the same as it does
>      on machine types which have never supported it (this is what my
>      patch does)
> 
> or
> 
>   2) Should query-hotpluggable-cpus succeed, but return an empty list?
>      (this is what Bharata's patch does)
> 
> Igor and / or Peter, do you have an opinion on which behaviour is preferable?

I don't really care which option you select as long as the
'hotpluggable-cpus' field which is repored in 'query-machines' is set to
false for machine types which don't support it. Libvirt then won't even
call query-hotpluggable-cpus.

Peter

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

* Re: [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types
  2016-08-02  6:20   ` [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types David Gibson
  2016-08-02  6:24     ` Peter Krempa
@ 2016-08-02  8:13     ` Igor Mammedov
  1 sibling, 0 replies; 4+ messages in thread
From: Igor Mammedov @ 2016-08-02  8:13 UTC (permalink / raw)
  To: David Gibson; +Cc: Bharata B Rao, qemu-devel, qemu-ppc, agraf, pkrempa

On Tue, 2 Aug 2016 16:20:50 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:

> On Tue, Aug 02, 2016 at 10:34:34AM +0530, Bharata B Rao wrote:
> > On Tue, Aug 02, 2016 at 02:25:08PM +1000, David Gibson wrote:  
> > > On Power, support for vCPU hotplug is new in qemu 2.7.  However, we
> > > currently implement the query_hotpluggable_cpus hook the same for all
> > > pseries machine type versions.
> > > 
> > > However, the old-style CPU initialization doesn't work with the new query
> > > code, meaning that attempting to use query-hotpluggable-cpus on a
> > > pseries-2.6 or earlier VM will cause qemu to SEGV.
> > > 
> > > This fixes the problem by simply disabling the hook for earlier machine
> > > types.  
> > 
> > I had sent a patch to fix this and a couple of other related issues
> > some time back and it indeed was accepted into your ppc-for-2.7 branch.
> > 
> > https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
> > 
> > Only now I am realizing that somehow that patch didn't make it to mainline.  
> 
> Oh.. good point.  Sorry, that one somehow slipped through the cracks.
> 
> So, the remaining question is, what's the preferred behaviour for
> older machine types:
> 
>   1) should query-hotpluggable-cpus give an error, the same as it does
>      on machine types which have never supported it (this is what my
>      patch does)
> 
> or
> 
>   2) Should query-hotpluggable-cpus succeed, but return an empty list?
>      (this is what Bharata's patch does)
> 
> Igor and / or Peter, do you have an opinion on which behaviour is preferable?
> 

If it doesn't have any output then it makes sense to set handler to NULL
so it would return error.

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

* Re: [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types
  2016-08-02  6:24     ` Peter Krempa
@ 2016-08-03  2:15       ` David Gibson
  0 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2016-08-03  2:15 UTC (permalink / raw)
  To: Peter Krempa; +Cc: Bharata B Rao, imammedo, qemu-devel, qemu-ppc, agraf

[-- Attachment #1: Type: text/plain, Size: 2361 bytes --]

On Tue, Aug 02, 2016 at 08:24:13AM +0200, Peter Krempa wrote:
> On Tue, Aug 02, 2016 at 16:20:50 +1000, David Gibson wrote:
> > On Tue, Aug 02, 2016 at 10:34:34AM +0530, Bharata B Rao wrote:
> > > On Tue, Aug 02, 2016 at 02:25:08PM +1000, David Gibson wrote:
> > > > On Power, support for vCPU hotplug is new in qemu 2.7.  However, we
> > > > currently implement the query_hotpluggable_cpus hook the same for all
> > > > pseries machine type versions.
> > > > 
> > > > However, the old-style CPU initialization doesn't work with the new query
> > > > code, meaning that attempting to use query-hotpluggable-cpus on a
> > > > pseries-2.6 or earlier VM will cause qemu to SEGV.
> > > > 
> > > > This fixes the problem by simply disabling the hook for earlier machine
> > > > types.
> > > 
> > > I had sent a patch to fix this and a couple of other related issues
> > > some time back and it indeed was accepted into your ppc-for-2.7 branch.
> > > 
> > > https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg01539.html
> > > 
> > > Only now I am realizing that somehow that patch didn't make it to mainline.
> > 
> > Oh.. good point.  Sorry, that one somehow slipped through the cracks.
> > 
> > So, the remaining question is, what's the preferred behaviour for
> > older machine types:
> > 
> >   1) should query-hotpluggable-cpus give an error, the same as it does
> >      on machine types which have never supported it (this is what my
> >      patch does)
> > 
> > or
> > 
> >   2) Should query-hotpluggable-cpus succeed, but return an empty list?
> >      (this is what Bharata's patch does)
> > 
> > Igor and / or Peter, do you have an opinion on which behaviour is preferable?
> 
> I don't really care which option you select as long as the
> 'hotpluggable-cpus' field which is repored in 'query-machines' is set to
> false for machine types which don't support it. Libvirt then won't even
> call query-hotpluggable-cpus.

Ah.. and looking at it more closely, Bharata's older patch will also
get that wrong.  However, it does some other checks which might make
sense.  I'll try to merge his approach and mine.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2016-08-03  2:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1470111908-8456-1-git-send-email-david@gibson.dropbear.id.au>
     [not found] ` <20160802050434.GC16350@in.ibm.com>
2016-08-02  6:20   ` [Qemu-devel] [PATCH] spapr: Don't support query-hotpluggable-cpus on earlier pseries machine types David Gibson
2016-08-02  6:24     ` Peter Krempa
2016-08-03  2:15       ` David Gibson
2016-08-02  8:13     ` Igor Mammedov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.