qemu-kvm: require 4K aligned resource size for memory
commit9171a8477cfa7681e3feb7ed80a767c2ee00e577
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 20 Oct 2009 17:15:09 +0000 (20 19:15 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 22 Oct 2009 16:37:28 +0000 (22 14:37 -0200)
tree86b7024b24cbe8abbe39442565646ef7036ae748
parent10ca841a95747ffb4af05d5c91ddafae98571eb2
qemu-kvm: require 4K aligned resource size for memory

KVM does not virtualize low address bits for memory accesses, so we must
require that PCI BAR size is a multiple of 4K for passthrough to work
(this also guarantees that address is 4K aligned).

Users of recent linux kernels can force resource size up to 4K
using:

commit 32a9a682bef2f6fce7026bd94d1ce20028b0e52d
Author: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
Date:   Mon Mar 16 17:13:39 2009 +0900
PCI: allow assignment of memory resources with a specified alignment

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
hw/device-assignment.c