Skip to content

Commit a056332

Browse files
s390x/pv: prepare for memory devices
Let's avoid checking for the maxram_size, and instead rely on the memory limit determined in s390_memory_init(), that might be larger than maxram_size, for example due to alignment purposes. This check now correctly mimics what the kernel will check in kvm_s390_pv_set_aside(), whereby a VM <= 2 GiB VM would end up using a segment type ASCE. Message-ID: <[email protected]> Acked-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Nina Schoetterl-Glausch <[email protected]> Signed-off-by: David Hildenbrand <[email protected]>
1 parent 1e86400 commit a056332

File tree

1 file changed

+1
-1
lines changed
  • target/s390x/kvm

1 file changed

+1
-1
lines changed

target/s390x/kvm/pv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms)
133133
* If the feature is not present or if the VM is not larger than 2 GiB,
134134
* KVM_PV_ASYNC_CLEANUP_PREPARE fill fail; no point in attempting it.
135135
*/
136-
if ((MACHINE(ms)->ram_size <= 2 * GiB) ||
136+
if (s390_get_memory_limit(ms) <= 2 * GiB ||
137137
!kvm_check_extension(kvm_state, KVM_CAP_S390_PROTECTED_ASYNC_DISABLE)) {
138138
return false;
139139
}

0 commit comments

Comments
 (0)