From patchwork Thu Nov 17 03:27:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinank Jain X-Patchwork-Id: 1800 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp192213wrr; Wed, 16 Nov 2022 19:28:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf5PQUJInQT2h1DmC4pCy751+6KhYabV/WfUOsEeWo/KyTfXmJKQS4BFgHUrY1hbk2O+ndhg X-Received: by 2002:a63:711:0:b0:464:527a:5796 with SMTP id 17-20020a630711000000b00464527a5796mr415327pgh.38.1668655722112; Wed, 16 Nov 2022 19:28:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668655722; cv=none; d=google.com; s=arc-20160816; b=CyMP8XiqO2ALtOCqu6AaUH5Yc7QzW25wjLrrZD11d3u2q6G58uRZZYN+bsX8m7vubv OG7jFjN11SWiqe9Lk5iyd06t7BkzFTuBXWTTFzDlYbRXs6LoUZXUD1bPwY1OXXN7qS/a vvGL4wOEXeE4yM9JGLdKkc8gbjH6O6VDcDJlAqaJpbOx6abalpZWeaD2iBayr+tZi51r HIS36F/5eNeBu70cJoYLziIljEdZI02zaPW9lfpbieZ+LNOjuvxfwR1Aq02xAAutn6qE rlyzEJF02VhlYgjdbUQBNl0xzvRLru8PQ/IeG3mSsR38/mNl9ShZWi0f7Leoj+pIqKtq NxPg== 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=CGuqdcgFFREA52DoeCkrhzpZV/LHr24q72S97S5r2ao=; b=p+7EtljKBTmOY3XEKVv4abWfKjld9E5q6IupHA40u2EF+aJjEL9N/eWk5xevD8btPi u3DHtA99K6bAhyiPmrxC7prCIYsop+NqGKhBNpdkjtTlfN3+abL5l6BLFDW1PWdDyqIA CtINPpiQiW3/bbnc9Jgg2AAt110WfuN+mAKpONdWuYaTKh/0X5hr7RcbpsOBRwaOXW7b 8Isp5ASl42MYHVKOF63Xh2ntF88uFx1UNOROrnn8guKU0HnBKqt387368Yfg60DkoRVm UR1SsFuYWgedof5SygnbH6NUBFgwAv3IBZ+bjasc0f+VsJpI9tnj9dei71BA57twRfpl 97Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=lE8YA9UU; 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 lb12-20020a17090b4a4c00b00212d47deabesi3971096pjb.60.2022.11.16.19.28.29; Wed, 16 Nov 2022 19:28:42 -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=lE8YA9UU; 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 S233096AbiKQD2K (ORCPT + 99 others); Wed, 16 Nov 2022 22:28:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234071AbiKQD2G (ORCPT ); Wed, 16 Nov 2022 22:28:06 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 92F6BCE12; Wed, 16 Nov 2022 19:28:04 -0800 (PST) Received: from jinankjain-dranzer.zrrkmle5drku1h0apvxbr2u2ee.ix.internal.cloudapp.net (unknown [20.188.121.5]) by linux.microsoft.com (Postfix) with ESMTPSA id E691920B6C40; Wed, 16 Nov 2022 19:27:59 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com E691920B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1668655684; bh=CGuqdcgFFREA52DoeCkrhzpZV/LHr24q72S97S5r2ao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lE8YA9UUcesT5jIf5DXlnBwKzJsesyZPcWa7N/Q2gsRurL33Ib+x4x0rcWQYCisMP VOmrvq9uMnfUuLV1yhL6Iriju04AaSUNd4xofudFAtmNdVkHVjgdxXw5+zdWpQoqwH t6oj3P1t2h23rSZl8ou76samJfuTA8PoQrfbw0i4= 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 v4 0/5] Add support running nested Microsoft Hypervisor Date: Thu, 17 Nov 2022 03:27:53 +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?1748403299597734940?= X-GMAIL-MSGID: =?utf-8?q?1749712342371436922?= 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 arch/arm64/hyperv/mshyperv.c | 6 +++ 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 | 71 ++++++++++++++++++++++++++++++ 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 + include/asm-generic/mshyperv.h | 1 + 12 files changed, 173 insertions(+), 38 deletions(-)