Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF9CEC54EAA for ; Sat, 28 Jan 2023 00:31:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233087AbjA1Abc (ORCPT ); Fri, 27 Jan 2023 19:31:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233192AbjA1AbZ (ORCPT ); Fri, 27 Jan 2023 19:31:25 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD0911E2A2 for ; Fri, 27 Jan 2023 16:30:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674865749; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UFSxdYO5nDtftBiB4L6W7S5MGdfu2Qx9OX4YoB+ycGk=; b=ZBJOz0LTHjtW4ZZ2aJp0u1NcdyftDiPLyi6KT0hbyW1/Jf+/INwkdsoRJdMX8QQabU3bXB Jh4IlOnD5mEdPc+6+LlTQd/+hgIbX1TwHoVd1IRBxrumLSpmNGqgPIDxb3JIQflW4xxoDh 0iAe3aEFRPwdbKbjIPN7hG3uR8Kxu8o= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-435-vEU1w1AuP9u29RJkzCLK-A-1; Fri, 27 Jan 2023 19:18:16 -0500 X-MC-Unique: vEU1w1AuP9u29RJkzCLK-A-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1A839858F0E; Sat, 28 Jan 2023 00:18:15 +0000 (UTC) Received: from [10.64.54.64] (vpn2-54-64.bne.redhat.com [10.64.54.64]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0A67492C18; Sat, 28 Jan 2023 00:18:07 +0000 (UTC) Reply-To: Gavin Shan Subject: Re: [PATCH v4 1/4] KVM: arm64: Include kvm_mmu.h from vgic.h To: Oliver Upton Cc: kvm@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, pbonzini@redhat.com, corbet@lwn.net, maz@kernel.org, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, yuzhe@nfschina.com, seanjc@google.com, isaku.yamahata@intel.com, ricarkol@google.com, eric.auger@redhat.com, renzhengeek@gmail.com, reijiw@google.com, shan.gavin@gmail.com References: <20230127235150.17025-1-gshan@redhat.com> <20230127235150.17025-2-gshan@redhat.com> From: Gavin Shan Message-ID: Date: Sat, 28 Jan 2023 11:18:05 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oliver, On 1/28/23 11:14 AM, Oliver Upton wrote: > On Sat, Jan 28, 2023 at 07:51:47AM +0800, Gavin Shan wrote: >> We need a unified helper in 'kvm/vgic/vgic.h' to write guest memory. In >> the helper, the check of no-running-vcpu context for dirty ring will be >> applied. kvm_write_guest_lock(), defined in 'include/asm/kvm_mmu.h', is >> going to be dereferenced by the unified helper. >> >> Include 'include/asm/kvm_mmu.h' to 'kvm/vgic/vgic.h' to avoid including >> the former header file when the later one is needed. With the change, >> the duplicate inclusions of 'include/asm/kvm_mmu.h' are removed. >> >> No functional change intended. >> >> Suggested-by: Oliver Upton > > No, I did not suggest for you to do this. I had suggested you just > include asm/kvm_mmu.h from the vgic header, not to go and remove it from > all the files that include vgic.h. > > Who cares if kvm_mmu.h gets included twice? Include guards exist for this > exact reason. > Ok, I misundertood your suggestion. Could you drop PATCH[v4 1/4] and include 'kvm_mmu.h' to 'vgic.h'? Otherwise, I need to respin for v5. Please let me know your preference. Thanks, Gavin