xref: /linux/drivers/xen/Kconfig (revision 703fc13a3f6615e29ce3eb862275d7b58a5d03ba)
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
40*703fc13aSVitaly Kuznetsov	    1) target domain: ensure that memory auto online policy is in
41*703fc13aSVitaly Kuznetsov	       effect by checking /sys/devices/system/memory/auto_online_blocks
42*703fc13aSVitaly Kuznetsov	       file (should be 'online').
43*703fc13aSVitaly Kuznetsov
44*703fc13aSVitaly Kuznetsov	    2) control domain: xl mem-max <target-domain> <maxmem>
45080e2be7SDaniel Kiper	       where <maxmem> is >= requested memory size,
46080e2be7SDaniel Kiper
47*703fc13aSVitaly 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
51*703fc13aSVitaly Kuznetsov	       /sys/devices/system/xen_memory/xen_memory0/target_kb on the
52*703fc13aSVitaly Kuznetsov	       target domain.
53080e2be7SDaniel Kiper
54*703fc13aSVitaly Kuznetsov	  Alternatively, if memory auto onlining was not requested at step 1
55*703fc13aSVitaly Kuznetsov	  the newly added memory can be manually onlined in the target domain
56*703fc13aSVitaly Kuznetsov	  by doing the following:
57*703fc13aSVitaly Kuznetsov
58*703fc13aSVitaly Kuznetsov		for i in /sys/devices/system/memory/memory*/state; do \
59080e2be7SDaniel Kiper		  [ "`cat "$i"`" = offline ] && echo online > "$i"; done
60080e2be7SDaniel Kiper
61*703fc13aSVitaly 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
199d9d660f6SJuergen Grossconfig XEN_SCSI_BACKEND
200d9d660f6SJuergen Gross	tristate "XEN SCSI backend driver"
201d9d660f6SJuergen Gross	depends on XEN && XEN_BACKEND && TARGET_CORE
202d9d660f6SJuergen Gross	help
203d9d660f6SJuergen Gross	  The SCSI backend driver allows the kernel to export its SCSI Devices
204d9d660f6SJuergen Gross	  to other guests via a high-performance shared-memory interface.
205d9d660f6SJuergen Gross	  Only needed for systems running as XEN driver domains (e.g. Dom0) and
206d9d660f6SJuergen Gross	  if guests need generic access to SCSI devices.
207d9d660f6SJuergen Gross
208d8414d3cSBastian Blankconfig XEN_PRIVCMD
209d8414d3cSBastian Blank	tristate
210d8414d3cSBastian Blank	depends on XEN
211d8414d3cSBastian Blank	default m
212d8414d3cSBastian Blank
213dcb93b96SLiu Jinsongconfig XEN_STUB
214dcb93b96SLiu Jinsong	bool "Xen stub drivers"
21576fc2537SKonrad Rzeszutek Wilk	depends on XEN && X86_64 && BROKEN
216dcb93b96SLiu Jinsong	default n
217dcb93b96SLiu Jinsong	help
218dcb93b96SLiu Jinsong	  Allow kernel to install stub drivers, to reserve space for Xen drivers,
219dcb93b96SLiu Jinsong	  i.e. memory hotplug and cpu hotplug, and to block native drivers loaded,
220dcb93b96SLiu Jinsong	  so that real Xen drivers can be modular.
221dcb93b96SLiu Jinsong
222dcb93b96SLiu Jinsong	  To enable Xen features like cpu and memory hotplug, select Y here.
223dcb93b96SLiu Jinsong
224ef92e7caSLiu Jinsongconfig XEN_ACPI_HOTPLUG_MEMORY
225ef92e7caSLiu Jinsong	tristate "Xen ACPI memory hotplug"
226ef92e7caSLiu Jinsong	depends on XEN_DOM0 && XEN_STUB && ACPI
227ef92e7caSLiu Jinsong	default n
228ef92e7caSLiu Jinsong	help
229ef92e7caSLiu Jinsong	  This is Xen ACPI memory hotplug.
230ef92e7caSLiu Jinsong
231ef92e7caSLiu Jinsong	  Currently Xen only support ACPI memory hot-add. If you want
232ef92e7caSLiu Jinsong	  to hot-add memory at runtime (the hot-added memory cannot be
233ef92e7caSLiu Jinsong	  removed until machine stop), select Y/M here, otherwise select N.
234ef92e7caSLiu Jinsong
23539adc483SLiu Jinsongconfig XEN_ACPI_HOTPLUG_CPU
23639adc483SLiu Jinsong	tristate "Xen ACPI cpu hotplug"
23739adc483SLiu Jinsong	depends on XEN_DOM0 && XEN_STUB && ACPI
23839adc483SLiu Jinsong	select ACPI_CONTAINER
23939adc483SLiu Jinsong	default n
24039adc483SLiu Jinsong	help
24139adc483SLiu Jinsong	  Xen ACPI cpu enumerating and hotplugging
24239adc483SLiu Jinsong
24339adc483SLiu Jinsong	  For hotplugging, currently Xen only support ACPI cpu hotadd.
24439adc483SLiu Jinsong	  If you want to hotadd cpu at runtime (the hotadded cpu cannot
24539adc483SLiu Jinsong	  be removed until machine stop), select Y/M here.
24639adc483SLiu Jinsong
24759a56802SKonrad Rzeszutek Wilkconfig XEN_ACPI_PROCESSOR
24859a56802SKonrad Rzeszutek Wilk	tristate "Xen ACPI processor"
249df7a3ee2SKonrad Rzeszutek Wilk	depends on XEN && X86 && ACPI_PROCESSOR && CPU_FREQ
250102b208eSKonrad Rzeszutek Wilk	default m
25159a56802SKonrad Rzeszutek Wilk	help
2521fd14432SAndrew Morton          This ACPI processor uploads Power Management information to the Xen
2531fd14432SAndrew Morton	  hypervisor.
25459a56802SKonrad Rzeszutek Wilk
2551fd14432SAndrew Morton	  To do that the driver parses the Power Management data and uploads
2561fd14432SAndrew Morton	  said information to the Xen hypervisor. Then the Xen hypervisor can
2575065a706SMasanari Iida	  select the proper Cx and Pxx states. It also registers itself as the
2581fd14432SAndrew Morton	  SMM so that other drivers (such as ACPI cpufreq scaling driver) will
2591fd14432SAndrew Morton	  not load.
26059a56802SKonrad Rzeszutek Wilk
2611fd14432SAndrew Morton          To compile this driver as a module, choose M here: the module will be
2621fd14432SAndrew Morton	  called xen_acpi_processor  If you do not know what to choose, select
2631fd14432SAndrew Morton	  M here. If the CPUFREQ drivers are built in, select Y here.
26459a56802SKonrad Rzeszutek Wilk
265cef12ee5SLiu, Jinsongconfig XEN_MCE_LOG
266cef12ee5SLiu, Jinsong	bool "Xen platform mcelog"
267cef12ee5SLiu, Jinsong	depends on XEN_DOM0 && X86_64 && X86_MCE
268cef12ee5SLiu, Jinsong	default n
269cef12ee5SLiu, Jinsong	help
270cef12ee5SLiu, Jinsong	  Allow kernel fetching MCE error from Xen platform and
271cef12ee5SLiu, Jinsong	  converting it into Linux mcelog format for mcelog tools
272cef12ee5SLiu, Jinsong
273c2374bf5SIan Campbellconfig XEN_HAVE_PVMMU
274c2374bf5SIan Campbell       bool
275c2374bf5SIan Campbell
276be81c8a1SDaniel Kiperconfig XEN_EFI
277be81c8a1SDaniel Kiper	def_bool y
278be81c8a1SDaniel Kiper	depends on X86_64 && EFI
279be81c8a1SDaniel Kiper
280628c28eeSDavid Vrabelconfig XEN_AUTO_XLATE
281628c28eeSDavid Vrabel	def_bool y
282628c28eeSDavid Vrabel	depends on ARM || ARM64 || XEN_PVHVM
283628c28eeSDavid Vrabel	help
284628c28eeSDavid Vrabel	  Support for auto-translated physmap guests.
285628c28eeSDavid Vrabel
28642068cfdSHanjun Guoconfig XEN_ACPI
28742068cfdSHanjun Guo	def_bool y
28842068cfdSHanjun Guo	depends on X86 && ACPI
28942068cfdSHanjun Guo
290a11f4f0aSBoris Ostrovskyconfig XEN_SYMS
291a11f4f0aSBoris Ostrovsky       bool "Xen symbols"
292a11f4f0aSBoris Ostrovsky       depends on X86 && XEN_DOM0 && XENFS
293a11f4f0aSBoris Ostrovsky       default y if KALLSYMS
294a11f4f0aSBoris Ostrovsky       help
295a11f4f0aSBoris Ostrovsky          Exports hypervisor symbols (along with their types and addresses) via
296a11f4f0aSBoris Ostrovsky          /proc/xen/xensyms file, similar to /proc/kallsyms
297a11f4f0aSBoris Ostrovsky
2985f141548SBoris Ostrovskyconfig XEN_HAVE_VPMU
2995f141548SBoris Ostrovsky       bool
3005f141548SBoris Ostrovsky
30127fb7f00SRandy Dunlapendmenu
302