Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-15 Thread Andrea Bolognani
On Sat, 2016-08-13 at 01:06 -0500, Wei Huang wrote: > > > Wouldn't that mean that you'd be unable to use > > >  > > >   -cpu foo,pmu=off > > >  > > > if CPU model 'foo' doesn't support a PMU? I'd expect that > > > to work. > >  > > The current precedent (has_el3) doesn't work like that: if > > foo

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-12 Thread Wei Huang
On 08/01/2016 08:32 AM, Peter Maydell wrote: > On 1 August 2016 at 14:26, Andrea Bolognani wrote: >> On Mon, 2016-08-01 at 15:08 +0200, Andrew Jones wrote: I'm not sure a warning is enough: if I start a guest and explicitly ask for a PMU, I expect it to be there, or for the guest

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-01 Thread Andrea Bolognani
On Mon, 2016-08-01 at 14:32 +0100, Peter Maydell wrote: > > Wouldn't that mean that you'd be unable to use > >  > >   -cpu foo,pmu=off > >  > > if CPU model 'foo' doesn't support a PMU? I'd expect that > > to work. >  > The current precedent (has_el3) doesn't work like that: if > foo isn't a CPU wh

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-01 Thread Peter Maydell
On 1 August 2016 at 14:26, Andrea Bolognani wrote: > On Mon, 2016-08-01 at 15:08 +0200, Andrew Jones wrote: >> > I'm not sure a warning is enough: if I start a guest and >> > explicitly ask for a PMU, I expect it to be there, or for >> > the guest not to start at all. How does x86 behave in this >

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-01 Thread Andrea Bolognani
On Mon, 2016-08-01 at 15:08 +0200, Andrew Jones wrote: > > I'm not sure a warning is enough: if I start a guest and > > explicitly ask for a PMU, I expect it to be there, or for > > the guest not to start at all. How does x86 behave in this > > regard? >  > Peter had a good suggestion for this. We

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-01 Thread Peter Maydell
On 1 August 2016 at 14:08, Andrew Jones wrote: > Peter had a good suggestion for this. We need to wrap the property > addition in an arm_feature check like the has_el3 property. That will > remove it from all cpu types that don't support it. Then there's no > need for the enable_pmu && !has_pmu ch

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-01 Thread Andrew Jones
On Mon, Aug 01, 2016 at 02:04:59PM +0200, Andrea Bolognani wrote: > On Fri, 2016-07-29 at 08:54 +0200, Andrew Jones wrote: > > On Thu, Jul 28, 2016 at 11:38:16AM -0500, Wei Huang wrote: > > >  > > > This patch adds a pmu=[on/off] option to enable/disable vpmu support > > > in guest vm. There are se

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-08-01 Thread Andrea Bolognani
On Fri, 2016-07-29 at 08:54 +0200, Andrew Jones wrote: > On Thu, Jul 28, 2016 at 11:38:16AM -0500, Wei Huang wrote: > >  > > This patch adds a pmu=[on/off] option to enable/disable vpmu support > > in guest vm. There are several reasons to justify this option. First > > vpmu can be problematic for

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-29 Thread Peter Maydell
On 29 July 2016 at 07:54, Andrew Jones wrote: > OK, so this property will be exposed to all ARM cpu types, and if a user > turns it on, then it will stay on for all types, except when using KVM > with an aarch64 cpu type, and KVM doesn't support it. This could mislead > users to believe they'll ge

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-29 Thread Peter Maydell
On 29 July 2016 at 16:08, Wei Huang wrote: > > > On 07/29/2016 02:57 AM, Peter Maydell wrote: >> On 28 July 2016 at 17:38, Wei Huang wrote: >>> This patch adds a pmu=[on/off] option to enable/disable vpmu support >>> in guest vm. There are several reasons to justify this option. First >>> vpmu ca

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-29 Thread Wei Huang
On 07/29/2016 02:57 AM, Peter Maydell wrote: > On 28 July 2016 at 17:38, Wei Huang wrote: >> This patch adds a pmu=[on/off] option to enable/disable vpmu support >> in guest vm. There are several reasons to justify this option. First >> vpmu can be problematic for cross-migration between differe

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-29 Thread Wei Huang
On 07/29/2016 01:54 AM, Andrew Jones wrote: > On Thu, Jul 28, 2016 at 11:38:16AM -0500, Wei Huang wrote: >> This patch adds a pmu=[on/off] option to enable/disable vpmu support >> in guest vm. There are several reasons to justify this option. First >> vpmu can be problematic for cross-migration b

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-29 Thread Peter Maydell
On 28 July 2016 at 17:38, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable vpmu support > in guest vm. There are several reasons to justify this option. First > vpmu can be problematic for cross-migration between different SoC as > perf counters is architecture-dependent.

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-28 Thread Andrew Jones
On Thu, Jul 28, 2016 at 11:38:16AM -0500, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable vpmu support > in guest vm. There are several reasons to justify this option. First > vpmu can be problematic for cross-migration between different SoC as > perf counters is architec

Re: [Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-28 Thread Shannon Zhao
On 2016/7/29 0:38, Wei Huang wrote: > This patch adds a pmu=[on/off] option to enable/disable vpmu support > in guest vm. There are several reasons to justify this option. First > vpmu can be problematic for cross-migration between different SoC as > perf counters is architecture-dependent. It is

[Qemu-devel] [PATCH RFC 1/1] arm64: add an option to turn on/off vpmu support

2016-07-28 Thread Wei Huang
This patch adds a pmu=[on/off] option to enable/disable vpmu support in guest vm. There are several reasons to justify this option. First vpmu can be problematic for cross-migration between different SoC as perf counters is architecture-dependent. It is more flexible to have an option to turn it on