From nobody Wed May 15 08:08:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1573530780; cv=none; d=zoho.com; s=zohoarc; b=HbS9Q88yVJxC8uc5CMpwfbGrU4PjZTMgdEDQjLMJQTNrTh1KFbMx3WdUIiFUDFQ17ahu8qaZAoccVnMA7+z+vrzTrXRXYbJKL7TlDg7Z51O2AE3nW9+3wJ1fX9OftNCTzZG6m6ZhCH8z7L22CWJAz0KuNXk/I/Uf2LTZ/iNmsNI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1573530780; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To; bh=sUvaOSmog4/cfJdCG7dBjdOjT/pcVmJekLgP9Qs4Dh4=; b=ZSh6Ev9acv8E/iC1tZi5JY5f1k6UnfFhAUM1RtVCau8E9Q2c3hnwTnkOAnwt19P+4rEBaPKk2aXsRWuKxNm99mxbIj6MKbqd713uxjjisYGv+WKr+NG+1L/G/rHGHJUbK2jLBGor/AhtJE1ondXSHjTCZJp846X1a0+mX/1TP0U= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1573530773909622.2300459913627; Mon, 11 Nov 2019 19:52:53 -0800 (PST) Received: from localhost ([::1]:58956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUNEQ-0007E4-39 for importer@patchew.org; Mon, 11 Nov 2019 22:52:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45042) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iUNDF-0006Ks-Ip for qemu-devel@nongnu.org; Mon, 11 Nov 2019 22:51:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iUNDE-0003bX-Es for qemu-devel@nongnu.org; Mon, 11 Nov 2019 22:51:29 -0500 Received: from danwin1210.me ([2a01:4f8:c010:d56::1]:33905) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iUNDD-0003ak-Up for qemu-devel@nongnu.org; Mon, 11 Nov 2019 22:51:28 -0500 Received: from localhost (unknown [10.8.3.3]) by danwin1210.me (Postfix) with ESMTPA id 55AD91F515 for ; Tue, 12 Nov 2019 03:51:22 +0000 (UTC) Received: from danwin1210.me (localhost [127.0.0.1]) by localhost (Postfix) with ESMTP id 149F910169F for ; Tue, 12 Nov 2019 03:51:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=danwin1210.me; s=mail; t=1573530682; bh=NN5bujsWX2iyGRkFY4xRiZD0nVWwpqpDbFlYB3CVlGI=; h=From:To:Cc:Subject:Date:From; b=CGO947kGgkq86Px4VtHhEd28V0/tzOepRYT2YFoB8MavXDpX1ab1PCikDq9X5ttyA j8ZDftpO10fJx/to5PX8g4BAijpSvF35Kjgo2EP/NCb5cL+ANJXc/Fi7Aze9g+ln3S GYpmaYlh9nzdutx4XY+KhXlomKII4jDZPOIgt7GHgzfk3C17JV8kfgii7Q/IFItAuM 9FwGXQOwEttlZExLMe+jXBhEOmetc+q2rNonF6RXQVfHYIG1Za32lSlWI6PfPAT9JF iiSRx3FWu8Br6avNEHGY2vJ81u/aIH/aR/kQQQRxh7QvLw9Wc0P6jpwP+kT6aBUmLr MGVgthdjPse28NOgVO+ySuRntrWFulfS+zOtcTqDYnsZX17+fbhM7mQCEdxbZYFsi/ 6XZInZGN7sJ8q8Blv8wKkKu1OPGTbJJFT12KGR6AjimEYSvvmycgWR2W3TuIpvV9iM Jwl5YwKxly7vQMU9Sd57Hh2ODnBHVg8QfXGRcMGrfu9p0kmLDVstxV/OaWBY+CPP7O e5A11/XGlyoj+SjPcQTXr9NLjQymX55mx2ToGlpWeUYyBF807X7rapqY9XURvPwQix 2gherU2qR7/u5dkZiIebsfsd0STRd/LV/pPhHqJFGlbJj9IT9YbZQzYMPKNlcw8frR ay/1LBUbO6QzrqIsYxByVjf0= X-OPENPGPKEY: Message passed unmodified To: qemu-devel@nongnu.org Cc: Kyle Copperfield Subject: [PATCH] i386: define the 'flush_l1d' CPUID feature bit (CVE-2018-3646) Date: Tue, 12 Nov 2019 03:50:43 +0000 Message-Id: <20191112035043.54600-1-kmcopper@danwin1210.me> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.101.4 at proxy X-Virus-Status: Clean Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a01:4f8:c010:d56::1 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Reply-to: Kyle Copperfield From: Kyle Copperfield via X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" New microcode introduces the "Flush L1D Cache" CPUID feature bit. This needs to be exposed to guest OS to allow them to protect against CVE-2018-3646. Signed-off-by: Kyle Copperfield --- docs/qemu-cpu-models.texi | 7 +++++++ target/i386/cpu.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/qemu-cpu-models.texi b/docs/qemu-cpu-models.texi index f88a1def0d..1b5349d86a 100644 --- a/docs/qemu-cpu-models.texi +++ b/docs/qemu-cpu-models.texi @@ -180,6 +180,13 @@ Must be explicitly turned on for all Intel CPU models. Requires the host CPU microcode to support this feature before it can be used for guest CPUs. =20 +@item @code{flush_l1d} + +Required to enable strong Foreshadow-NG (VMM) (CVE-2018-3646) fixes in +guests. + +Requires the host CPU microcode to support this feature before it +can be used for guest CPUs. =20 @item @code{ssbd} =20 diff --git a/target/i386/cpu.c b/target/i386/cpu.c index a624163ac2..1fb6d677e2 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -1083,7 +1083,7 @@ static FeatureWordInfo feature_word_info[FEATURE_WORD= S] =3D { NULL, NULL, NULL /* pconfig */, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "spec-ctrl", "stibp", - NULL, "arch-capabilities", "core-capability", "ssbd", + "flush_l1d", "arch-capabilities", "core-capability", "ssbd", }, .cpuid =3D { .eax =3D 7, --=20 2.24.0