From patchwork Fri Jan 31 17:49:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11360327 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 9C61B159A for ; Fri, 31 Jan 2020 17:50:49 +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 7754C2082E for ; Fri, 31 Jan 2020 17:50:49 +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="eJq7rkHi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7754C2082E 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 1ixaQC-0005qj-7o; Fri, 31 Jan 2020 17:49:36 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ixaQB-0005qe-NI for xen-devel@lists.xenproject.org; Fri, 31 Jan 2020 17:49:35 +0000 X-Inumbo-ID: 0aacdd8e-4452-11ea-b211-bc764e2007e4 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 0aacdd8e-4452-11ea-b211-bc764e2007e4; Fri, 31 Jan 2020 17:49:35 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id a9so9673128wmj.3 for ; Fri, 31 Jan 2020 09:49:34 -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=FCmlc12KCp0jcY4TLO/CylLO89w0ffpqpJQrZC8EOqg=; b=eJq7rkHi4748ljDLDBvZOmMSPuiaFGBjMMOHZneuFy2zSual+hJRGgxKXP2PJXA7ia g5vf3dX5iKAF/wisE30hKltCQ7aiR8mtY4HTZZD2Ma/jQoBEtUp6nuUMW9X3CVFAO18O lGNObh+UmMjw0l05quAYh+o90Sh65iif6tJ/BeB1rvwt6H+g9mteQSLbiltjD2Alvn8u K2WtrL3gxsMrJJCD7wNXZIlF1S2//K8cTWUG8aXS9DADCeLH9kOQcNWmKC7CtXFqUlah ghDnMAWa5T+FyAzUdQlygegKHN/bVCvt0drK9lDJRkN9J1XqdgZlbkkt72x+yYl3rjxB 3EBQ== 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=FCmlc12KCp0jcY4TLO/CylLO89w0ffpqpJQrZC8EOqg=; b=gjR2hiuQaG2fzd4+Swh/6ziSi7ah1OKxPWx4Tx6nNQg6IwOfi5Uxs+wxaiBahsgFfS 3Qi7XkeKebeeXdZ3qXCAGTXObX1x3gUYSczloOrDQUvvYZplbNsp0EcmpTRYLKq8JRVq 32h649uz8XsXOQb9HEusRC8wSCqrYN2MTDDyQ/ersbd12XCCZU1jSe4x90c5W3RD7fH+ LwazfadzoM5HPUMZDZYkGoe5Zk8V67kkc1F93bJ4bL3sb4uef1KQep+5QOw6l3Tjw2bl tG3lKv7RCbNFQTcxJ3reaiN2rAXWIW8Maxh3/ECNSbY2dasWq6V8nAv11LmkVVMw2RZL H5Zw== X-Gm-Message-State: APjAAAXFCNNt226X1eY8K3GOLIZnPfkWh2M7jGUfwBKwTC5mVXDurlN8 3/Wt/GWnm/CgY/dIhjCO1WK7222tLKU= X-Google-Smtp-Source: APXvYqwaSHjvKlx5Bab2868FlTaY9sWSxCOzTRWcHJ2QzUUCyO/UrPii7T5ORzXO2onq3mct/nAgYw== X-Received: by 2002:a1c:b607:: with SMTP id g7mr13319293wmf.110.1580492973941; Fri, 31 Jan 2020 09:49:33 -0800 (PST) Received: from localhost.localdomain (41.142.6.51.dyn.plus.net. [51.6.142.41]) by smtp.gmail.com with ESMTPSA id 133sm4364352wmd.5.2020.01.31.09.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jan 2020 09:49:33 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Fri, 31 Jan 2020 17:49:19 +0000 Message-Id: <20200131174930.31045-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v6 00/11] 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 , =?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 (11): 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: move viridian_page_msr to hyperv-tlfs.h 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 | 152 ++++++++++++++++++++++- xen/arch/x86/guest/hyperv/private.h | 31 +++++ xen/arch/x86/guest/hypervisor.c | 12 +- xen/arch/x86/guest/xen/xen.c | 31 +++-- xen/arch/x86/hvm/viridian/viridian.c | 2 +- xen/arch/x86/livepatch.c | 3 +- xen/arch/x86/mm.c | 17 ++- xen/arch/x86/smpboot.c | 12 +- xen/arch/x86/xen.lds.S | 7 ++ 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 | 16 ++- xen/include/asm-x86/guest/hyperv.h | 3 + xen/include/asm-x86/guest/hypervisor.h | 12 +- xen/include/asm-x86/hvm/viridian.h | 15 +-- 19 files changed, 411 insertions(+), 45 deletions(-) create mode 100644 xen/arch/x86/guest/hyperv/private.h create mode 100644 xen/include/asm-x86/guest/hyperv-hcall.h