Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Andrew Jones
On Tue, Oct 25, 2016 at 01:50:01PM -0500, Wei Huang wrote: > > > On 10/25/2016 12:56 PM, Andrew Jones wrote: > > >> > >> Compared with V7, my proposed solution above isn't so different as we > >> thought. Details below. In V7, > >> > >> * has_pmu=off by default. It is turned on in target-arm/cpu

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Wei Huang
On 10/25/2016 12:56 PM, Andrew Jones wrote: >> >> Compared with V7, my proposed solution above isn't so different as we >> thought. Details below. In V7, >> >> * has_pmu=off by default. It is turned on in target-arm/cpu.c (see >> below). Apparently it is turned on only under KVM mode; UNDER TCG,

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Andrew Jones
On Tue, Oct 25, 2016 at 11:55:05AM -0500, Wei Huang wrote: > > > On 10/25/2016 10:26 AM, Peter Maydell wrote: > > On 25 October 2016 at 08:33, Andrew Jones wrote: > >> On Mon, Oct 24, 2016 at 11:39:59PM -0500, Wei Huang wrote: > > V6->V7: > > * change has_pmu variable type from OnOffAu

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Wei Huang
On 10/25/2016 10:59 AM, Peter Maydell wrote: > On 25 October 2016 at 16:26, Peter Maydell wrote: >> On 25 October 2016 at 08:33, Andrew Jones wrote: >>> Yes, I prefer it to not being able to easily switch a command line from >>> KVM to TCG. Granted, right now we mostly need to run with -cpu hos

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Wei Huang
On 10/25/2016 10:26 AM, Peter Maydell wrote: > On 25 October 2016 at 08:33, Andrew Jones wrote: >> On Mon, Oct 24, 2016 at 11:39:59PM -0500, Wei Huang wrote: > V6->V7: > * change has_pmu variable type from OnOffAuto to Boolean > * only add "pmu" property to CPU under kvm mode, de

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Peter Maydell
On 25 October 2016 at 16:26, Peter Maydell wrote: > On 25 October 2016 at 08:33, Andrew Jones wrote: >> Yes, I prefer it to not being able to easily switch a command line from >> KVM to TCG. Granted, right now we mostly need to run with -cpu host for >> KVM, which also needs to be switched for TC

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Peter Maydell
On 25 October 2016 at 08:33, Andrew Jones wrote: > On Mon, Oct 24, 2016 at 11:39:59PM -0500, Wei Huang wrote: >> >> V6->V7: >> >> * change has_pmu variable type from OnOffAuto to Boolean >> >> * only add "pmu" property to CPU under kvm mode, default ON >> > >> > Hmm, if we don't allow the prop

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-25 Thread Andrew Jones
On Mon, Oct 24, 2016 at 11:39:59PM -0500, Wei Huang wrote: > >> V6->V7: > >> * change has_pmu variable type from OnOffAuto to Boolean > >> * only add "pmu" property to CPU under kvm mode, default ON > > > > Hmm, if we don't allow the property with TCG then switching a guest from > > KVM to TCG

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-24 Thread Wei Huang
On 10/24/2016 03:49 AM, Andrew Jones wrote: > On Fri, Oct 21, 2016 at 05:53:00PM -0400, Wei Huang wrote: >> This patchset adds a pmu=[on/off] option to enable/disable vPMU support >> for guest VM. There are several reasons to justify this option. First, >> vPMU can be problematic for cross-migra

Re: [Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-24 Thread Andrew Jones
On Fri, Oct 21, 2016 at 05:53:00PM -0400, Wei Huang wrote: > This patchset adds a pmu=[on/off] option to enable/disable vPMU support > for guest VM. There are several reasons to justify this option. First, > vPMU can be problematic for cross-migration between different SoC as perf > counters are a

[Qemu-devel] [PATCH V7 0/2] Add option to configure guest vPMU

2016-10-21 Thread Wei Huang
This patchset adds a pmu=[on/off] option to enable/disable vPMU support for guest VM. There are several reasons to justify this option. First, vPMU can be problematic for cross-migration between different SoC as perf counters are architecture-dependent. It is more flexible to have an option to tur