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 16080e2be7SDaniel Kiper help 17080e2be7SDaniel Kiper Memory hotplug support for Xen balloon driver allows expanding memory 18080e2be7SDaniel Kiper available for the system above limit declared at system startup. 19080e2be7SDaniel Kiper It is very useful on critical systems which require long 20080e2be7SDaniel Kiper run without rebooting. 21080e2be7SDaniel Kiper 22*0df683ffSRoger Pau Monne It's also very useful for non PV domains to obtain unpopulated physical 23*0df683ffSRoger Pau Monne memory ranges to use in order to map foreign memory or grants. 24*0df683ffSRoger Pau Monne 25080e2be7SDaniel Kiper Memory could be hotplugged in following steps: 26080e2be7SDaniel Kiper 27703fc13aSVitaly Kuznetsov 1) target domain: ensure that memory auto online policy is in 28703fc13aSVitaly Kuznetsov effect by checking /sys/devices/system/memory/auto_online_blocks 29703fc13aSVitaly Kuznetsov file (should be 'online'). 30703fc13aSVitaly Kuznetsov 31703fc13aSVitaly Kuznetsov 2) control domain: xl mem-max <target-domain> <maxmem> 32080e2be7SDaniel Kiper where <maxmem> is >= requested memory size, 33080e2be7SDaniel Kiper 34703fc13aSVitaly Kuznetsov 3) control domain: xl mem-set <target-domain> <memory> 35080e2be7SDaniel Kiper where <memory> is requested memory size; alternatively memory 36080e2be7SDaniel Kiper could be added by writing proper value to 37080e2be7SDaniel Kiper /sys/devices/system/xen_memory/xen_memory0/target or 38703fc13aSVitaly Kuznetsov /sys/devices/system/xen_memory/xen_memory0/target_kb on the 39703fc13aSVitaly Kuznetsov target domain. 40080e2be7SDaniel Kiper 41703fc13aSVitaly Kuznetsov Alternatively, if memory auto onlining was not requested at step 1 42703fc13aSVitaly Kuznetsov the newly added memory can be manually onlined in the target domain 43703fc13aSVitaly Kuznetsov by doing the following: 44703fc13aSVitaly Kuznetsov 45703fc13aSVitaly Kuznetsov for i in /sys/devices/system/memory/memory*/state; do \ 46080e2be7SDaniel Kiper [ "`cat "$i"`" = offline ] && echo online > "$i"; done 47080e2be7SDaniel Kiper 48703fc13aSVitaly Kuznetsov or by adding the following line to udev rules: 49080e2be7SDaniel Kiper 50080e2be7SDaniel Kiper SUBSYSTEM=="memory", ACTION=="add", RUN+="/bin/sh -c '[ -f /sys$devpath/state ] && echo online > /sys$devpath/state'" 51080e2be7SDaniel Kiper 52633d6f17SJuergen Grossconfig XEN_BALLOON_MEMORY_HOTPLUG_LIMIT 53633d6f17SJuergen Gross int "Hotplugged memory limit (in GiB) for a PV guest" 54633d6f17SJuergen Gross default 512 if X86_64 55633d6f17SJuergen Gross default 4 if X86_32 56633d6f17SJuergen Gross range 0 64 if X86_32 57633d6f17SJuergen Gross depends on XEN_HAVE_PVMMU 58633d6f17SJuergen Gross depends on XEN_BALLOON_MEMORY_HOTPLUG 59633d6f17SJuergen Gross help 60633d6f17SJuergen Gross Maxmium amount of memory (in GiB) that a PV guest can be 61633d6f17SJuergen Gross expanded to when using memory hotplug. 62633d6f17SJuergen Gross 63633d6f17SJuergen Gross A PV guest can have more memory than this limit if is 64633d6f17SJuergen Gross started with a larger maximum. 65633d6f17SJuergen Gross 66633d6f17SJuergen Gross This value is used to allocate enough space in internal 67633d6f17SJuergen Gross tables needed for physical memory administration. 68633d6f17SJuergen Gross 69197ecb38SMarek Marczykowski-Góreckiconfig XEN_SCRUB_PAGES_DEFAULT 70197ecb38SMarek Marczykowski-Górecki bool "Scrub pages before returning them to system by default" 711775826cSJeremy Fitzhardinge depends on XEN_BALLOON 721775826cSJeremy Fitzhardinge default y 731775826cSJeremy Fitzhardinge help 741775826cSJeremy Fitzhardinge Scrub pages before returning them to the system for reuse by 751775826cSJeremy Fitzhardinge other domains. This makes sure that any confidential data 76af320de9SGeert Uytterhoeven is not accidentally visible to other domains. It is more 77197ecb38SMarek Marczykowski-Górecki secure, but slightly less efficient. This can be controlled with 78197ecb38SMarek Marczykowski-Górecki xen_scrub_pages=0 parameter and 79197ecb38SMarek Marczykowski-Górecki /sys/devices/system/xen_memory/xen_memory0/scrub_pages. 80197ecb38SMarek Marczykowski-Górecki This option only sets the default value. 81197ecb38SMarek Marczykowski-Górecki 821775826cSJeremy Fitzhardinge If in doubt, say yes. 831107ba88SAlex Zeffertt 84f7116284SIan Campbellconfig XEN_DEV_EVTCHN 85f7116284SIan Campbell tristate "Xen /dev/xen/evtchn device" 86f7116284SIan Campbell default y 87f7116284SIan Campbell help 886b2aac42SMasanari Iida The evtchn driver allows a userspace process to trigger event 89f7116284SIan Campbell channels and to receive notification of an event channel 90f7116284SIan Campbell firing. 91f7116284SIan Campbell If in doubt, say yes. 92f7116284SIan Campbell 93df660251SIan Campbellconfig XEN_BACKEND 94329620a8SJeremy Fitzhardinge bool "Backend driver support" 95ea9e57d0SJason Andryuk default XEN_DOM0 96df660251SIan Campbell help 97df660251SIan Campbell Support for backend device drivers that provide I/O services 98df660251SIan Campbell to other virtual machines. 99df660251SIan Campbell 1001107ba88SAlex Zefferttconfig XENFS 1011107ba88SAlex Zeffertt tristate "Xen filesystem" 102d8414d3cSBastian Blank select XEN_PRIVCMD 1031107ba88SAlex Zeffertt default y 1041107ba88SAlex Zeffertt help 1051107ba88SAlex Zeffertt The xen filesystem provides a way for domains to share 1061107ba88SAlex Zeffertt information with each other and with the hypervisor. 1071107ba88SAlex Zeffertt For example, by reading and writing the "xenbus" file, guests 1081107ba88SAlex Zeffertt may pass arbitrary information to the initial domain. 1091107ba88SAlex Zeffertt If in doubt, say yes. 1101107ba88SAlex Zeffertt 1111107ba88SAlex Zefferttconfig XEN_COMPAT_XENFS 1121107ba88SAlex Zeffertt bool "Create compatibility mount point /proc/xen" 1131107ba88SAlex Zeffertt depends on XENFS 1141107ba88SAlex Zeffertt default y 1151107ba88SAlex Zeffertt help 1161107ba88SAlex Zeffertt The old xenstore userspace tools expect to find "xenbus" 1171107ba88SAlex Zeffertt under /proc/xen, but "xenbus" is now found at the root of the 1181107ba88SAlex Zeffertt xenfs filesystem. Selecting this causes the kernel to create 119692105b8SMatt LaPlante the compatibility mount point /proc/xen if it is running on 1201107ba88SAlex Zeffertt a xen platform. 1211107ba88SAlex Zeffertt If in doubt, say yes. 1221107ba88SAlex Zeffertt 123cff7e81bSJeremy Fitzhardingeconfig XEN_SYS_HYPERVISOR 124cff7e81bSJeremy Fitzhardinge bool "Create xen entries under /sys/hypervisor" 12527fb7f00SRandy Dunlap depends on SYSFS 126cff7e81bSJeremy Fitzhardinge select SYS_HYPERVISOR 127cff7e81bSJeremy Fitzhardinge default y 128cff7e81bSJeremy Fitzhardinge help 129cff7e81bSJeremy Fitzhardinge Create entries under /sys/hypervisor describing the Xen 130cff7e81bSJeremy Fitzhardinge hypervisor environment. When running native or in another 131cff7e81bSJeremy Fitzhardinge virtual environment, /sys/hypervisor will still be present, 132cff7e81bSJeremy Fitzhardinge but will have no xen contents. 13327fb7f00SRandy Dunlap 1342de06cc1SIan Campbellconfig XEN_XENBUS_FRONTEND 1352de06cc1SIan Campbell tristate 1369c4bc1c2SLinus Torvalds 137ab31523cSGerd Hoffmannconfig XEN_GNTDEV 138ab31523cSGerd Hoffmann tristate "userspace grant access device driver" 139ab31523cSGerd Hoffmann depends on XEN 1401f169f66SStefano Stabellini default m 141ab31523cSGerd Hoffmann select MMU_NOTIFIER 142ab31523cSGerd Hoffmann help 143ab31523cSGerd Hoffmann Allows userspace processes to use grants. 1442de06cc1SIan Campbell 145932d6562SOleksandr Andrushchenkoconfig XEN_GNTDEV_DMABUF 146932d6562SOleksandr Andrushchenko bool "Add support for dma-buf grant access device driver extension" 147fa6614d8SJason Gunthorpe depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC 148fa6614d8SJason Gunthorpe select DMA_SHARED_BUFFER 149932d6562SOleksandr Andrushchenko help 150932d6562SOleksandr Andrushchenko Allows userspace processes and kernel modules to use Xen backed 151932d6562SOleksandr Andrushchenko dma-buf implementation. With this extension grant references to 152932d6562SOleksandr Andrushchenko the pages of an imported dma-buf can be exported for other domain 153932d6562SOleksandr Andrushchenko use and grant references coming from a foreign domain can be 154932d6562SOleksandr Andrushchenko converted into a local dma-buf for local export. 155932d6562SOleksandr Andrushchenko 156dd314058SDaniel De Graafconfig XEN_GRANT_DEV_ALLOC 157dd314058SDaniel De Graaf tristate "User-space grant reference allocator driver" 158dd314058SDaniel De Graaf depends on XEN 1591f169f66SStefano Stabellini default m 160dd314058SDaniel De Graaf help 161dd314058SDaniel De Graaf Allows userspace processes to create pages with access granted 162dd314058SDaniel De Graaf to other domains. This can be used to implement frontend drivers 163dd314058SDaniel De Graaf or as part of an inter-domain shared memory channel. 164dd314058SDaniel De Graaf 1659bdc7304SOleksandr Andrushchenkoconfig XEN_GRANT_DMA_ALLOC 1669bdc7304SOleksandr Andrushchenko bool "Allow allocating DMA capable buffers with grant reference module" 1679bdc7304SOleksandr Andrushchenko depends on XEN && HAS_DMA 1689bdc7304SOleksandr Andrushchenko help 1699bdc7304SOleksandr Andrushchenko Extends grant table module API to allow allocating DMA capable 1709bdc7304SOleksandr Andrushchenko buffers and mapping foreign grant references on top of it. 1719bdc7304SOleksandr Andrushchenko The resulting buffer is similar to one allocated by the balloon 1729bdc7304SOleksandr Andrushchenko driver in that proper memory reservation is made by 1739bdc7304SOleksandr Andrushchenko ({increase|decrease}_reservation and VA mappings are updated if 1749bdc7304SOleksandr Andrushchenko needed). 1759bdc7304SOleksandr Andrushchenko This is useful for sharing foreign buffers with HW drivers which 1769bdc7304SOleksandr Andrushchenko cannot work with scattered buffers provided by the balloon driver, 1779bdc7304SOleksandr Andrushchenko but require DMAable memory instead. 1789bdc7304SOleksandr Andrushchenko 179b097186fSKonrad Rzeszutek Wilkconfig SWIOTLB_XEN 180b097186fSKonrad Rzeszutek Wilk def_bool y 1812775609cSKonrad Rzeszutek Wilk select SWIOTLB 182b097186fSKonrad Rzeszutek Wilk 18330edc14bSKonrad Rzeszutek Wilkconfig XEN_PCIDEV_BACKEND 18430edc14bSKonrad Rzeszutek Wilk tristate "Xen PCI-device backend driver" 18530edc14bSKonrad Rzeszutek Wilk depends on PCI && X86 && XEN 18630edc14bSKonrad Rzeszutek Wilk depends on XEN_BACKEND 1872ebdc426SKonrad Rzeszutek Wilk default m 18830edc14bSKonrad Rzeszutek Wilk help 18930edc14bSKonrad Rzeszutek Wilk The PCI device backend driver allows the kernel to export arbitrary 19030edc14bSKonrad Rzeszutek Wilk PCI devices to other guests. If you select this to be a module, you 19130edc14bSKonrad Rzeszutek Wilk will need to make sure no other driver has bound to the device(s) 19230edc14bSKonrad Rzeszutek Wilk you want to make visible to other guests. 19330edc14bSKonrad Rzeszutek Wilk 1942ebdc426SKonrad Rzeszutek Wilk The parameter "passthrough" allows you specify how you want the PCI 1952ebdc426SKonrad Rzeszutek Wilk devices to appear in the guest. You can choose the default (0) where 1962ebdc426SKonrad Rzeszutek Wilk PCI topology starts at 00.00.0, or (1) for passthrough if you want 1972ebdc426SKonrad Rzeszutek Wilk the PCI devices topology appear the same as in the host. 19830edc14bSKonrad Rzeszutek Wilk 1992ebdc426SKonrad Rzeszutek Wilk The "hide" parameter (only applicable if backend driver is compiled 2002ebdc426SKonrad Rzeszutek Wilk into the kernel) allows you to bind the PCI devices to this module 2012ebdc426SKonrad Rzeszutek Wilk from the default device drivers. The argument is the list of PCI BDFs: 2022ebdc426SKonrad Rzeszutek Wilk xen-pciback.hide=(03:00.0)(04:00.0) 20330edc14bSKonrad Rzeszutek Wilk 2042ebdc426SKonrad Rzeszutek Wilk If in doubt, say m. 205d8414d3cSBastian Blank 2065eee149aSStefano Stabelliniconfig XEN_PVCALLS_FRONTEND 2075eee149aSStefano Stabellini tristate "XEN PV Calls frontend driver" 2085eee149aSStefano Stabellini depends on INET && XEN 2095eee149aSStefano Stabellini select XEN_XENBUS_FRONTEND 2105eee149aSStefano Stabellini help 2115eee149aSStefano Stabellini Experimental frontend for the Xen PV Calls protocol 2125eee149aSStefano Stabellini (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It 2135eee149aSStefano Stabellini sends a small set of POSIX calls to the backend, which 2145eee149aSStefano Stabellini implements them. 2155eee149aSStefano Stabellini 21642d3078aSStefano Stabelliniconfig XEN_PVCALLS_BACKEND 21742d3078aSStefano Stabellini bool "XEN PV Calls backend driver" 21842d3078aSStefano Stabellini depends on INET && XEN && XEN_BACKEND 21942d3078aSStefano Stabellini help 22042d3078aSStefano Stabellini Experimental backend for the Xen PV Calls protocol 22142d3078aSStefano Stabellini (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It 22242d3078aSStefano Stabellini allows PV Calls frontends to send POSIX calls to the backend, 22342d3078aSStefano Stabellini which implements them. 22442d3078aSStefano Stabellini 22542d3078aSStefano Stabellini If in doubt, say n. 22642d3078aSStefano Stabellini 227d9d660f6SJuergen Grossconfig XEN_SCSI_BACKEND 228d9d660f6SJuergen Gross tristate "XEN SCSI backend driver" 229d9d660f6SJuergen Gross depends on XEN && XEN_BACKEND && TARGET_CORE 230d9d660f6SJuergen Gross help 231d9d660f6SJuergen Gross The SCSI backend driver allows the kernel to export its SCSI Devices 232d9d660f6SJuergen Gross to other guests via a high-performance shared-memory interface. 233d9d660f6SJuergen Gross Only needed for systems running as XEN driver domains (e.g. Dom0) and 234d9d660f6SJuergen Gross if guests need generic access to SCSI devices. 235d9d660f6SJuergen Gross 236d8414d3cSBastian Blankconfig XEN_PRIVCMD 237d8414d3cSBastian Blank tristate 238d8414d3cSBastian Blank depends on XEN 239d8414d3cSBastian Blank default m 240d8414d3cSBastian Blank 241dcb93b96SLiu Jinsongconfig XEN_STUB 242dcb93b96SLiu Jinsong bool "Xen stub drivers" 24376fc2537SKonrad Rzeszutek Wilk depends on XEN && X86_64 && BROKEN 244dcb93b96SLiu Jinsong help 245dcb93b96SLiu Jinsong Allow kernel to install stub drivers, to reserve space for Xen drivers, 246dcb93b96SLiu Jinsong i.e. memory hotplug and cpu hotplug, and to block native drivers loaded, 247dcb93b96SLiu Jinsong so that real Xen drivers can be modular. 248dcb93b96SLiu Jinsong 249dcb93b96SLiu Jinsong To enable Xen features like cpu and memory hotplug, select Y here. 250dcb93b96SLiu Jinsong 251ef92e7caSLiu Jinsongconfig XEN_ACPI_HOTPLUG_MEMORY 252ef92e7caSLiu Jinsong tristate "Xen ACPI memory hotplug" 253ef92e7caSLiu Jinsong depends on XEN_DOM0 && XEN_STUB && ACPI 254ef92e7caSLiu Jinsong help 255ef92e7caSLiu Jinsong This is Xen ACPI memory hotplug. 256ef92e7caSLiu Jinsong 257ef92e7caSLiu Jinsong Currently Xen only support ACPI memory hot-add. If you want 258ef92e7caSLiu Jinsong to hot-add memory at runtime (the hot-added memory cannot be 259ef92e7caSLiu Jinsong removed until machine stop), select Y/M here, otherwise select N. 260ef92e7caSLiu Jinsong 26139adc483SLiu Jinsongconfig XEN_ACPI_HOTPLUG_CPU 26239adc483SLiu Jinsong tristate "Xen ACPI cpu hotplug" 26339adc483SLiu Jinsong depends on XEN_DOM0 && XEN_STUB && ACPI 26439adc483SLiu Jinsong select ACPI_CONTAINER 26539adc483SLiu Jinsong help 26639adc483SLiu Jinsong Xen ACPI cpu enumerating and hotplugging 26739adc483SLiu Jinsong 26839adc483SLiu Jinsong For hotplugging, currently Xen only support ACPI cpu hotadd. 26939adc483SLiu Jinsong If you want to hotadd cpu at runtime (the hotadded cpu cannot 27039adc483SLiu Jinsong be removed until machine stop), select Y/M here. 27139adc483SLiu Jinsong 27259a56802SKonrad Rzeszutek Wilkconfig XEN_ACPI_PROCESSOR 27359a56802SKonrad Rzeszutek Wilk tristate "Xen ACPI processor" 274c4f9d9cbSJan Beulich depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ 275102b208eSKonrad Rzeszutek Wilk default m 27659a56802SKonrad Rzeszutek Wilk help 2771fd14432SAndrew Morton This ACPI processor uploads Power Management information to the Xen 2781fd14432SAndrew Morton hypervisor. 27959a56802SKonrad Rzeszutek Wilk 2801fd14432SAndrew Morton To do that the driver parses the Power Management data and uploads 2811fd14432SAndrew Morton said information to the Xen hypervisor. Then the Xen hypervisor can 2825065a706SMasanari Iida select the proper Cx and Pxx states. It also registers itself as the 2831fd14432SAndrew Morton SMM so that other drivers (such as ACPI cpufreq scaling driver) will 2841fd14432SAndrew Morton not load. 28559a56802SKonrad Rzeszutek Wilk 2861fd14432SAndrew Morton To compile this driver as a module, choose M here: the module will be 2871fd14432SAndrew Morton called xen_acpi_processor If you do not know what to choose, select 2881fd14432SAndrew Morton M here. If the CPUFREQ drivers are built in, select Y here. 28959a56802SKonrad Rzeszutek Wilk 290cef12ee5SLiu, Jinsongconfig XEN_MCE_LOG 291cef12ee5SLiu, Jinsong bool "Xen platform mcelog" 292e221065aSJan Beulich depends on XEN_DOM0 && X86_MCE 293cef12ee5SLiu, Jinsong help 294cef12ee5SLiu, Jinsong Allow kernel fetching MCE error from Xen platform and 295cef12ee5SLiu, Jinsong converting it into Linux mcelog format for mcelog tools 296cef12ee5SLiu, Jinsong 297c2374bf5SIan Campbellconfig XEN_HAVE_PVMMU 298c2374bf5SIan Campbell bool 299c2374bf5SIan Campbell 300be81c8a1SDaniel Kiperconfig XEN_EFI 301be81c8a1SDaniel Kiper def_bool y 302be1aaf4eSShannon Zhao depends on (ARM || ARM64 || X86_64) && EFI 303be81c8a1SDaniel Kiper 304628c28eeSDavid Vrabelconfig XEN_AUTO_XLATE 305628c28eeSDavid Vrabel def_bool y 306628c28eeSDavid Vrabel depends on ARM || ARM64 || XEN_PVHVM 307628c28eeSDavid Vrabel help 308628c28eeSDavid Vrabel Support for auto-translated physmap guests. 309628c28eeSDavid Vrabel 31042068cfdSHanjun Guoconfig XEN_ACPI 31142068cfdSHanjun Guo def_bool y 31242068cfdSHanjun Guo depends on X86 && ACPI 31342068cfdSHanjun Guo 314a11f4f0aSBoris Ostrovskyconfig XEN_SYMS 315a11f4f0aSBoris Ostrovsky bool "Xen symbols" 316a11f4f0aSBoris Ostrovsky depends on X86 && XEN_DOM0 && XENFS 317a11f4f0aSBoris Ostrovsky default y if KALLSYMS 318a11f4f0aSBoris Ostrovsky help 319a11f4f0aSBoris Ostrovsky Exports hypervisor symbols (along with their types and addresses) via 320a11f4f0aSBoris Ostrovsky /proc/xen/xensyms file, similar to /proc/kallsyms 321a11f4f0aSBoris Ostrovsky 3225f141548SBoris Ostrovskyconfig XEN_HAVE_VPMU 3235f141548SBoris Ostrovsky bool 3245f141548SBoris Ostrovsky 325b3383974SOleksandr Andrushchenkoconfig XEN_FRONT_PGDIR_SHBUF 326b3383974SOleksandr Andrushchenko tristate 327b3383974SOleksandr Andrushchenko 32827fb7f00SRandy Dunlapendmenu 329