[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MINIOS PATCH v3 3/5] remove file type FTYPE_XC



Juergen Gross, le dim. 16 janv. 2022 07:45:25 +0100, a ecrit:
> The only reason for the file type FTYPE_XC has been gone long time
> ago: it was needed for xc_map_foreign_bulk(), which has been switched
> to use libxenforeignmemory and doesn't need this special file any
> more.
> 
> So remove everything related to FTYPE_XC.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

> ---
> V2:
> - new patch
> V3:
> - moved patch in series (Andrew Cooper)
> ---
>  Config.mk                     |  1 -
>  arch/x86/testbuild/all-no     |  1 -
>  arch/x86/testbuild/all-yes    |  1 -
>  arch/x86/testbuild/newxen-yes |  1 -
>  include/lib.h                 |  1 -
>  lib/sys.c                     | 13 -------------
>  6 files changed, 18 deletions(-)
> 
> diff --git a/Config.mk b/Config.mk
> index 5e660891..1e083881 100644
> --- a/Config.mk
> +++ b/Config.mk
> @@ -197,7 +197,6 @@ CONFIG-n += CONFIG_PARAVIRT
>  endif
>  # Support legacy CONFIG_XC value
>  CONFIG_XC ?= $(libc)
> -CONFIG-$(CONFIG_XC) += CONFIG_LIBXENCTRL
>  CONFIG-$(CONFIG_XC) += CONFIG_LIBXENEVTCHN
>  CONFIG-$(CONFIG_XC) += CONFIG_LIBXENGNTTAB
>  
> diff --git a/arch/x86/testbuild/all-no b/arch/x86/testbuild/all-no
> index 7972ecd5..d6fc2608 100644
> --- a/arch/x86/testbuild/all-no
> +++ b/arch/x86/testbuild/all-no
> @@ -13,7 +13,6 @@ CONFIG_FBFRONT = n
>  CONFIG_KBDFRONT = n
>  CONFIG_CONSFRONT = n
>  CONFIG_XENBUS = n
> -CONFIG_LIBXENCTRL = n
>  CONFIG_LIBXENEVTCHN = n
>  CONFIG_LIBXENGNTTAB = n
>  CONFIG_LWIP = n
> diff --git a/arch/x86/testbuild/all-yes b/arch/x86/testbuild/all-yes
> index bc8eea57..98bbfebf 100644
> --- a/arch/x86/testbuild/all-yes
> +++ b/arch/x86/testbuild/all-yes
> @@ -16,7 +16,6 @@ CONFIG_XENBUS = y
>  CONFIG_BALLOON = y
>  CONFIG_USE_XEN_CONSOLE = y
>  # The following are special: they need support from outside
> -CONFIG_LIBXENCTRL = n
>  CONFIG_LIBXENEVTCHN = n
>  CONFIG_LIBXENGNTTAB = n
>  CONFIG_LWIP = n
> diff --git a/arch/x86/testbuild/newxen-yes b/arch/x86/testbuild/newxen-yes
> index f72123b5..06032004 100644
> --- a/arch/x86/testbuild/newxen-yes
> +++ b/arch/x86/testbuild/newxen-yes
> @@ -17,7 +17,6 @@ CONFIG_BALLOON = y
>  CONFIG_USE_XEN_CONSOLE = y
>  XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
>  # The following are special: they need support from outside
> -CONFIG_LIBXENCTRL = n
>  CONFIG_LIBXENEVTCHN = n
>  CONFIG_LIBXENGNTTAB = n
>  CONFIG_LWIP = n
> diff --git a/include/lib.h b/include/lib.h
> index 7a0546bd..7ca90768 100644
> --- a/include/lib.h
> +++ b/include/lib.h
> @@ -159,7 +159,6 @@ enum fd_type {
>      FTYPE_CONSOLE,
>      FTYPE_FILE,
>      FTYPE_XENBUS,
> -    FTYPE_XC,
>      FTYPE_EVTCHN,
>      FTYPE_GNTMAP,
>      FTYPE_SOCKET,
> diff --git a/lib/sys.c b/lib/sys.c
> index 7df77cc6..a24687b7 100644
> --- a/lib/sys.c
> +++ b/lib/sys.c
> @@ -87,7 +87,6 @@
>      }
>  
>  #define NOFILE 32
> -extern void minios_interface_close_fd(int fd);
>  extern void minios_evtchn_close_fd(int fd);
>  extern void minios_gnttab_close_fd(int fd);
>  
> @@ -443,11 +442,6 @@ int close(int fd)
>              res = lwip_close(files[fd].fd);
>              break;
>  #endif
> -#ifdef CONFIG_LIBXENCTRL
> -     case FTYPE_XC:
> -         minios_interface_close_fd(fd);
> -            break;
> -#endif
>  #ifdef CONFIG_LIBXENEVTCHN
>       case FTYPE_EVTCHN:
>           minios_evtchn_close_fd(fd);
> @@ -651,7 +645,6 @@ static const char file_types[] = {
>      [FTYPE_NONE]     = 'N',
>      [FTYPE_CONSOLE]  = 'C',
>      [FTYPE_XENBUS]   = 'S',
> -    [FTYPE_XC]               = 'X',
>      [FTYPE_EVTCHN]   = 'E',
>      [FTYPE_SOCKET]   = 's',
>      [FTYPE_TAP]              = 'T',
> @@ -1383,12 +1376,6 @@ void *mmap(void *start, size_t length, int prot, int 
> flags, int fd, off_t offset
>  
>      if (fd == -1)
>          return map_zero(n, 1);
> -#ifdef CONFIG_LIBXENCTRL
> -    else if (files[fd].type == FTYPE_XC) {
> -        unsigned long zero = 0;
> -        return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, NULL, 0);
> -    }
> -#endif
>      else if (files[fd].type == FTYPE_MEM) {
>          unsigned long first_mfn = offset >> PAGE_SHIFT;
>          return map_frames_ex(&first_mfn, n, 0, 1, 1, DOMID_IO, NULL, 
> _PAGE_PRESENT|_PAGE_RW);
> -- 
> 2.26.2
> 

-- 
Samuel
$ du temp.iso 
2,0T    temp.iso
$ ls temp.iso -l
-r-xr-xr-x    1 samy     thibault      16E 2003-03-22 14:44 temp.iso*
 -+- je vous dirai pas la marque de mon disque dur, na :p -+- 



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.