xref: /openbmc/linux/drivers/xen/Kconfig (revision 5eee149ab9f83d1d0eb16c6b32a97d7060eeb490)
127fb7f00SRandy Dunlapmenu "Xen driver support"
227fb7f00SRandy Dunlap	depends on XEN
327fb7f00SRandy Dunlap
41775826cSJeremy Fitzhardingeconfig XEN_BALLOON
51775826cSJeremy Fitzhardinge	bool "Xen memory balloon driver"
61775826cSJeremy Fitzhardinge	default y
71775826cSJeremy Fitzhardinge	help
81775826cSJeremy Fitzhardinge	  The balloon driver allows the Xen domain to request more memory from
91775826cSJeremy Fitzhardinge	  the system to expand the domain's memory allocation, or alternatively
101775826cSJeremy Fitzhardinge	  return unneeded memory to the system.
111775826cSJeremy Fitzhardinge
12a50777c7SDan Magenheimerconfig XEN_SELFBALLOONING
13a50777c7SDan Magenheimer	bool "Dynamically self-balloon kernel memory to target"
1465d4b248SKonrad Rzeszutek Wilk	depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM
15a50777c7SDan Magenheimer	default n
16a50777c7SDan Magenheimer	help
17a50777c7SDan Magenheimer	  Self-ballooning dynamically balloons available kernel memory driven
18a50777c7SDan Magenheimer	  by the current usage of anonymous memory ("committed AS") and
19a50777c7SDan Magenheimer	  controlled by various sysfs-settable parameters.  Configuring
20a50777c7SDan Magenheimer	  FRONTSWAP is highly recommended; if it is not configured, self-
21ed4f346aSKonrad Rzeszutek Wilk	  ballooning is disabled by default. If FRONTSWAP is configured,
22a50777c7SDan Magenheimer	  frontswap-selfshrinking is enabled by default but can be disabled
2354598d1bSKonrad Rzeszutek Wilk	  with the 'tmem.selfshrink=0' kernel boot parameter; and self-ballooning
24ed4f346aSKonrad Rzeszutek Wilk	  is enabled by default but can be disabled with the 'tmem.selfballooning=0'
25a50777c7SDan Magenheimer	  kernel boot parameter.  Note that systems without a sufficiently
26a50777c7SDan Magenheimer	  large swap device should not enable self-ballooning.
27a50777c7SDan Magenheimer
28080e2be7SDaniel Kiperconfig XEN_BALLOON_MEMORY_HOTPLUG
29080e2be7SDaniel Kiper	bool "Memory hotplug support for Xen balloon driver"
30080e2be7SDaniel Kiper	default n
31080e2be7SDaniel Kiper	depends on XEN_BALLOON && MEMORY_HOTPLUG
32080e2be7SDaniel Kiper	help
33080e2be7SDaniel Kiper	  Memory hotplug support for Xen balloon driver allows expanding memory
34080e2be7SDaniel Kiper	  available for the system above limit declared at system startup.
35080e2be7SDaniel Kiper	  It is very useful on critical systems which require long
36080e2be7SDaniel Kiper	  run without rebooting.
37080e2be7SDaniel Kiper
38080e2be7SDaniel Kiper	  Memory could be hotplugged in following steps:
39080e2be7SDaniel Kiper
40703fc13aSVitaly Kuznetsov	    1) target domain: ensure that memory auto online policy is in
41703fc13aSVitaly Kuznetsov	       effect by checking /sys/devices/system/memory/auto_online_blocks
42703fc13aSVitaly Kuznetsov	       file (should be 'online').
43703fc13aSVitaly Kuznetsov
44703fc13aSVitaly Kuznetsov	    2) control domain: xl mem-max <target-domain> <maxmem>
45080e2be7SDaniel Kiper	       where <maxmem> is >= requested memory size,
46080e2be7SDaniel Kiper
47703fc13aSVitaly Kuznetsov	    3) control domain: xl mem-set <target-domain> <memory>
48080e2be7SDaniel Kiper	       where <memory> is requested memory size; alternatively memory
49080e2be7SDaniel Kiper	       could be added by writing proper value to
50080e2be7SDaniel Kiper	       /sys/devices/system/xen_memory/xen_memory0/target or
51703fc13aSVitaly Kuznetsov	       /sys/devices/system/xen_memory/xen_memory0/target_kb on the
52703fc13aSVitaly Kuznetsov	       target domain.
53080e2be7SDaniel Kiper
54703fc13aSVitaly Kuznetsov	  Alternatively, if memory auto onlining was not requested at step 1
55703fc13aSVitaly Kuznetsov	  the newly added memory can be manually onlined in the target domain
56703fc13aSVitaly Kuznetsov	  by doing the following:
57703fc13aSVitaly Kuznetsov
58703fc13aSVitaly Kuznetsov		for i in /sys/devices/system/memory/memory*/state; do \
59080e2be7SDaniel Kiper		  [ "`cat "$i"`" = offline ] && echo online > "$i"; done
60080e2be7SDaniel Kiper
61703fc13aSVitaly Kuznetsov	  or by adding the following line to udev rules:
62080e2be7SDaniel Kiper
63080e2be7SDaniel Kiper	  SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'"
64080e2be7SDaniel Kiper
65633d6f17SJuergen Grossconfig XEN_BALLOON_MEMORY_HOTPLUG_LIMIT
66633d6f17SJuergen Gross	int "Hotplugged memory limit (in GiB) for a PV guest"
67633d6f17SJuergen Gross	default 512 if X86_64
68633d6f17SJuergen Gross	default 4 if X86_32
69633d6f17SJuergen Gross	range 0 64 if X86_32
70633d6f17SJuergen Gross	depends on XEN_HAVE_PVMMU
71633d6f17SJuergen Gross	depends on XEN_BALLOON_MEMORY_HOTPLUG
72633d6f17SJuergen Gross	help
73633d6f17SJuergen Gross	  Maxmium amount of memory (in GiB) that a PV guest can be
74633d6f17SJuergen Gross	  expanded to when using memory hotplug.
75633d6f17SJuergen Gross
76633d6f17SJuergen Gross	  A PV guest can have more memory than this limit if is
77633d6f17SJuergen Gross	  started with a larger maximum.
78633d6f17SJuergen Gross
79633d6f17SJuergen Gross	  This value is used to allocate enough space in internal
80633d6f17SJuergen Gross	  tables needed for physical memory administration.
81633d6f17SJuergen Gross
821775826cSJeremy Fitzhardingeconfig XEN_SCRUB_PAGES
831775826cSJeremy Fitzhardinge	bool "Scrub pages before returning them to system"
841775826cSJeremy Fitzhardinge	depends on XEN_BALLOON
851775826cSJeremy Fitzhardinge	default y
861775826cSJeremy Fitzhardinge	help
871775826cSJeremy Fitzhardinge	  Scrub pages before returning them to the system for reuse by
881775826cSJeremy Fitzhardinge	  other domains.  This makes sure that any confidential data
891775826cSJeremy Fitzhardinge	  is not accidentally visible to other domains.  Is it more
901775826cSJeremy Fitzhardinge	  secure, but slightly less efficient.
911775826cSJeremy Fitzhardinge	  If in doubt, say yes.
921107ba88SAlex Zeffertt
93f7116284SIan Campbellconfig XEN_DEV_EVTCHN
94f7116284SIan Campbell	tristate "Xen /dev/xen/evtchn device"
95f7116284SIan Campbell	default y
96f7116284SIan Campbell	help
976b2aac42SMasanari Iida	  The evtchn driver allows a userspace process to trigger event
98f7116284SIan Campbell	  channels and to receive notification of an event channel
99f7116284SIan Campbell	  firing.
100f7116284SIan Campbell	  If in doubt, say yes.
101f7116284SIan Campbell
102df660251SIan Campbellconfig XEN_BACKEND
103329620a8SJeremy Fitzhardinge	bool "Backend driver support"
104df660251SIan Campbell	depends on XEN_DOM0
105df660251SIan Campbell	default y
106df660251SIan Campbell	help
107df660251SIan Campbell	  Support for backend device drivers that provide I/O services
108df660251SIan Campbell	  to other virtual machines.
109df660251SIan Campbell
1101107ba88SAlex Zefferttconfig XENFS
1111107ba88SAlex Zeffertt	tristate "Xen filesystem"
112d8414d3cSBastian Blank	select XEN_PRIVCMD
1131107ba88SAlex Zeffertt	default y
1141107ba88SAlex Zeffertt	help
1151107ba88SAlex Zeffertt	  The xen filesystem provides a way for domains to share
1161107ba88SAlex Zeffertt	  information with each other and with the hypervisor.
1171107ba88SAlex Zeffertt	  For example, by reading and writing the "xenbus" file, guests
1181107ba88SAlex Zeffertt	  may pass arbitrary information to the initial domain.
1191107ba88SAlex Zeffertt	  If in doubt, say yes.
1201107ba88SAlex Zeffertt
1211107ba88SAlex Zefferttconfig XEN_COMPAT_XENFS
1221107ba88SAlex Zeffertt       bool "Create compatibility mount point /proc/xen"
1231107ba88SAlex Zeffertt       depends on XENFS
1241107ba88SAlex Zeffertt       default y
1251107ba88SAlex Zeffertt       help
1261107ba88SAlex Zeffertt         The old xenstore userspace tools expect to find "xenbus"
1271107ba88SAlex Zeffertt         under /proc/xen, but "xenbus" is now found at the root of the
1281107ba88SAlex Zeffertt         xenfs filesystem.  Selecting this causes the kernel to create
129692105b8SMatt LaPlante         the compatibility mount point /proc/xen if it is running on
1301107ba88SAlex Zeffertt         a xen platform.
1311107ba88SAlex Zeffertt         If in doubt, say yes.
1321107ba88SAlex Zeffertt
133cff7e81bSJeremy Fitzhardingeconfig XEN_SYS_HYPERVISOR
134cff7e81bSJeremy Fitzhardinge       bool "Create xen entries under /sys/hypervisor"
13527fb7f00SRandy Dunlap       depends on SYSFS
136cff7e81bSJeremy Fitzhardinge       select SYS_HYPERVISOR
137cff7e81bSJeremy Fitzhardinge       default y
138cff7e81bSJeremy Fitzhardinge       help
139cff7e81bSJeremy Fitzhardinge         Create entries under /sys/hypervisor describing the Xen
140cff7e81bSJeremy Fitzhardinge	 hypervisor environment.  When running native or in another
141cff7e81bSJeremy Fitzhardinge	 virtual environment, /sys/hypervisor will still be present,
142cff7e81bSJeremy Fitzhardinge	 but will have no xen contents.
14327fb7f00SRandy Dunlap
1442de06cc1SIan Campbellconfig XEN_XENBUS_FRONTEND
1452de06cc1SIan Campbell	tristate
1469c4bc1c2SLinus Torvalds
147ab31523cSGerd Hoffmannconfig XEN_GNTDEV
148ab31523cSGerd Hoffmann	tristate "userspace grant access device driver"
149ab31523cSGerd Hoffmann	depends on XEN
1501f169f66SStefano Stabellini	default m
151ab31523cSGerd Hoffmann	select MMU_NOTIFIER
152ab31523cSGerd Hoffmann	help
153ab31523cSGerd Hoffmann	  Allows userspace processes to use grants.
1542de06cc1SIan Campbell
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
164b097186fSKonrad Rzeszutek Wilkconfig SWIOTLB_XEN
165b097186fSKonrad Rzeszutek Wilk	def_bool y
1662775609cSKonrad Rzeszutek Wilk	select SWIOTLB
167b097186fSKonrad Rzeszutek Wilk
168afec6e04SDan Magenheimerconfig XEN_TMEM
16910a7a077SDan Magenheimer	tristate
170741ddbcfSStefano Stabellini	depends on !ARM && !ARM64
17110a7a077SDan Magenheimer	default m if (CLEANCACHE || FRONTSWAP)
172afec6e04SDan Magenheimer	help
173afec6e04SDan Magenheimer	  Shim to interface in-kernel Transcendent Memory hooks
174afec6e04SDan Magenheimer	  (e.g. cleancache and frontswap) to Xen tmem hypercalls.
175afec6e04SDan Magenheimer
17630edc14bSKonrad Rzeszutek Wilkconfig XEN_PCIDEV_BACKEND
17730edc14bSKonrad Rzeszutek Wilk	tristate "Xen PCI-device backend driver"
17830edc14bSKonrad Rzeszutek Wilk	depends on PCI && X86 && XEN
17930edc14bSKonrad Rzeszutek Wilk	depends on XEN_BACKEND
1802ebdc426SKonrad Rzeszutek Wilk	default m
18130edc14bSKonrad Rzeszutek Wilk	help
18230edc14bSKonrad Rzeszutek Wilk	  The PCI device backend driver allows the kernel to export arbitrary
18330edc14bSKonrad Rzeszutek Wilk	  PCI devices to other guests. If you select this to be a module, you
18430edc14bSKonrad Rzeszutek Wilk	  will need to make sure no other driver has bound to the device(s)
18530edc14bSKonrad Rzeszutek Wilk	  you want to make visible to other guests.
18630edc14bSKonrad Rzeszutek Wilk
1872ebdc426SKonrad Rzeszutek Wilk	  The parameter "passthrough" allows you specify how you want the PCI
1882ebdc426SKonrad Rzeszutek Wilk	  devices to appear in the guest. You can choose the default (0) where
1892ebdc426SKonrad Rzeszutek Wilk	  PCI topology starts at 00.00.0, or (1) for passthrough if you want
1902ebdc426SKonrad Rzeszutek Wilk	  the PCI devices topology appear the same as in the host.
19130edc14bSKonrad Rzeszutek Wilk
1922ebdc426SKonrad Rzeszutek Wilk	  The "hide" parameter (only applicable if backend driver is compiled
1932ebdc426SKonrad Rzeszutek Wilk	  into the kernel) allows you to bind the PCI devices to this module
1942ebdc426SKonrad Rzeszutek Wilk	  from the default device drivers. The argument is the list of PCI BDFs:
1952ebdc426SKonrad Rzeszutek Wilk	  xen-pciback.hide=(03:00.0)(04:00.0)
19630edc14bSKonrad Rzeszutek Wilk
1972ebdc426SKonrad Rzeszutek Wilk	  If in doubt, say m.
198d8414d3cSBastian Blank
199*5eee149aSStefano Stabelliniconfig XEN_PVCALLS_FRONTEND
200*5eee149aSStefano Stabellini	tristate "XEN PV Calls frontend driver"
201*5eee149aSStefano Stabellini	depends on INET && XEN
202*5eee149aSStefano Stabellini	default n
203*5eee149aSStefano Stabellini	select XEN_XENBUS_FRONTEND
204*5eee149aSStefano Stabellini	help
205*5eee149aSStefano Stabellini	  Experimental frontend for the Xen PV Calls protocol
206*5eee149aSStefano Stabellini	  (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
207*5eee149aSStefano Stabellini	  sends a small set of POSIX calls to the backend, which
208*5eee149aSStefano Stabellini	  implements them.
209*5eee149aSStefano Stabellini
21042d3078aSStefano Stabelliniconfig XEN_PVCALLS_BACKEND
21142d3078aSStefano Stabellini	bool "XEN PV Calls backend driver"
21242d3078aSStefano Stabellini	depends on INET && XEN && XEN_BACKEND
21342d3078aSStefano Stabellini	default n
21442d3078aSStefano Stabellini	help
21542d3078aSStefano Stabellini	  Experimental backend for the Xen PV Calls protocol
21642d3078aSStefano Stabellini	  (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It
21742d3078aSStefano Stabellini	  allows PV Calls frontends to send POSIX calls to the backend,
21842d3078aSStefano Stabellini	  which implements them.
21942d3078aSStefano Stabellini
22042d3078aSStefano Stabellini	  If in doubt, say n.
22142d3078aSStefano Stabellini
222d9d660f6SJuergen Grossconfig XEN_SCSI_BACKEND
223d9d660f6SJuergen Gross	tristate "XEN SCSI backend driver"
224d9d660f6SJuergen Gross	depends on XEN && XEN_BACKEND && TARGET_CORE
225d9d660f6SJuergen Gross	help
226d9d660f6SJuergen Gross	  The SCSI backend driver allows the kernel to export its SCSI Devices
227d9d660f6SJuergen Gross	  to other guests via a high-performance shared-memory interface.
228d9d660f6SJuergen Gross	  Only needed for systems running as XEN driver domains (e.g. Dom0) and
229d9d660f6SJuergen Gross	  if guests need generic access to SCSI devices.
230d9d660f6SJuergen Gross
231d8414d3cSBastian Blankconfig XEN_PRIVCMD
232d8414d3cSBastian Blank	tristate
233d8414d3cSBastian Blank	depends on XEN
234d8414d3cSBastian Blank	default m
235d8414d3cSBastian Blank
236dcb93b96SLiu Jinsongconfig XEN_STUB
237dcb93b96SLiu Jinsong	bool "Xen stub drivers"
23876fc2537SKonrad Rzeszutek Wilk	depends on XEN && X86_64 && BROKEN
239dcb93b96SLiu Jinsong	default n
240dcb93b96SLiu Jinsong	help
241dcb93b96SLiu Jinsong	  Allow kernel to install stub drivers, to reserve space for Xen drivers,
242dcb93b96SLiu Jinsong	  i.e. memory hotplug and cpu hotplug, and to block native drivers loaded,
243dcb93b96SLiu Jinsong	  so that real Xen drivers can be modular.
244dcb93b96SLiu Jinsong
245dcb93b96SLiu Jinsong	  To enable Xen features like cpu and memory hotplug, select Y here.
246dcb93b96SLiu Jinsong
247ef92e7caSLiu Jinsongconfig XEN_ACPI_HOTPLUG_MEMORY
248ef92e7caSLiu Jinsong	tristate "Xen ACPI memory hotplug"
249ef92e7caSLiu Jinsong	depends on XEN_DOM0 && XEN_STUB && ACPI
250ef92e7caSLiu Jinsong	default n
251ef92e7caSLiu Jinsong	help
252ef92e7caSLiu Jinsong	  This is Xen ACPI memory hotplug.
253ef92e7caSLiu Jinsong
254ef92e7caSLiu Jinsong	  Currently Xen only support ACPI memory hot-add. If you want
255ef92e7caSLiu Jinsong	  to hot-add memory at runtime (the hot-added memory cannot be
256ef92e7caSLiu Jinsong	  removed until machine stop), select Y/M here, otherwise select N.
257ef92e7caSLiu Jinsong
25839adc483SLiu Jinsongconfig XEN_ACPI_HOTPLUG_CPU
25939adc483SLiu Jinsong	tristate "Xen ACPI cpu hotplug"
26039adc483SLiu Jinsong	depends on XEN_DOM0 && XEN_STUB && ACPI
26139adc483SLiu Jinsong	select ACPI_CONTAINER
26239adc483SLiu Jinsong	default n
26339adc483SLiu Jinsong	help
26439adc483SLiu Jinsong	  Xen ACPI cpu enumerating and hotplugging
26539adc483SLiu Jinsong
26639adc483SLiu Jinsong	  For hotplugging, currently Xen only support ACPI cpu hotadd.
26739adc483SLiu Jinsong	  If you want to hotadd cpu at runtime (the hotadded cpu cannot
26839adc483SLiu Jinsong	  be removed until machine stop), select Y/M here.
26939adc483SLiu Jinsong
27059a56802SKonrad Rzeszutek Wilkconfig XEN_ACPI_PROCESSOR
27159a56802SKonrad Rzeszutek Wilk	tristate "Xen ACPI processor"
272df7a3ee2SKonrad Rzeszutek Wilk	depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ
273102b208eSKonrad Rzeszutek Wilk	default m
27459a56802SKonrad Rzeszutek Wilk	help
2751fd14432SAndrew Morton          This ACPI processor uploads Power Management information to the Xen
2761fd14432SAndrew Morton	  hypervisor.
27759a56802SKonrad Rzeszutek Wilk
2781fd14432SAndrew Morton	  To do that the driver parses the Power Management data and uploads
2791fd14432SAndrew Morton	  said information to the Xen hypervisor. Then the Xen hypervisor can
2805065a706SMasanari Iida	  select the proper Cx and Pxx states. It also registers itself as the
2811fd14432SAndrew Morton	  SMM so that other drivers (such as ACPI cpufreq scaling driver) will
2821fd14432SAndrew Morton	  not load.
28359a56802SKonrad Rzeszutek Wilk
2841fd14432SAndrew Morton          To compile this driver as a module, choose M here: the module will be
2851fd14432SAndrew Morton	  called xen_acpi_processor  If you do not know what to choose, select
2861fd14432SAndrew Morton	  M here. If the CPUFREQ drivers are built in, select Y here.
28759a56802SKonrad Rzeszutek Wilk
288cef12ee5SLiu, Jinsongconfig XEN_MCE_LOG
289cef12ee5SLiu, Jinsong	bool "Xen platform mcelog"
290cef12ee5SLiu, Jinsong	depends on XEN_DOM0 && X86_64 && X86_MCE
291cef12ee5SLiu, Jinsong	default n
292cef12ee5SLiu, Jinsong	help
293cef12ee5SLiu, Jinsong	  Allow kernel fetching MCE error from Xen platform and
294cef12ee5SLiu, Jinsong	  converting it into Linux mcelog format for mcelog tools
295cef12ee5SLiu, Jinsong
296c2374bf5SIan Campbellconfig XEN_HAVE_PVMMU
297c2374bf5SIan Campbell       bool
298c2374bf5SIan Campbell
299be81c8a1SDaniel Kiperconfig XEN_EFI
300be81c8a1SDaniel Kiper	def_bool y
301be1aaf4eSShannon Zhao	depends on (ARM || ARM64 || X86_64) && EFI
302be81c8a1SDaniel Kiper
303628c28eeSDavid Vrabelconfig XEN_AUTO_XLATE
304628c28eeSDavid Vrabel	def_bool y
305628c28eeSDavid Vrabel	depends on ARM || ARM64 || XEN_PVHVM
306628c28eeSDavid Vrabel	help
307628c28eeSDavid Vrabel	  Support for auto-translated physmap guests.
308628c28eeSDavid Vrabel
30942068cfdSHanjun Guoconfig XEN_ACPI
31042068cfdSHanjun Guo	def_bool y
31142068cfdSHanjun Guo	depends on X86 && ACPI
31242068cfdSHanjun Guo
313a11f4f0aSBoris Ostrovskyconfig XEN_SYMS
314a11f4f0aSBoris Ostrovsky       bool "Xen symbols"
315a11f4f0aSBoris Ostrovsky       depends on X86 && XEN_DOM0 && XENFS
316a11f4f0aSBoris Ostrovsky       default y if KALLSYMS
317a11f4f0aSBoris Ostrovsky       help
318a11f4f0aSBoris Ostrovsky          Exports hypervisor symbols (along with their types and addresses) via
319a11f4f0aSBoris Ostrovsky          /proc/xen/xensyms file, similar to /proc/kallsyms
320a11f4f0aSBoris Ostrovsky
3215f141548SBoris Ostrovskyconfig XEN_HAVE_VPMU
3225f141548SBoris Ostrovsky       bool
3235f141548SBoris Ostrovsky
32427fb7f00SRandy Dunlapendmenu
325