From patchwork Sat Nov 30 11:57:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11267929 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 971E417F0 for ; Sat, 30 Nov 2019 11:58: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 729E820833 for ; Sat, 30 Nov 2019 11:58: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="jUOOiYzy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 729E820833 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 1ib1Ng-0004in-3e; Sat, 30 Nov 2019 11:57:44 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ib1Ne-0004ii-MV for xen-devel@lists.xenproject.org; Sat, 30 Nov 2019 11:57:42 +0000 X-Inumbo-ID: 9ce85824-1368-11ea-83b8-bc764e2007e4 Received: from mail-wm1-x341.google.com (unknown [2a00:1450:4864:20::341]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9ce85824-1368-11ea-83b8-bc764e2007e4; Sat, 30 Nov 2019 11:57:42 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id p17so4861863wmi.3 for ; Sat, 30 Nov 2019 03:57:42 -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=l/stZRTrBJWatCpyjrTLK9IFgbC8jyUYHayzXXJg7yU=; b=jUOOiYzymtgWYtQTwYL0wQMm172hF4Gh19VMBbiugW9Uma8ILqlElaP0EY5kGGrA05 9HttucKbZZzFg5geNzxKQrcSwSxIq4VuI+VlMmORnSisg9j8R6O41QmayXOO5N0DF+bI j7rCo9fC0UEfdh1PJ9fr1ovOI0gM0iUkRVlfKOy8CuxD5r4YVGnELv2OPEmSZRl2Aole fZTsO0LUnjk+A9ClNT7iJtTh7MJPhMW3nxRvPn/kG9cNzfCcQTzle+mrZpUAz7j7+Wij caqsFH90cxutIsMLmYMqfYrRs2KCGS4w+J5SFYF7ViODbniQdX5nDQd7+aHdaHUN8ZD/ wYRw== 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=l/stZRTrBJWatCpyjrTLK9IFgbC8jyUYHayzXXJg7yU=; b=nbEn2YYNqbnBDMV7vON44S3rl8klKJima0A9kSmxtJZ9nfU9NfmhTXCcMTN/bnhHxK 9jbegl6Co4MMSXy/K5yL9lZD0JF15/+ValfmaqS9S3qvGvOjF2fmiIJzyUYMcFhAP/Dg YUOJkNmjaerhJhZK4tgTY4kvaMDjf338AqJKno5pu+iOkb5JZstRliLMdCAk4rzCJ355 hoYAnx0oDYMX+XSg2y0sAuGsLF3cafgIKsce9g8hfqhaDxzSVXYPKuV4e8mCxx4vqzGF 5s/TdjaOtxWmCw4OugTvM0c1YqNNCG2mP0k/L/vsswLjCE6nNG0GXpVmL0lyv7NWwfLO ewrw== X-Gm-Message-State: APjAAAX6bgCCJQxabHAdNAklbmINQO9a7rWTcScLMjnNiR34GvyrIEY3 wU454YoNiajy9zkyPJgCv3XMZV8aWoU= X-Google-Smtp-Source: APXvYqylAS9TK5bJ+8UEZNcuJ7PWOt4eecfLIwj9a3b7m8popHV5I1PFwr1Ba1a1lAMr59a/yD63/Q== X-Received: by 2002:a1c:ba89:: with SMTP id k131mr13281264wmf.108.1575115061299; Sat, 30 Nov 2019 03:57:41 -0800 (PST) Received: from debian.mshome.net (122.163.200.146.dyn.plus.net. [146.200.163.122]) by smtp.gmail.com with ESMTPSA id z11sm2227769wrt.82.2019.11.30.03.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 03:57:40 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Sat, 30 Nov 2019 11:57:29 +0000 Message-Id: <20191130115737.15752-1-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v5 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 | 78 +++++++++++++++++++ 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, 312 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