diff mbox series

[v4,5/8] x86: rename hypervisor_{alloc, free}_unused_page

Message ID 20191121185049.16666-6-liuwe@microsoft.com (mailing list archive)
State Superseded
Headers show
Series Port Xen to Hyper-V | expand

Commit Message

Wei Liu Nov. 21, 2019, 6:50 p.m. UTC
They are used in Xen code only.

No functional change.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
---
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(-)

Comments

Paul Durrant Nov. 22, 2019, 10:57 a.m. UTC | #1
> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Wei
> Liu
> Sent: 21 November 2019 19:51
> To: Xen Development List <xen-devel@lists.xenproject.org>
> Cc: Wei Liu <liuwe@microsoft.com>; Wei Liu <wl@xen.org>; Andrew Cooper
> <andrew.cooper3@citrix.com>; Michael Kelley <mikelley@microsoft.com>; Jan
> Beulich <jbeulich@suse.com>; Roger Pau Monné <roger.pau@citrix.com>
> Subject: [Xen-devel] [PATCH v4 5/8] x86: rename hypervisor_{alloc,
> free}_unused_page
> 
> They are used in Xen code only.
> 
> No functional change.
> 
> Signed-off-by: Wei Liu <liuwe@microsoft.com>

Reviewed-by: Paul Durrant <pdurrant@amazon.com>

> ---
> 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);
> --
> 2.20.1
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xenproject.org
> https://lists.xenproject.org/mailman/listinfo/xen-devel
Jan Beulich Nov. 29, 2019, 1:39 p.m. UTC | #2
On 22.11.2019 11:57,  Durrant, Paul  wrote:
>> -----Original Message-----
>> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of Wei
>> Liu
>> Sent: 21 November 2019 19:51
>> To: Xen Development List <xen-devel@lists.xenproject.org>
>> Cc: Wei Liu <liuwe@microsoft.com>; Wei Liu <wl@xen.org>; Andrew Cooper
>> <andrew.cooper3@citrix.com>; Michael Kelley <mikelley@microsoft.com>; Jan
>> Beulich <jbeulich@suse.com>; Roger Pau Monné <roger.pau@citrix.com>
>> Subject: [Xen-devel] [PATCH v4 5/8] x86: rename hypervisor_{alloc,
>> free}_unused_page
>>
>> They are used in Xen code only.
>>
>> No functional change.
>>
>> Signed-off-by: Wei Liu <liuwe@microsoft.com>
> 
> Reviewed-by: Paul Durrant <pdurrant@amazon.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
diff mbox series

Patch

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);