Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2347555ybz; Thu, 23 Apr 2020 16:29:37 -0700 (PDT) X-Google-Smtp-Source: APiQypI85dMoHxjWUpB0dwZmghHo4jLbWMWa+aDe4rj9+CsYakiBPr5BwDmZozZitsDpqtvPqcJX X-Received: by 2002:a05:6402:558:: with SMTP id i24mr4738727edx.347.1587684577177; Thu, 23 Apr 2020 16:29:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587684577; cv=none; d=google.com; s=arc-20160816; b=P9cpBumMOdFS3KiCoWrWmmzt/oOMx0DARTj6BhAXn2oLXLrgSbHtYXbrbijoHWqV9V VVO/mrs4AqPDx0w4fY+quR67SK15jUqTmPO1atstE+PfnJjUqnMjuNR7f/6+BnhESq8j NC1oACv3nJ87Rd+nZE4EuOeCS9KkecwTl3U+NVTVA5e2EIp4QwvPbl5LV1m1h/RINWHJ JtjzRqmX2nJEhcJinSeeM0mBUvOFsiYYydFgtNuGeNhoRhXcqPXBg+fpaZW5W8zoQ4HR dt/Igb/G7DuHjuVrCd1Y0knud2U5CxxnnqOscpKZwY5n3v5XfUjC+3rBiZQfJNctxlSI 7uoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=KMqQWrMDyxSGf6N19U8KgUgYRuaceIfsMsPxMg7fXM0=; b=aQ8wNQGzbgN5gcH8S9PR1dRsf0Yc8srb20cQvZ57wX1D8jsE3BXq1WcmSMroSYcvXx 9a+xGQ9oFydYbRlJ+c+4lapn22CTznrnWf9+H0WAJx+ucBxo/8U98O1KCOZ3X5XP/9FU nHjvcgAaZyNVBsOmx2IhqQ/JMa3VtH9KbkaT65xfDAZLsC0+qQaExuJE/qKkktfP4lor hN8ahKL8cdYUnpoinWfvtNQ4X6fWKCE5eg8hKgcDJQiqhBhHkrA+2NuwEhi89pXrEInY dzzJaQGOxNkz/U5L//v6FCl4fyZXjeRlncSBCRVmeoIvr0kUSadDel1YYlROywRQt7NW C1IQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oq20si1984824ejb.419.2020.04.23.16.29.13; Thu, 23 Apr 2020 16:29:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729881AbgDWXZw (ORCPT + 99 others); Thu, 23 Apr 2020 19:25:52 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:48154 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727913AbgDWXG1 (ORCPT ); Thu, 23 Apr 2020 19:06:27 -0400 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jRkvI-0004ZP-4G; Fri, 24 Apr 2020 00:06:24 +0100 Received: from ben by deadeye with local (Exim 4.93) (envelope-from ) id 1jRkvH-00E6ep-Jm; Fri, 24 Apr 2020 00:06:23 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, Denis Kirjanov , "Tom Lendacky" , "Thomas Gleixner" , "Ingo Molnar" , "Borislav Petkov" Date: Fri, 24 Apr 2020 00:03:56 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) X-Patchwork-Hint: ignore Subject: [PATCH 3.16 009/245] x86/microcode/AMD: Add support for fam17h microcode loading In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.83-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tom Lendacky commit f4e9b7af0cd58dd039a0fb2cd67d57cea4889abf upstream. The size for the Microcode Patch Block (MPB) for an AMD family 17h processor is 3200 bytes. Add a #define for fam17h so that it does not default to 2048 bytes and fail a microcode load/update. Signed-off-by: Tom Lendacky Signed-off-by: Thomas Gleixner Reviewed-by: Borislav Petkov Link: https://lkml.kernel.org/r/20171130224640.15391.40247.stgit@tlendack-t1.amdoffice.net Signed-off-by: Ingo Molnar Signed-off-by: Ben Hutchings --- arch/x86/kernel/cpu/microcode/amd.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/arch/x86/kernel/cpu/microcode/amd.c +++ b/arch/x86/kernel/cpu/microcode/amd.c @@ -154,6 +154,7 @@ static unsigned int verify_patch_size(u8 #define F14H_MPB_MAX_SIZE 1824 #define F15H_MPB_MAX_SIZE 4096 #define F16H_MPB_MAX_SIZE 3458 +#define F17H_MPB_MAX_SIZE 3200 switch (family) { case 0x14: @@ -165,6 +166,9 @@ static unsigned int verify_patch_size(u8 case 0x16: max_size = F16H_MPB_MAX_SIZE; break; + case 0x17: + max_size = F17H_MPB_MAX_SIZE; + break; default: max_size = F1XH_MPB_MAX_SIZE; break;