From patchwork Thu Nov 21 18:50:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11256829 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 680936C1 for ; Thu, 21 Nov 2019 18:51:42 +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 42E472067D for ; Thu, 21 Nov 2019 18:51:42 +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="HC1ETjxj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 42E472067D 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 1iXrXb-00074U-R9; Thu, 21 Nov 2019 18:50:55 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iXrXa-00074L-Ga for xen-devel@lists.xenproject.org; Thu, 21 Nov 2019 18:50:54 +0000 X-Inumbo-ID: d8206af6-0c8f-11ea-984a-bc764e2007e4 Received: from mail-wm1-x344.google.com (unknown [2a00:1450:4864:20::344]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d8206af6-0c8f-11ea-984a-bc764e2007e4; Thu, 21 Nov 2019 18:50:53 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id l17so4937255wmh.0 for ; Thu, 21 Nov 2019 10:50:53 -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=oK//4eWPwKiz07S4xOiSY1AsXbRsxv+kBltxwHfY7+k=; b=HC1ETjxj9NMsO3gBpPzfp92ojjeu4EXj5TjD0XCSIf5DrhSVqRG+qC7V9eOc1ah0TX axTwYkOPbArXktAEdiqKy1HMFm69zNfDc8d5ns7sFUD54EK+fxqk+y7L46WwPuxlntv/ 38c05anVxR2MKFKndojOW7Rp14PBx5AOGA2mbL0qL/SCMy+hULs/odGqlnDNuWWxuOWw 14gH2uTyIWSFD3gEAI0w52hpvuLPlMsu3pKQL7IcnYWS8HRz4NyOnuFam928AIi4pIQo BXLwGuUOo1BJzZwwGjtf6zhUyPxn4Mo42HeAKfLxWdVG1vLBl1vOyXQxeuzUGZQ/Qr0i kaDg== 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=oK//4eWPwKiz07S4xOiSY1AsXbRsxv+kBltxwHfY7+k=; b=Mlpb+S+LopOZf8hFimOSoNOrNMSPHWfaAofayc6ti1KpyUd4s1OmfAxUpb9iX3YAxu /B588/kSSQcqDdlLWM1nvxn9C4yZ0hKsTaPvQ9KVA8Cc0s3yCfjEzkR/zTMmUXZsoHEh aY7ImYQ0+WzCHMCf4S8tz0ovOlOqbxNuBXLS8CndbCCzg6zQ9PvavjGpZFH4Pu2dP3e3 TaV0BBFatvxlPHOlKmoQGMwFlhtUUuYII9eeVJDKQL7PvkFNnow0mTC0YfbRVF6zCeLJ MiaGDKPMy0V+/RPWQfVCLQdMO3w7k0Y7KlpQDLCJUKVqgg4diSH9Mx2VHuoU8eNwi0TI 9mkQ== X-Gm-Message-State: APjAAAVchElWOc9hAFiD4Y7rjaAS9haC7po9PlZZrMR5Xtcj7zgyOhz+ Yt8MIm+55JP8EmuFWQtCY3xH+bgz75V9rQ== X-Google-Smtp-Source: APXvYqzx7ziX2KiJpABDqvLNU+y2TYc9ZoeN2fA3vDv3zDE+OoV8CRPeykght7+w7y6SKkIs04JBbQ== X-Received: by 2002:a1c:30b:: with SMTP id 11mr11243113wmd.171.1574362252944; Thu, 21 Nov 2019 10:50:52 -0800 (PST) Received: from debian.mshome.net (74.162.147.147.dyn.plus.net. [147.147.162.74]) by smtp.gmail.com with ESMTPSA id f24sm535776wmb.37.2019.11.21.10.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 10:50:52 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Thu, 21 Nov 2019 18:50:41 +0000 Message-Id: <20191121185049.16666-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 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 , Paul Durrant , 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" Please see individual patches for changes. Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Roger Pau Monné Cc: Paul Durrant Wei Liu (8): x86: introduce CONFIG_GUEST and move code x86: add missing headers in hypercall.h x86: drop hypervisor_cpuid_base x86: introduce hypervisor framework x86: rename hypervisor_{alloc,free}_unused_page x86: switch xen guest implementation to use hypervisor framework x86: be more verbose when running on a hypervisor x86: introduce CONFIG_HYPERV and detection code xen/arch/x86/Kconfig | 15 +++- 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 | 54 +++++++++++++ xen/arch/x86/guest/hypervisor.c | 80 +++++++++++++++++++ xen/arch/x86/guest/xen/Makefile | 4 + xen/arch/x86/guest/{ => xen}/hypercall_page.S | 0 xen/arch/x86/guest/{ => xen}/pvh-boot.c | 2 +- xen/arch/x86/guest/{ => xen}/xen.c | 60 +++++++------- xen/arch/x86/pv/shim.c | 6 +- xen/arch/x86/setup.c | 7 +- xen/include/asm-x86/guest.h | 2 + xen/include/asm-x86/guest/hypercall.h | 4 + xen/include/asm-x86/guest/hyperv.h | 43 ++++++++++ xen/include/asm-x86/guest/hypervisor.h | 62 ++++++++++++++ xen/include/asm-x86/guest/xen.h | 23 ++---- 17 files changed, 314 insertions(+), 57 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 (99%) rename xen/arch/x86/guest/{ => xen}/xen.c (94%) create mode 100644 xen/include/asm-x86/guest/hyperv.h create mode 100644 xen/include/asm-x86/guest/hypervisor.h