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