David Hildenbrand 296e88fd9f virito-mem: Implement get_min_alignment()
The block size determines the alignment requirements. Implement
get_min_alignment() of the TYPE_MEMORY_DEVICE interface.

This allows auto-assignment of a properly aligned address in guest
physical address space. For example, when specifying a 2GB block size
for a virtio-mem device with 10GB with a memory setup "-m 4G, 20G",
we'll no longer fail when realizing.

Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Wei Yang <richardw.yang@linux.intel.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20201008083029.9504-7-david@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-11-03 07:19:26 -05:00
..
2020-10-21 11:36:19 +02:00
2020-08-21 06:30:32 -04:00
2020-09-09 09:27:09 -04:00
2020-11-02 17:17:29 +00:00
2020-10-27 11:10:44 +00:00
2020-11-02 17:17:29 +00:00
2020-11-03 07:19:26 -05:00
2020-11-02 11:56:55 +00:00
2020-10-29 11:40:04 +00:00
2020-08-21 06:30:25 -04:00
2020-08-21 06:30:33 -04:00
2020-08-27 14:04:55 -04:00
2020-09-09 09:27:09 -04:00
2020-08-21 06:30:25 -04:00
2020-10-29 11:40:04 +00:00
2020-08-21 06:30:33 -04:00
2020-08-21 06:30:33 -04:00
2020-11-01 12:30:52 -07:00
2020-08-21 06:30:33 -04:00
2020-08-21 06:30:33 -04:00