From patchwork Tue Feb 24 18:02:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 44974 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7E2042029F for ; Tue, 24 Feb 2015 18:06:25 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id bs8sf16313093wib.2 for ; Tue, 24 Feb 2015 10:06:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:list-archive; bh=ojpU5zQtFCLPJuOOlqDmG8JTEt6SJNLExOrzLsiHFc4=; b=bhrpxVha9ADKf56TiwXYUEN0NIKVdbEj/FvdwpESZLOtnz1WVnbpuE7CYcVXhVot2J f4HFiGqsId5FHT54Tt+vd303Lf725tIBx1ZIe8A03k060zApyRKDBNFIyxeKqzzbvqTd oBIT2DeKxC7v1BiJmODceKDH5Lf05TXqHatIrFdpyfE8Aafe3jbT6uUQ8ax991KUGaT6 lwiRTLeXxLvXX3uDIcdyEADF1rVZ1/VqXwS2k9RRS/SKHxCLRQuE5tkBcVgrnSHNkW/N 0CG3Kt84mxNwHz6zIkQKg2vdovQHsTcdh+i2KjxHzRSWLDzjys/28bl2yn2zs7n74M4Q fIpg== X-Gm-Message-State: ALoCoQmyf0QJ4kFo6obpCvGJJ76iw9cY7xMPeUlz7YdQN5yp0La4Dec1p4obkeC/ZkP7XLXVAxAa X-Received: by 10.152.28.137 with SMTP id b9mr2349433lah.8.1424801184662; Tue, 24 Feb 2015 10:06:24 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.207 with SMTP id jq15ls713683lab.107.gmail; Tue, 24 Feb 2015 10:06:23 -0800 (PST) X-Received: by 10.152.29.102 with SMTP id j6mr15745154lah.12.1424801183421; Tue, 24 Feb 2015 10:06:23 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id f6si11244448lbd.92.2015.02.24.10.06.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Feb 2015 10:06:23 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by lbdu10 with SMTP id u10so26674422lbd.7 for ; Tue, 24 Feb 2015 10:06:23 -0800 (PST) X-Received: by 10.112.114.230 with SMTP id jj6mr15163856lbb.112.1424801183265; Tue, 24 Feb 2015 10:06:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp2079132lbj; Tue, 24 Feb 2015 10:06:20 -0800 (PST) X-Received: by 10.140.101.133 with SMTP id u5mr7182772qge.2.1424801179825; Tue, 24 Feb 2015 10:06:19 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id z18si26691804qgz.67.2015.02.24.10.06.19 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 24 Feb 2015 10:06:19 -0800 (PST) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YQJrF-0002oZ-O3; Tue, 24 Feb 2015 18:05:21 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YQJrC-0002kR-UE for xen-devel@lists.xen.org; Tue, 24 Feb 2015 18:05:19 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id F5/4E-02881-D5DBCE45; Tue, 24 Feb 2015 18:05:17 +0000 X-Env-Sender: ard.biesheuvel@linaro.org X-Msg-Ref: server-8.tower-31.messagelabs.com!1424801116!11926486!1 X-Originating-IP: [74.125.82.179] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.13.4; banners=-,-,- X-VirusChecked: Checked Received: (qmail 23128 invoked from network); 24 Feb 2015 18:05:16 -0000 Received: from mail-we0-f179.google.com (HELO mail-we0-f179.google.com) (74.125.82.179) by server-8.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 24 Feb 2015 18:05:16 -0000 Received: by wesq59 with SMTP id q59so26937453wes.1 for ; Tue, 24 Feb 2015 10:05:16 -0800 (PST) X-Received: by 10.194.236.200 with SMTP id uw8mr34129091wjc.10.1424801116469; Tue, 24 Feb 2015 10:05:16 -0800 (PST) Received: from ards-macbook-pro.lan (bl11-65-113.dsl.telepac.pt. [85.244.65.113]) by mx.google.com with ESMTPSA id w8sm12792521wja.4.2015.02.24.10.05.13 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Feb 2015 10:05:15 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.sourceforge.net, olivier.martin@arm.com, lersek@redhat.com, roy.franz@linaro.org, leif.lindholm@linaro.org, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, anthony.perard@citrix.com, xen-devel@lists.xen.org, julien.grall@linaro.org, jordan.l.justen@intel.com, michael.d.kinney@intel.com Date: Tue, 24 Feb 2015 18:02:59 +0000 Message-Id: <1424800990-15777-19-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1424800990-15777-1-git-send-email-ard.biesheuvel@linaro.org> References: <1424800990-15777-1-git-send-email-ard.biesheuvel@linaro.org> Cc: wei.liu2@citrix.com, Ard Biesheuvel Subject: [Xen-devel] [PATCH v5 18/29] Ovmf/Xen: move XenBusDxe hypercall code to separate library X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: This moves all of the Xen hypercall code that was private to XenBusDxe to a new library class XenHypercallLib. This will allow us to reimplement it for ARM, and to export the Xen hypercall functionality to other parts of the code, such as a Xen console SerialPortLib driver. Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Laszlo Ersek Reviewed-by: Anthony PERARD Signed-off-by: Ard Biesheuvel --- .../Library/XenHypercallLib.h} | 22 ++----- .../XenHypercallLib}/Ia32/hypercall.nasm | 0 .../XenHypercallLib}/X64/hypercall.nasm | 0 .../XenHypercallLib}/XenHypercall.c | 48 +------------- .../Library/XenHypercallLib/XenHypercallIntel.c | 77 ++++++++++++++++++++++ .../XenHypercallLib/XenHypercallLibIntel.inf | 52 +++++++++++++++ OvmfPkg/OvmfPkg.dec | 4 ++ OvmfPkg/OvmfPkgIa32.dsc | 1 + OvmfPkg/OvmfPkgIa32X64.dsc | 1 + OvmfPkg/OvmfPkgX64.dsc | 1 + OvmfPkg/XenBusDxe/EventChannel.c | 3 +- OvmfPkg/XenBusDxe/GrantTable.c | 2 +- OvmfPkg/XenBusDxe/XenBusDxe.c | 9 +-- OvmfPkg/XenBusDxe/XenBusDxe.inf | 11 +--- OvmfPkg/XenBusDxe/XenStore.c | 2 +- 15 files changed, 149 insertions(+), 84 deletions(-) rename OvmfPkg/{XenBusDxe/XenHypercall.h => Include/Library/XenHypercallLib.h} (79%) rename OvmfPkg/{XenBusDxe => Library/XenHypercallLib}/Ia32/hypercall.nasm (100%) rename OvmfPkg/{XenBusDxe => Library/XenHypercallLib}/X64/hypercall.nasm (100%) rename OvmfPkg/{XenBusDxe => Library/XenHypercallLib}/XenHypercall.c (60%) create mode 100644 OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c create mode 100644 OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf diff --git a/OvmfPkg/XenBusDxe/XenHypercall.h b/OvmfPkg/Include/Library/XenHypercallLib.h similarity index 79% rename from OvmfPkg/XenBusDxe/XenHypercall.h rename to OvmfPkg/Include/Library/XenHypercallLib.h index 9d49e33eb5af..1a468ea7dcc5 100644 --- a/OvmfPkg/XenBusDxe/XenHypercall.h +++ b/OvmfPkg/Include/Library/XenHypercallLib.h @@ -13,8 +13,8 @@ **/ -#ifndef __XENBUS_DXE_HYPERCALL_H__ -#define __XENBUS_DXE_HYPERCALL_H__ +#ifndef __XEN_HYPERCALL_LIB_H__ +#define __XEN_HYPERCALL_LIB_H__ /** This function will put the two arguments in the right place (registers) and @@ -29,21 +29,9 @@ INTN EFIAPI XenHypercall2 ( - IN INTN HypercallID, - IN OUT INTN Arg1, - IN OUT INTN Arg2 - ); - -/** - Get the page where all hypercall are from the XenInfo hob. - - @param Dev A XENBUS_DEVICE instance. - - @retval EFI_NOT_FOUND hyperpage could not be found. - @retval EFI_SUCCESS Successfully retrieve the hyperpage pointer. -**/ -EFI_STATUS -XenHyperpageInit ( + IN UINTN HypercallID, + IN OUT INTN Arg1, + IN OUT INTN Arg2 ); /** diff --git a/OvmfPkg/XenBusDxe/Ia32/hypercall.nasm b/OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm similarity index 100% rename from OvmfPkg/XenBusDxe/Ia32/hypercall.nasm rename to OvmfPkg/Library/XenHypercallLib/Ia32/hypercall.nasm diff --git a/OvmfPkg/XenBusDxe/X64/hypercall.nasm b/OvmfPkg/Library/XenHypercallLib/X64/hypercall.nasm similarity index 100% rename from OvmfPkg/XenBusDxe/X64/hypercall.nasm rename to OvmfPkg/Library/XenHypercallLib/X64/hypercall.nasm diff --git a/OvmfPkg/XenBusDxe/XenHypercall.c b/OvmfPkg/Library/XenHypercallLib/XenHypercall.c similarity index 60% rename from OvmfPkg/XenBusDxe/XenHypercall.c rename to OvmfPkg/Library/XenHypercallLib/XenHypercall.c index e7134fcf74ce..ecc757cf707c 100644 --- a/OvmfPkg/XenBusDxe/XenHypercall.c +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercall.c @@ -14,43 +14,12 @@ **/ #include -#include -#include - -#include "XenBusDxe.h" -#include "XenHypercall.h" #include #include -STATIC VOID *HyperPage; - -// -// Interface exposed by the ASM implementation of the core hypercall -// -INTN -EFIAPI -__XenHypercall2 ( - IN VOID *HypercallAddr, - IN OUT INTN Arg1, - IN OUT INTN Arg2 - ); - -EFI_STATUS -XenHyperpageInit ( - ) -{ - EFI_HOB_GUID_TYPE *GuidHob; - EFI_XEN_INFO *XenInfo; - - GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); - if (GuidHob == NULL) { - return EFI_NOT_FOUND; - } - XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob); - HyperPage = XenInfo->HyperPages; - return EFI_SUCCESS; -} +#include +#include UINT64 XenHypercallHvmGetParam ( @@ -92,16 +61,3 @@ XenHypercallEventChannelOp ( return XenHypercall2 (__HYPERVISOR_event_channel_op, Operation, (INTN) Arguments); } - -INTN -EFIAPI -XenHypercall2 ( - IN UINTN HypercallID, - IN OUT INTN Arg1, - IN OUT INTN Arg2 - ) -{ - ASSERT (HyperPage != NULL); - - return __XenHypercall2 ((UINT8*)HyperPage + HypercallID * 32, Arg1, Arg2); -} diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c b/OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c new file mode 100644 index 000000000000..fc52823f239a --- /dev/null +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercallIntel.c @@ -0,0 +1,77 @@ +/** @file + Xen Hypercall Library implementation for Intel architecture + +Copyright (c) 2014, Linaro Ltd. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. +The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#include +#include +#include +#include + +STATIC VOID *HyperPage; + +// +// Interface exposed by the ASM implementation of the core hypercall +// +INTN +EFIAPI +__XenHypercall2 ( + IN VOID *HypercallAddr, + IN OUT INTN Arg1, + IN OUT INTN Arg2 + ); + +/** + Library constructor: retrieves the Hyperpage address + from the gEfiXenInfoGuid HOB +**/ + +RETURN_STATUS +EFIAPI +XenHypercallLibIntelInit ( + VOID + ) +{ + EFI_HOB_GUID_TYPE *GuidHob; + EFI_XEN_INFO *XenInfo; + + GuidHob = GetFirstGuidHob (&gEfiXenInfoGuid); + if (GuidHob == NULL) { + return RETURN_NOT_FOUND; + } + XenInfo = (EFI_XEN_INFO *) GET_GUID_HOB_DATA (GuidHob); + HyperPage = XenInfo->HyperPages; + return RETURN_SUCCESS; +} + +/** + This function will put the two arguments in the right place (registers) and + invoke the hypercall identified by HypercallID. + + @param HypercallID The symbolic ID of the hypercall to be invoked + @param Arg1 First argument. + @param Arg2 Second argument. + + @return Return 0 if success otherwise it return an errno. +**/ +INTN +EFIAPI +XenHypercall2 ( + IN UINTN HypercallID, + IN OUT INTN Arg1, + IN OUT INTN Arg2 + ) +{ + ASSERT (HyperPage != NULL); + + return __XenHypercall2 ((UINT8*)HyperPage + HypercallID * 32, Arg1, Arg2); +} diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf b/OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf new file mode 100644 index 000000000000..2afd608f4a05 --- /dev/null +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf @@ -0,0 +1,52 @@ +## @file +# Xen Hypercall abstraction lib for Intel architecture +# +# Copyright (c) 2014, Linaro Ltd. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# +## + +[Defines] + INF_VERSION = 0x00010005 + BASE_NAME = XenHypercallLibIntel + FILE_GUID = B5EE9A32-CA5A-49A8-82E3-ADA4CCB77C7C + MODULE_TYPE = BASE + VERSION_STRING = 1.0 + LIBRARY_CLASS = XenHypercallLib|DXE_DRIVER UEFI_DRIVER + CONSTRUCTOR = XenHypercallLibIntelInit + +# +# The following information is for reference only and not required by the build tools. +# +# VALID_ARCHITECTURES = IA32 X64 +# + +[Sources] + XenHypercallIntel.c + +[Sources.IA32] + Ia32/hypercall.nasm + +[Sources.X64] + X64/hypercall.nasm + +[Sources] + XenHypercall.c + +[Packages] + MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec + +[LibraryClasses] + BaseLib + HobLib + DebugLib + +[Guids] + gEfiXenInfoGuid diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 6eb551a8d436..30a9fb1e9b42 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -44,6 +44,10 @@ # SerializeVariablesLib|Include/Library/SerializeVariablesLib.h + ## @libraryclass Invoke Xen hypercalls + # + XenHypercallLib|Include/Library/XenHypercallLib.h + [Guids] gUefiOvmfPkgTokenSpaceGuid = {0x93bb96af, 0xb9f2, 0x4eb8, {0x94, 0x62, 0xe0, 0xba, 0x74, 0x56, 0x42, 0x36}} gEfiXenInfoGuid = {0xd3b46f3b, 0xd441, 0x1244, {0x9a, 0x12, 0x0, 0x12, 0x27, 0x3f, 0xc1, 0x4d}} diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index ca656698754b..90540272745c 100644 --- a/OvmfPkg/OvmfPkgIa32.dsc +++ b/OvmfPkg/OvmfPkgIa32.dsc @@ -128,6 +128,7 @@ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 4b4a1da717c1..0a331eda8be0 100644 --- a/OvmfPkg/OvmfPkgIa32X64.dsc +++ b/OvmfPkg/OvmfPkgIa32X64.dsc @@ -133,6 +133,7 @@ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc index eb3f34b8350b..e2b37c271681 100644 --- a/OvmfPkg/OvmfPkgX64.dsc +++ b/OvmfPkg/OvmfPkgX64.dsc @@ -133,6 +133,7 @@ S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf + XenHypercallLib|OvmfPkg/Library/XenHypercallLib/XenHypercallLibIntel.inf [LibraryClasses.common] !if $(SECURE_BOOT_ENABLE) == TRUE diff --git a/OvmfPkg/XenBusDxe/EventChannel.c b/OvmfPkg/XenBusDxe/EventChannel.c index a86323e6adfd..6a36dca29911 100644 --- a/OvmfPkg/XenBusDxe/EventChannel.c +++ b/OvmfPkg/XenBusDxe/EventChannel.c @@ -16,7 +16,8 @@ **/ #include "EventChannel.h" -#include "XenHypercall.h" + +#include UINT32 XenEventChannelNotify ( diff --git a/OvmfPkg/XenBusDxe/GrantTable.c b/OvmfPkg/XenBusDxe/GrantTable.c index 53cb99f0e004..a80d5eff39cd 100644 --- a/OvmfPkg/XenBusDxe/GrantTable.c +++ b/OvmfPkg/XenBusDxe/GrantTable.c @@ -34,7 +34,7 @@ #include -#include "XenHypercall.h" +#include #include "GrantTable.h" #include "InterlockedCompareExchange16.h" diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.c b/OvmfPkg/XenBusDxe/XenBusDxe.c index d333b331b6db..cc334c086c1f 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.c +++ b/OvmfPkg/XenBusDxe/XenBusDxe.c @@ -26,10 +26,10 @@ #include #include #include +#include #include "XenBusDxe.h" -#include "XenHypercall.h" #include "GrantTable.h" #include "XenStore.h" #include "XenBus.h" @@ -390,13 +390,6 @@ XenBusDxeDriverBindingStart ( MmioAddr = BarDesc->AddrRangeMin; FreePool (BarDesc); - Status = XenHyperpageInit (); - if (EFI_ERROR (Status)) { - DEBUG ((EFI_D_ERROR, "XenBus: Unable to retrieve the hyperpage.\n")); - Status = EFI_UNSUPPORTED; - goto ErrorAllocated; - } - Status = XenGetSharedInfoPage (Dev); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "XenBus: Unable to get the shared info page.\n")); diff --git a/OvmfPkg/XenBusDxe/XenBusDxe.inf b/OvmfPkg/XenBusDxe/XenBusDxe.inf index 4ce474345452..714607dbd6f8 100644 --- a/OvmfPkg/XenBusDxe/XenBusDxe.inf +++ b/OvmfPkg/XenBusDxe/XenBusDxe.inf @@ -34,8 +34,6 @@ DriverBinding.h ComponentName.c ComponentName.h - XenHypercall.c - XenHypercall.h InterlockedCompareExchange16.c InterlockedCompareExchange16.h GrantTable.c @@ -49,12 +47,10 @@ Helpers.c [Sources.IA32] - Ia32/hypercall.nasm Ia32/InterlockedCompareExchange16.nasm Ia32/TestAndClearBit.nasm [Sources.X64] - X64/hypercall.nasm X64/InterlockedCompareExchange16.nasm X64/TestAndClearBit.nasm @@ -67,8 +63,7 @@ UefiLib DevicePathLib DebugLib - HobLib - + XenHypercallLib [Protocols] gEfiDriverBindingProtocolGuid @@ -77,7 +72,3 @@ gEfiComponentNameProtocolGuid gXenBusProtocolGuid - -[Guids] - gEfiXenInfoGuid - diff --git a/OvmfPkg/XenBusDxe/XenStore.c b/OvmfPkg/XenBusDxe/XenStore.c index 7ec1e634bc5c..9850f1e644fc 100644 --- a/OvmfPkg/XenBusDxe/XenStore.c +++ b/OvmfPkg/XenBusDxe/XenStore.c @@ -60,8 +60,8 @@ #include -#include "XenHypercall.h" #include "EventChannel.h" +#include // // Private Data Structures