aboutsummaryrefslogtreecommitdiff
path: root/hw/s390-virtio-bus.c
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2011-04-13 10:55:11 +0200
committerAlexander Graf <agraf@suse.de>2011-05-20 17:35:12 +0200
commitd1ff903ca592420b196ce261428e035b69aa470f (patch)
tree9a9c5bcf5ea24d00038383dacc1223bbc8e70bd8 /hw/s390-virtio-bus.c
parent1f20626679964730f991a9faeb5d9438c2827465 (diff)
s390x: keep hint on virtio managing size
The s390x virtio bus keeps management information on virtio after the top of the guest's RAM. We need to be able to tell the guest the size of its RAM (without virtio stuff), but also be able to trap when the guest accesses RAM outside of its scope (including virtio stuff). So we need a variable telling us the size of the virtio stuff, so we can calculate the highest available RAM address from that. While at it, also increase the maximum number of virtio pages, so we play along well with more recent kernels that spawn a ridiculous number of virtio console adapters. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/s390-virtio-bus.c')
-rw-r--r--hw/s390-virtio-bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/s390-virtio-bus.c b/hw/s390-virtio-bus.c
index bb49e393ec..d4a12f7531 100644
--- a/hw/s390-virtio-bus.c
+++ b/hw/s390-virtio-bus.c
@@ -60,6 +60,9 @@ static const VirtIOBindings virtio_s390_bindings;
static ram_addr_t s390_virtio_device_num_vq(VirtIOS390Device *dev);
+/* length of VirtIO device pages */
+const target_phys_addr_t virtio_size = S390_DEVICE_PAGES * TARGET_PAGE_SIZE;
+
VirtIOS390Bus *s390_virtio_bus_init(ram_addr_t *ram_size)
{
VirtIOS390Bus *bus;