From patchwork Mon Sep 30 15:00:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11166849 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 7010E112B for ; Mon, 30 Sep 2019 15:02:50 +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 4C16020679 for ; Mon, 30 Sep 2019 15:02:50 +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="W4jAwl1S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C16020679 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 1iExAv-0006EM-Vo; Mon, 30 Sep 2019 15:01:21 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iExAu-0006Da-A1 for xen-devel@lists.xenproject.org; Mon, 30 Sep 2019 15:01:20 +0000 X-Inumbo-ID: 1972c15a-e393-11e9-bf31-bc764e2007e4 Received: from mail-wm1-x32b.google.com (unknown [2a00:1450:4864:20::32b]) by localhost (Halon) with ESMTPS id 1972c15a-e393-11e9-bf31-bc764e2007e4; Mon, 30 Sep 2019 15:00:54 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id a6so13796336wma.5 for ; Mon, 30 Sep 2019 08:00:54 -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=+NBwsgPo14hF2SBE5SphMAPpppnQLhW6kJgfDwP7ses=; b=W4jAwl1SnUJ1WI6MrUDQ/d2/6Jtxu//of+9egZ5uC+FLUPmXrxVhgMEPVfNFRWU04j neni1af4BcOs1ZMbw8OPImHmR0jEso5MS+aIbjCkB/xf1xztqi3QdOoBd+k4B/jmeI/u VWaNN1ug65fQC8ARtCDGamj+5o3S1YWGq1zbxVsNqQtSSa6IKYMOqC8JJi4ee3OpXMlW AYdjTL1I0CxRgvHc3vf5JVuSUAMGrCovjBUQzvUtfi0bpb+cra6ORa8lKXZIc4fT2YBs 0nzf7OIkohWeRg+bz90lp9d9/Zi6zc4hWHc7qx/W7RQo6a6sPNW3Bv+xBmC7okNAcdqT 5+1Q== 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=+NBwsgPo14hF2SBE5SphMAPpppnQLhW6kJgfDwP7ses=; b=EOKtV3WBJ30WqhfuHko4z7q71/HQLShOS37BWMrrGn7dbpYfJ018ZGqk7gIk76Pmm8 8jfVSX/EkPFsDCvtSVuQ1BJ0AS+31KnrXLNkIs4kcPacySc0LJlUW4r7OVHu7OzBVwhp Si1T991eCerEq8+Wg/DVcrpKXkRtvahaQiAIIiknjTEOmO+G6qOdrxJXQkebjedN+9os LtREzZrscOWQCuenQzMNAgE3+5xBah4koDv4lqFOuGL8W0IMHoWCqf6Kg9BYeaEBkPJr cBbqE258xpHriGHKDHZnOBNfL50Q+Qt7yZma8b/BhzS10U0cv/wodlfpZEWZTzVqg/M5 EzEA== X-Gm-Message-State: APjAAAXLG8S1XgZ3DHUuyOAeoTX7SWhFf/XY5sPU5g8xN1r2jyxYMBEW jrPYvOGTxGgYGIYYAA8L/6QQt8RyTXw= X-Google-Smtp-Source: APXvYqzQzmzlaqThHgVzqWeq6cGav5gQKngdTV2wVijSIvjWxCcXYrj5dA/5iV/c64qp47zlqudevA== X-Received: by 2002:a1c:a516:: with SMTP id o22mr18764974wme.116.1569855653373; Mon, 30 Sep 2019 08:00:53 -0700 (PDT) Received: from debian.mshome.net (207.148.159.143.dyn.plus.net. [143.159.148.207]) by smtp.gmail.com with ESMTPSA id f143sm32870852wme.40.2019.09.30.08.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2019 08:00:52 -0700 (PDT) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Mon, 30 Sep 2019 16:00:40 +0100 Message-Id: <20190930150044.5734-7-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190930150044.5734-1-liuwe@microsoft.com> References: <20190930150044.5734-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH for-next v2 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);