From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPLdR-0007jG-Rd for qemu-devel@nongnu.org; Mon, 18 Jul 2016 23:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPLdN-0000p4-Il for qemu-devel@nongnu.org; Mon, 18 Jul 2016 23:23:52 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:42929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPLdN-0000oC-AV for qemu-devel@nongnu.org; Mon, 18 Jul 2016 23:23:49 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u6J3NYlm062234 for ; Mon, 18 Jul 2016 23:23:43 -0400 Received: from e23smtp03.au.ibm.com (e23smtp03.au.ibm.com [202.81.31.145]) by mx0a-001b2d01.pphosted.com with ESMTP id 2495r7j07a-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 18 Jul 2016 23:23:43 -0400 Received: from localhost by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 19 Jul 2016 13:23:40 +1000 Received: from d23relay10.au.ibm.com (d23relay10.au.ibm.com [9.190.26.77]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 5C935357805B for ; Tue, 19 Jul 2016 13:23:30 +1000 (EST) Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay10.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u6J3NULa15597606 for ; Tue, 19 Jul 2016 13:23:30 +1000 Received: from d23av01.au.ibm.com (localhost [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u6J3NTFm011493 for ; Tue, 19 Jul 2016 13:23:30 +1000 Date: Tue, 19 Jul 2016 13:23:25 +1000 From: Sam Bobroff References: <741e7a7860e055603a311bcc6051bd88fdad1215.1467785081.git.sam.bobroff@au1.ibm.com> <3rmB8G0Wkxz9s9Z@ozlabs.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3rmB8G0Wkxz9s9Z@ozlabs.org> Message-Id: <20160719032325.GA14519@tungsten.ozlabs.ibm.com> Subject: Re: [Qemu-devel] [1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org, aik@ozlabs.ru, agraf@suse.de, kvm-ppc@vger.kernel.org, qemu-devel@nongnu.org, paulus@samba.org, david@gibson.dropbear.id.au On Fri, Jul 08, 2016 at 08:49:49PM +1000, Michael Ellerman wrote: > On Wed, 2016-06-07 at 06:05:54 UTC, Sam bobroff wrote: > > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > > index 02416fe..06d79bc 100644 > > --- a/arch/powerpc/kvm/powerpc.c > > +++ b/arch/powerpc/kvm/powerpc.c > > @@ -588,6 +588,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext) > > r = 1; > > break; > > #endif > > + case KVM_CAP_PPC_HTM: > > + r = cpu_has_feature(CPU_FTR_TM) > > + && is_kvmppc_hv_enabled(kvm); > > I think it should be using CPU_FTR_TM_COMP. Oh, why is that? I'm happy to respin the patch I'm just curious. (I did it that way becuase that seems to be the way the other flags are used, e.g. CPU_FTR_ALTIVEC). If I read the code correctly, using CPU_FTR_TM_COMP will work fine: it should cause the cpu_has_feature() test to always return false if CPU_FTR_TM_COMP is 0. > And AFAICS you don't need to break that line. Sure, I'll un-split it when I respin. > cheers Cheers, Sam.