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=-4.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 22B13C56202 for ; Wed, 25 Nov 2020 10:49:49 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 A60B62075A for ; Wed, 25 Nov 2020 10:49:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="2R8qhBNo"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="v6vPS9fD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A60B62075A 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+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=merlin.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=OFL3BDE8FZTpkGEPYN7wwdxYrhCtSTh+LAHFDXhmd5w=; b=2R8qhBNoAHq7sduVUuOF15e2Q Xal/OTvncxOiG/JiAn0nwYyYhXwYQiEBa9HrIvFObhhS1LALFxGE8G6JCknei2xGctItSqZjQcHvm 8yEbis4K+aXD/iiFPM30J0DEn6x/tSc5zmHwy+8FYGNIExdjxCREnly0uetZMcvh4Pik5y7RXieR7 /KR/WzlEgwMt/YhscnEuo4JIng454qK7ZzK03zRyWolbpyk9cxWvbo/WJS7VSYFWOiy6yvLhK3WVM afWpNzSJLpOasH9gKgwXYPPv31zCnOL7jeWoFXWELE7grZtuYlBlDUDr7CoOxx0jVZPeyyNL38heB cJT5gp9RA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khsMW-0003UE-Mq; Wed, 25 Nov 2020 10:49:24 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khsMU-0003Tn-Ly for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2020 10:49:23 +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 6802C2075A; Wed, 25 Nov 2020 10:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606301361; bh=k8JMumggIN1LUGGzTQSyZv3AZbIMuj0rpxQJfz5sL8I=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=v6vPS9fDI5hnTJ8ThHNAiwCD6PcSrZAAmxL3Jclalq593Krfgz9aISvSIn+UJKxU2 KR5yjs019NW8WgI8ke2w2sp2+dJ8fu/SOTyL9K036/PMaH2UdpztAgikPjvoWYDsd+ uLV7LUNmH768ZbUFhs3uTuiw0YGcY2BgUgIWEQtY= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94) (envelope-from ) id 1khsMR-00DVTd-18; Wed, 25 Nov 2020 10:49:19 +0000 MIME-Version: 1.0 Date: Wed, 25 Nov 2020 10:49:18 +0000 From: Marc Zyngier To: David Brazdil Subject: Re: [PATCH v2 06/24] kvm: arm64: Move hyp-init params to a per-CPU struct In-Reply-To: <20201125103946.2unmclsdfqpr3eyk@google.com> References: <20201116204318.63987-1-dbrazdil@google.com> <20201116204318.63987-7-dbrazdil@google.com> <87lfes5f54.wl-maz@kernel.org> <20201125103946.2unmclsdfqpr3eyk@google.com> User-Agent: Roundcube Webmail/1.4.9 Message-ID: <643459b9146c5cdf91c3316bb1cb096e@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, will@kernel.org, dennis@kernel.org, tj@kernel.org, cl@linux.com, mark.rutland@arm.com, lorenzo.pieralisi@arm.com, qperret@google.com, ascull@google.com, qwandor@google.com, kernel-team@android.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-20201125_054922_962628_26CCBB16 X-CRM114-Status: GOOD ( 18.03 ) 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: Mark Rutland , kernel-team@android.com, Lorenzo Pieralisi , Andrew Walbran , Suzuki K Poulose , Catalin Marinas , Quentin Perret , linux-kernel@vger.kernel.org, James Morse , linux-arm-kernel@lists.infradead.org, Tejun Heo , Dennis Zhou , Christoph Lameter , Will Deacon , kvmarm@lists.cs.columbia.edu, Julien Thierry , Andrew Scull Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-11-25 10:39, David Brazdil wrote: > On Mon, Nov 23, 2020 at 02:20:07PM +0000, Marc Zyngier wrote: [...] >> > + >> > + /* >> > + * Flush the init params from the data cache because the struct will >> > + * be read while the MMU is off. >> > + */ >> > + __flush_dcache_area(params, sizeof(*params)); >> >> nit: please use kvm_flush_dcache_to_poc(), as it clearly indicates to >> which point we are flushing. > > Will change, but out of curiosity - how is it different? AFAICT, it is > just > an alias with a single use in __clean_dcache_guest_page: > > #define kvm_flush_dcache_to_poc(a,l) __flush_dcache_area((a), (l)) It is indeed the exact same thing, but it says clearly in the name that we are cleaning to the "Point Of Coherency", as opposed to any other architectural level (Unification or Persistence). It makes it clear that we are cleaning all the way to the point where it can be accessed reliably with an uncacheable mapping, and not leaving the data dangling at a shallower cache level. 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