Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2479880rwo; Sun, 23 Jul 2023 16:45:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlEayfEoCwcqICKpYWa802Mij6eXCvigMUWW7RuoO6XG77wT7VPOznZllfGQEmXFqDTZV+Tn X-Received: by 2002:a05:6a21:3285:b0:125:3445:8af0 with SMTP id yt5-20020a056a21328500b0012534458af0mr10278204pzb.7.1690155946551; Sun, 23 Jul 2023 16:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690155946; cv=none; d=google.com; s=arc-20160816; b=WX4ss+7qK8sJbrxgggeRvqIMEaCQvMg4fQ5CRxLHbbIWyw8assj0vlhhKJlse1LcuI 6/RRzC87cNU8XzrnTKQCCGZ5F5egD9o2wZimWYrzVDlJRsGT3v2y00GGEOdjoebUxogS F4CMp8FQsud5kY7HYLK5QGqbtULFYoTwq2tcIwIx3DHS2a/ZseklK980bl4KWRz8vyR/ GYRmRhQIRa7SGkEfWhUlRIWK9fwUkPCEW7Tp9/scW/UbY5qPrdWhRwkCLdmBsrRPWxIs duiqmN9aFEU4iz5KiyYydHylFAXh9WRfXEIL3w4T3+n2bi0MNu+HP2kEyGjpYjYp6dSA enRQ== 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:date; bh=ejk+IkfG5HIe+hQjbA5510kpJD8rhXbCRXUBxtMfbVI=; fh=3UUITfl2zV5Ol28prf3R6lA+JrUIn1ukrOYRXHLr3uY=; b=MtP9B8YR9kCIEIcGycvaEGE4FDUEACWwAE6EZS4a+WSZmWXlJlSM1VcRenWJItVk+c Q3zM64d68Cmm961Y6jyt9IYEQmptrcNB3sM0amWCuj+Mg2ndBgS2Xz+pLP54XQHujeaK /P/G56loIWoz/mcsqPZJ/187Jltv13JW3L6boGWSOrs6Wxcwp5iK+FA3dJx/7VyI6GV9 q1v8PIK5XX3elg/dLm9joyJ8nFEdz9fMgvUNUuq6p6wHEFedXd06rJsL/y/rIR3IPYyc TyP+SUr+YMd8wf9hG+3XQtjeojgvDDf/THSSJZiXHlcl3txyn2RWjGo2Zr3oIBPIMGar IppA== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a633c44000000b0056384f80321si5070958pgn.242.2023.07.23.16.45.34; Sun, 23 Jul 2023 16:45:46 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229809AbjGWXIL (ORCPT + 99 others); Sun, 23 Jul 2023 19:08:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229577AbjGWXIJ (ORCPT ); Sun, 23 Jul 2023 19:08:09 -0400 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4092BA6; Sun, 23 Jul 2023 16:08:09 -0700 (PDT) Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1bba54f7eefso1655025ad.1; Sun, 23 Jul 2023 16:08:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690153688; x=1690758488; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ejk+IkfG5HIe+hQjbA5510kpJD8rhXbCRXUBxtMfbVI=; b=hRq6HwXB+GfLKQkkMMU7dPscLDa0JJW9+hKahdl7vetT9797uZFdsdobsNDf24yXUV kZt/6+JwzV+iNV65CRAb6tIolayUrsheaj6GBZkn8I89SikhAAi2WdfKBF1S2LvZwbnp 4ZTWCLT3LLkEme4zGyMzJx09sfxGrophkCESZt4oiZMRHjH8j+fuIQjjfaR5G6h9tdgs VVwkv+oiKHgYH00rbIva+WFeY5C7qUKx3FAiO7lr7jBhhl1Asdh9hQMQXGA1VjuKgpQp ne35oED5QNLmxX9qnw0SwtAjbUM1e5y0yMx38OxFTu1zWuDvBQY2MXzSdTPTaP20BdVD uWmQ== X-Gm-Message-State: ABy/qLay9kUz7jG7UYcHO8wVx4ztm7e2S32teyf+O/PK8H/EW589u82e eZzCQkkQ9N+4FmYVYAsoDXw= X-Received: by 2002:a17:902:ecc9:b0:1b8:8702:1e7c with SMTP id a9-20020a170902ecc900b001b887021e7cmr13048563plh.33.1690153688428; Sun, 23 Jul 2023 16:08:08 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([20.69.120.36]) by smtp.gmail.com with ESMTPSA id d24-20020a170902b71800b001b9cea4e8a2sm7355186pls.293.2023.07.23.16.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jul 2023 16:08:07 -0700 (PDT) Date: Sun, 23 Jul 2023 23:08:06 +0000 From: Wei Liu To: Michael Kelley Cc: kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2 1/1] x86/hyperv: Disable IBT when hypercall page lacks ENDBR instruction Message-ID: References: <1690001476-98594-1-git-send-email-mikelley@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1690001476-98594-1-git-send-email-mikelley@microsoft.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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, Jul 21, 2023 at 09:51:16PM -0700, Michael Kelley wrote: > On hardware that supports Indirect Branch Tracking (IBT), Hyper-V VMs > with ConfigVersion 9.3 or later support IBT in the guest. However, > current versions of Hyper-V have a bug in that there's not an ENDBR64 > instruction at the beginning of the hypercall page. Since hypercalls are > made with an indirect call to the hypercall page, all hypercall attempts > fail with an exception and Linux panics. > > A Hyper-V fix is in progress to add ENDBR64. But guard against the Linux > panic by clearing X86_FEATURE_IBT if the hypercall page doesn't start > with ENDBR. The VM will boot and run without IBT. > > If future Linux 32-bit kernels were to support IBT, additional hypercall > page hackery would be needed to make IBT work for such kernels in a > Hyper-V VM. > > Cc: stable@vger.kernel.org > Signed-off-by: Michael Kelley Applied to hyperv-fixes. Thanks.