xref: /openbmc/linux/drivers/xen/Kconfig (revision b7019ac5)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "Xen driver support"
3	depends on XEN
4
5config XEN_BALLOON
6	bool "Xen memory balloon driver"
7	default y
8	help
9	  The balloon driver allows the Xen domain to request more memory from
10	  the system to expand the domain's memory allocation, or alternatively
11	  return unneeded memory to the system.
12
13config XEN_SELFBALLOONING
14	bool "Dynamically self-balloon kernel memory to target"
15	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
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
28config XEN_BALLOON_MEMORY_HOTPLUG
29	bool "Memory hotplug support for Xen balloon driver"
30	depends on XEN_BALLOON && MEMORY_HOTPLUG
31	help
32	  Memory hotplug support for Xen balloon driver allows expanding memory
33	  available for the system above limit declared at system startup.
34	  It is very useful on critical systems which require long
35	  run without rebooting.
36
37	  Memory could be hotplugged in following steps:
38
39	    1) target domain: ensure that memory auto online policy is in
40	       effect by checking /sys/devices/system/memory/auto_online_blocks
41	       file (should be 'online').
42
43	    2) control domain: xl mem-max <target-domain> <maxmem>
44	       where <maxmem> is >= requested memory size,
45
46	    3) control domain: xl mem-set <target-domain> <memory>
47	       where <memory> is requested memory size; alternatively memory
48	       could be added by writing proper value to
49	       /sys/devices/system/xen_memory/xen_memory0/target or
50	       /sys/devices/system/xen_memory/xen_memory0/target_kb on the
51	       target domain.
52
53	  Alternatively, if memory auto onlining was not requested at step 1
54	  the newly added memory can be manually onlined in the target domain
55	  by doing the following:
56
57		for i in /sys/devices/system/memory/memory*/state; do \
58		  [ "`cat "$i"`" = offline ] && echo online > "$i"; done
59
60	  or by adding the following line to udev rules:
61
62	  SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"
63
64config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT
65	int "Hotplugged memory limit (in GiB) for a PV guest"
66	default 512 if X86_64
67	default 4 if X86_32
68	range 0 64 if X86_32
69	depends on XEN_HAVE_PVMMU
70	depends on XEN_BALLOON_MEMORY_HOTPLUG
71	help
72	  Maxmium amount of memory (in GiB) that a PV guest can be
73	  expanded to when using memory hotplug.
74
75	  A PV guest can have more memory than this limit if is
76	  started with a larger maximum.
77
78	  This value is used to allocate enough space in internal
79	  tables needed for physical memory administration.
80
81config XEN_SCRUB_PAGES_DEFAULT
82	bool "Scrub pages before returning them to system by default"
83	depends on XEN_BALLOON
84	default y
85	help
86	  Scrub pages before returning them to the system for reuse by
87	  other domains.  This makes sure that any confidential data
88	  is not accidentally visible to other domains.  It is more
89	  secure, but slightly less efficient. This can be controlled with
90	  xen_scrub_pages=0 parameter and
91	  /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
92	  This option only sets the default value.
93
94	  If in doubt, say yes.
95
96config XEN_DEV_EVTCHN
97	tristate "Xen /dev/xen/evtchn device"
98	default y
99	help
100	  The evtchn driver allows a userspace process to trigger event
101	  channels and to receive notification of an event channel
102	  firing.
103	  If in doubt, say yes.
104
105config XEN_BACKEND
106	bool "Backend driver support"
107	default XEN_DOM0
108	help
109	  Support for backend device drivers that provide I/O services
110	  to other virtual machines.
111
112config XENFS
113	tristate "Xen filesystem"
114	select XEN_PRIVCMD
115	default y
116	help
117	  The xen filesystem provides a way for domains to share
118	  information with each other and with the hypervisor.
119	  For example, by reading and writing the "xenbus" file, guests
120	  may pass arbitrary information to the initial domain.
121	  If in doubt, say yes.
122
123config XEN_COMPAT_XENFS
124       bool "Create compatibility mount point /proc/xen"
125       depends on XENFS
126       default y
127       help
128         The old xenstore userspace tools expect to find "xenbus"
129         under /proc/xen, but "xenbus" is now found at the root of the
130         xenfs filesystem.  Selecting this causes the kernel to create
131         the compatibility mount point /proc/xen if it is running on
132         a xen platform.
133         If in doubt, say yes.
134
135config XEN_SYS_HYPERVISOR
136       bool "Create xen entries under /sys/hypervisor"
137       depends on SYSFS
138       select SYS_HYPERVISOR
139       default y
140       help
141         Create entries under /sys/hypervisor describing the Xen
142	 hypervisor environment.  When running native or in another
143	 virtual environment, /sys/hypervisor will still be present,
144	 but will have no xen contents.
145
146config XEN_XENBUS_FRONTEND
147	tristate
148
149config XEN_GNTDEV
150	tristate "userspace grant access device driver"
151	depends on XEN
152	default m
153	select MMU_NOTIFIER
154	help
155	  Allows userspace processes to use grants.
156
157config XEN_GNTDEV_DMABUF
158	bool "Add support for dma-buf grant access device driver extension"
159	depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC && DMA_SHARED_BUFFER
160	help
161	  Allows userspace processes and kernel modules to use Xen backed
162	  dma-buf implementation. With this extension grant references to
163	  the pages of an imported dma-buf can be exported for other domain
164	  use and grant references coming from a foreign domain can be
165	  converted into a local dma-buf for local export.
166
167config XEN_GRANT_DEV_ALLOC
168	tristate "User-space grant reference allocator driver"
169	depends on XEN
170	default m
171	help
172	  Allows userspace processes to create pages with access granted
173	  to other domains. This can be used to implement frontend drivers
174	  or as part of an inter-domain shared memory channel.
175
176config XEN_GRANT_DMA_ALLOC
177	bool "Allow allocating DMA capable buffers with grant reference module"
178	depends on XEN && HAS_DMA
179	help
180	  Extends grant table module API to allow allocating DMA capable
181	  buffers and mapping foreign grant references on top of it.
182	  The resulting buffer is similar to one allocated by the balloon
183	  driver in that proper memory reservation is made by
184	  ({increase|decrease}_reservation and VA mappings are updated if
185	  needed).
186	  This is useful for sharing foreign buffers with HW drivers which
187	  cannot work with scattered buffers provided by the balloon driver,
188	  but require DMAable memory instead.
189
190config SWIOTLB_XEN
191	def_bool y
192	select SWIOTLB
193
194config XEN_TMEM
195	tristate
196	depends on !ARM && !ARM64
197	default m if (CLEANCACHE || FRONTSWAP)
198	help
199	  Shim to interface in-kernel Transcendent Memory hooks
200	  (e.g. cleancache and frontswap) to Xen tmem hypercalls.
201
202config XEN_PCIDEV_BACKEND
203	tristate "Xen PCI-device backend driver"
204	depends on PCI && X86 && XEN
205	depends on XEN_BACKEND
206	default m
207	help
208	  The PCI device backend driver allows the kernel to export arbitrary
209	  PCI devices to other guests. If you select this to be a module, you
210	  will need to make sure no other driver has bound to the device(s)
211	  you want to make visible to other guests.
212
213	  The parameter "passthrough" allows you specify how you want the PCI
214	  devices to appear in the guest. You can choose the default (0) where
215	  PCI topology starts at 00.00.0, or (1) for passthrough if you want
216	  the PCI devices topology appear the same as in the host.
217
218	  The "hide" parameter (only applicable if backend driver is compiled
219	  into the kernel) allows you to bind the PCI devices to this module
220	  from the default device drivers. The argument is the list of PCI BDFs:
221	  xen-pciback.hide=(03:00.0)(04:00.0)
222
223	  If in doubt, say m.
224
225config XEN_PVCALLS_FRONTEND
226	tristate "XEN PV Calls frontend driver"
227	depends on INET && XEN
228	select XEN_XENBUS_FRONTEND
229	help
230	  Experimental frontend for the Xen PV Calls protocol
231	  (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
232	  sends a small set of POSIX calls to the backend, which
233	  implements them.
234
235config XEN_PVCALLS_BACKEND
236	bool "XEN PV Calls backend driver"
237	depends on INET && XEN && XEN_BACKEND
238	help
239	  Experimental backend for the Xen PV Calls protocol
240	  (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
241	  allows PV Calls frontends to send POSIX calls to the backend,
242	  which implements them.
243
244	  If in doubt, say n.
245
246config XEN_SCSI_BACKEND
247	tristate "XEN SCSI backend driver"
248	depends on XEN && XEN_BACKEND && TARGET_CORE
249	help
250	  The SCSI backend driver allows the kernel to export its SCSI Devices
251	  to other guests via a high-performance shared-memory interface.
252	  Only needed for systems running as XEN driver domains (e.g. Dom0) and
253	  if guests need generic access to SCSI devices.
254
255config XEN_PRIVCMD
256	tristate
257	depends on XEN
258	default m
259
260config XEN_STUB
261	bool "Xen stub drivers"
262	depends on XEN && X86_64 && BROKEN
263	help
264	  Allow kernel to install stub drivers, to reserve space for Xen drivers,
265	  i.e. memory hotplug and cpu hotplug, and to block native drivers loaded,
266	  so that real Xen drivers can be modular.
267
268	  To enable Xen features like cpu and memory hotplug, select Y here.
269
270config XEN_ACPI_HOTPLUG_MEMORY
271	tristate "Xen ACPI memory hotplug"
272	depends on XEN_DOM0 && XEN_STUB && ACPI
273	help
274	  This is Xen ACPI memory hotplug.
275
276	  Currently Xen only support ACPI memory hot-add. If you want
277	  to hot-add memory at runtime (the hot-added memory cannot be
278	  removed until machine stop), select Y/M here, otherwise select N.
279
280config XEN_ACPI_HOTPLUG_CPU
281	tristate "Xen ACPI cpu hotplug"
282	depends on XEN_DOM0 && XEN_STUB && ACPI
283	select ACPI_CONTAINER
284	help
285	  Xen ACPI cpu enumerating and hotplugging
286
287	  For hotplugging, currently Xen only support ACPI cpu hotadd.
288	  If you want to hotadd cpu at runtime (the hotadded cpu cannot
289	  be removed until machine stop), select Y/M here.
290
291config XEN_ACPI_PROCESSOR
292	tristate "Xen ACPI processor"
293	depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ
294	default m
295	help
296          This ACPI processor uploads Power Management information to the Xen
297	  hypervisor.
298
299	  To do that the driver parses the Power Management data and uploads
300	  said information to the Xen hypervisor. Then the Xen hypervisor can
301	  select the proper Cx and Pxx states. It also registers itself as the
302	  SMM so that other drivers (such as ACPI cpufreq scaling driver) will
303	  not load.
304
305          To compile this driver as a module, choose M here: the module will be
306	  called xen_acpi_processor  If you do not know what to choose, select
307	  M here. If the CPUFREQ drivers are built in, select Y here.
308
309config XEN_MCE_LOG
310	bool "Xen platform mcelog"
311	depends on XEN_DOM0 && X86_64 && X86_MCE
312	help
313	  Allow kernel fetching MCE error from Xen platform and
314	  converting it into Linux mcelog format for mcelog tools
315
316config XEN_HAVE_PVMMU
317       bool
318
319config XEN_EFI
320	def_bool y
321	depends on (ARM || ARM64 || X86_64) && EFI
322
323config XEN_AUTO_XLATE
324	def_bool y
325	depends on ARM || ARM64 || XEN_PVHVM
326	help
327	  Support for auto-translated physmap guests.
328
329config XEN_ACPI
330	def_bool y
331	depends on X86 && ACPI
332
333config XEN_SYMS
334       bool "Xen symbols"
335       depends on X86 && XEN_DOM0 && XENFS
336       default y if KALLSYMS
337       help
338          Exports hypervisor symbols (along with their types and addresses) via
339          /proc/xen/xensyms file, similar to /proc/kallsyms
340
341config XEN_HAVE_VPMU
342       bool
343
344config XEN_FRONT_PGDIR_SHBUF
345	tristate
346
347endmenu
348