On 01.02.2024 18:01, Roger Pau Monne wrote: > Currently when a unity range overlaps with memory being used as RAM by the > hypervisor the result would be that the IOMMU gets disabled. However that's > not enough, as even with the IOMMU disabled the device will still access the > affected RAM areas.
Hmm, no, I think this is going too far. Not the least because it is s/will/may/. But also because if we really wanted such behavior, we ought to also parse the respective ACPI tables when the "iommu=off". > Note that IVMD or RMRR ranges being placed over RAM is a firmware bug. As written this is wrong: They're typically in RAM, just that the E820 type for that range should not be RAM_TYPE_CONVENTIONAL. > Doing so also allows to simplify the code and use a switch over the reported > memory type(s). I'm afraid this isn't right either: page_get_ram_type() can set multiple bits in its output. Jan
