Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5844256rwd; Mon, 5 Jun 2023 09:15:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ477dXENYkPf4zux2Ba75QUtp2ltuU1BXKzPEx6FA0tontl4XdVURTjv3I2/NAjxFzZTQ/c X-Received: by 2002:a05:6a20:1595:b0:10f:759d:c5b2 with SMTP id h21-20020a056a20159500b0010f759dc5b2mr4099366pzj.45.1685981728194; Mon, 05 Jun 2023 09:15:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685981728; cv=none; d=google.com; s=arc-20160816; b=ThdJ5i7SDFhja9SlAvbfWaEnsvNviZLIg5b2V81BEmS3XndyzZMYi49dC79tLMCWW8 KjfTqlMT64OBAhDzAAw/8dJvOebnZamxHcBzEa/SX4AufqqhndUumgLBsegAv6IL1CGO 285jlfK4SKciPDLWV6lW67OUZeyVFilwMcK0fSoPwIlHTsW3ELQqV8JRCFDH9dNTLNZ7 ZXT955ZJos6F9SQ1LjSNp81Av7ZpfP56ISbfUyx1zhPqYlns+UJJceuBBqqNNCci5Arb XostcxdDGv1mYIUE6FSNtdANd7dGCBKbVxhMk1EUZkhTZXVeMuIznEUATXEC5nvDZ/1m aXsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=GoZGAOTBvlr1nlPErXnetSaPgiXMcLx2bMeCqDLA1dk=; b=BKKfLWM3zQTXRmVxsJjE0zpVVPC+PGN8jJ3T00Q1IySeJxy+VYBzRv2Cr7c14q+glz ZJnNldoABk67WR7J+WJx3/jb5UU9YnaFXUfFlWcxTK9stCwJa2fDkBuJXYBax42QwV/T cVkUtqNG0+zqU+yOoZ89riGtcku4CBLTlephNO/bR9JuN4KXSeOPoPP+JxA3F1eSqj2S Ja0MMNcxb+0XedKND6UUxN0xpxFddh/pYDwc/MOWEnnK57Jl/uT93ySIc9wcflaOljhO Bd+JP8cMyZAgcWCVna3kFBFgpyCp8WM8sXgGrdPzqJfi6sfW1vMkOzQ1MFzzpaO4Mt7Y bRaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PivUa3rR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a633f02000000b0053fc68bc1afsi5656511pga.619.2023.06.05.09.14.51; Mon, 05 Jun 2023 09:15:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=PivUa3rR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234962AbjFEPmk (ORCPT + 99 others); Mon, 5 Jun 2023 11:42:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234964AbjFEPm0 (ORCPT ); Mon, 5 Jun 2023 11:42:26 -0400 Received: from out-39.mta1.migadu.com (out-39.mta1.migadu.com [IPv6:2001:41d0:203:375::27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9E941A7 for ; Mon, 5 Jun 2023 08:42:03 -0700 (PDT) Date: Mon, 5 Jun 2023 15:41:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1685979676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=GoZGAOTBvlr1nlPErXnetSaPgiXMcLx2bMeCqDLA1dk=; b=PivUa3rReYTnWwK9qzsAl7TVQSXztMg4Tj2jSXkRklNXzzHrH9eEHLzBq1b1cu/7VjtJAQ r3iniQ+ra6KyqjFwT2g0zigWYeRj+dReKT6T78yu35CWbJtDe0fLF7Qt64ZoPF9/0vbLKn ibqWLX433iGoUtvLnqtuA/o+6gp4rm8= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Catalin Marinas Cc: Kristina Martsenko , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, Will Deacon , Marc Zyngier , James Morse , Suzuki K Poulose , Zenghui Yu , Mark Rutland , Mark Brown , Luis Machado , Vladimir Murzin , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 01/11] KVM: arm64: initialize HCRX_EL2 Message-ID: References: <20230509142235.3284028-1-kristina.martsenko@arm.com> <20230509142235.3284028-2-kristina.martsenko@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 02, 2023 at 02:49:50PM +0100, Catalin Marinas wrote: > On Tue, May 09, 2023 at 03:22:25PM +0100, Kristina Martsenko wrote: > > ARMv8.7/9.2 adds a new hypervisor configuration register HCRX_EL2. > > Initialize the register to a safe value (all fields 0), to be robust > > against firmware that has not initialized it. This is also needed to > > ensure that the register is reinitialized after a kexec by a future > > kernel. > > > > In addition, move SMPME setup over to the new flags, as it would > > otherwise get overridden. It is safe to set the bit even if SME is not > > (uniformly) supported, as it will write to a RES0 bit (having no > > effect), and SME will be disabled by the cpufeature framework. > > (Similar to how e.g. the API bit is handled in HCR_HOST_NVHE_FLAGS.) > > This looks fine to me but I may have lost track of the VHE/nVHE code > initialisation paths. > > Marc/Oliver, are you ok with this patch (or this series in general)? I'd > like to merge it through the arm64 tree. Acked-by: Oliver Upton -- Thanks, Oliver