mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
tools: introduce some new parameters to set rdm policy
This patch introduces user configurable parameters to specify RDM
resource and according policies,
Global RDM parameter:
rdm = "strategy=host,policy=strict/relaxed"
Per-device RDM parameter:
pci = [ 'sbdf, rdm_policy=strict/relaxed' ]
Global RDM parameter, "strategy", allows user to specify reserved regions
explicitly, Currently, using 'host' to include all reserved regions reported
on this platform which is good to handle hotplug scenario. In the future
this parameter may be further extended to allow specifying random regions,
e.g. even those belonging to another platform as a preparation for live
migration with passthrough devices. By default this isn't set so we don't
check all rdms. Instead, we just check rdm specific to a given device if
you're assigning this kind of device. Note this option is not recommended
unless you can make sure any conflict does exist.
'strict/relaxed' policy decides how to handle conflict when reserving RDM
regions in pfn space. If conflict exists, 'strict' means an immediate error
so VM can't keep running, while 'relaxed' allows moving forward with a
warning message thrown out.
Default per-device RDM policy is same as default global RDM policy as being
'relaxed'. And the per-device policy would override the global policy like
others.
CC: Ian Jackson <ian.jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Ian Campbell <ian.campbell@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Checked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
9b34056cb4
commit
63bc1398ad
6 files changed
+141
No files matched your search
@@ -111,6 +111,30 @@ in the config file:
|
||||
To override for a specific device:
|
||||
pci = [ '01:00.0,msitranslate=0', '03:00.0' ]
|
||||
|
||||
RDM, 'reserved device memory', for PCI Device Passthrough
|
||||
---------------------------------------------------------
|
||||
|
||||
There are some devices the BIOS controls, for e.g. USB devices to perform
|
||||
PS2 emulation. The regions of memory used for these devices are marked
|
||||
reserved in the e820 map. When we turn on DMA translation, DMA to those
|
||||
regions will fail. Hence BIOS uses RMRR to specify these regions along with
|
||||
devices that need to access these regions. OS is expected to setup
|
||||
identity mappings for these regions for these devices to access these regions.
|
||||
|
||||
While creating a VM we should reserve them in advance, and avoid any conflicts.
|
||||
So we introduce user configurable parameters to specify RDM resource and
|
||||
according policies,
|
||||
|
||||
To enable this globally, add "rdm" in the config file:
|
||||
|
||||
rdm = "strategy=host, policy=relaxed" (default policy is "relaxed")
|
||||
|
||||
Or just for a specific device:
|
||||
|
||||
pci = [ '01:00.0,rdm_policy=relaxed', '03:00.0,rdm_policy=strict' ]
|
||||
|
||||
For all the options available to RDM, see xl.cfg(5).
|
||||
|
||||
|
||||
Caveat on Conventional PCI Device Passthrough
|
||||
---------------------------------------------
|
||||
|
||||