From patchwork Mon Oct 21 15:57:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11202581 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 594431895 for ; Mon, 21 Oct 2019 15:59:05 +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 350C82084B for ; Mon, 21 Oct 2019 15:59:05 +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="MDrHd9/w" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 350C82084B 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 1iMa4B-0008IS-HW; Mon, 21 Oct 2019 15:57: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 1iMa49-0008Hl-SJ for xen-devel@lists.xenproject.org; Mon, 21 Oct 2019 15:57:53 +0000 X-Inumbo-ID: 7b1566c2-f41b-11e9-beca-bc764e2007e4 Received: from mail-wm1-x343.google.com (unknown [2a00:1450:4864:20::343]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7b1566c2-f41b-11e9-beca-bc764e2007e4; Mon, 21 Oct 2019 15:57:28 +0000 (UTC) Received: by mail-wm1-x343.google.com with SMTP id c22so4239809wmd.1 for ; Mon, 21 Oct 2019 08:57:28 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=ExfOi0N6VUGqchtp2Vv94a4Sc6kPF7iWTxBmQdbZTUY=; b=MDrHd9/w6r2SS5bNBvH4wPUa25y5FsK6mLR8DbHPxvWHD+2naAhHzESjYDv1pIsGo/ geOo0flBHGontoIoY1lHkZRXiLdDAntbGI9XRkcb1Q8PQhIE/uAl4nTHzlGSAd0+Eb2Z YQ3RIqMeJvXiArZVWfSVmTYMrfCNfLw9y2gfwQoxuCUjOv/Ed62jnZip/r+SB1PxRwFC rg5bYShShrXt/NS/ds7wPnZmU47Sm84Jy0BdBf5NSD7wptgFzDfJ+kprnX9hokCJLbY6 mOKvOqs389qxDGFg1jkkd4usU64HUgQqchEzNcLevI8G636jgoyn6FWb1U5XkqP/stTJ X0cQ== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=ExfOi0N6VUGqchtp2Vv94a4Sc6kPF7iWTxBmQdbZTUY=; b=F5rN1vbyQ7+dd4rKnVFoKeuy6RiJs9d9JBNYwnnXGyCe1w2/ETykPqn8iIQVxkD8vH fOEZHTNBtsvYtVB+IPiQ9bkSQ74ETAUbv4X9XGTLWDmx9gadqwdWIh3Sp6unahNYFhNg k4YnRPH0j3mGS1ExdDKTl7FWcc/JLEwecLR+L8890NZcOPdPNcsRyRQ55Eh+bfqyr1vv 570cNpVOHRscA+vHf7vfGOq2M1f9XUFHu1zvJFucVp2e70C5+qMxLscV7tg1TI1+FUdu Hgfg1vnfH6vlLifoVlqJroB5wna9F8734T/6nt+zouaa+GUcB5UkL3On4fxFDto9pQjE DnSw== X-Gm-Message-State: APjAAAXBxR1l0ixi8u43T6QWrIUrB3CcF5Qhpa+OIpRQytPCneZzXEic qd4mq/A2I6sHAdkMFrekddXhNxj5HQU= X-Google-Smtp-Source: APXvYqxwIHsOQ9QEmy2XrZYBQQSBlbkiyNYA8Sza8Uiz/Qc+g6OpkO99Vrybf2mgWPoMjr5yFxH0aQ== X-Received: by 2002:a7b:c5c9:: with SMTP id n9mr21037600wmk.28.1571673447173; Mon, 21 Oct 2019 08:57:27 -0700 (PDT) Received: from debian.mshome.net (54.163.200.146.dyn.plus.net. [146.200.163.54]) by smtp.gmail.com with ESMTPSA id x12sm5667410wru.93.2019.10.21.08.57.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 08:57:26 -0700 (PDT) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Mon, 21 Oct 2019 16:57:15 +0100 Message-Id: <20191021155718.28653-7-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191021155718.28653-1-liuwe@microsoft.com> References: <20191021155718.28653-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-next v3 6/9] x86: rename hypervisor_{alloc, free}_unused_page 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" They are used in Xen code only. No functional change. Signed-off-by: Wei Liu Reviewed-by: Roger Pau Monné --- xen/arch/x86/guest/xen/xen.c | 6 +++--- xen/arch/x86/pv/shim.c | 4 ++-- xen/include/asm-x86/guest/xen.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/guest/xen/xen.c b/xen/arch/x86/guest/xen/xen.c index 78fc603996..9895025d02 100644 --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -97,7 +97,7 @@ static void map_shared_info(void) unsigned int i; unsigned long rc; - if ( hypervisor_alloc_unused_page(&mfn) ) + if ( xen_alloc_unused_page(&mfn) ) panic("unable to reserve shared info memory page\n"); xatp.gpfn = mfn_x(mfn); @@ -284,7 +284,7 @@ void hypervisor_ap_setup(void) init_evtchn(); } -int hypervisor_alloc_unused_page(mfn_t *mfn) +int xen_alloc_unused_page(mfn_t *mfn) { unsigned long m; int rc; @@ -296,7 +296,7 @@ int hypervisor_alloc_unused_page(mfn_t *mfn) return rc; } -int hypervisor_free_unused_page(mfn_t mfn) +int xen_free_unused_page(mfn_t mfn) { return rangeset_remove_range(mem, mfn_x(mfn), mfn_x(mfn)); } diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c index 5441e89de2..41b4665649 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -739,7 +739,7 @@ static long pv_shim_grant_table_op(unsigned int cmd, }; mfn_t mfn; - rc = hypervisor_alloc_unused_page(&mfn); + rc = xen_alloc_unused_page(&mfn); if ( rc ) { gprintk(XENLOG_ERR, @@ -751,7 +751,7 @@ static long pv_shim_grant_table_op(unsigned int cmd, rc = xen_hypercall_memory_op(XENMEM_add_to_physmap, &xatp); if ( rc ) { - hypervisor_free_unused_page(mfn); + xen_free_unused_page(mfn); break; } diff --git a/xen/include/asm-x86/guest/xen.h b/xen/include/asm-x86/guest/xen.h index 3145f75361..8221fc1325 100644 --- a/xen/include/asm-x86/guest/xen.h +++ b/xen/include/asm-x86/guest/xen.h @@ -33,8 +33,8 @@ extern bool pv_console; extern uint32_t xen_cpuid_base; void probe_hypervisor(void); -int hypervisor_alloc_unused_page(mfn_t *mfn); -int hypervisor_free_unused_page(mfn_t mfn); +int xen_alloc_unused_page(mfn_t *mfn); +int xen_free_unused_page(mfn_t mfn); DECLARE_PER_CPU(unsigned int, vcpu_id); DECLARE_PER_CPU(struct vcpu_info *, vcpu_info);