From: Lai Jiangshan <laijs@linux.alibaba.com>
To: Sean Christopherson <seanjc@google.com>,
Lai Jiangshan <jiangshanlai@gmail.com>
Cc: kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Hou Wenlong <houwenlong.hwl@antgroup.com>
Subject: Re: [kvm-unit-tests PATCH V2] x86: Add a test to check effective permissions
Date: Sun, 6 Jun 2021 11:20:47 +0800 [thread overview]
Message-ID: <6c87d221-8b6c-56a7-e8d1-31ad8a8379e3@linux.alibaba.com> (raw)
In-Reply-To: <YLqdt11W6R4FgoIY@google.com>
On 2021/6/5 05:40, Sean Christopherson wrote:
> On Fri, Jun 04, 2021, Lai Jiangshan wrote:
>> @@ -326,6 +335,7 @@ static pt_element_t ac_test_alloc_pt(ac_pool_t *pool)
>> {
>> pt_element_t ret = pool->pt_pool + pool->pt_pool_current;
>> pool->pt_pool_current += PAGE_SIZE;
>> + memset(va(ret), 0, PAGE_SIZE);
>
> Should this go in a separate patch? This seems like a bug fix.
I don't think we need to separate the patch. It is a patch for the testing
repository in which there is no real bug.
I prefer to add the test in a single patch with everything the test needs.
>
>> return ret;
>> }
>>
>> +static int check_effective_sp_permissions(ac_pool_t *pool)
>> +{
>> + unsigned long ptr1 = 0x123480000000;
>> + unsigned long ptr2 = ptr1 + 2 * 1024 * 1024;
>> + unsigned long ptr3 = ptr1 + 1 * 1024 * 1024 * 1024;
>> + unsigned long ptr4 = ptr3 + 2 * 1024 * 1024;
>
> I belatedly remembered we have SZ_2M and SZ_1G, I think we can use those here
> instead of open coding the math.
>
Will do.
Thanks
Lai
next prev parent reply other threads:[~2021-06-06 3:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-03 5:05 [kvm-unit-tests PATCH] x86: test combined access Lai Jiangshan
2021-06-03 18:39 ` Sean Christopherson
2021-06-03 22:58 ` [kvm-unit-tests PATCH V2] x86: Add a test to check effective permissions Lai Jiangshan
2021-06-04 21:40 ` Sean Christopherson
2021-06-06 3:20 ` Lai Jiangshan [this message]
2021-06-05 17:49 ` [kvm-unit-tests PATCH V3] " Lai Jiangshan
2021-06-08 0:24 ` Sean Christopherson
2021-06-08 18:49 ` 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=6c87d221-8b6c-56a7-e8d1-31ad8a8379e3@linux.alibaba.com \
--to=laijs@linux.alibaba.com \
--cc=houwenlong.hwl@antgroup.com \
--cc=jiangshanlai@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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).