From patchwork Thu Nov 21 18:50:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11256843 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 8FF6F930 for ; Thu, 21 Nov 2019 18:52:15 +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 6C3A32067D for ; Thu, 21 Nov 2019 18:52:15 +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="ptxXAqqy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C3A32067D 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 1iXrY0-0007Ef-E7; Thu, 21 Nov 2019 18:51:20 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iXrXz-0007EH-HY for xen-devel@lists.xenproject.org; Thu, 21 Nov 2019 18:51:19 +0000 X-Inumbo-ID: dab75856-0c8f-11ea-9631-bc764e2007e4 Received: from mail-wm1-x32d.google.com (unknown [2a00:1450:4864:20::32d]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id dab75856-0c8f-11ea-9631-bc764e2007e4; Thu, 21 Nov 2019 18:50:58 +0000 (UTC) Received: by mail-wm1-x32d.google.com with SMTP id u18so4928858wmc.3 for ; Thu, 21 Nov 2019 10:50:58 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=LK3O/o3+V3DHJGhpDMqiDmW/Ssr7NmvU9isr2SCzc0w=; b=ptxXAqqy8ro3dJL4t/nSoN1+6hRmBkHjzvFQ6bnfQInHK85Zsebpy1US9d5CNxDJcJ yU2E61X+Ys4dW33ov3X7t5quLCXGY5WOlg4fP/8OnSzciX87gm9Q087EjyvUs1RVsQpL wUmHbuxDk+mEEO8Kj9s/mARhugYhygJMSKd6W1EzpRc2m92uRdXDD8P2GMB6Vwql9yvN QsIUNFuHJFvZeICz7juxFCQPi3RQq2+n1l6Ioiyo1FFgMpD7NxhllOzeoTJq+US/0NS1 sqMgEb5xgvFXPOljXYJyTx8tKDhJhzbmssiLixprTIQcbeE8gUQ/4C0KvEHuLWfUT1gv 1k3A== 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=LK3O/o3+V3DHJGhpDMqiDmW/Ssr7NmvU9isr2SCzc0w=; b=olLux41gkg1cj2Da1pLPPxr/MooM9ZVOBgfkpdqPoV+P3sAFesK+2J1f4QcR61I8lw jeaO+O5itg/+JInIVLQJAW2z5A54pxbzQOQu4lC0MF/u6+TC5EyZ1j4mTq1ICsAQnWSn zZ2e6u268/VFNCoZNlGTThjR2WW9x3WhkHFID0NTUWwgZDfamAwECtlZ7MhVrPOGJVzB p2JUNx1JdgWHN59508j70UpNEjnFPjbrmj7swFcDknwLGJ8DjLELWyhUMI74D907QVZV Xl+EdLTuWk8Q2HaqvGf0+EoZus/CGwFaZ1d439sUOwc4CypSj/MG58bJ3uSCMB81oTV9 JVog== X-Gm-Message-State: APjAAAXtoDPv4oEjyRiFEN8+IQuIi/CMYeb8LspeTttKm2O7wwNhl9r5 8Vve56EqVz+IdNUQhJUqShIwU8cJCP/3yA== X-Google-Smtp-Source: APXvYqxWVpXt/Qc0C0cAUMlzaVQmPeT7b7SzY5KpY5MsUpZ+UblLnhPUVoKTy2oNPFEsWfnK6ebi3g== X-Received: by 2002:a1c:a512:: with SMTP id o18mr11419892wme.4.1574362257271; Thu, 21 Nov 2019 10:50:57 -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.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Nov 2019 10:50:56 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Thu, 21 Nov 2019 18:50:46 +0000 Message-Id: <20191121185049.16666-6-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191121185049.16666-1-liuwe@microsoft.com> References: <20191121185049.16666-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 5/8] 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: Paul Durrant Acked-by: Jan Beulich --- Changes in v4: 1. Use xg_ prefix instead. 2. Drop Roger's review tag. --- 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 1e37086518..0f5b5267c5 100644 --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -93,7 +93,7 @@ static void map_shared_info(void) unsigned int i; unsigned long rc; - if ( hypervisor_alloc_unused_page(&mfn) ) + if ( xg_alloc_unused_page(&mfn) ) panic("unable to reserve shared info memory page\n"); xatp.gpfn = mfn_x(mfn); @@ -280,7 +280,7 @@ void hypervisor_ap_setup(void) init_evtchn(); } -int hypervisor_alloc_unused_page(mfn_t *mfn) +int xg_alloc_unused_page(mfn_t *mfn) { unsigned long m; int rc; @@ -292,7 +292,7 @@ int hypervisor_alloc_unused_page(mfn_t *mfn) return rc; } -int hypervisor_free_unused_page(mfn_t mfn) +int xg_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 351da970ef..7a898fdbe5 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -742,7 +742,7 @@ static long pv_shim_grant_table_op(unsigned int cmd, }; mfn_t mfn; - rc = hypervisor_alloc_unused_page(&mfn); + rc = xg_alloc_unused_page(&mfn); if ( rc ) { gprintk(XENLOG_ERR, @@ -754,7 +754,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); + xg_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..01dc3ee6f6 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 xg_alloc_unused_page(mfn_t *mfn); +int xg_free_unused_page(mfn_t mfn); DECLARE_PER_CPU(unsigned int, vcpu_id); DECLARE_PER_CPU(struct vcpu_info *, vcpu_info);