Re: kvm/queue demand paging test and s390

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

 



On 10.03.20 17:54, Christian Borntraeger wrote:
> For s390 the guest memory size must be 1M aligned. I need something like the following to make this work:
> 
> diff --git a/tools/testing/selftests/kvm/demand_paging_test.c b/tools/testing/selftests/kvm/demand_paging_test.c
> index c1e326d3ed7f..f85ec3f01a35 100644
> --- a/tools/testing/selftests/kvm/demand_paging_test.c
> +++ b/tools/testing/selftests/kvm/demand_paging_test.c
> @@ -164,6 +164,10 @@ static struct kvm_vm *create_vm(enum vm_guest_mode mode, int vcpus,
>         pages += ((2 * vcpus * vcpu_memory_bytes) >> PAGE_SHIFT_4K) /
>                  PTES_PER_4K_PT;
>         pages = vm_adjust_num_guest_pages(mode, pages);
> +#ifdef __s390x__
> +       /* s390 requires 1M aligned guest sizes */
> +       pages = (pages + 255) & ~0xff;
> +#endif
>  
>         pr_info("Testing guest mode: %s\n", vm_guest_mode_string(mode));
>  
> 
> any better idea how to do that?
> 

Without an ALIGN_UP() and/or PAGES_PER_SEGMENT this won't get any nicer
I guess.

-- 
Thanks,

David / dhildenb




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux