From patchwork Thu Nov 24 05:53:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinank Jain X-Patchwork-Id: 2157 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3210675wrr; Wed, 23 Nov 2022 21:54:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf48EvTCaONvqm3dXtVNg8F7c0pNDIKD4MIIHIc75jz3U+GGKpq+7tJwh43+kXq+kqNLUBOH X-Received: by 2002:aa7:ccd3:0:b0:468:f345:aa4a with SMTP id y19-20020aa7ccd3000000b00468f345aa4amr27861155edt.412.1669269265946; Wed, 23 Nov 2022 21:54:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669269265; cv=none; d=google.com; s=arc-20160816; b=ZiPmK5LrE422kGN3r2oY8Z2VGUZiQQYv9KQXtR2rlbio3LUqUsUI9c2O1SX79z33CP 5KMK6KVxbIniAfzOzfzwcU6959CAkhKGd+ziexa4Jj8+pNtmWHj86E+p67yrZLkwu/uU bNrkEJSEn4Dl6Az5ehujbj9YrNowT2h5GD7Q65MGzoeB6c7+h6Z1cG/JKIobC8VZYlfh 3LgdR5gbO+jyAhJC2CeA16RLR1tyqPXSbrnb/wSbZjHXAZct2E17nTuSsVIzxHvBI1Wu QD3kVy+2BRz23SR+y1CJlFKJZRnWwv8Y/XRqjuF2O65/yf5v6fqpFghaTlhAQTOARvg5 sSig== 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=3cySG9haYsoJ6p0W88BJ02lNEMjUVZWpQgClbO06Ftg=; b=EjY3cdroJ14mqoVodg30e0TGBwr4DEvnSYXiMn668CYPMKG9vCh8EgcmNYODw4vf18 Ge1OHFlEiP5WmXJCtTHOQ6Q658/b8TiHDjkEPZ75H/EtHVNRpkDwEFq0JuX0SGSUQwuQ rN5PckDDjmqrsSfToF2P2YqjZ9Y2CU373ezP7WXrAO1Die0DyaFafWsE8f4jiPeLMux6 C5/hD2AhxSIQBtE9i/ORKjnveJlkdRnGxGUzuIWHcOhmc2PcQlK+Wiywbh0kLpI8N28n j9+lXmSBuPt/kQ4zvOy87ObSyjG8bjbzuHeJsxx9eJ3ClghCbbWE5BgNdyLrzPD1fWnn 2vaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=GMhfprFo; 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 k7-20020a05640212c700b0046a57695aacsi85616edx.292.2022.11.23.21.54.02; Wed, 23 Nov 2022 21:54:25 -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=GMhfprFo; 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 S229580AbiKXFxP (ORCPT + 99 others); Thu, 24 Nov 2022 00:53:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34088 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbiKXFxO (ORCPT ); Thu, 24 Nov 2022 00:53:14 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 124B31D32B; Wed, 23 Nov 2022 21:53:13 -0800 (PST) Received: from jinankjain-dranzer.zrrkmle5drku1h0apvxbr2u2ee.ix.internal.cloudapp.net (unknown [20.188.121.5]) by linux.microsoft.com (Postfix) with ESMTPSA id 8071020B6C40; Wed, 23 Nov 2022 21:53:08 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 8071020B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1669269192; bh=3cySG9haYsoJ6p0W88BJ02lNEMjUVZWpQgClbO06Ftg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GMhfprFouulREloL7gUXOLxvsC9Xyt74yYtB7Mk4ew9EVUqZdPpXOkTtnBwVD0H4h jqJbbpK3kQK/FlurimPvMGB4UUo2qnaZu8ljQWBIYvmmZL0eTr4tN3qtoONm1utzBD qejNrSWzQCtbJN/vZhc3/GSktHelpPHSHSl6t1KY= 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 v5 0/5] Add support running nested Microsoft Hypervisor Date: Thu, 24 Nov 2022 05:53:01 +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?1748393268801564032?= X-GMAIL-MSGID: =?utf-8?q?1750355690198812314?= 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 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(-)