s390x/s390-virtio-ccw: move setting the maximum guest size from sclp to machine code
authorDavid Hildenbrand <david@redhat.com>
Thu, 19 Dec 2024 14:41:06 +0000 (15:41 +0100)
committerDavid Hildenbrand <david@redhat.com>
Sat, 21 Dec 2024 14:59:59 +0000 (15:59 +0100)
commit3c6fb557d295949bea291c3bf88ee9c83392e78c
treee08619720c21c4c53b8447fbce45fd9464408946
parent85489fc3652d0c4433c940f1a80a952e8cb5d3cb
s390x/s390-virtio-ccw: move setting the maximum guest size from sclp to machine code

Nowadays, it feels more natural to have that code located in
s390_memory_init(), where we also have direct access to the machine
object.

While at it, use the actual RAM size, not the maximum RAM size which
cannot currently be reached without support for any memory devices.
Consequently update s390_pv_vm_try_disable_async() to rely on the RAM size
as well, to avoid temporary issues while we further rework that
handling.

set_memory_limit() is temporary, we'll merge it with
s390_set_memory_limit() next.

Message-ID: <20241219144115.2820241-6-david@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
hw/s390x/s390-virtio-ccw.c
hw/s390x/sclp.c
target/s390x/kvm/pv.c