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=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 707C6C63697 for ; Sat, 28 Nov 2020 12:48:48 +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 056D12242F for ; Sat, 28 Nov 2020 12:48:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qgahtAj3"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dtsEoM1j" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 056D12242F 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-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=g2wv+22vDpZR08uV+xlB/zaEj4owzuwJKKRldupjaWo=; b=qgahtAj3G7w4GGW3rTg2xiPyqK YoniuaCC6/uTokg5qxDbTCikP7gH0RqeH03kIMjYjDYBTvqOiA+qu0RVwMSmiFS7kZb6IFT5cvpIz aIWiYIVtkEDLKSiDMpSsYDNZJQ8oAN7Y/sUS7P96fVR91RaTm4ZNwRF1ehYVoe4PNGlWQnd+SofuZ nnm8sMLPHI8aG2F9Q5pxuYpnj0iNgFezCU9FT8UMfiENCGwFF6/AvLJenCNdOJFzTaBFFBv4jSjZP 0Y64lfFzhPTUDW/d4HgpZs1lPZLTEKbh3sPIO43O0DFlbojR0SW7kz2HH731eQYWFTKSJ+tF7J2M2 0quqCuTg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kizdC-0000U7-Dh; Sat, 28 Nov 2020 12:47:14 +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 1kizd4-0000Su-Ja for linux-arm-kernel@lists.infradead.org; Sat, 28 Nov 2020 12:47:09 +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 79547223C7; Sat, 28 Nov 2020 12:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606567625; bh=fnB3UrwreWz3sJGIlA6kos60u0AVN2W7lWnz1F1QPas=; h=From:To:Cc:Subject:Date:From; b=dtsEoM1jAO3kNJRwc8dSFjNYZHDw2+n4lN1ZUh1mKzpYKmzJ98hgLtg0BeVKBIEte 2IAbF4XwG42xL1aT9mzmhMmoR4KS3Ww9FcrI0HAt3LS1veAIhX0v2xHiCpv2E1BC3b wUMtrY5JzhuMPVM57z4wNp6naLXdolpc6ZmP57K4= Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1kizd1-00EHHF-CD; Sat, 28 Nov 2020 12:47:03 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: [PATCH 0/2] KVM: arm64: Expose CSV3 to guests on running on Meltdown-safe HW Date: Sat, 28 Nov 2020 12:46:57 +0000 Message-Id: <20201128124659.669578-1-maz@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, will@kernel.org, james.morse@arm.com, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.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-20201128_074708_764300_6B4E3175 X-CRM114-Status: GOOD ( 13.08 ) 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: James Morse , kernel-team@android.com, Will Deacon , Julien Thierry , Suzuki K Poulose 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 Will recently pointed out that when running on big-little systems that are known not to be vulnerable to Metldown, guests are not presented with the CSV3 property if the physical HW include a core that doesn't have CSV3, despite being known to be safe (it is on the kpti_safe_list). Since this is valuable information that can be cheaply given to the guest, let's just do that. The scheme is the same as what we do for CSV2, allowing userspace to change the default setting if this doesn't advertise a safer setting than what the kernel thinks it is. Marc Zyngier (2): arm64: Make the Meltdown mitigation state available KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV3=1 if the CPUs are Meltdown-safe arch/arm64/include/asm/kvm_host.h | 1 + arch/arm64/include/asm/spectre.h | 2 ++ arch/arm64/kernel/cpufeature.c | 20 +++++++++++++++++--- arch/arm64/kvm/arm.c | 6 ++++-- arch/arm64/kvm/sys_regs.c | 15 ++++++++++++--- 5 files changed, 36 insertions(+), 8 deletions(-) -- 2.28.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel