hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/xen/Kconfig
....@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 menu "Xen driver support"
23 depends on XEN
34
....@@ -9,31 +10,18 @@
910 the system to expand the domain's memory allocation, or alternatively
1011 return unneeded memory to the system.
1112
12
-config XEN_SELFBALLOONING
13
- bool "Dynamically self-balloon kernel memory to target"
14
- depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
15
- default n
16
- help
17
- Self-ballooning dynamically balloons available kernel memory driven
18
- by the current usage of anonymous memory ("committed AS") and
19
- controlled by various sysfs-settable parameters. Configuring
20
- FRONTSWAP is highly recommended; if it is not configured, self-
21
- ballooning is disabled by default. If FRONTSWAP is configured,
22
- frontswap-selfshrinking is enabled by default but can be disabled
23
- with the 'tmem.selfshrink=0' kernel boot parameter; and self-ballooning
24
- is enabled by default but can be disabled with the 'tmem.selfballooning=0'
25
- kernel boot parameter. Note that systems without a sufficiently
26
- large swap device should not enable self-ballooning.
27
-
2813 config XEN_BALLOON_MEMORY_HOTPLUG
2914 bool "Memory hotplug support for Xen balloon driver"
30
- default n
3115 depends on XEN_BALLOON && MEMORY_HOTPLUG
16
+ default y
3217 help
3318 Memory hotplug support for Xen balloon driver allows expanding memory
3419 available for the system above limit declared at system startup.
3520 It is very useful on critical systems which require long
3621 run without rebooting.
22
+
23
+ It's also very useful for non PV domains to obtain unpopulated physical
24
+ memory ranges to use in order to map foreign memory or grants.
3725
3826 Memory could be hotplugged in following steps:
3927
....@@ -62,13 +50,11 @@
6250
6351 SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"
6452
65
-config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT
53
+config XEN_MEMORY_HOTPLUG_LIMIT
6654 int "Hotplugged memory limit (in GiB) for a PV guest"
67
- default 512 if X86_64
68
- default 4 if X86_32
69
- range 0 64 if X86_32
55
+ default 512
7056 depends on XEN_HAVE_PVMMU
71
- depends on XEN_BALLOON_MEMORY_HOTPLUG
57
+ depends on MEMORY_HOTPLUG
7258 help
7359 Maxmium amount of memory (in GiB) that a PV guest can be
7460 expanded to when using memory hotplug.
....@@ -86,7 +72,7 @@
8672 help
8773 Scrub pages before returning them to the system for reuse by
8874 other domains. This makes sure that any confidential data
89
- is not accidentally visible to other domains. Is it more
75
+ is not accidentally visible to other domains. It is more
9076 secure, but slightly less efficient. This can be controlled with
9177 xen_scrub_pages=0 parameter and
9278 /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
....@@ -105,8 +91,7 @@
10591
10692 config XEN_BACKEND
10793 bool "Backend driver support"
108
- depends on XEN_DOM0
109
- default y
94
+ default XEN_DOM0
11095 help
11196 Support for backend device drivers that provide I/O services
11297 to other virtual machines.
....@@ -123,27 +108,27 @@
123108 If in doubt, say yes.
124109
125110 config XEN_COMPAT_XENFS
126
- bool "Create compatibility mount point /proc/xen"
127
- depends on XENFS
128
- default y
129
- help
130
- The old xenstore userspace tools expect to find "xenbus"
131
- under /proc/xen, but "xenbus" is now found at the root of the
132
- xenfs filesystem. Selecting this causes the kernel to create
133
- the compatibility mount point /proc/xen if it is running on
134
- a xen platform.
135
- If in doubt, say yes.
111
+ bool "Create compatibility mount point /proc/xen"
112
+ depends on XENFS
113
+ default y
114
+ help
115
+ The old xenstore userspace tools expect to find "xenbus"
116
+ under /proc/xen, but "xenbus" is now found at the root of the
117
+ xenfs filesystem. Selecting this causes the kernel to create
118
+ the compatibility mount point /proc/xen if it is running on
119
+ a xen platform.
120
+ If in doubt, say yes.
136121
137122 config XEN_SYS_HYPERVISOR
138
- bool "Create xen entries under /sys/hypervisor"
139
- depends on SYSFS
140
- select SYS_HYPERVISOR
141
- default y
142
- help
143
- Create entries under /sys/hypervisor describing the Xen
144
- hypervisor environment. When running native or in another
145
- virtual environment, /sys/hypervisor will still be present,
146
- but will have no xen contents.
123
+ bool "Create xen entries under /sys/hypervisor"
124
+ depends on SYSFS
125
+ select SYS_HYPERVISOR
126
+ default y
127
+ help
128
+ Create entries under /sys/hypervisor describing the Xen
129
+ hypervisor environment. When running native or in another
130
+ virtual environment, /sys/hypervisor will still be present,
131
+ but will have no xen contents.
147132
148133 config XEN_XENBUS_FRONTEND
149134 tristate
....@@ -192,15 +177,8 @@
192177
193178 config SWIOTLB_XEN
194179 def_bool y
180
+ select DMA_OPS
195181 select SWIOTLB
196
-
197
-config XEN_TMEM
198
- tristate
199
- depends on !ARM && !ARM64
200
- default m if (CLEANCACHE || FRONTSWAP)
201
- help
202
- Shim to interface in-kernel Transcendent Memory hooks
203
- (e.g. cleancache and frontswap) to Xen tmem hypercalls.
204182
205183 config XEN_PCIDEV_BACKEND
206184 tristate "Xen PCI-device backend driver"
....@@ -228,7 +206,6 @@
228206 config XEN_PVCALLS_FRONTEND
229207 tristate "XEN PV Calls frontend driver"
230208 depends on INET && XEN
231
- default n
232209 select XEN_XENBUS_FRONTEND
233210 help
234211 Experimental frontend for the Xen PV Calls protocol
....@@ -239,7 +216,6 @@
239216 config XEN_PVCALLS_BACKEND
240217 bool "XEN PV Calls backend driver"
241218 depends on INET && XEN && XEN_BACKEND
242
- default n
243219 help
244220 Experimental backend for the Xen PV Calls protocol
245221 (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
....@@ -265,7 +241,6 @@
265241 config XEN_STUB
266242 bool "Xen stub drivers"
267243 depends on XEN && X86_64 && BROKEN
268
- default n
269244 help
270245 Allow kernel to install stub drivers, to reserve space for Xen drivers,
271246 i.e. memory hotplug and cpu hotplug, and to block native drivers loaded,
....@@ -276,7 +251,6 @@
276251 config XEN_ACPI_HOTPLUG_MEMORY
277252 tristate "Xen ACPI memory hotplug"
278253 depends on XEN_DOM0 && XEN_STUB && ACPI
279
- default n
280254 help
281255 This is Xen ACPI memory hotplug.
282256
....@@ -288,7 +262,6 @@
288262 tristate "Xen ACPI cpu hotplug"
289263 depends on XEN_DOM0 && XEN_STUB && ACPI
290264 select ACPI_CONTAINER
291
- default n
292265 help
293266 Xen ACPI cpu enumerating and hotplugging
294267
....@@ -301,7 +274,7 @@
301274 depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ
302275 default m
303276 help
304
- This ACPI processor uploads Power Management information to the Xen
277
+ This ACPI processor uploads Power Management information to the Xen
305278 hypervisor.
306279
307280 To do that the driver parses the Power Management data and uploads
....@@ -310,20 +283,19 @@
310283 SMM so that other drivers (such as ACPI cpufreq scaling driver) will
311284 not load.
312285
313
- To compile this driver as a module, choose M here: the module will be
286
+ To compile this driver as a module, choose M here: the module will be
314287 called xen_acpi_processor If you do not know what to choose, select
315288 M here. If the CPUFREQ drivers are built in, select Y here.
316289
317290 config XEN_MCE_LOG
318291 bool "Xen platform mcelog"
319
- depends on XEN_DOM0 && X86_64 && X86_MCE
320
- default n
292
+ depends on XEN_DOM0 && X86_MCE
321293 help
322294 Allow kernel fetching MCE error from Xen platform and
323295 converting it into Linux mcelog format for mcelog tools
324296
325297 config XEN_HAVE_PVMMU
326
- bool
298
+ bool
327299
328300 config XEN_EFI
329301 def_bool y
....@@ -340,14 +312,27 @@
340312 depends on X86 && ACPI
341313
342314 config XEN_SYMS
343
- bool "Xen symbols"
344
- depends on X86 && XEN_DOM0 && XENFS
345
- default y if KALLSYMS
346
- help
347
- Exports hypervisor symbols (along with their types and addresses) via
348
- /proc/xen/xensyms file, similar to /proc/kallsyms
315
+ bool "Xen symbols"
316
+ depends on X86 && XEN_DOM0 && XENFS
317
+ default y if KALLSYMS
318
+ help
319
+ Exports hypervisor symbols (along with their types and addresses) via
320
+ /proc/xen/xensyms file, similar to /proc/kallsyms
349321
350322 config XEN_HAVE_VPMU
351
- bool
323
+ bool
324
+
325
+config XEN_FRONT_PGDIR_SHBUF
326
+ tristate
327
+
328
+config XEN_UNPOPULATED_ALLOC
329
+ bool "Use unpopulated memory ranges for guest mappings"
330
+ depends on X86 && ZONE_DEVICE
331
+ default XEN_BACKEND || XEN_GNTDEV || XEN_DOM0
332
+ help
333
+ Use unpopulated memory ranges in order to create mappings for guest
334
+ memory regions, including grant maps and foreign pages. This avoids
335
+ having to balloon out RAM regions in order to obtain physical memory
336
+ space to create such mappings.
352337
353338 endmenu