From patchwork Mon Sep 23 10:09:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11156561 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 54A1417EE for ; Mon, 23 Sep 2019 10:11:41 +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 303DE20865 for ; Mon, 23 Sep 2019 10:11:41 +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="T/ztLkOa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 303DE20865 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 1iCLHn-0006oA-4F; Mon, 23 Sep 2019 10:09:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iCLHm-0006o5-99 for xen-devel@lists.xenproject.org; Mon, 23 Sep 2019 10:09:38 +0000 X-Inumbo-ID: 3f96f8aa-ddea-11e9-978d-bc764e2007e4 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 3f96f8aa-ddea-11e9-978d-bc764e2007e4; Mon, 23 Sep 2019 10:09:37 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id 3so8597347wmi.3 for ; Mon, 23 Sep 2019 03:09:37 -0700 (PDT) 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=zxSmSyH8rh0b6FSX+opTdkwSk+odZPTYcviyJsiQBDI=; b=T/ztLkOaWk5DOP/HdR1pMS/KY/JiEC5faXhJ95RK7uCOFeP3iiM09oivMfJBmjqPek So+bjbmsL3+ZCO/LpSdD3PqAzYz+PiccgXjaRrQn9KQ86BwOURkvT4/wsESV7eYo69ze tDwKoI5C6zbRWN7eXQUvoAATClhkxtmGAIx05xije+M7DkX8yyCO/zyoJK5CsCYhlkof uUBCFlCt5SFLXHI3nn9xtzl0X3Vqd/6cxzVPRngdbDBFTQpzxc3bXX1u4gUSLQIjttb8 l+8tKq/LTLVwGxY4Lvtt4vP7n/a86wqYNHtT+3KOwqwkutcQSwq/HHS/rxHT9DMYdvpc 40eg== 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=zxSmSyH8rh0b6FSX+opTdkwSk+odZPTYcviyJsiQBDI=; b=uN8G9t9sgNAsvrDGDw38v6PpCq7n/5bcqZjT8DBKVdzFHYpkkYSHA+NXdiWFxQoCWH xb72bB/wkBWHmyuf+f/oa8uSEfsE4C0KIKWEGStwO9W3WDVIo1GFTOu9bEBvR6jEsPRk 2JGds0yWu54TedtrFPVSlO6J4L7OgQO1mCeVc6TpRBTnyT1az2H6d+YjcTdCiHguI8vO DgwWiIohux2cV5V03yWk/9nXOB9R/3Rar1mWha5P4ecq2l2Ew55dKW/zk/y6J+h/uILv RIYsWoBEw78cT6d31KizjJ2QEPE5PA8vz5TKgK/VR33oGghbISnS7tEKTZiOWfVtlJ2Z H2Ig== X-Gm-Message-State: APjAAAWPFzE0ZTPaBQhjbvvxmQp8kFUZ0YTHDWBGfTkOERzKEr7RM2Aj fPfcZHrui27wMMUb2vXAxvk77FEM X-Google-Smtp-Source: APXvYqxrWgOIFpmGp2CUhqpkte/gY4bduvMv4pczj5/J0KOej7DnG3fE2ORvwzAM0H7x91TLL3t2tQ== X-Received: by 2002:a1c:7902:: with SMTP id l2mr13119868wme.55.1569233376576; Mon, 23 Sep 2019 03:09:36 -0700 (PDT) Received: from debian.mshome.net (207.148.159.143.dyn.plus.net. [143.159.148.207]) by smtp.gmail.com with ESMTPSA id s10sm18241662wmf.48.2019.09.23.03.09.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2019 03:09:36 -0700 (PDT) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Mon, 23 Sep 2019 11:09:23 +0100 Message-Id: <20190923100931.29670-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-next RFC 0/8] Port Xen to Hyper-V 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 , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Hi all In case you're wondering, I can already run a fully fledged Xen system on Hyper-V with emulated disk and network. This is the very first stage for porting Xen to run on Hyper-V with all the goodies Hyper-V has to offer. With this series, Xen can successfully detect Hyper-V and prints out a message. I would like to first get the directory structure and kconfig options agreed upon. There are two major areas to be worked on: * Make Dom0 able to use Hyper-V's synthetic devices. * Make Xen use of the synthetic timer, reference TSC and enlightenment VMCS and other interfaces. They aren't trivial, and time can be scarce on my side, so I intend to post patches piece meal when they are ready. Questions and comments are welcome. Thanks, Wei. Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Roger Pau Monné Wei Liu (8): x86: introduce CONFIG_GUEST and move code x86: include asm_defns.h directly in hypercall.h x86: drop hypervisor_cpuid_base x86: factor out xen variants for hypervisor setup code x86: factor out hypervisor agnostic code x86: make probe_xen return boolean value x86: introduce CONFIG_HYPERV and hyperv directory x86: be more verbose when running nested xen/arch/x86/Kconfig | 13 ++ xen/arch/x86/Makefile | 2 +- xen/arch/x86/guest/Makefile | 6 +- xen/arch/x86/guest/hyperv/Makefile | 1 + xen/arch/x86/guest/hyperv/hyperv.c | 63 ++++++++++ xen/arch/x86/guest/hypervisor.c | 116 ++++++++++++++++++ xen/arch/x86/guest/xen/Makefile | 4 + xen/arch/x86/guest/{ => xen}/hypercall_page.S | 0 xen/arch/x86/guest/{ => xen}/pvh-boot.c | 0 xen/arch/x86/guest/{ => xen}/xen.c | 73 ++--------- xen/arch/x86/pv/shim.c | 2 +- xen/arch/x86/setup.c | 11 ++ xen/include/asm-x86/guest.h | 2 + xen/include/asm-x86/guest/hypercall.h | 2 + xen/include/asm-x86/guest/hyperv.h | 48 ++++++++ xen/include/asm-x86/guest/hypervisor.h | 58 +++++++++ xen/include/asm-x86/guest/xen.h | 23 +--- 17 files changed, 337 insertions(+), 87 deletions(-) create mode 100644 xen/arch/x86/guest/hyperv/Makefile create mode 100644 xen/arch/x86/guest/hyperv/hyperv.c create mode 100644 xen/arch/x86/guest/hypervisor.c create mode 100644 xen/arch/x86/guest/xen/Makefile rename xen/arch/x86/guest/{ => xen}/hypercall_page.S (100%) rename xen/arch/x86/guest/{ => xen}/pvh-boot.c (100%) rename xen/arch/x86/guest/{ => xen}/xen.c (80%) create mode 100644 xen/include/asm-x86/guest/hyperv.h create mode 100644 xen/include/asm-x86/guest/hypervisor.h Signed-off-by: Roger Pau Monné