xref: /openbmc/linux/drivers/xen/Kconfig (revision cae7d81a3730dfe08623f8c1083230c8d0987639)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
227fb7f00SRandy Dunlapmenu "Xen driver support"
327fb7f00SRandy Dunlap	depends on XEN
427fb7f00SRandy Dunlap
51775826cSJeremy Fitzhardingeconfig XEN_BALLOON
61775826cSJeremy Fitzhardinge	bool "Xen memory balloon driver"
71775826cSJeremy Fitzhardinge	default y
81775826cSJeremy Fitzhardinge	help
91775826cSJeremy Fitzhardinge	  The balloon driver allows the Xen domain to request more memory from
101775826cSJeremy Fitzhardinge	  the system to expand the domain's memory allocation, or alternatively
111775826cSJeremy Fitzhardinge	  return unneeded memory to the system.
121775826cSJeremy Fitzhardinge
13080e2be7SDaniel Kiperconfig XEN_BALLOON_MEMORY_HOTPLUG
14080e2be7SDaniel Kiper	bool "Memory hotplug support for Xen balloon driver"
15080e2be7SDaniel Kiper	depends on XEN_BALLOON && MEMORY_HOTPLUG
162abb65a3SRoger Pau Monne	default y
17080e2be7SDaniel Kiper	help
18080e2be7SDaniel Kiper	  Memory hotplug support for Xen balloon driver allows expanding memory
19080e2be7SDaniel Kiper	  available for the system above limit declared at system startup.
20080e2be7SDaniel Kiper	  It is very useful on critical systems which require long
21080e2be7SDaniel Kiper	  run without rebooting.
22080e2be7SDaniel Kiper
230df683ffSRoger Pau Monne	  It's also very useful for non PV domains to obtain unpopulated physical
240df683ffSRoger Pau Monne	  memory ranges to use in order to map foreign memory or grants.
250df683ffSRoger Pau Monne
26080e2be7SDaniel Kiper	  Memory could be hotplugged in following steps:
27080e2be7SDaniel Kiper
28703fc13aSVitaly Kuznetsov	    1) target domain: ensure that memory auto online policy is in
29703fc13aSVitaly Kuznetsov	       effect by checking /sys/devices/system/memory/auto_online_blocks
30703fc13aSVitaly Kuznetsov	       file (should be 'online').
31703fc13aSVitaly Kuznetsov
32703fc13aSVitaly Kuznetsov	    2) control domain: xl mem-max <target-domain> <maxmem>
33080e2be7SDaniel Kiper	       where <maxmem> is >= requested memory size,
34080e2be7SDaniel Kiper
35703fc13aSVitaly Kuznetsov	    3) control domain: xl mem-set <target-domain> <memory>
36080e2be7SDaniel Kiper	       where <memory> is requested memory size; alternatively memory
37080e2be7SDaniel Kiper	       could be added by writing proper value to
38080e2be7SDaniel Kiper	       /sys/devices/system/xen_memory/xen_memory0/target or
39703fc13aSVitaly Kuznetsov	       /sys/devices/system/xen_memory/xen_memory0/target_kb on the
40703fc13aSVitaly Kuznetsov	       target domain.
41080e2be7SDaniel Kiper
42703fc13aSVitaly Kuznetsov	  Alternatively, if memory auto onlining was not requested at step 1
43703fc13aSVitaly Kuznetsov	  the newly added memory can be manually onlined in the target domain
44703fc13aSVitaly Kuznetsov	  by doing the following:
45703fc13aSVitaly Kuznetsov
46703fc13aSVitaly Kuznetsov		for i in /sys/devices/system/memory/memory*/state; do \
47080e2be7SDaniel Kiper		  [ "`cat "$i"`" = offline ] && echo online > "$i"; done
48080e2be7SDaniel Kiper
49703fc13aSVitaly Kuznetsov	  or by adding the following line to udev rules:
50080e2be7SDaniel Kiper
51080e2be7SDaniel Kiper	  SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"
52080e2be7SDaniel Kiper
532b514ec7SRoger Pau Monneconfig XEN_MEMORY_HOTPLUG_LIMIT
54633d6f17SJuergen Gross	int "Hotplugged memory limit (in GiB) for a PV guest"
55a13f2ef1SJuergen Gross	default 512
56633d6f17SJuergen Gross	depends on XEN_HAVE_PVMMU
572b514ec7SRoger Pau Monne	depends on MEMORY_HOTPLUG
58633d6f17SJuergen Gross	help
59633d6f17SJuergen Gross	  Maxmium amount of memory (in GiB) that a PV guest can be
60633d6f17SJuergen Gross	  expanded to when using memory hotplug.
61633d6f17SJuergen Gross
62633d6f17SJuergen Gross	  A PV guest can have more memory than this limit if is
63633d6f17SJuergen Gross	  started with a larger maximum.
64633d6f17SJuergen Gross
65633d6f17SJuergen Gross	  This value is used to allocate enough space in internal
66633d6f17SJuergen Gross	  tables needed for physical memory administration.
67633d6f17SJuergen Gross
68197ecb38SMarek Marczykowski-Góreckiconfig XEN_SCRUB_PAGES_DEFAULT
69197ecb38SMarek Marczykowski-Górecki	bool "Scrub pages before returning them to system by default"
701775826cSJeremy Fitzhardinge	depends on XEN_BALLOON
711775826cSJeremy Fitzhardinge	default y
721775826cSJeremy Fitzhardinge	help
731775826cSJeremy Fitzhardinge	  Scrub pages before returning them to the system for reuse by
741775826cSJeremy Fitzhardinge	  other domains.  This makes sure that any confidential data
75af320de9SGeert Uytterhoeven	  is not accidentally visible to other domains.  It is more
76197ecb38SMarek Marczykowski-Górecki	  secure, but slightly less efficient. This can be controlled with
77197ecb38SMarek Marczykowski-Górecki	  xen_scrub_pages=0 parameter and
78197ecb38SMarek Marczykowski-Górecki	  /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
79197ecb38SMarek Marczykowski-Górecki	  This option only sets the default value.
80197ecb38SMarek Marczykowski-Górecki
811775826cSJeremy Fitzhardinge	  If in doubt, say yes.
821107ba88SAlex Zeffertt
83f7116284SIan Campbellconfig XEN_DEV_EVTCHN
84f7116284SIan Campbell	tristate "Xen /dev/xen/evtchn device"
85f7116284SIan Campbell	default y
86f7116284SIan Campbell	help
876b2aac42SMasanari Iida	  The evtchn driver allows a userspace process to trigger event
88f7116284SIan Campbell	  channels and to receive notification of an event channel
89f7116284SIan Campbell	  firing.
90f7116284SIan Campbell	  If in doubt, say yes.
91f7116284SIan Campbell
92df660251SIan Campbellconfig XEN_BACKEND
93329620a8SJeremy Fitzhardinge	bool "Backend driver support"
94ea9e57d0SJason Andryuk	default XEN_DOM0
95df660251SIan Campbell	help
96df660251SIan Campbell	  Support for backend device drivers that provide I/O services
97df660251SIan Campbell	  to other virtual machines.
98df660251SIan Campbell
991107ba88SAlex Zefferttconfig XENFS
1001107ba88SAlex Zeffertt	tristate "Xen filesystem"
101d8414d3cSBastian Blank	select XEN_PRIVCMD
1021107ba88SAlex Zeffertt	default y
1031107ba88SAlex Zeffertt	help
1041107ba88SAlex Zeffertt	  The xen filesystem provides a way for domains to share
1051107ba88SAlex Zeffertt	  information with each other and with the hypervisor.
1061107ba88SAlex Zeffertt	  For example, by reading and writing the "xenbus" file, guests
1071107ba88SAlex Zeffertt	  may pass arbitrary information to the initial domain.
1081107ba88SAlex Zeffertt	  If in doubt, say yes.
1091107ba88SAlex Zeffertt
1101107ba88SAlex Zefferttconfig XEN_COMPAT_XENFS
1111107ba88SAlex Zeffertt	bool "Create compatibility mount point /proc/xen"
1121107ba88SAlex Zeffertt	depends on XENFS
1131107ba88SAlex Zeffertt	default y
1141107ba88SAlex Zeffertt	help
1151107ba88SAlex Zeffertt	  The old xenstore userspace tools expect to find "xenbus"
1161107ba88SAlex Zeffertt	  under /proc/xen, but "xenbus" is now found at the root of the
1171107ba88SAlex Zeffertt	  xenfs filesystem.  Selecting this causes the kernel to create
118692105b8SMatt LaPlante	  the compatibility mount point /proc/xen if it is running on
1191107ba88SAlex Zeffertt	  a xen platform.
1201107ba88SAlex Zeffertt	  If in doubt, say yes.
1211107ba88SAlex Zeffertt
122cff7e81bSJeremy Fitzhardingeconfig XEN_SYS_HYPERVISOR
123cff7e81bSJeremy Fitzhardinge	bool "Create xen entries under /sys/hypervisor"
12427fb7f00SRandy Dunlap	depends on SYSFS
125cff7e81bSJeremy Fitzhardinge	select SYS_HYPERVISOR
126cff7e81bSJeremy Fitzhardinge	default y
127cff7e81bSJeremy Fitzhardinge	help
128cff7e81bSJeremy Fitzhardinge	  Create entries under /sys/hypervisor describing the Xen
129cff7e81bSJeremy Fitzhardinge	  hypervisor environment.  When running native or in another
130cff7e81bSJeremy Fitzhardinge	  virtual environment, /sys/hypervisor will still be present,
131cff7e81bSJeremy Fitzhardinge	  but will have no xen contents.
13227fb7f00SRandy Dunlap
1332de06cc1SIan Campbellconfig XEN_XENBUS_FRONTEND
1342de06cc1SIan Campbell	tristate
1359c4bc1c2SLinus Torvalds
136ab31523cSGerd Hoffmannconfig XEN_GNTDEV
137ab31523cSGerd Hoffmann	tristate "userspace grant access device driver"
138ab31523cSGerd Hoffmann	depends on XEN
1391f169f66SStefano Stabellini	default m
140ab31523cSGerd Hoffmann	select MMU_NOTIFIER
141ab31523cSGerd Hoffmann	help
142ab31523cSGerd Hoffmann	  Allows userspace processes to use grants.
1432de06cc1SIan Campbell
144932d6562SOleksandr Andrushchenkoconfig XEN_GNTDEV_DMABUF
145932d6562SOleksandr Andrushchenko	bool "Add support for dma-buf grant access device driver extension"
146fa6614d8SJason Gunthorpe	depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC
147fa6614d8SJason Gunthorpe	select DMA_SHARED_BUFFER
148932d6562SOleksandr Andrushchenko	help
149932d6562SOleksandr Andrushchenko	  Allows userspace processes and kernel modules to use Xen backed
150932d6562SOleksandr Andrushchenko	  dma-buf implementation. With this extension grant references to
151932d6562SOleksandr Andrushchenko	  the pages of an imported dma-buf can be exported for other domain
152932d6562SOleksandr Andrushchenko	  use and grant references coming from a foreign domain can be
153932d6562SOleksandr Andrushchenko	  converted into a local dma-buf for local export.
154932d6562SOleksandr Andrushchenko
155dd314058SDaniel De Graafconfig XEN_GRANT_DEV_ALLOC
156dd314058SDaniel De Graaf	tristate "User-space grant reference allocator driver"
157dd314058SDaniel De Graaf	depends on XEN
1581f169f66SStefano Stabellini	default m
159dd314058SDaniel De Graaf	help
160dd314058SDaniel De Graaf	  Allows userspace processes to create pages with access granted
161dd314058SDaniel De Graaf	  to other domains. This can be used to implement frontend drivers
162dd314058SDaniel De Graaf	  or as part of an inter-domain shared memory channel.
163dd314058SDaniel De Graaf
1649bdc7304SOleksandr Andrushchenkoconfig XEN_GRANT_DMA_ALLOC
1659bdc7304SOleksandr Andrushchenko	bool "Allow allocating DMA capable buffers with grant reference module"
1669bdc7304SOleksandr Andrushchenko	depends on XEN && HAS_DMA
1679bdc7304SOleksandr Andrushchenko	help
1689bdc7304SOleksandr Andrushchenko	  Extends grant table module API to allow allocating DMA capable
1699bdc7304SOleksandr Andrushchenko	  buffers and mapping foreign grant references on top of it.
1709bdc7304SOleksandr Andrushchenko	  The resulting buffer is similar to one allocated by the balloon
1719bdc7304SOleksandr Andrushchenko	  driver in that proper memory reservation is made by
1729bdc7304SOleksandr Andrushchenko	  ({increase|decrease}_reservation and VA mappings are updated if
1739bdc7304SOleksandr Andrushchenko	  needed).
1749bdc7304SOleksandr Andrushchenko	  This is useful for sharing foreign buffers with HW drivers which
1759bdc7304SOleksandr Andrushchenko	  cannot work with scattered buffers provided by the balloon driver,
1769bdc7304SOleksandr Andrushchenko	  but require DMAable memory instead.
1779bdc7304SOleksandr Andrushchenko
178b097186fSKonrad Rzeszutek Wilkconfig SWIOTLB_XEN
179b097186fSKonrad Rzeszutek Wilk	def_bool y
180794d5b8aSJan Beulich	depends on XEN_PV || ARM || ARM64
1812f9237d4SChristoph Hellwig	select DMA_OPS
1822775609cSKonrad Rzeszutek Wilk	select SWIOTLB
183b097186fSKonrad Rzeszutek Wilk
18430edc14bSKonrad Rzeszutek Wilkconfig XEN_PCIDEV_BACKEND
18530edc14bSKonrad Rzeszutek Wilk	tristate "Xen PCI-device backend driver"
18630edc14bSKonrad Rzeszutek Wilk	depends on PCI && X86 && XEN
18730edc14bSKonrad Rzeszutek Wilk	depends on XEN_BACKEND
1882ebdc426SKonrad Rzeszutek Wilk	default m
18930edc14bSKonrad Rzeszutek Wilk	help
19030edc14bSKonrad Rzeszutek Wilk	  The PCI device backend driver allows the kernel to export arbitrary
19130edc14bSKonrad Rzeszutek Wilk	  PCI devices to other guests. If you select this to be a module, you
19230edc14bSKonrad Rzeszutek Wilk	  will need to make sure no other driver has bound to the device(s)
19330edc14bSKonrad Rzeszutek Wilk	  you want to make visible to other guests.
19430edc14bSKonrad Rzeszutek Wilk
1952ebdc426SKonrad Rzeszutek Wilk	  The parameter "passthrough" allows you specify how you want the PCI
1962ebdc426SKonrad Rzeszutek Wilk	  devices to appear in the guest. You can choose the default (0) where
1972ebdc426SKonrad Rzeszutek Wilk	  PCI topology starts at 00.00.0, or (1) for passthrough if you want
1982ebdc426SKonrad Rzeszutek Wilk	  the PCI devices topology appear the same as in the host.
19930edc14bSKonrad Rzeszutek Wilk
2002ebdc426SKonrad Rzeszutek Wilk	  The "hide" parameter (only applicable if backend driver is compiled
2012ebdc426SKonrad Rzeszutek Wilk	  into the kernel) allows you to bind the PCI devices to this module
2022ebdc426SKonrad Rzeszutek Wilk	  from the default device drivers. The argument is the list of PCI BDFs:
2032ebdc426SKonrad Rzeszutek Wilk	  xen-pciback.hide=(03:00.0)(04:00.0)
20430edc14bSKonrad Rzeszutek Wilk
2052ebdc426SKonrad Rzeszutek Wilk	  If in doubt, say m.
206d8414d3cSBastian Blank
2075eee149aSStefano Stabelliniconfig XEN_PVCALLS_FRONTEND
2085eee149aSStefano Stabellini	tristate "XEN PV Calls frontend driver"
2095eee149aSStefano Stabellini	depends on INET && XEN
2105eee149aSStefano Stabellini	select XEN_XENBUS_FRONTEND
2115eee149aSStefano Stabellini	help
2125eee149aSStefano Stabellini	  Experimental frontend for the Xen PV Calls protocol
2135eee149aSStefano Stabellini	  (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
2145eee149aSStefano Stabellini	  sends a small set of POSIX calls to the backend, which
2155eee149aSStefano Stabellini	  implements them.
2165eee149aSStefano Stabellini
21742d3078aSStefano Stabelliniconfig XEN_PVCALLS_BACKEND
21845da2344SJan Beulich	tristate "XEN PV Calls backend driver"
21942d3078aSStefano Stabellini	depends on INET && XEN && XEN_BACKEND
22042d3078aSStefano Stabellini	help
22142d3078aSStefano Stabellini	  Experimental backend for the Xen PV Calls protocol
22242d3078aSStefano Stabellini	  (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
22342d3078aSStefano Stabellini	  allows PV Calls frontends to send POSIX calls to the backend,
22442d3078aSStefano Stabellini	  which implements them.
22542d3078aSStefano Stabellini
22642d3078aSStefano Stabellini	  If in doubt, say n.
22742d3078aSStefano Stabellini
228d9d660f6SJuergen Grossconfig XEN_SCSI_BACKEND
229d9d660f6SJuergen Gross	tristate "XEN SCSI backend driver"
230d9d660f6SJuergen Gross	depends on XEN && XEN_BACKEND && TARGET_CORE
231d9d660f6SJuergen Gross	help
232d9d660f6SJuergen Gross	  The SCSI backend driver allows the kernel to export its SCSI Devices
233d9d660f6SJuergen Gross	  to other guests via a high-performance shared-memory interface.
234d9d660f6SJuergen Gross	  Only needed for systems running as XEN driver domains (e.g. Dom0) and
235d9d660f6SJuergen Gross	  if guests need generic access to SCSI devices.
236d9d660f6SJuergen Gross
237d8414d3cSBastian Blankconfig XEN_PRIVCMD
238d8414d3cSBastian Blank	tristate
239d8414d3cSBastian Blank	depends on XEN
240d8414d3cSBastian Blank	default m
241d8414d3cSBastian Blank
24259a56802SKonrad Rzeszutek Wilkconfig XEN_ACPI_PROCESSOR
24359a56802SKonrad Rzeszutek Wilk	tristate "Xen ACPI processor"
244*cae7d81aSJan Beulich	depends on XEN && XEN_PV_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ
245102b208eSKonrad Rzeszutek Wilk	default m
24659a56802SKonrad Rzeszutek Wilk	help
2471fd14432SAndrew Morton	  This ACPI processor uploads Power Management information to the Xen
2481fd14432SAndrew Morton	  hypervisor.
24959a56802SKonrad Rzeszutek Wilk
2501fd14432SAndrew Morton	  To do that the driver parses the Power Management data and uploads
2511fd14432SAndrew Morton	  said information to the Xen hypervisor. Then the Xen hypervisor can
2525065a706SMasanari Iida	  select the proper Cx and Pxx states. It also registers itself as the
2531fd14432SAndrew Morton	  SMM so that other drivers (such as ACPI cpufreq scaling driver) will
2541fd14432SAndrew Morton	  not load.
25559a56802SKonrad Rzeszutek Wilk
2561fd14432SAndrew Morton	  To compile this driver as a module, choose M here: the module will be
2571fd14432SAndrew Morton	  called xen_acpi_processor  If you do not know what to choose, select
2581fd14432SAndrew Morton	  M here. If the CPUFREQ drivers are built in, select Y here.
25959a56802SKonrad Rzeszutek Wilk
260cef12ee5SLiu, Jinsongconfig XEN_MCE_LOG
261cef12ee5SLiu, Jinsong	bool "Xen platform mcelog"
262*cae7d81aSJan Beulich	depends on XEN_PV_DOM0 && X86_MCE
263cef12ee5SLiu, Jinsong	help
264cef12ee5SLiu, Jinsong	  Allow kernel fetching MCE error from Xen platform and
265cef12ee5SLiu, Jinsong	  converting it into Linux mcelog format for mcelog tools
266cef12ee5SLiu, Jinsong
267c2374bf5SIan Campbellconfig XEN_HAVE_PVMMU
268c2374bf5SIan Campbell	bool
269c2374bf5SIan Campbell
270be81c8a1SDaniel Kiperconfig XEN_EFI
271be81c8a1SDaniel Kiper	def_bool y
272be1aaf4eSShannon Zhao	depends on (ARM || ARM64 || X86_64) && EFI
273be81c8a1SDaniel Kiper
274628c28eeSDavid Vrabelconfig XEN_AUTO_XLATE
275628c28eeSDavid Vrabel	def_bool y
276628c28eeSDavid Vrabel	depends on ARM || ARM64 || XEN_PVHVM
277628c28eeSDavid Vrabel	help
278628c28eeSDavid Vrabel	  Support for auto-translated physmap guests.
279628c28eeSDavid Vrabel
28042068cfdSHanjun Guoconfig XEN_ACPI
28142068cfdSHanjun Guo	def_bool y
28242068cfdSHanjun Guo	depends on X86 && ACPI
28342068cfdSHanjun Guo
284a11f4f0aSBoris Ostrovskyconfig XEN_SYMS
285a11f4f0aSBoris Ostrovsky	bool "Xen symbols"
286a11f4f0aSBoris Ostrovsky	depends on X86 && XEN_DOM0 && XENFS
287a11f4f0aSBoris Ostrovsky	default y if KALLSYMS
288a11f4f0aSBoris Ostrovsky	help
289a11f4f0aSBoris Ostrovsky	  Exports hypervisor symbols (along with their types and addresses) via
290a11f4f0aSBoris Ostrovsky	  /proc/xen/xensyms file, similar to /proc/kallsyms
291a11f4f0aSBoris Ostrovsky
2925f141548SBoris Ostrovskyconfig XEN_HAVE_VPMU
2935f141548SBoris Ostrovsky	bool
2945f141548SBoris Ostrovsky
295b3383974SOleksandr Andrushchenkoconfig XEN_FRONT_PGDIR_SHBUF
296b3383974SOleksandr Andrushchenko	tristate
297b3383974SOleksandr Andrushchenko
2989e2369c0SRoger Pau Monneconfig XEN_UNPOPULATED_ALLOC
2999e2369c0SRoger Pau Monne	bool "Use unpopulated memory ranges for guest mappings"
3009e2369c0SRoger Pau Monne	depends on X86 && ZONE_DEVICE
3019e2369c0SRoger Pau Monne	default XEN_BACKEND || XEN_GNTDEV || XEN_DOM0
3029e2369c0SRoger Pau Monne	help
3039e2369c0SRoger Pau Monne	  Use unpopulated memory ranges in order to create mappings for guest
3049e2369c0SRoger Pau Monne	  memory regions, including grant maps and foreign pages. This avoids
3059e2369c0SRoger Pau Monne	  having to balloon out RAM regions in order to obtain physical memory
3069e2369c0SRoger Pau Monne	  space to create such mappings.
3079e2369c0SRoger Pau Monne
30827fb7f00SRandy Dunlapendmenu
309