Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5769005imm; Mon, 23 Jul 2018 05:53:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpduNQWPWoT8Qs4B/U2WOcvuOeWbXkiQDw5e6g+zKlSSbhWMrUsVVj6DdSw/tLTIim2Z320U X-Received: by 2002:a17:902:5381:: with SMTP id c1-v6mr12605139pli.137.1532350386220; Mon, 23 Jul 2018 05:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532350386; cv=none; d=google.com; s=arc-20160816; b=DM0EPFE4bgsY596Nuh0MRDnC6LJvGBVB90/fdg5Em0xVbdtNOhoAyasbvLKI7zFtfb +RoEgYfWTTQlfLoycjmdVTDCpTsqOSKIYsPD+RBkQfaGTmxVAOXapheEJnL0kJ8yX5R+ pInHtEi5IhwCO18DLZp/CnaXZc4c9swz2dGI48cUM74HcGr4hHSyaFL2IAGsZ0AeKUtx xgEcWsM/adWPgQ6ZtjHlWs45DRsGuF9xKJKxVsiqMTwDkanecOBzGx806Smxa6pT7Z2a t5KQEXYrktpKV6Bccj0kTeQw4xv37NeNLu3A9EP5LZSQuuHZy/nxRmp6Zpw7X04t3sb3 YKqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=HwqhO7hDzMbnkKWRjbcfaQSOuS4kDcao2ED/J5YvUbU=; b=a5A39ts9x9I5fgbH2vVBEc9RZA1DT2FXnK394+7FxJarBUidlrC6zWyKzsl2TcvWqa qqfhhDXA5IoNLRLITJHJ5kFyA8qzIoXDk4Nz0J4PbTM5MpWrqgizM6jd+z91EhDD5U80 UObKwJCqjl5DbblxWGU5m8PXTApmCY7utEXmo3PJX2bvXSyM2EWzdySntPUM7vy2qm8q 8MmOzYyylQRl1lIxwDtGPXYxM1p9Z/OnZlAgc5VWyXmiIS6qNWb9erF2rQpnTVM476WG emRkFIZIq1jz9IMB0VZLQrKtXBd2xSV/W2ED0muZBpCZIiFhbwoO4rMbeOdevcgJij3S D/cg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9-v6si8358424pgu.130.2018.07.23.05.52.51; Mon, 23 Jul 2018 05:53:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389525AbeGWNr7 (ORCPT + 99 others); Mon, 23 Jul 2018 09:47:59 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51200 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388674AbeGWNr6 (ORCPT ); Mon, 23 Jul 2018 09:47:58 -0400 Received: from localhost (LFbn-1-12238-233.w90-92.abo.wanadoo.fr [90.92.53.233]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 93FACC0A; Mon, 23 Jul 2018 12:46:15 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jim Mattson , Konrad Rzeszutek Wilk , Thomas Gleixner , Linus Torvalds , David Woodhouse , "Srivatsa S. Bhat" , "Matt Helsley (VMware)" , Alexey Makhalov , Bo Gan Subject: [PATCH 4.4 082/107] x86/cpu: Make alternative_msr_write work for 32-bit code Date: Mon, 23 Jul 2018 14:42:16 +0200 Message-Id: <20180723122417.589119687@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723122413.003644357@linuxfoundation.org> References: <20180723122413.003644357@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jim Mattson commit 5f2b745f5e1304f438f9b2cd03ebc8120b6e0d3b upstream Cast val and (val >> 32) to (u32), so that they fit in a general-purpose register in both 32-bit and 64-bit code. [ tglx: Made it u32 instead of uintptr_t ] Fixes: c65732e4f721 ("x86/cpu: Restore CPUID_8000_0008_EBX reload") Signed-off-by: Jim Mattson Signed-off-by: Konrad Rzeszutek Wilk Signed-off-by: Thomas Gleixner Acked-by: Linus Torvalds Signed-off-by: David Woodhouse Signed-off-by: Greg Kroah-Hartman Signed-off-by: Srivatsa S. Bhat Reviewed-by: Matt Helsley (VMware) Reviewed-by: Alexey Makhalov Reviewed-by: Bo Gan Signed-off-by: Greg Kroah-Hartman --- arch/x86/include/asm/nospec-branch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/x86/include/asm/nospec-branch.h +++ b/arch/x86/include/asm/nospec-branch.h @@ -219,8 +219,8 @@ void alternative_msr_write(unsigned int { asm volatile(ALTERNATIVE("", "wrmsr", %c[feature]) : : "c" (msr), - "a" (val), - "d" (val >> 32), + "a" ((u32)val), + "d" ((u32)(val >> 32)), [feature] "i" (feature) : "memory"); }