From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 09 Jul 2013 17:16:02 +0000 Subject: Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction Message-Id: <1373390162.8183.195@snotra> List-Id: References: <1372858255-19708-1-git-send-email-mihai.caraman@freescale.com> <1372858255-19708-2-git-send-email-mihai.caraman@freescale.com> <1C2B7183-EF0F-4D97-9287-1068C9E97471@suse.de> In-Reply-To: <1C2B7183-EF0F-4D97-9287-1068C9E97471@suse.de> (from agraf@suse.de on Mon Jul 8 13:45:58 2013) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alexander Graf Cc: Mihai Caraman , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org On 07/08/2013 01:45:58 PM, Alexander Graf wrote: > > On 03.07.2013, at 15:30, Mihai Caraman wrote: > > > Some guests are making use of return from machine check instruction > > to do crazy things even though the 64-bit kernel doesn't handle yet > > this interrupt. Emulate MCSRR0/1 SPR and rfmci instruction > accordingly. > > > > Signed-off-by: Mihai Caraman > > --- > > arch/powerpc/include/asm/kvm_host.h | 1 + > > arch/powerpc/kvm/booke_emulate.c | 25 +++++++++++++++++++++++++ > > arch/powerpc/kvm/timing.c | 1 + > > 3 files changed, 27 insertions(+), 0 deletions(-) > > > > diff --git a/arch/powerpc/include/asm/kvm_host.h > b/arch/powerpc/include/asm/kvm_host.h > > index af326cd..0466789 100644 > > --- a/arch/powerpc/include/asm/kvm_host.h > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -148,6 +148,7 @@ enum kvm_exit_types { > > EMULATED_TLBWE_EXITS, > > EMULATED_RFI_EXITS, > > EMULATED_RFCI_EXITS, > > + EMULATED_RFMCI_EXITS, > > I would quite frankly prefer to see us abandon the whole exit timing > framework in the kernel and instead use trace points. Then we don't > have to maintain all of this randomly exercised code. Would this map well to tracepoints? We're not trying to track discrete events, so much as accumulated time spent in different areas. -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tx2outboundpool.messaging.microsoft.com (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (Client CN "mail.global.frontbridge.com", Issuer "MSIT Machine Auth CA 2" (not verified)) by ozlabs.org (Postfix) with ESMTPS id ED1502C00A1 for ; Wed, 10 Jul 2013 03:16:13 +1000 (EST) Date: Tue, 9 Jul 2013 12:16:02 -0500 From: Scott Wood Subject: Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction To: Alexander Graf References: <1372858255-19708-1-git-send-email-mihai.caraman@freescale.com> <1372858255-19708-2-git-send-email-mihai.caraman@freescale.com> <1C2B7183-EF0F-4D97-9287-1068C9E97471@suse.de> In-Reply-To: <1C2B7183-EF0F-4D97-9287-1068C9E97471@suse.de> (from agraf@suse.de on Mon Jul 8 13:45:58 2013) Message-ID: <1373390162.8183.195@snotra> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Cc: Mihai Caraman , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 07/08/2013 01:45:58 PM, Alexander Graf wrote: >=20 > On 03.07.2013, at 15:30, Mihai Caraman wrote: >=20 > > Some guests are making use of return from machine check instruction > > to do crazy things even though the 64-bit kernel doesn't handle yet > > this interrupt. Emulate MCSRR0/1 SPR and rfmci instruction =20 > accordingly. > > > > Signed-off-by: Mihai Caraman > > --- > > arch/powerpc/include/asm/kvm_host.h | 1 + > > arch/powerpc/kvm/booke_emulate.c | 25 +++++++++++++++++++++++++ > > arch/powerpc/kvm/timing.c | 1 + > > 3 files changed, 27 insertions(+), 0 deletions(-) > > > > diff --git a/arch/powerpc/include/asm/kvm_host.h =20 > b/arch/powerpc/include/asm/kvm_host.h > > index af326cd..0466789 100644 > > --- a/arch/powerpc/include/asm/kvm_host.h > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -148,6 +148,7 @@ enum kvm_exit_types { > > EMULATED_TLBWE_EXITS, > > EMULATED_RFI_EXITS, > > EMULATED_RFCI_EXITS, > > + EMULATED_RFMCI_EXITS, >=20 > I would quite frankly prefer to see us abandon the whole exit timing =20 > framework in the kernel and instead use trace points. Then we don't =20 > have to maintain all of this randomly exercised code. Would this map well to tracepoints? We're not trying to track discrete =20 events, so much as accumulated time spent in different areas. -Scott= From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 2/2] KVM: PPC: Book3E: Emulate MCSRR0/1 SPR and rfmci instruction Date: Tue, 9 Jul 2013 12:16:02 -0500 Message-ID: <1373390162.8183.195@snotra> References: <1372858255-19708-1-git-send-email-mihai.caraman@freescale.com> <1372858255-19708-2-git-send-email-mihai.caraman@freescale.com> <1C2B7183-EF0F-4D97-9287-1068C9E97471@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="Flowed"; DelSp="Yes" Content-Transfer-Encoding: 7bit Cc: Mihai Caraman , linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org To: Alexander Graf Return-path: In-Reply-To: <1C2B7183-EF0F-4D97-9287-1068C9E97471@suse.de> (from agraf@suse.de on Mon Jul 8 13:45:58 2013) Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: kvm.vger.kernel.org On 07/08/2013 01:45:58 PM, Alexander Graf wrote: > > On 03.07.2013, at 15:30, Mihai Caraman wrote: > > > Some guests are making use of return from machine check instruction > > to do crazy things even though the 64-bit kernel doesn't handle yet > > this interrupt. Emulate MCSRR0/1 SPR and rfmci instruction > accordingly. > > > > Signed-off-by: Mihai Caraman > > --- > > arch/powerpc/include/asm/kvm_host.h | 1 + > > arch/powerpc/kvm/booke_emulate.c | 25 +++++++++++++++++++++++++ > > arch/powerpc/kvm/timing.c | 1 + > > 3 files changed, 27 insertions(+), 0 deletions(-) > > > > diff --git a/arch/powerpc/include/asm/kvm_host.h > b/arch/powerpc/include/asm/kvm_host.h > > index af326cd..0466789 100644 > > --- a/arch/powerpc/include/asm/kvm_host.h > > +++ b/arch/powerpc/include/asm/kvm_host.h > > @@ -148,6 +148,7 @@ enum kvm_exit_types { > > EMULATED_TLBWE_EXITS, > > EMULATED_RFI_EXITS, > > EMULATED_RFCI_EXITS, > > + EMULATED_RFMCI_EXITS, > > I would quite frankly prefer to see us abandon the whole exit timing > framework in the kernel and instead use trace points. Then we don't > have to maintain all of this randomly exercised code. Would this map well to tracepoints? We're not trying to track discrete events, so much as accumulated time spent in different areas. -Scott