The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Juergen Gross <jgross@suse.com>
Cc: linux-kernel@vger.kernel.org,
	Stefano Stabellini <sstabellini@kernel.org>,
	 Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>,
	 xen-devel@lists.xenproject.org
Subject: Re: [PATCH 3/4] xen: Drop CONFIG_XEN_AUTO_XLATE
Date: Wed, 5 Aug 2026 15:47:06 -0700 (PDT)	[thread overview]
Message-ID: <fcdf9321-c4bf-216e-7be9-395ba0f20df4@kernel.org> (raw)
In-Reply-To: <20260805082137.1214967-4-jgross@suse.com>

On Wed, 5 Aug 2026, Juergen Gross wrote:
> CONFIG_XEN_AUTO_XLATE is referenced only in code built with CONFIG_XEN
> enabled. As it is enabled for all architectures supporting Xen, it can
> be just dropped.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>

> ---
>  drivers/xen/Kconfig   |  6 ------
>  drivers/xen/Makefile  |  2 +-
>  drivers/xen/privcmd.c |  4 ++--
>  include/xen/xen-ops.h | 22 ----------------------
>  4 files changed, 3 insertions(+), 31 deletions(-)
> 
> diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig
> index cfb517cd77dc..32e35a8580ee 100644
> --- a/drivers/xen/Kconfig
> +++ b/drivers/xen/Kconfig
> @@ -309,12 +309,6 @@ config XEN_EFI
>  	def_bool y
>  	depends on (ARM || ARM64 || X86_64) && EFI
>  
> -config XEN_AUTO_XLATE
> -	def_bool y
> -	depends on ARM || ARM64 || X86
> -	help
> -	  Support for auto-translated physmap guests.
> -
>  config XEN_ACPI
>  	def_bool y
>  	depends on X86 && ACPI
> diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
> index c0503f1c7d5b..6ce2e2a52d47 100644
> --- a/drivers/xen/Makefile
> +++ b/drivers/xen/Makefile
> @@ -2,6 +2,7 @@
>  obj-$(CONFIG_HOTPLUG_CPU)		+= cpu_hotplug.o
>  obj-y	+= grant-table.o features.o balloon.o manage.o time.o
>  obj-y	+= mem-reservation.o
> +obj-y	+= xlate_mmu.o
>  obj-y	+= events/
>  obj-y	+= xenbus/
>  
> @@ -29,7 +30,6 @@ obj-$(CONFIG_XEN_PRIVCMD)		+= xen-privcmd.o
>  obj-$(CONFIG_XEN_ACPI_PROCESSOR)	+= xen-acpi-processor.o
>  obj-$(CONFIG_XEN_EFI)			+= efi.o
>  obj-$(CONFIG_XEN_SCSI_BACKEND)		+= xen-scsiback.o
> -obj-$(CONFIG_XEN_AUTO_XLATE)		+= xlate_mmu.o
>  obj-$(CONFIG_XEN_PVCALLS_BACKEND)	+= pvcalls-back.o
>  obj-$(CONFIG_XEN_PVCALLS_FRONTEND)	+= pvcalls-front.o
>  xen-evtchn-y				:= evtchn.o
> diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c
> index 725a49a0eee7..7cfc28f1bb86 100644
> --- a/drivers/xen/privcmd.c
> +++ b/drivers/xen/privcmd.c
> @@ -794,7 +794,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file,
>  		goto out;
>  	}
>  
> -	if (IS_ENABLED(CONFIG_XEN_AUTO_XLATE) && !xen_pv_domain()) {
> +	if (!xen_pv_domain()) {
>  		unsigned int nr = DIV_ROUND_UP(kdata.num, XEN_PFN_PER_PAGE);
>  		struct page **pages;
>  		unsigned int i;
> @@ -825,7 +825,7 @@ static long privcmd_ioctl_mmap_resource(struct file *file,
>  	if (rc)
>  		goto out;
>  
> -	if (IS_ENABLED(CONFIG_XEN_AUTO_XLATE) && !xen_pv_domain()) {
> +	if (!xen_pv_domain()) {
>  		rc = xen_remap_vma_range(vma, kdata.addr, kdata.num << PAGE_SHIFT);
>  	} else {
>  		unsigned int domid =
> diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
> index 496e6013c689..15e0c3f4b7bb 100644
> --- a/include/xen/xen-ops.h
> +++ b/include/xen/xen-ops.h
> @@ -59,7 +59,6 @@ static inline int xen_remap_pfn(struct vm_area_struct *vma, unsigned long addr,
>  
>  struct vm_area_struct;
>  
> -#ifdef CONFIG_XEN_AUTO_XLATE
>  int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
>  			      unsigned long addr,
>  			      xen_pfn_t *gfn, int nr,
> @@ -68,27 +67,6 @@ int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
>  			      struct page **pages);
>  int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma,
>  			      int nr, struct page **pages);
> -#else
> -/*
> - * These two functions are called from arch/x86/xen/mmu.c and so stubs
> - * are needed for a configuration not specifying CONFIG_XEN_AUTO_XLATE.
> - */
> -static inline int xen_xlate_remap_gfn_array(struct vm_area_struct *vma,
> -					    unsigned long addr,
> -					    xen_pfn_t *gfn, int nr,
> -					    int *err_ptr, pgprot_t prot,
> -					    unsigned int domid,
> -					    struct page **pages)
> -{
> -	return -EOPNOTSUPP;
> -}
> -
> -static inline int xen_xlate_unmap_gfn_range(struct vm_area_struct *vma,
> -					    int nr, struct page **pages)
> -{
> -	return -EOPNOTSUPP;
> -}
> -#endif
>  
>  int xen_remap_vma_range(struct vm_area_struct *vma, unsigned long addr,
>  			unsigned long len);
> -- 
> 2.55.0
> 

  parent reply	other threads:[~2026-08-05 22:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05  8:21 [PATCH 0/4] xen: cleanup config files Juergen Gross
2026-08-05  8:21 ` [PATCH 1/4] x86/xen: Remove redundant config dependency on X86_LOCAL_APIC Juergen Gross
2026-08-05  8:37   ` Jan Beulich
2026-08-05  8:40     ` Jan Beulich
2026-08-05  8:43       ` Andrew Cooper
2026-08-05 22:30   ` Stefano Stabellini
2026-08-05  8:21 ` [PATCH 2/4] xen: Drop CONFIG_XEN_PVHVM Juergen Gross
2026-08-05  8:28   ` Andrew Cooper
2026-08-05  8:36     ` Juergen Gross
2026-08-06  1:51       ` Jason Andryuk
2026-08-05 22:45   ` Stefano Stabellini
2026-08-05  8:21 ` [PATCH 3/4] xen: Drop CONFIG_XEN_AUTO_XLATE Juergen Gross
2026-08-05  8:42   ` Jan Beulich
2026-08-05  8:56     ` Juergen Gross
2026-08-05 22:47   ` Stefano Stabellini [this message]
2026-08-05  8:21 ` [PATCH 4/4] x86/xen: Drop CONFIG_XEN_PVHVM_SMP Juergen Gross
2026-08-05  8:44   ` Jan Beulich
2026-08-05  8:55     ` Juergen Gross
2026-08-05  9:04       ` Jan Beulich
2026-08-05  9:44         ` Jürgen Groß
2026-08-05  9:55           ` Jan Beulich
2026-08-05 22:49   ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fcdf9321-c4bf-216e-7be9-395ba0f20df4@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_tyshchenko@epam.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox