Re: [PATCH/RFC] KVM: selftests: introduce P44V64 for z196 and EC12

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 05.07.21 11:53, David Hildenbrand wrote:
On 01.07.21 17:38, Christian Borntraeger wrote:
Older machines likes z196 and zEC12 do only support 44 bits of physical
addresses. Make this the default and check via IBC if we are on a later
machine. We then add P47V64 as an additional model.

Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Fixes: 1bc603af73dd ("KVM: selftests: introduce P47V64 for s390x")

[...]

+#ifdef __s390x__
+    {
+        int kvm_fd, vm_fd;
+        struct kvm_s390_vm_cpu_processor info;
+
+        kvm_fd = open_kvm_dev_path_or_exit();
+        vm_fd = ioctl(kvm_fd, KVM_CREATE_VM, 0);
+        kvm_device_access(vm_fd, KVM_S390_VM_CPU_MODEL,
+                  KVM_S390_VM_CPU_PROCESSOR, &info, false);

Can we always assume to run on a kernel where this won't fail?

As far as I can tell, the selftests are bundled with a given kernel (and
there it should not fail). I guess most selftests will fail with a 3.x
kernel and we do not care?

+        close(vm_fd);
+        close(kvm_fd);
+        /* Starting with z13 we have 47bits of physical address */

This matches the definition in the QEMU cpu models.

+        if (info.ibc >= 0x30)
+            guest_mode_append(VM_MODE_P47V64_4K, true, true);
+    }
+#endif


In general, LGTM





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux