Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp566788rwb; Tue, 13 Dec 2022 23:05:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf4FLiBSNbhcT4hkS6sGe4j/pGr0fQoKP1VvLdDFhrwwMMgxDDC5eg06HAkimywr39zcTPTP X-Received: by 2002:a17:906:3fd5:b0:7aa:491c:6cdf with SMTP id k21-20020a1709063fd500b007aa491c6cdfmr21008162ejj.18.1671001546088; Tue, 13 Dec 2022 23:05:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671001546; cv=none; d=google.com; s=arc-20160816; b=wuM4/hUVMJWoNssOnvUzL9WMtFQ/vQ0xVsl270OBSCvrP3TKoD5WSBRoivkcdZ1zUr 3yBZqaS8zwdOdciSvRigiD3mi8HGxz1hKNHFPlqBocLAYuUZ0AIrUXgkInuHkK0b6jvE awOIdI/V5uCYR0qnl4O3V1qq4OfjZ0eUd7BjYtTHJeFDudwaZKP427uCoXFOwiyr5hN3 VQA+lQDj20DCqnlicFjUcdw4HnzeyI5Ew9t0AjNSqoAJRz/u+P4jbs5jzFSsXCpeGKud t3plEyMS7KS9mh7RMSM5+8YjMle2OoODyTAwHi2MEkWVk8++Si3yyy4LHovnhjoJCOI7 xtnQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=FdaBi9/UQGf58YdgIgm2T4j7hu0zNGTVpigliN7T3i4=; b=UeA6IjletN01t3HeDIW+j0TU2gi5TTstPpxN28IflWKvfoUbgt/a4YKMEMwnswmZGU pR5BC0JhQdQq9WyGblgvTvm9kcivI1+3JXK7LXiaq42jIsiKhS8AJfEgxdp23g9p4xUh 2EkijWbGs4t2y65fbmfrK8UiG2BDYE1On+J3igdwMijCYaFd3o4wz1bmP1jpIP6Zjsjt S4vzFH3b54h0yI/FFWzOjIhD2hz/7eB1n8ZnsEiI6DaI7VUehit+HAq6ddaJ8bypTYo3 OcZZPQkdSfA54pVCzlBp4opSfDzTZRS1xZu8LbaXJftTCZnKmtaFQi6oqqtoQTN1NwLB a0qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=R6dHAnLb; 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 gs18-20020a1709072d1200b0078c3197bf86si11851651ejc.533.2022.12.13.23.05.29; Tue, 13 Dec 2022 23:05:46 -0800 (PST) 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=R6dHAnLb; 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 S229739AbiLNGdO (ORCPT + 71 others); Wed, 14 Dec 2022 01:33:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237066AbiLNGdM (ORCPT ); Wed, 14 Dec 2022 01:33:12 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CD7711D66C; Tue, 13 Dec 2022 22:33:10 -0800 (PST) Received: from jinankjain-dranzer.zrrkmle5drku1h0apvxbr2u2ee.ix.internal.cloudapp.net (unknown [20.188.121.5]) by linux.microsoft.com (Postfix) with ESMTPSA id 4585B20B8768; Tue, 13 Dec 2022 22:33:06 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4585B20B8768 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1670999590; bh=FdaBi9/UQGf58YdgIgm2T4j7hu0zNGTVpigliN7T3i4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R6dHAnLbwUkjs/eiq7E52J+K2L1QTd6SDIA182EE03p/YhKBNoOv9DtSYl/DM0J71 eozeLtZq1pT7U+UGEsOtgUC41rzmh5Yj+oNGEXcJIlGHtywpGLcU/Wsl2fwYliw/Na gDjqM+bNza2sNHio/S9XtgYkgWAFlKPb9u0ffotY= From: Jinank Jain To: jinankjain@microsoft.com 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, x86@kernel.org, hpa@zytor.com, arnd@arndb.de, peterz@infradead.org, jpoimboe@kernel.org, jinankjain@linux.microsoft.com, seanjc@google.com, kirill.shutemov@linux.intel.com, ak@linux.intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, anrayabh@linux.microsoft.com, mikelley@microsoft.com Subject: [PATCH v9 0/5] Add support running nested Microsoft Hypervisor Date: Wed, 14 Dec 2022 06:32:59 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: 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 This patch series plans to add support for running nested Microsoft Hypervisor. In case of nested Microsoft Hypervisor there are few privileged hypercalls which need to go L0 Hypervisor instead of L1 Hypervisor. This patches series basically identifies such hypercalls and replace them with nested hypercalls. Jinank Jain (5): x86/hyperv: Add support for detecting nested hypervisor Drivers: hv: Setup synic registers in case of nested root partition x86/hyperv: Add an interface to do nested hypercalls Drivers: hv: Enable vmbus driver for nested root partition x86/hyperv: Change interrupt vector for nested root partition [v4] - Fix ARM64 compilation [v5] - Fix comments from Michael Kelly [v6] - Send the correct patches from the right folder [v7] - Fix linker issues for CONFIG_HYPERV=n pointed out by Michael - Fix comments from Nuno: created two separate functions for fetching nested vs non-nested registers. [v8] - Refactor as per the recommendation from Michael Kelly [v9] - Address comments from Michael and Nuno. arch/x86/include/asm/hyperv-tlfs.h | 17 +++++- arch/x86/include/asm/idtentry.h | 2 + arch/x86/include/asm/irq_vectors.h | 6 +++ arch/x86/include/asm/mshyperv.h | 72 +++++++++++++++---------- arch/x86/kernel/cpu/mshyperv.c | 87 ++++++++++++++++++++++++++++++ arch/x86/kernel/idt.c | 10 ++++ drivers/hv/hv.c | 19 +++++-- drivers/hv/hv_common.c | 9 ++-- drivers/hv/vmbus_drv.c | 5 +- include/asm-generic/hyperv-tlfs.h | 1 + include/asm-generic/mshyperv.h | 1 + 11 files changed, 190 insertions(+), 39 deletions(-) -- 2.25.1