/* * Set swiotlb to 1 so that bounce buffers are allocated and used for * devices that can't support DMA to encrypted memory.
*/ if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
x86_swiotlb_enable = true;
/* * Guest with guest memory encryption currently perform all DMA through * bounce buffers as the hypervisor can't access arbitrary VM memory * that is not explicitly shared with it.
*/ if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
x86_swiotlb_enable = true;
x86_swiotlb_flags |= SWIOTLB_FORCE;
}
} #else staticinlinevoid __init pci_swiotlb_detect(void)
{
} #define x86_swiotlb_flags 0 #endif/* CONFIG_SWIOTLB */
static __init int iommu_setup(char *p)
{
iommu_merge = 1;
if (!p) return -EINVAL;
while (*p) { if (!strncmp(p, "off", 3))
no_iommu = 1; /* gart_parse_options has more force support */ if (!strncmp(p, "force", 5))
force_iommu = 1; if (!strncmp(p, "noforce", 7)) {
iommu_merge = 0;
force_iommu = 0;
}
if (!strncmp(p, "biomerge", 8)) {
iommu_merge = 1;
force_iommu = 1;
} if (!strncmp(p, "panic", 5))
panic_on_overflow = 1; if (!strncmp(p, "nopanic", 7))
panic_on_overflow = 0; if (!strncmp(p, "merge", 5)) {
iommu_merge = 1;
force_iommu = 1;
} if (!strncmp(p, "nomerge", 7))
iommu_merge = 0; if (!strncmp(p, "forcesac", 8))
pr_warn("forcesac option ignored.\n"); if (!strncmp(p, "allowdac", 8))
pr_warn("allowdac option ignored.\n"); if (!strncmp(p, "nodac", 5))
pr_warn("nodac option ignored.\n"); if (!strncmp(p, "usedac", 6)) {
disable_dac_quirk = true; return 1;
} #ifdef CONFIG_SWIOTLB if (!strncmp(p, "soft", 4))
x86_swiotlb_enable = true; #endif if (!strncmp(p, "pt", 2))
iommu_set_default_passthrough(true); if (!strncmp(p, "nopt", 4))
iommu_set_default_translated(true);
gart_parse_options(p);
p += strcspn(p, ","); if (*p == ',')
++p;
} return 0;
}
early_param("iommu", iommu_setup);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.