From patchwork Sat Nov 30 11:57:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11267939 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 406BE112B for ; Sat, 30 Nov 2019 11:58:53 +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 1CC512075A for ; Sat, 30 Nov 2019 11:58:53 +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="EhscjL2O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CC512075A 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 1ib1O4-0004s3-KY; Sat, 30 Nov 2019 11:58:08 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ib1O3-0004rU-L6 for xen-devel@lists.xenproject.org; Sat, 30 Nov 2019 11:58:07 +0000 X-Inumbo-ID: 9f9f7372-1368-11ea-9db0-bc764e2007e4 Received: from mail-wr1-x444.google.com (unknown [2a00:1450:4864:20::444]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 9f9f7372-1368-11ea-9db0-bc764e2007e4; Sat, 30 Nov 2019 11:57:46 +0000 (UTC) Received: by mail-wr1-x444.google.com with SMTP id j42so12278316wrj.12 for ; Sat, 30 Nov 2019 03:57:46 -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=aF2MOBbI22XVZVTeoITRt1VPD08a0otFAVUzMFsLzLw=; b=EhscjL2OLRAUEsuFjy4BwU6j3iZDmJU4YtLQCTDrquzlUMcun0QEPXMlNh2XCr3fbW 0W64blpl/0ANBCAVOQSUTLAy5OvRzA470Dtkx4Ukm9piySJztNerm9g5vqUaFLLQFftn jANKun1A9JAb+gFg6wUNg7tG5Gzz4T6Ldh/x1tSuBZvfLV1F8D1cmUkinpQRZ8CSxAO/ GMwHgtQJ1/fQERkzKB80EtuHGFY3CWzGLeS6dNjlFfSXQDK2eqhv1BL+uuDABMwV9orV qj+m3ItFXODJuJc8RHjGkGxkppKU2LVfKyDPpp2Ync3XTqDzo6ebFnwtKZsEUC0x5n9U u5sA== 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=aF2MOBbI22XVZVTeoITRt1VPD08a0otFAVUzMFsLzLw=; b=a5w+/6LbcOTuwJbsfo+fH6tyKYsB73oGJ5VrfoHPzt+Fui8hhq26Ca8Uu4nvVVlol2 sfGUKwHud4wxDozTvtcKqlasx4wSMbl1O0+FgPb2bKbHk0GaJKdMUfGXhCM/EoduYFA2 hz1Geh8ylrmRBl9nMI57/YWupQtLlvP7cpr10WMrzOiGr0ScMB3JGarGJouSiYMTPWD/ pc8ExSDfpwGVTF8bglEocQJY8RsxVdOb18kQ01ewaZsDH8snfmpurwc/J+528mYGrOcN IJu0mfEyyjDFPFmlpKWEynp7u0WlIiEtyaCHVmGN3DfGbeWw/dOOgxERnl7xLY7x3GH/ GiXA== X-Gm-Message-State: APjAAAXl5ty27agawNN6DTkFf00JMNl3hoGrQfHeCYn3Z49KBudETSC/ dGakQqbex5xHgzKCA1ufu5oLh4+JM+g= X-Google-Smtp-Source: APXvYqz8VMnDwshl771gOfNO0EHtBNEMv7fqxpNtF8QTMEb2oQ2b0lnVLXvLf+eGTZQcD2ZzfUAhJA== X-Received: by 2002:a5d:6089:: with SMTP id w9mr13591842wrt.228.1575115065819; Sat, 30 Nov 2019 03:57:45 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 03:57:45 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Sat, 30 Nov 2019 11:57:34 +0000 Message-Id: <20191130115737.15752-6-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191130115737.15752-1-liuwe@microsoft.com> References: <20191130115737.15752-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v5 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 , Paul Durrant , 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 --- 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);