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_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, 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 9515BC433E1 for ; Mon, 13 Jul 2020 09:49:13 +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 624B82076D for ; Mon, 13 Jul 2020 09:49:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xi69j+FT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="A7ZsCQpb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 624B82076D Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=8PYnKvoDUCSqTZKfIpdI3NEDLJAWWe09/undub6fiXQ=; b=Xi69j+FTWa+1RGufLqm1HibC1 qCIJk6X69qUTSZsopBBbaCGUjuisKudYm97a3CyH6LkTTJEJPscA6LbN38f4llRKznTBXfOLwIoeR O6F4a5ALxv8/gxZp2Tuw7ZKEmBtTTyBZ7mUi2tA/xkm63D3tqcUUIQiGCI/9lHAi1DRrneGcqUq7y S8/1svNYNXDxWCUqeoFDH2NZu4PZNG//1p2XN3MaQuFeXQinYJ5PpLuLyLNNZI9aFyI/b9vqlq2th NPoEaGW/JilsIvHgo02CWiO0Dwu5tGH26i0DjRU/oEonIFF/h+ugOATgKqLAfjZn5rbnA/6AhLAlZ RzPY6DDbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1juv44-0002Xh-Ut; Mon, 13 Jul 2020 09:48:00 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1juv42-0002W4-0t for linux-arm-kernel@lists.infradead.org; Mon, 13 Jul 2020 09:47:58 +0000 Received: by mail-wm1-x342.google.com with SMTP id f139so12527907wmf.5 for ; Mon, 13 Jul 2020 02:47:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wU36Y0dkg3gAVd6d1AcAnpID0ooqTkwf12/Wn37dSh8=; b=A7ZsCQpbegT8axsNvUlyF9UT89ZbeiGiZkLrgxw1YmwTLxFMJeSBX5PVPDvwemiCQf +xdOx4uXQ04sxIVCK4z4DHESzUOUwvxMl1Pbr2+u1DqVXylIXHlVdC9tQ8cu4q2bMAkp 3wcfRjrV8MULjMq8vbKugMS7E27X5BQMVf3Gk7wUolkk8AQHn380jLXMJcIFP+iHcONA wF86WUEtjwWADcagCLRleHr0e33uzB5lqVIMz3Q7LzU4PjbEaF6qRmFAEMcxtiKTvCaW lbrWyFdP56eeGYvwuHdtddQQo1T2XJL+8FS5TzY3Ak5EL5I/kkTT71VshclQHeN7BbpE 25RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wU36Y0dkg3gAVd6d1AcAnpID0ooqTkwf12/Wn37dSh8=; b=ad5F/8FZRB8O+LhUt8cWwgn/CIXF2LTnVJH9jVxTmx724GoWX9un0oIRxncsc3X7di hWjBwc7wjhpBrg+ae9uHaSmqW8xIk32DK4bFU9b8cPsl7vvQ6JBDFuTq60KAs1Pp3L33 4c2fCUpTj7wd23VouYzxWjdunIPkzcsiokvx4vUFaCW+0vdJh+dfkIRsmVllCduaIsnK YPSbF8VRA8mvGsc0HVxwlY45/xTSR/CVr4edJbTvBwYlCMMO6Mn4K1rccgt0V4es7dti nsg7WQc/Yxbqva/RP9mWVqV98M8KC93CRPD8mJV3JWFQ4XZyQIsqmZC3BKWs+XJOzy6r QgsQ== X-Gm-Message-State: AOAM530mk5WbWXqeI62k1bqkkE6Dg3IyfsXTOn9G4EAjnLEZbvc6wULA M2Ze3PMg6GUjop0YrCNi7fDpHQ== X-Google-Smtp-Source: ABdhPJwyciHJulV8GXvdtkPxOyujpSo+cQuGQ3mGaHjDjrbR5btQ2IIFf/d0BtLDW6TxzTCNb06wKA== X-Received: by 2002:a1c:c387:: with SMTP id t129mr17858571wmf.27.1594633675285; Mon, 13 Jul 2020 02:47:55 -0700 (PDT) Received: from google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) by smtp.gmail.com with ESMTPSA id z6sm19636364wmf.33.2020.07.13.02.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 02:47:54 -0700 (PDT) Date: Mon, 13 Jul 2020 10:47:49 +0100 From: Andrew Scull To: Marc Zyngier Subject: Re: [PATCH v2 01/17] KVM: arm64: Factor out stage 2 page table data from struct kvm Message-ID: <20200713094749.GA1705612@google.com> References: <20200615132719.1932408-1-maz@kernel.org> <20200615132719.1932408-2-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200615132719.1932408-2-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200713_054758_106355_3B41F005 X-CRM114-Status: GOOD ( 12.80 ) 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, kvm@vger.kernel.org, Suzuki K Poulose , Jintack Lim , Andre Przywara , Christoffer Dall , kvmarm@lists.cs.columbia.edu, Will Deacon , George Cherian , James Morse , Julien Thierry , "Zengtao \(B\)" , Catalin Marinas , Alexandru Elisei , Dave Martin , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 15, 2020 at 02:27:03PM +0100, Marc Zyngier wrote: > -static void __hyp_text __tlb_switch_to_guest_nvhe(struct kvm *kvm, > +static void __hyp_text __tlb_switch_to_guest_nvhe(struct kvm_s2_mmu *mmu, > struct tlb_inv_context *cxt) > { > if (cpus_have_final_cap(ARM64_WORKAROUND_SPECULATIVE_AT)) { > @@ -79,22 +79,19 @@ static void __hyp_text __tlb_switch_to_guest_nvhe(struct kvm *kvm, > isb(); > } > > - /* __load_guest_stage2() includes an ISB for the workaround. */ > - __load_guest_stage2(kvm); > - asm(ALTERNATIVE("isb", "nop", ARM64_WORKAROUND_SPECULATIVE_AT)); > + __load_guest_stage2(mmu); > } Just noticed that this drops the ISB when the speculative AT workaround is not active. This alternative is 'backwards' to avoid a double ISB as there is one in __load_guest_stage2 when the workaround is active. I hope to address this smell in an upcoming series but, for now, we should at least have an ISB. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel