From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E3ECC433DF for ; Thu, 11 Jun 2020 07:42:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 148132074B for ; Thu, 11 Jun 2020 07:42:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591861360; bh=gKJMd5utUWukaitgLZGRza7ui70C0kpqMr9sxdjD8/c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=2h71ZNdWo6UXxPXZeq5yqhR59EbFkP2/bJTWwVJnTqYeWBJoJUdzuCTy71HYroYcq yEpy4PsLQqfBFzJ21E0ZGEYaflHgzOC+p1c2XA5DPvnoauiwVQinkLUU55VtePhsVD DhGwIyfac1dCJWT7+6JPr/3aHHIffiykp1dCOHI0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbgFKHmi (ORCPT ); Thu, 11 Jun 2020 03:42:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:38892 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726770AbgFKHmi (ORCPT ); Thu, 11 Jun 2020 03:42:38 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 293AD2072F; Thu, 11 Jun 2020 07:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591861357; bh=gKJMd5utUWukaitgLZGRza7ui70C0kpqMr9sxdjD8/c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KFqoZB/lJU4/f4epVDrDHxmP+O9tSVmWZ9vwm72Y2fn4eZGAMXQWihXl2JAI4FS72 UqbCTonXJ0Ycg0aPDpTrq2bK/znskSWa72A+cKKnHvHHm+0q+A2Ze1gBPrDX5T95DW zyqKCImV0KfIgaDkJAgPptVndfnb+CFq3aZUfJQ8= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjHr9-0021J7-Lk; Thu, 11 Jun 2020 08:42:35 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 11 Jun 2020 08:42:35 +0100 From: Marc Zyngier To: Sean Christopherson Cc: Paul Mackerras , Christian Borntraeger , Janosch Frank , Paolo Bonzini , James Morse , Julien Thierry , Suzuki K Poulose , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Feiner , Peter Shier , Junaid Shahid , Ben Gardon , Christoffer Dall Subject: Re: [PATCH 14/21] KVM: Move x86's version of struct kvm_mmu_memory_cache to common code In-Reply-To: <20200605213853.14959-15-sean.j.christopherson@intel.com> References: <20200605213853.14959-1-sean.j.christopherson@intel.com> <20200605213853.14959-15-sean.j.christopherson@intel.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sean.j.christopherson@intel.com, paulus@ozlabs.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, pbonzini@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, david@redhat.com, cohuck@redhat.com, imbrenda@linux.ibm.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, pfeiner@google.com, pshier@google.com, junaids@google.com, bgardon@google.com, christoffer.dall@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sean, On 2020-06-05 22:38, Sean Christopherson wrote: > Move x86's 'struct kvm_mmu_memory_cache' to common code in anticipation > of moving the entire x86 implementation code to common KVM and reusing > it for arm64 and MIPS. Add a new architecture specific asm/kvm_types.h > to control the existence and parameters of the struct. The new header > is needed to avoid a chicken-and-egg problem with asm/kvm_host.h as all > architectures define instances of the struct in their vCPU structs. > > Suggested-by: Christoffer Dall > Signed-off-by: Sean Christopherson > --- > arch/arm64/include/asm/kvm_types.h | 6 ++++++ > arch/mips/include/asm/kvm_types.h | 5 +++++ > arch/powerpc/include/asm/kvm_types.h | 5 +++++ > arch/s390/include/asm/kvm_types.h | 5 +++++ > arch/x86/include/asm/kvm_host.h | 13 ------------- > arch/x86/include/asm/kvm_types.h | 7 +++++++ > include/linux/kvm_types.h | 19 +++++++++++++++++++ > 7 files changed, 47 insertions(+), 13 deletions(-) > create mode 100644 arch/arm64/include/asm/kvm_types.h > create mode 100644 arch/mips/include/asm/kvm_types.h > create mode 100644 arch/powerpc/include/asm/kvm_types.h > create mode 100644 arch/s390/include/asm/kvm_types.h > create mode 100644 arch/x86/include/asm/kvm_types.h > > diff --git a/arch/arm64/include/asm/kvm_types.h > b/arch/arm64/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..d0987007d581 > --- /dev/null > +++ b/arch/arm64/include/asm/kvm_types.h > @@ -0,0 +1,6 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_ARM64_KVM_TYPES_H > +#define _ASM_ARM64_KVM_TYPES_H > + > +#endif /* _ASM_ARM64_KVM_TYPES_H */ > + > diff --git a/arch/mips/include/asm/kvm_types.h > b/arch/mips/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..5efeb32a5926 > --- /dev/null > +++ b/arch/mips/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_MIPS_KVM_TYPES_H > +#define _ASM_MIPS_KVM_TYPES_H > + > +#endif /* _ASM_MIPS_KVM_TYPES_H */ > diff --git a/arch/powerpc/include/asm/kvm_types.h > b/arch/powerpc/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..f627eceaa314 > --- /dev/null > +++ b/arch/powerpc/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_POWERPC_KVM_TYPES_H > +#define _ASM_POWERPC_KVM_TYPES_H > + > +#endif /* _ASM_POWERPC_KVM_TYPES_H */ > diff --git a/arch/s390/include/asm/kvm_types.h > b/arch/s390/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..b66a81f8a354 > --- /dev/null > +++ b/arch/s390/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_S390_KVM_TYPES_H > +#define _ASM_S390_KVM_TYPES_H > + > +#endif /* _ASM_S390_KVM_TYPES_H */ Instead of carrying an empty include file for at least two of the architectures (s390 and Power), how about having it in asm-generic, and updating arch/$ARCH/include/asm/Kbuild to point to the generic one? Thanks, M. -- Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8581BC433E0 for ; Thu, 11 Jun 2020 07:42:47 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 07A1F2074B for ; Thu, 11 Jun 2020 07:42:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="KFqoZB/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 07A1F2074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id A5DC44B15D; Thu, 11 Jun 2020 03:42:46 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@kernel.org Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hNEAgXQe9MFn; Thu, 11 Jun 2020 03:42:43 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id ADC4C4B1B0; Thu, 11 Jun 2020 03:42:43 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 48F3D4B1B0 for ; Thu, 11 Jun 2020 03:42:42 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 51mt9SatgIy7 for ; Thu, 11 Jun 2020 03:42:38 -0400 (EDT) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 406034B196 for ; Thu, 11 Jun 2020 03:42:38 -0400 (EDT) Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 293AD2072F; Thu, 11 Jun 2020 07:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591861357; bh=gKJMd5utUWukaitgLZGRza7ui70C0kpqMr9sxdjD8/c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KFqoZB/lJU4/f4epVDrDHxmP+O9tSVmWZ9vwm72Y2fn4eZGAMXQWihXl2JAI4FS72 UqbCTonXJ0Ycg0aPDpTrq2bK/znskSWa72A+cKKnHvHHm+0q+A2Ze1gBPrDX5T95DW zyqKCImV0KfIgaDkJAgPptVndfnb+CFq3aZUfJQ8= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjHr9-0021J7-Lk; Thu, 11 Jun 2020 08:42:35 +0100 MIME-Version: 1.0 Date: Thu, 11 Jun 2020 08:42:35 +0100 From: Marc Zyngier To: Sean Christopherson Subject: Re: [PATCH 14/21] KVM: Move x86's version of struct kvm_mmu_memory_cache to common code In-Reply-To: <20200605213853.14959-15-sean.j.christopherson@intel.com> References: <20200605213853.14959-1-sean.j.christopherson@intel.com> <20200605213853.14959-15-sean.j.christopherson@intel.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sean.j.christopherson@intel.com, paulus@ozlabs.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, pbonzini@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, david@redhat.com, cohuck@redhat.com, imbrenda@linux.ibm.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, pfeiner@google.com, pshier@google.com, junaids@google.com, bgardon@google.com, christoffer.dall@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Cc: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, Paul Mackerras , Ben Gardon , Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, Janosch Frank , Joerg Roedel , Christian Borntraeger , Junaid Shahid , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , Peter Shier , linux-mips@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov , Peter Feiner X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu Hi Sean, On 2020-06-05 22:38, Sean Christopherson wrote: > Move x86's 'struct kvm_mmu_memory_cache' to common code in anticipation > of moving the entire x86 implementation code to common KVM and reusing > it for arm64 and MIPS. Add a new architecture specific asm/kvm_types.h > to control the existence and parameters of the struct. The new header > is needed to avoid a chicken-and-egg problem with asm/kvm_host.h as all > architectures define instances of the struct in their vCPU structs. > > Suggested-by: Christoffer Dall > Signed-off-by: Sean Christopherson > --- > arch/arm64/include/asm/kvm_types.h | 6 ++++++ > arch/mips/include/asm/kvm_types.h | 5 +++++ > arch/powerpc/include/asm/kvm_types.h | 5 +++++ > arch/s390/include/asm/kvm_types.h | 5 +++++ > arch/x86/include/asm/kvm_host.h | 13 ------------- > arch/x86/include/asm/kvm_types.h | 7 +++++++ > include/linux/kvm_types.h | 19 +++++++++++++++++++ > 7 files changed, 47 insertions(+), 13 deletions(-) > create mode 100644 arch/arm64/include/asm/kvm_types.h > create mode 100644 arch/mips/include/asm/kvm_types.h > create mode 100644 arch/powerpc/include/asm/kvm_types.h > create mode 100644 arch/s390/include/asm/kvm_types.h > create mode 100644 arch/x86/include/asm/kvm_types.h > > diff --git a/arch/arm64/include/asm/kvm_types.h > b/arch/arm64/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..d0987007d581 > --- /dev/null > +++ b/arch/arm64/include/asm/kvm_types.h > @@ -0,0 +1,6 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_ARM64_KVM_TYPES_H > +#define _ASM_ARM64_KVM_TYPES_H > + > +#endif /* _ASM_ARM64_KVM_TYPES_H */ > + > diff --git a/arch/mips/include/asm/kvm_types.h > b/arch/mips/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..5efeb32a5926 > --- /dev/null > +++ b/arch/mips/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_MIPS_KVM_TYPES_H > +#define _ASM_MIPS_KVM_TYPES_H > + > +#endif /* _ASM_MIPS_KVM_TYPES_H */ > diff --git a/arch/powerpc/include/asm/kvm_types.h > b/arch/powerpc/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..f627eceaa314 > --- /dev/null > +++ b/arch/powerpc/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_POWERPC_KVM_TYPES_H > +#define _ASM_POWERPC_KVM_TYPES_H > + > +#endif /* _ASM_POWERPC_KVM_TYPES_H */ > diff --git a/arch/s390/include/asm/kvm_types.h > b/arch/s390/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..b66a81f8a354 > --- /dev/null > +++ b/arch/s390/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_S390_KVM_TYPES_H > +#define _ASM_S390_KVM_TYPES_H > + > +#endif /* _ASM_S390_KVM_TYPES_H */ Instead of carrying an empty include file for at least two of the architectures (s390 and Power), how about having it in asm-generic, and updating arch/$ARCH/include/asm/Kbuild to point to the generic one? Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D054CC433E0 for ; Thu, 11 Jun 2020 07:42:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A59572074B for ; Thu, 11 Jun 2020 07:42:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Dp5vR5Ok"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="KFqoZB/l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A59572074B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G1GNi18CD/gRy9D60WHNIdujI7ngBc+np5fwPcNDzQ8=; b=Dp5vR5OkwXc+EGOBF02IxqswQ fESf+YlHl/ALOgeNErAWfIvTrtpJ2/+EthfddoUHxUs1I30Yrg2pQgS61rvc9vJeDWUOGZ21cJums yTA9sggIJLhL2dNeZQ1veL01aqedwQaaeAIlhDXBwzXrYSUuszQ1V9hS+3MNsXsbR6a7XPcndfkmC Ldh1YOm+u3gUO0dJy8jDOmq7iwWDvBGmufZgjlJVdzr2snvw9dlJGs3KaoHSJ46SiFslMJOmrC4h+ A0ZhMisgy3qFWogSfcKrdcRj4WqPJutUDD+yny3u3g/iQQ6rKrfCknXCacVBYx4nWEs4A5KOQMhNa AGXS1D5LQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jjHrF-0005lJ-4T; Thu, 11 Jun 2020 07:42:41 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jjHrB-0005ky-Me for linux-arm-kernel@lists.infradead.org; Thu, 11 Jun 2020 07:42:39 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 293AD2072F; Thu, 11 Jun 2020 07:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591861357; bh=gKJMd5utUWukaitgLZGRza7ui70C0kpqMr9sxdjD8/c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KFqoZB/lJU4/f4epVDrDHxmP+O9tSVmWZ9vwm72Y2fn4eZGAMXQWihXl2JAI4FS72 UqbCTonXJ0Ycg0aPDpTrq2bK/znskSWa72A+cKKnHvHHm+0q+A2Ze1gBPrDX5T95DW zyqKCImV0KfIgaDkJAgPptVndfnb+CFq3aZUfJQ8= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jjHr9-0021J7-Lk; Thu, 11 Jun 2020 08:42:35 +0100 MIME-Version: 1.0 Date: Thu, 11 Jun 2020 08:42:35 +0100 From: Marc Zyngier To: Sean Christopherson Subject: Re: [PATCH 14/21] KVM: Move x86's version of struct kvm_mmu_memory_cache to common code In-Reply-To: <20200605213853.14959-15-sean.j.christopherson@intel.com> References: <20200605213853.14959-1-sean.j.christopherson@intel.com> <20200605213853.14959-15-sean.j.christopherson@intel.com> User-Agent: Roundcube Webmail/1.4.4 Message-ID: X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sean.j.christopherson@intel.com, paulus@ozlabs.org, borntraeger@de.ibm.com, frankja@linux.ibm.com, pbonzini@redhat.com, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, david@redhat.com, cohuck@redhat.com, imbrenda@linux.ibm.com, vkuznets@redhat.com, wanpengli@tencent.com, jmattson@google.com, joro@8bytes.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, pfeiner@google.com, pshier@google.com, junaids@google.com, bgardon@google.com, christoffer.dall@arm.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200611_004237_784996_6D6CCA11 X-CRM114-Status: GOOD ( 13.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christoffer Dall , Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-kernel@vger.kernel.org, Paul Mackerras , Ben Gardon , Claudio Imbrenda , kvmarm@lists.cs.columbia.edu, Janosch Frank , Joerg Roedel , Christian Borntraeger , Julien Thierry , Junaid Shahid , Suzuki K Poulose , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , Peter Shier , linux-mips@vger.kernel.org, James Morse , Paolo Bonzini , Vitaly Kuznetsov , Peter Feiner Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sean, On 2020-06-05 22:38, Sean Christopherson wrote: > Move x86's 'struct kvm_mmu_memory_cache' to common code in anticipation > of moving the entire x86 implementation code to common KVM and reusing > it for arm64 and MIPS. Add a new architecture specific asm/kvm_types.h > to control the existence and parameters of the struct. The new header > is needed to avoid a chicken-and-egg problem with asm/kvm_host.h as all > architectures define instances of the struct in their vCPU structs. > > Suggested-by: Christoffer Dall > Signed-off-by: Sean Christopherson > --- > arch/arm64/include/asm/kvm_types.h | 6 ++++++ > arch/mips/include/asm/kvm_types.h | 5 +++++ > arch/powerpc/include/asm/kvm_types.h | 5 +++++ > arch/s390/include/asm/kvm_types.h | 5 +++++ > arch/x86/include/asm/kvm_host.h | 13 ------------- > arch/x86/include/asm/kvm_types.h | 7 +++++++ > include/linux/kvm_types.h | 19 +++++++++++++++++++ > 7 files changed, 47 insertions(+), 13 deletions(-) > create mode 100644 arch/arm64/include/asm/kvm_types.h > create mode 100644 arch/mips/include/asm/kvm_types.h > create mode 100644 arch/powerpc/include/asm/kvm_types.h > create mode 100644 arch/s390/include/asm/kvm_types.h > create mode 100644 arch/x86/include/asm/kvm_types.h > > diff --git a/arch/arm64/include/asm/kvm_types.h > b/arch/arm64/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..d0987007d581 > --- /dev/null > +++ b/arch/arm64/include/asm/kvm_types.h > @@ -0,0 +1,6 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_ARM64_KVM_TYPES_H > +#define _ASM_ARM64_KVM_TYPES_H > + > +#endif /* _ASM_ARM64_KVM_TYPES_H */ > + > diff --git a/arch/mips/include/asm/kvm_types.h > b/arch/mips/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..5efeb32a5926 > --- /dev/null > +++ b/arch/mips/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_MIPS_KVM_TYPES_H > +#define _ASM_MIPS_KVM_TYPES_H > + > +#endif /* _ASM_MIPS_KVM_TYPES_H */ > diff --git a/arch/powerpc/include/asm/kvm_types.h > b/arch/powerpc/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..f627eceaa314 > --- /dev/null > +++ b/arch/powerpc/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_POWERPC_KVM_TYPES_H > +#define _ASM_POWERPC_KVM_TYPES_H > + > +#endif /* _ASM_POWERPC_KVM_TYPES_H */ > diff --git a/arch/s390/include/asm/kvm_types.h > b/arch/s390/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..b66a81f8a354 > --- /dev/null > +++ b/arch/s390/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_S390_KVM_TYPES_H > +#define _ASM_S390_KVM_TYPES_H > + > +#endif /* _ASM_S390_KVM_TYPES_H */ Instead of carrying an empty include file for at least two of the architectures (s390 and Power), how about having it in asm-generic, and updating arch/$ARCH/include/asm/Kbuild to point to the generic one? Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Date: Thu, 11 Jun 2020 07:42:35 +0000 Subject: Re: [PATCH 14/21] KVM: Move x86's version of struct kvm_mmu_memory_cache to common code Message-Id: List-Id: References: <20200605213853.14959-1-sean.j.christopherson@intel.com> <20200605213853.14959-15-sean.j.christopherson@intel.com> In-Reply-To: <20200605213853.14959-15-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Christopherson Cc: Paul Mackerras , Christian Borntraeger , Janosch Frank , Paolo Bonzini , James Morse , Julien Thierry , Suzuki K Poulose , David Hildenbrand , Cornelia Huck , Claudio Imbrenda , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-kernel@vger.kernel.org, Peter Feiner , Peter Shier , Junaid Shahid , Ben Gardon , Christoffer Dall Hi Sean, On 2020-06-05 22:38, Sean Christopherson wrote: > Move x86's 'struct kvm_mmu_memory_cache' to common code in anticipation > of moving the entire x86 implementation code to common KVM and reusing > it for arm64 and MIPS. Add a new architecture specific asm/kvm_types.h > to control the existence and parameters of the struct. The new header > is needed to avoid a chicken-and-egg problem with asm/kvm_host.h as all > architectures define instances of the struct in their vCPU structs. > > Suggested-by: Christoffer Dall > Signed-off-by: Sean Christopherson > --- > arch/arm64/include/asm/kvm_types.h | 6 ++++++ > arch/mips/include/asm/kvm_types.h | 5 +++++ > arch/powerpc/include/asm/kvm_types.h | 5 +++++ > arch/s390/include/asm/kvm_types.h | 5 +++++ > arch/x86/include/asm/kvm_host.h | 13 ------------- > arch/x86/include/asm/kvm_types.h | 7 +++++++ > include/linux/kvm_types.h | 19 +++++++++++++++++++ > 7 files changed, 47 insertions(+), 13 deletions(-) > create mode 100644 arch/arm64/include/asm/kvm_types.h > create mode 100644 arch/mips/include/asm/kvm_types.h > create mode 100644 arch/powerpc/include/asm/kvm_types.h > create mode 100644 arch/s390/include/asm/kvm_types.h > create mode 100644 arch/x86/include/asm/kvm_types.h > > diff --git a/arch/arm64/include/asm/kvm_types.h > b/arch/arm64/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..d0987007d581 > --- /dev/null > +++ b/arch/arm64/include/asm/kvm_types.h > @@ -0,0 +1,6 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_ARM64_KVM_TYPES_H > +#define _ASM_ARM64_KVM_TYPES_H > + > +#endif /* _ASM_ARM64_KVM_TYPES_H */ > + > diff --git a/arch/mips/include/asm/kvm_types.h > b/arch/mips/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..5efeb32a5926 > --- /dev/null > +++ b/arch/mips/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_MIPS_KVM_TYPES_H > +#define _ASM_MIPS_KVM_TYPES_H > + > +#endif /* _ASM_MIPS_KVM_TYPES_H */ > diff --git a/arch/powerpc/include/asm/kvm_types.h > b/arch/powerpc/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..f627eceaa314 > --- /dev/null > +++ b/arch/powerpc/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_POWERPC_KVM_TYPES_H > +#define _ASM_POWERPC_KVM_TYPES_H > + > +#endif /* _ASM_POWERPC_KVM_TYPES_H */ > diff --git a/arch/s390/include/asm/kvm_types.h > b/arch/s390/include/asm/kvm_types.h > new file mode 100644 > index 000000000000..b66a81f8a354 > --- /dev/null > +++ b/arch/s390/include/asm/kvm_types.h > @@ -0,0 +1,5 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +#ifndef _ASM_S390_KVM_TYPES_H > +#define _ASM_S390_KVM_TYPES_H > + > +#endif /* _ASM_S390_KVM_TYPES_H */ Instead of carrying an empty include file for at least two of the architectures (s390 and Power), how about having it in asm-generic, and updating arch/$ARCH/include/asm/Kbuild to point to the generic one? Thanks, M. -- Jazz is not dead. It just smells funny...