From patchwork Thu Nov 3 13:04:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinank Jain X-Patchwork-Id: 1093 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp519693wru; Thu, 3 Nov 2022 06:09:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7chIbXbLf0dTT7bp6jgiaoKxDHzn+r5+AnwU4Ns9oTMxUYdNAYZO2pcJvvTc5kTi4XLxH6 X-Received: by 2002:a63:4182:0:b0:46f:1263:1f6 with SMTP id o124-20020a634182000000b0046f126301f6mr25960217pga.611.1667480966244; Thu, 03 Nov 2022 06:09:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667480966; cv=none; d=google.com; s=arc-20160816; b=r5fCCF+PTW0Or09gorWmb9K/n6AHv8OSc2mTap4fTTxMyLWzwXTMamorQZSpsgjg98 cnBRnsUnWiM5+ABb+Zg7J/qCpb7s0ehE7iCoOsf73auxT5SCM1XUA4Wbgw3YwMRtG6TK n1z8U+rKZeUVovTyd/mmEraTG+gH/jIHf1f3NFIckOI0+VMWilOGdJoCvTejrYk3hEQJ QU5ogmtd3b/lhaX/7R+sSTNx0MbSevLqwN2U6tVM+W1+OYJMjWJte8s6l0jC1PUaz4Xd F+7lzTxgMEaeVmgHKjMyCDRo1VrpiA1+Ih+Y+aw2Fdyre+fNKlflRu7acadLkO+mFaMV oMsw== 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=AN7mmvGxBvUuf9Ip8jEZg4kDB3svnoriD2HrczLSwDg=; b=aiRYXPg8ji/PLjZY4Dippbq/Cxns4tTdVlwS5QUjgUy2cuzu+cg+GRL66LYBVXxJRw TJZMmyprfK3hwyXHoDGWrbcsVHegOvu0o5ZH+mASOqFrW0KcPkux5vx9VwhbXXdg76ap h48iYhac3de7f2H7M9LGvyCzVj1CtFseif8t2nqZCE3jSn1bU7FXSjoq/VbK9+MUgTwy jkPMPchXpjanQfigXKiAOTVLj6Cg3w1T4AXCdQSucI/Nrzoo98l1mhLdqrViQ0Rypb48 k4vXtMxpkhwiqhCN90SsVUARBBXfd4Q1s+K4GTV11zGEtO5/G6OSncVKONBrv+0iYp/k O8CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="S0dCEIZ/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 189-20020a6306c6000000b004395afacb7csi969742pgg.214.2022.11.03.06.09.09; Thu, 03 Nov 2022 06:09:26 -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="S0dCEIZ/"; 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 S230368AbiKCNF2 (ORCPT + 99 others); Thu, 3 Nov 2022 09:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbiKCNFJ (ORCPT ); Thu, 3 Nov 2022 09:05:09 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 915EB178BF; Thu, 3 Nov 2022 06:04:13 -0700 (PDT) Received: from jinankjain-dranzer.zrrkmle5drku1h0apvxbr2u2ee.ix.internal.cloudapp.net (unknown [20.188.121.5]) by linux.microsoft.com (Postfix) with ESMTPSA id 1A66B20B9F81; Thu, 3 Nov 2022 06:04:08 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1A66B20B9F81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1667480653; bh=AN7mmvGxBvUuf9Ip8jEZg4kDB3svnoriD2HrczLSwDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S0dCEIZ/u+kEPxD2IdDHWcQrGjvD1xZJor3tAKzbqw+1lT6+otiotEiXBjfhy45jU OCV+zq2NyTO24z2rOzZdp1FY/aYZMRwidSNsFU9vtacLg5u0S9SKLPaiZVYfoWDI+L VYafYJ0kJDTG15QXMLlkMFHD6n/XJUFHnSSqZFOU= 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 v3 0/5] Add support running nested Microsoft Hypervisor Date: Thu, 3 Nov 2022 13:04:02 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748480522007434721?= X-GMAIL-MSGID: =?utf-8?q?1748480522007434721?= 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 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 | 68 ++++++++++++++++++++++++++++-- arch/x86/kernel/cpu/mshyperv.c | 22 ++++++++++ arch/x86/kernel/idt.c | 9 ++++ drivers/hv/hv.c | 18 +++++--- drivers/hv/hv_common.c | 7 ++- drivers/hv/vmbus_drv.c | 5 ++- include/asm-generic/hyperv-tlfs.h | 1 + 10 files changed, 141 insertions(+), 14 deletions(-)