From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Peter Xu <peterx@redhat.com>, Andrew Jones <drjones@redhat.com>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, frankja@linux.ibm.com,
bgardon@google.com
Subject: Re: [PATCH 09/11] KVM: selftests: Make vm_create_default common
Date: Thu, 5 Nov 2020 19:54:25 +0100 [thread overview]
Message-ID: <c27eb25a-3e4d-7812-3534-22a557443419@de.ibm.com> (raw)
In-Reply-To: <20201105184511.GC106309@xz-x1>
On 05.11.20 19:45, Peter Xu wrote:
> On Thu, Nov 05, 2020 at 10:59:30AM +0100, Andrew Jones wrote:
>>>>> +#define PTRS_PER_PAGE(page_size) ((page_size) / 8)
>>>>
>>>> Doh. I think this 8 is supposed to be a 16 for s390x, considering it
>>>> was dividing by 256 in its version of vm_create_default. I need
>>>> guidance from s390x gurus as to whether or not I should respin though.
>>>>
>>>> Thanks,
>>>> drew
>>>>
>>>
>>> This is kind of tricky. The last level page table is only 2kb (256 entries = 1MB range).
>>> Depending on whether the page table allocation is clever or not (you can have 2 page
>>> tables in one page) this means that indeed 16 might be better. But then you actually
>>> want to change the macro name to PTES_PER_PAGE?
>>
>> Thanks Christian,
>>
>> I'll respin with the macro name change and 16 for s390.
>
> Maybe it can also be moved to common header, but instead define PTR_SIZE for
> per-arch? I'm also curious whether PTR_SIZE will equals to "sizeof(void *)",
> but seems not for s390x.. Thanks,
Thats why I want to change the name. It is not about the ptr size. It is about
number of page table entries in a page. And as a page table is just 2kb on s390
there is a mismatch. So instead of
#define PTRS_PER_PAGE(page_size) ((page_size) / 8)
let us just to
#define PTES_PER_PAGETABLE 256
for s390
and
#define PTES_PER_PAGETABLE 512
for the others
next prev parent reply other threads:[~2020-11-05 19:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-04 21:23 [PATCH 00/11] KVM: selftests: Cleanups Andrew Jones
2020-11-04 21:23 ` [PATCH 01/11] KVM: selftests: Add x86_64/tsc_msrs_test to .gitignore Andrew Jones
2020-11-04 21:23 ` [PATCH 02/11] KVM: selftests: Drop pointless vm_create wrapper Andrew Jones
2020-11-04 21:23 ` [PATCH 03/11] KVM: selftests: Always clear dirty bitmap after iteration Andrew Jones
2020-11-04 21:23 ` [PATCH 04/11] KVM: selftests: Use a single binary for dirty/clear log test Andrew Jones
2020-11-04 21:23 ` [PATCH 05/11] KVM: selftests: Introduce after_vcpu_run hook for dirty " Andrew Jones
2020-11-04 21:23 ` [PATCH 06/11] KVM: selftests: Make the per vcpu memory size global Andrew Jones
2020-11-04 21:23 ` [PATCH 07/11] KVM: selftests: Make the number of vcpus global Andrew Jones
2020-11-04 21:23 ` [PATCH 08/11] KVM: selftests: Factor out guest mode code Andrew Jones
2020-11-04 21:23 ` [PATCH 09/11] KVM: selftests: Make vm_create_default common Andrew Jones
2020-11-04 21:36 ` Andrew Jones
2020-11-05 7:18 ` Christian Borntraeger
2020-11-05 9:59 ` Andrew Jones
2020-11-05 18:45 ` Peter Xu
2020-11-05 18:54 ` Christian Borntraeger [this message]
2020-11-04 21:23 ` [PATCH 10/11] KVM: selftests: Introduce vm_create_[default_]vcpus Andrew Jones
2020-11-04 21:23 ` [PATCH 11/11] KVM: selftests: Remove create_vm Andrew Jones
2020-11-05 7:08 ` [PATCH 00/11] KVM: selftests: Cleanups Christian Borntraeger
2020-11-05 18:55 ` Peter Xu
2020-11-05 19:41 ` Ben Gardon
2020-11-06 9:45 ` Andrew Jones
2020-11-06 15:04 ` Peter Xu
2020-11-09 17:11 ` Ben Gardon
2020-11-06 13:01 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c27eb25a-3e4d-7812-3534-22a557443419@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=bgardon@google.com \
--cc=drjones@redhat.com \
--cc=frankja@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).