Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp408453rwi; Thu, 27 Oct 2022 03:01:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4opp1W07Xte/B3bI8Q27iN8rMcRqNErK/S/qwVHDmyQEa6X5yCv6jwfED3srDhPS/YZQTY X-Received: by 2002:a05:6402:d0b:b0:458:a244:4e99 with SMTP id eb11-20020a0564020d0b00b00458a2444e99mr45045852edb.46.1666864899104; Thu, 27 Oct 2022 03:01:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666864899; cv=none; d=google.com; s=arc-20160816; b=jzDyEf2W6DKOdFF+yGvihLZdkXg/3jRQ4wz5OKXjHsiVIq/H+yTnBEz+qz8nutV9Vi NRW0WondVRaa0TW0eVpRqPeFgATMEpAfBPJDHSklMrK0KA2KGa79fLv+A0+GzWnFnkey iKdsvDTpEpDXKmyqj9RXBXippp2Rb2N1fBU2fRvh6Bs92EWItsJoBvyjMXZr+P/eC0FC ZqR7XmecTWO+J86RZM3RKK9GrvMvdeEO0VZK6t7ffZFH7torHX3i7L8hbrEqjPaIVuto ZxiNEeAJbFrb4WAziq6oCWyQrjpI1hYjYO0OWZbl+ZpNwmhxtqzXx0ZTKzJKsVyUH/F7 qcCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=Bvmo3uopcCHqTy41GnJDIxmpJghyOohBNndaPK/207U=; b=sJnyVfCFqHw9gs5N15ptq+sCIOpkLwj8hUCUr7vemAi1p87zWpZkWMqb8M7KOfMmOH 4bYbpxsUUFnaoihPCdFqO6QEFlVraZG/KjMqUu4b15FTwYtuOWgdxRZ+ujWowE7T4+IV kTkddBVPF+mnBkR04QzqRUk9/32nmDCcGwsmrfK5az+RKjMEO7juUV8lj78ttEo2O0b7 XuDubCZruSya+OgSNOLtm3dCBe2/V3SK1EK0kklxtl4TsaLvvobb5mcuggK+0N0EqDts MEeUgxpbw55ruoLTNzR8ihugNwjk1aQqPnUAKmf/deO65zgZHtmN16MaVnDDhVT7zFza PLlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=GuK58xEf; 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=linux.microsoft.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh43-20020a1709076eab00b007a9c3366e9asi1069324ejc.716.2022.10.27.03.01.02; Thu, 27 Oct 2022 03:01:39 -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; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=GuK58xEf; 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=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234041AbiJ0J6r (ORCPT + 99 others); Thu, 27 Oct 2022 05:58:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234918AbiJ0J6N (ORCPT ); Thu, 27 Oct 2022 05:58:13 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 630EE9A9F6; Thu, 27 Oct 2022 02:57:50 -0700 (PDT) Received: from anrayabh-desk.corp.microsoft.com (unknown [167.220.238.193]) by linux.microsoft.com (Postfix) with ESMTPSA id 3D1DF210CC07; Thu, 27 Oct 2022 02:57:45 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3D1DF210CC07 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1666864670; bh=Bvmo3uopcCHqTy41GnJDIxmpJghyOohBNndaPK/207U=; h=From:To:Cc:Subject:Date:From; b=GuK58xEfqlzPOT12zgrPQ0v9aqqYhgJimibJuxL8K7MXXVFvxrbgyuNVm03gEN5LZ ShREypEUJbZUSHdP2rRGgvnURgHbHnxj6Iyv0QnQTt5hZ4Qmb37tvuam4kiK6ykkyj 1d2DEvY182zQrWbe+qS0z3rw8e/8kqoVZSryg3j4= From: Anirudh Rayabharam To: kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, daniel.lezcano@linaro.org, Arnd Bergmann , linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Cc: stanislav.kinsburskiy@gmail.com, Anirudh Rayabharam , kumarpraveen@linux.microsoft.com, mail@anirudhrb.com Subject: [PATCH v2 0/2] Fix MSR access errors during kexec in root partition Date: Thu, 27 Oct 2022 15:27:27 +0530 Message-Id: <20221027095729.1676394-1-anrayabh@linux.microsoft.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 Fixes a couple of MSR access errors seen during kexec in root partition and opportunistically introduces a data structure for the reference TSC MSR in order to simplify the code that updates that MSR. New in v2: 1. Reverse the patch order as suggested by Michael. First introduce the new structure for reference tsc MSR and then use it in the hv_cleanup fix. 2. Use hv_{get,set}_register functions in hv_cleanup(). Anirudh Rayabharam (2): clocksource/drivers/hyperv: add data structure for reference TSC MSR x86/hyperv: fix invalid writes to MSRs during root partition kexec arch/x86/hyperv/hv_init.c | 11 +++++++---- drivers/clocksource/hyperv_timer.c | 28 ++++++++++++++-------------- include/asm-generic/hyperv-tlfs.h | 9 +++++++++ 3 files changed, 30 insertions(+), 18 deletions(-) -- 2.34.1