On 21/09/2015 15:05, Igor Mammedov wrote: >> > To some extend, enforcing natural alignment would be okay as a >> > workaround for the virtio bug as well. It would also make it easier to >> > ensure that hotplugged hugetlbfs-backed memory can use hugepages in the >> > guest. Does it make sense to you? > in current machine types we already enforce backend-s address/size alignment, > which is file's page size for hugetlbfs-backed memory and 2Mb for RAM backend.
Right, but it's not enough if the guest's physical address is not aligned to 2Mb/1Gb too. This is why we changed i440FX and q35 to have only 3 and 2 gigabytes of low memory (down from 3.5 and 2 IIRC). > So I guess we could try to apply workaround to virtio on guest side, > aligning and limiting max buffer size to 2Mb, it should work for 'old' > machine types as well. That would make sense and it would be complementary to natural alignment of DIMMs in the host. This would give: host guest old old fails old new works (virtio workaround) new old works (natural alignment) new new works (choose your favorite workaround) Paolo