Skip to contentSkip to conversation

update the xen config fragments

PATCH Applied Lukas Bulwahn 4 participants 13 messages Aug 10, 2022 – Aug 17, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover update the xen config fragments

Dear xen maintainers,

here are three patches to update the xen config fragments to the currently existing configs.

The fourth patch is just an addition to MAINTAINERS that I saw reasonable after get_maintainers did not point to the XEN subsystem.

It applies cleanly on next-20220810.

Lukas

Lukas Bulwahn (4):
xen: x86: set the config XEN_512GB after config change
xen: remove XEN_SCRUB_PAGES in xen.config
xen: move XEN_BALLOON_MEMORY_HOTPLUG to generic config
MAINTAINERS: add xen config fragments to XEN HYPERVISOR sections

 MAINTAINERS                 | 2 ++
 arch/x86/configs/xen.config | 5 +----
 kernel/configs/xen.config   | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/4 xen: x86: set the config XEN_512GB after config change

Commit c70727a5bc18 ("xen: allow more than 512 GB of RAM for 64 bit pv-domains") from July 2015 replaces the config XEN_MAX_DOMAIN_MEMORY with a new config XEN_512GB, but misses to adjust arch/x86/configs/xen.config.

Adjust this config fragment now.

---
 arch/x86/configs/xen.config | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/configs/xen.config +1 -1
index d9fc7139fd46..8a6c88f48e75 100644
@@ -14,7 +14,7 @@ CONFIG_CPU_FREQ=y
 
 # x86 xen specific config options
 CONFIG_XEN_PVH=y
-CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_512GB=y
 CONFIG_XEN_SAVE_RESTORE=y
 # CONFIG_XEN_DEBUG_FS is not set
 CONFIG_XEN_MCE_LOG=y
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 1/4] xen: x86: set the config XEN_512GB after config change

arch/x86/configs/xen.config CONFIG_CPU_FREQ=y · line 17

Quoted 8 lines · Lukas Bulwahn
arch/x86/configs/xen.config +1 -1
@@ -14,7 +14,7 @@ CONFIG_CPU_FREQ=y
 
 # x86 xen specific config options
 CONFIG_XEN_PVH=y
-CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_512GB=y

Does this actually need setting here? The option's default is y, so it ought to be turned on "automatically". Hence I think it's only the stale line which wants deleting.

Jan

#3 lore raw

Re: [PATCH 1/4] xen: x86: set the config XEN_512GB after config change

Quoted 6 lines · Jan Beulich
Quoted 4 lines · Lukas Bulwahn
arch/x86/configs/xen.config +0 -0
@@ -14,7 +14,7 @@ CONFIG_CPU_FREQ=y
 
Quoted 9 lines

arch/x86/configs/xen.config CONFIG_CPU_FREQ=y · line 17

Quoted 4 lines
arch/x86/configs/xen.config +1 -1
 # x86 xen specific config options
 CONFIG_XEN_PVH=y
-CONFIG_XEN_MAX_DOMAIN_MEMORY=500
+CONFIG_XEN_512GB=y

Does this actually need setting here? The option's default is y, so it ought to be turned on "automatically". Hence I think it's only the stale line which wants deleting.

Jan, that makes sense. I will send a patch v2 to do so.

Lukas

#4 lore raw

PATCH 2/4 xen: remove XEN_SCRUB_PAGES in xen.config

In reply to Lukas Bulwahn

Commit 197ecb3802c0 ("xen/balloon: add runtime control for scrubbing ballooned out pages") changed config XEN_SCRUB_PAGES to config XEN_SCRUB_PAGES_DEFAULT. As xen.config sets 'XEN_BALLOON=y' and XEN_SCRUB_PAGES_DEFAULT defaults to yes, there is no further need to set this config in the xen.config file.

Remove setting XEN_SCRUB_PAGES in xen.config, which is without effect since the commit above anyway.

---
 kernel/configs/xen.config | 1 -
 1 file changed, 1 deletion(-)
kernel/configs/xen.config +0 -1
index ff756221f112..436f806aa1ed 100644
@@ -34,7 +34,6 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
 CONFIG_XEN_SCSI_FRONTEND=m
 # others
 CONFIG_XEN_BALLOON=y
-CONFIG_XEN_SCRUB_PAGES=y
 CONFIG_XEN_DEV_EVTCHN=m
 CONFIG_XEN_BLKDEV_FRONTEND=m
 CONFIG_XEN_NETDEV_FRONTEND=m
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] xen: remove XEN_SCRUB_PAGES in xen.config

Quoted 10 lines · Lukas Bulwahn

Commit 197ecb3802c0 ("xen/balloon: add runtime control for scrubbing ballooned out pages") changed config XEN_SCRUB_PAGES to config XEN_SCRUB_PAGES_DEFAULT. As xen.config sets 'XEN_BALLOON=y' and XEN_SCRUB_PAGES_DEFAULT defaults to yes, there is no further need to set this config in the xen.config file.

Remove setting XEN_SCRUB_PAGES in xen.config, which is without effect since the commit above anyway.

Juergen

maintainer Applied
#6 lore raw

Re: [PATCH 2/4] xen: remove XEN_SCRUB_PAGES in xen.config

In reply to Lukas Bulwahn
Quoted 10 lines · Lukas Bulwahn

Commit 197ecb3802c0 ("xen/balloon: add runtime control for scrubbing ballooned out pages") changed config XEN_SCRUB_PAGES to config XEN_SCRUB_PAGES_DEFAULT. As xen.config sets 'XEN_BALLOON=y' and XEN_SCRUB_PAGES_DEFAULT defaults to yes, there is no further need to set this config in the xen.config file.

Remove setting XEN_SCRUB_PAGES in xen.config, which is without effect since the commit above anyway.

Pushed to xen/tip.git for-linus-6.0

Juergen

#7 lore raw

PATCH 3/4 xen: move XEN_BALLOON_MEMORY_HOTPLUG to generic config

In reply to Lukas Bulwahn

While reviewing arch/x86/configs/xen.config, I noticed the following note in this file:

'# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet, '# move to generic config if it ever does. CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y

Commit 6c6685055a28 ("kconfig: add xenconfig defconfig helper") in June 2015 adds this note. Fortunately, commit 4ab215061554 ("arm64: Add memory hotplug support") from December 2018 adds the memory hotplug in arm64, so the precondition of this note above is now met.

Move setting the config XEN_BALLOON_MEMORY_HOTPLUG into the generic xen.config now.

---
 arch/x86/configs/xen.config | 3 ---
 kernel/configs/xen.config   | 1 +
 2 files changed, 1 insertion(+), 3 deletions(-)
arch/x86/configs/xen.config +0 -3
index 8a6c88f48e75..024817bc4f0e 100644
@@ -23,6 +23,3 @@ CONFIG_XEN_ACPI_PROCESSOR=m
 CONFIG_XEN_PCIDEV_BACKEND=m
 # x86 specific frontend drivers
 CONFIG_XEN_PCIDEV_FRONTEND=m
-# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
-# move to generic config if it ever does.
-CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
kernel/configs/xen.config +1 -0
index 436f806aa1ed..ea84d5b3122d 100644
@@ -34,6 +34,7 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
 CONFIG_XEN_SCSI_FRONTEND=m
 # others
 CONFIG_XEN_BALLOON=y
+CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
 CONFIG_XEN_DEV_EVTCHN=m
 CONFIG_XEN_BLKDEV_FRONTEND=m
 CONFIG_XEN_NETDEV_FRONTEND=m
Signature · 1 line
2.17.1
#8 lore raw

Re: [PATCH 3/4] xen: move XEN_BALLOON_MEMORY_HOTPLUG to generic config

On 10.08.22 08:07, Lukas Bulwahn wrote:

Hello Lukas, all

Quoted 7 lines

While reviewing arch/x86/configs/xen.config, I noticed the following note in this file:

'# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet, '# move to generic config if it ever does. CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y

Quoted 7 lines

Commit 6c6685055a28 ("kconfig: add xenconfig defconfig helper") in June 2015 adds this note. Fortunately, commit 4ab215061554 ("arm64: Add memory hotplug support") from December 2018 adds the memory hotplug in arm64, so the precondition of this note above is now met.

Move setting the config XEN_BALLOON_MEMORY_HOTPLUG into the generic xen.config now.

I might have missed something but I have never heard of anyone using XEN_BALLOON_MEMORY_HOTPLUG on Arm.

Looking into the code, I am afraid, CONFIG_XEN_BALLOON_MEMORY_HOTPLUG won't be functional on Arm without reworking resource allocation logic in drivers/xen/ballon.c at least, since system "iomem_resource" cannot be used on Arm to allocate unused memory region(s), please see additional_memory_resource(). I might be wrong, but it feels to me that here we would need a similar logic like in drivers/xen/unpopulated-alloc.c which is functional on Arm since it uses specific Xen resource (on x86 it is just an iomem_resource, but on Arm it contains provided by the hypervisor extended regions).

I am not aware of anyone working on it, so I wouldn't enable that support on Arm by default until the code is updated.

Quoted 30 lines
---
  arch/x86/configs/xen.config | 3 ---
  kernel/configs/xen.config   | 1 +
  2 files changed, 1 insertion(+), 3 deletions(-)
arch/x86/configs/xen.config +0 -3
index 8a6c88f48e75..024817bc4f0e 100644
@@ -23,6 +23,3 @@ CONFIG_XEN_ACPI_PROCESSOR=m
  CONFIG_XEN_PCIDEV_BACKEND=m
  # x86 specific frontend drivers
  CONFIG_XEN_PCIDEV_FRONTEND=m
-# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
-# move to generic config if it ever does.
-CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
kernel/configs/xen.config +1 -0
index 436f806aa1ed..ea84d5b3122d 100644
@@ -34,6 +34,7 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
  CONFIG_XEN_SCSI_FRONTEND=m
  # others
  CONFIG_XEN_BALLOON=y
+CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
  CONFIG_XEN_DEV_EVTCHN=m
  CONFIG_XEN_BLKDEV_FRONTEND=m
  CONFIG_XEN_NETDEV_FRONTEND=m
Signature · 3 lines
Regards,

Oleksandr Tyshchenko
#9 lore raw

Re: [PATCH 3/4] xen: move XEN_BALLOON_MEMORY_HOTPLUG to generic config

Quoted 35 lines · Oleksandr Tyshchenko

On 10.08.22 08:07, Lukas Bulwahn wrote:

Hello Lukas, all

Quoted 7 lines

While reviewing arch/x86/configs/xen.config, I noticed the following note in this file:

'# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet, '# move to generic config if it ever does. CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y

Quoted 7 lines

Commit 6c6685055a28 ("kconfig: add xenconfig defconfig helper") in June 2015 adds this note. Fortunately, commit 4ab215061554 ("arm64: Add memory hotplug support") from December 2018 adds the memory hotplug in arm64, so the precondition of this note above is now met.

Move setting the config XEN_BALLOON_MEMORY_HOTPLUG into the generic xen.config now.

I might have missed something but I have never heard of anyone using XEN_BALLOON_MEMORY_HOTPLUG on Arm.

Looking into the code, I am afraid, CONFIG_XEN_BALLOON_MEMORY_HOTPLUG won't be functional on Arm without reworking resource allocation logic in drivers/xen/ballon.c at least, since system "iomem_resource" cannot be used on Arm to allocate unused memory region(s), please see additional_memory_resource(). I might be wrong, but it feels to me that here we would need a similar logic like in drivers/xen/unpopulated-alloc.c which is functional on Arm since it uses specific Xen resource (on x86 it is just an iomem_resource, but on Arm it contains provided by the hypervisor extended regions).

Quoted 3 lines

I am not aware of anyone working on it, so I wouldn't enable that support on Arm by default until the code is updated.

Thanks for the in-depth investigation and explanation. For now, let us drop this patch here and keep the configs as they are.

Lukas

#10 lore raw

PATCH 4/4 MAINTAINERS: add xen config fragments to XEN HYPERVISOR sections

In reply to Lukas Bulwahn

Make changes to the xen config fragments reach the XEN HYPERVISOR maintainers and mailing list.

---
 MAINTAINERS | 2 ++
 1 file changed, 2 insertions(+)
MAINTAINERS +2 -0
index ee2098fc6f7c..6c2516b3da21 100644
@@ -22217,12 +22217,14 @@ F:	drivers/*/xen-*front.c
 F:	drivers/xen/
 F:	include/uapi/xen/
 F:	include/xen/
+F:	kernel/configs/xen.config
 
 XEN HYPERVISOR X86
 M:	Juergen Gross <[email protected]>
 R:	Boris Ostrovsky <[email protected]>
 L:	[email protected] (moderated for non-subscribers)
 S:	Supported
+F:	arch/x86/configs/xen.config
 F:	arch/x86/include/asm/pvclock-abi.h
 F:	arch/x86/include/asm/xen/
 F:	arch/x86/platform/pvh/
Signature · 1 line
2.17.1