From patchwork Tue Feb 4 15:36:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11364873 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68B9E139A for ; Tue, 4 Feb 2020 15:38:10 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4560320674 for ; Tue, 4 Feb 2020 15:38:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qUrvFbbi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4560320674 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iz0GF-0001FF-J0; Tue, 04 Feb 2020 15:37:11 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iz0GE-0001F2-8x for xen-devel@lists.xenproject.org; Tue, 04 Feb 2020 15:37:10 +0000 X-Inumbo-ID: 348737a2-4764-11ea-8396-bc764e2007e4 Received: from mail-wm1-x344.google.com (unknown [2a00:1450:4864:20::344]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 348737a2-4764-11ea-8396-bc764e2007e4; Tue, 04 Feb 2020 15:37:09 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id p9so3805495wmc.2 for ; Tue, 04 Feb 2020 07:37:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fqANxVLhM2I9zrhppkMQYTW4mO2FrIkIERz5fgKt3g8=; b=qUrvFbbiAPTxE5wefhRZpzQauR07HUTX/XdtyBrriRS0+e1Tgr0lgTlJXxY5Aql+bE LOGhODfxJGkfLVAF0ZzZZRDhFd9npZKKzP9UDzbynFsW996CKSrhpp7QaGNA4fMZaYr3 rdNH30adXkUfihhvYwIDVynOo1aOsJ0omNhJhSYYne5+WqrWZCzppXDdC9s5vDZy1JLi FzxjxzNfcBN/En1wNFQasWM6y1HWugKfiC9LuyrYD3mYfPT2/xGKGQF5PDKcNLCBOsyn to8NmiIk1kSfzy0sLdD3Gg8I1ygw4VuZ8sipF6mSNehLM+ar7rwakRj/QdJBtGk3SkwG AO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=fqANxVLhM2I9zrhppkMQYTW4mO2FrIkIERz5fgKt3g8=; b=Z59mjasennfqHhDKs1FL7eRrudNqQ7Xxv7Dt6ER3LdhCcXXK2nzG3fzlEYjkKp4fIL UBWCe/xA1ff7BnOvAgV87bJPTnZYWnZT/SmVGfLzeC6H9HvGS0xDLyXzF8boySVCG5AH JvmgiZs0Qc3dB5VeBA4bti5H8TW2Vo7CIgLWsIBNFNdDr/d5SnSGVbnEO77TbkzUTcWZ sODVjL/MRq5VmFX0tCbEo5/wjni/qkT4PcZ6F87xeJ0J4hswR/DF2dGG93XL//RfaZId s9fluJTu6JS/ihKUq6gMBb1AHmBDpckmsepj28qYMkQKNuNSql9mwLdUrw0aZtmrpw41 5YLA== X-Gm-Message-State: APjAAAWCjULicW2rR1cYKZ1H1HyvyoKFI89v9sNg3Yrhfa1dQHAygfVM Uk0n69jnm6wihmpCro/Kl7+iTb/7oQo= X-Google-Smtp-Source: APXvYqxtwiTmzJtWJRjCVBxLAoNs5qdtOX86pGXVQ55er46q1XqW2oa9Cc0HeDZgb0UY4lD2l16Lqw== X-Received: by 2002:a1c:4857:: with SMTP id v84mr6368542wma.8.1580830628612; Tue, 04 Feb 2020 07:37:08 -0800 (PST) Received: from localhost.localdomain (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id p26sm4067143wmc.24.2020.02.04.07.37.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Feb 2020 07:37:07 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Tue, 4 Feb 2020 15:36:54 +0000 Message-Id: <20200204153704.15934-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v7 00/10] More Hyper-V infrastructures X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Andrew Cooper , Paul Durrant , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This patch sereis implements several important functionalities to run Xen on top of Hyper-V. See individual patches for more details. I've checked the assembly code as well as putting in a test patch to make sure the hypercall interface is implemented correctly. Wei. Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Roger Pau Monné Cc: Michael Kelley Cc: Paul Durrant Wei Liu (10): x86/hypervisor: make hypervisor_ap_setup return an error code x86/smp: don't online cpu if hypervisor_ap_setup fails x86: provide executable fixmap facility x86/hypervisor: provide hypervisor_fixup_e820 x86/hyperv: setup hypercall page x86/hyperv: provide Hyper-V hypercall functions DO NOT APPLY: x86/hyperv: issue an hypercall x86/hyperv: provide percpu hypercall input page x86/hyperv: retrieve vp_index from Hyper-V x86/hyperv: setup VP assist page MAINTAINERS | 1 + xen/arch/x86/boot/x86_64.S | 15 ++- xen/arch/x86/e820.c | 4 +- xen/arch/x86/guest/hyperv/hyperv.c | 154 ++++++++++++++++++++++- xen/arch/x86/guest/hyperv/private.h | 31 +++++ xen/arch/x86/guest/hypervisor.c | 12 +- xen/arch/x86/guest/xen/xen.c | 65 ++++++---- xen/arch/x86/livepatch.c | 3 +- xen/arch/x86/mm.c | 14 ++- xen/arch/x86/smpboot.c | 12 +- xen/arch/x86/xen.lds.S | 5 + xen/include/asm-x86/asm_defns.h | 5 + xen/include/asm-x86/config.h | 2 +- xen/include/asm-x86/fixmap.h | 24 ++++ xen/include/asm-x86/guest/hyperv-hcall.h | 97 ++++++++++++++ xen/include/asm-x86/guest/hyperv-tlfs.h | 5 +- xen/include/asm-x86/guest/hyperv.h | 3 + xen/include/asm-x86/guest/hypervisor.h | 12 +- 18 files changed, 419 insertions(+), 45 deletions(-) create mode 100644 xen/arch/x86/guest/hyperv/private.h create mode 100644 xen/include/asm-x86/guest/hyperv-hcall.h