Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2182962rwb; Thu, 8 Dec 2022 21:44:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf5bYFFYCJkEmyjBRZiTVqCJ2o4aP2pSAW3D0wSKzrnvIrOTUFXSzaZ5XSD8uAgostkGq3bt X-Received: by 2002:a05:6a21:6d99:b0:ac:21c3:2fb7 with SMTP id wl25-20020a056a216d9900b000ac21c32fb7mr6599811pzb.6.1670564646487; Thu, 08 Dec 2022 21:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670564646; cv=none; d=google.com; s=arc-20160816; b=SrOmh8jp4rVqbLFnVRv+iuVLf1Dc2Tipts/hA39bTpCnsWQJBpuL2QF7uMDdkwkDOF oxP5sL9JWcCQPjdriX3dmvq9SaBFIt0RPCYIm9JHzmrY9q053q4SdAXHVqZcw7kTc6sz seXfQ8s2AXj3O/3D+cC2ip7ualFS4k6ioddPDtr5h0h7o7SNbs0ORotRw8RrIZAzMZu/ 83+t4u3wpsWXOKVinRdd3zN8r52g1bwAAnjaOwZ6lrYKQox6Vkawl2qG9lq6C40hbbMK JhNnmj+9K5wxXSGZua+Y2sZx0NmgqBW8TIUOS1nq3IkhWY5jvWYLY0ZDZO6U4JX0AobI /KxA== 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=386SbrNrhbQDnyCUyTnw3kjM1xfS5uk71VzyZuTA4GA=; b=yAOMQBc+HADe1JcaYAOlklJlLZITLGe/oYzAhMh4GwL+vBgE7hrqB4gBm6BO+9N6GP Fct4gzq0oEqi+4q8FxH4+a+4rg7GnHoPFk4If8jOQDIO8bB8qu0V4u+aRWfAwgpobDYZ D6DHKrS2v0KWBhLry7ys0bx+Y94mU4aflSCiwIiHCvTrSA8xiiGws0bVCdFdaVqXu5QZ 2FZ1AuUwQtDCezT1zkR2YkjB7zuaCgrMs7zXn2mM6iiGHDOE4RHWVVG8KWbCiaIRxGJU A2E/O1Ac31t+bCWiOkTcHei8/wncl5d4mLoahKjpyViHCPO5NVEKMKHtOARtfH8gk4cA oC+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=DDzdmSUo; 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 z14-20020a630a4e000000b00476c6b9cf69si586421pgk.856.2022.12.08.21.43.56; Thu, 08 Dec 2022 21:44:06 -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=DDzdmSUo; 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 S229715AbiLIFcq (ORCPT + 74 others); Fri, 9 Dec 2022 00:32:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229691AbiLIFcm (ORCPT ); Fri, 9 Dec 2022 00:32:42 -0500 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76992C76F; Thu, 8 Dec 2022 21:32:39 -0800 (PST) Received: from jinankjain-dranzer.zrrkmle5drku1h0apvxbr2u2ee.ix.internal.cloudapp.net (unknown [20.188.121.5]) by linux.microsoft.com (Postfix) with ESMTPSA id 1C67920B6C40; Thu, 8 Dec 2022 21:32:33 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 1C67920B6C40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1670563959; bh=386SbrNrhbQDnyCUyTnw3kjM1xfS5uk71VzyZuTA4GA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DDzdmSUo9EjMiWaSmAkT2k8pPEcoO8LU1/RdndTIHq4EN0ULzNYZGC+4BoYOzbGil J+Tu5NAXnsurPa3569S2ybV0CcljxIkbQEGiK26uB0pvtMcGJzP/xKDolg/g+BKYS4 114tzgDmfxmndIaDC2jadr1fLJLaw/knma39tuu0= 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 v8 0/5] Add support running nested Microsoft Hypervisor Date: Fri, 9 Dec 2022 05:32:26 +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 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 | 83 ++++++++++++++++++++++++++++++ arch/x86/kernel/idt.c | 10 ++++ drivers/hv/hv.c | 32 ++++++++---- 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, 193 insertions(+), 45 deletions(-) -- 2.25.1