iommu=off would kill the SWIOTLB as well, while swiotlb=1 consumes 1MB. However, maintaining guests' kernel commandlines is something we'd like to stay away from if possible. It's certainly a short-term answer, or something individual customers can choose to do today. Thanks! Ben On Tue, Aug 23, 2016 at 7:44 PM, Yang Zhang <yang.zhang.wz@xxxxxxxxx> wrote: > On 2016/8/23 7:45, Benjamin Serebrin wrote: >> >> Hi, kvm land, >> >> The Linux SWIOTLB runs by default in our guest images (and likely all >> Linux guests in any cloud), even though SWIOTLB will never actually be >> used. By default, the SWIOTLB allocates a 64 MB bounce buffer in >> contiguous low memory that is never used, so that RAM is wasted. I'd >> like to gather opinions on how to tell guests not to bother wasting >> that RAM. > > > Does the kernel parameter swiotlb cannot solve your problem? I usually set > the swiotlb = 1 page to reduce memory wasting for swiotlb. > > >> >> >> Possible solutions that we've discussed internally: >> - We could have an explicit detection that the guest can use to >> decide to not allocate the SWIOTLB. >> - The easiest is a hypervisor leaf CPUID bit. >> - However, ACPI is arguably a more appropriate place for this kind >> of platform information. ACPI is a bit more involved to implement in >> guest and BIOS; is it worth the trouble? >> - Let the guest infer that no SWIOTLB is needed, perhaps by detecting >> the absence of ACPI hotplug slots, and (at late boot) all known PCIe >> devices have DMA masks capable of addressing all of RAM. >> >> The timing is nice; we'll see if there's interest in holding a short >> BoF at this week's KVM forum. > > > > > -- > Yang > Alibaba Cloud Computing -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html