From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: marc.zyngier@arm.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
kvmarm@lists.cs.columbia.edu, will.deacon@arm.com,
catalin.marinas@arm.com, james.morse@arm.com,
julien.thierry@arm.com, wanghaibin.wang@huawei.com,
lious.lilei@hisilicon.com, lishuo1@hisilicon.com,
zhengxiang9@huawei.com, yuzenghui@huawei.com,
christoffer.dall@arm.com
Subject: Re: [PATCH] kvm: arm: Fix handling of stage2 huge mappings
Date: Wed, 20 Mar 2019 11:12:47 +0000 [thread overview]
Message-ID: <c27d5828-3924-e209-82b6-c9168007867b@arm.com> (raw)
In-Reply-To: <20190320103511.11d777b9@why.wild-wind.fr.eu.org>
Marc,
On 20/03/2019 10:35, Marc Zyngier wrote:
> On Wed, 20 Mar 2019 10:23:39 +0000
> Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>
> Hi Suzuki,
>
>> Marc,
>>
>> On 20/03/2019 10:11, Marc Zyngier wrote:
>>> On Wed, 20 Mar 2019 09:44:38 +0000
>>> Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>>>
>>>> Hi Marc,
>>>>
>>>> On 20/03/2019 08:15, Marc Zyngier wrote:
>>>>> Hi Suzuki,
>>>>>
>>>>> On Tue, 19 Mar 2019 14:11:08 +0000,
>>>>> Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
...
>>>>>> + if (!pmd_thp_or_huge(old_pmd)) {
>>>>>> + unmap_stage2_range(kvm, addr & S2_PMD_MASK, S2_PMD_SIZE);
>>>>>> + goto retry;
>>>>>
>>
>>>>>> + if (!stage2_pud_huge(kvm, old_pud)) {
>>>>>> + unmap_stage2_range(kvm, addr & S2_PUD_MASK, S2_PUD_SIZE);
>>>>>
>>
>>>> We should really get rid of the S2_P{U/M}D_* definitions, as they are
>>>> always the same as the host. The only thing that changes is the PGD size
>>>> which varies according to the IPA and the concatenation.
>>>>
>>
>> Also what do you think about using P{M,U}D_* instead of S2_P{M,U}D_*
>> above ? I could make that change with the respin.
>
> Given that this is a fix, I'd like it to be as small as obvious as
> possible, making it easier to backport.
>
> I'm happy to take another patch for 5.2 that will drop the whole S2_P*
> if we still think that this should be the case (though what I'd really
> like is to have architectural levels instead of these arbitrary
> definitions).
I only meant the two new instances added above in the patch. Of course, I
could send something to fix the existing ones.
Cheers
Suzuki
next prev parent reply other threads:[~2019-03-20 11:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <25971fd5-3774-3389-a82a-04707480c1e0@huawei.com>
2019-03-19 14:11 ` [PATCH] kvm: arm: Fix handling of stage2 huge mappings Suzuki K Poulose
2019-03-19 16:02 ` Zenghui Yu
2019-03-20 8:15 ` Marc Zyngier
2019-03-20 9:44 ` Suzuki K Poulose
2019-03-20 10:11 ` Marc Zyngier
2019-03-20 10:23 ` Suzuki K Poulose
2019-03-20 10:35 ` Marc Zyngier
2019-03-20 11:12 ` Suzuki K Poulose [this message]
2019-03-20 17:24 ` Marc Zyngier
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=c27d5828-3924-e209-82b6-c9168007867b@arm.com \
--to=suzuki.poulose@arm.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@arm.com \
--cc=james.morse@arm.com \
--cc=julien.thierry@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lious.lilei@hisilicon.com \
--cc=lishuo1@hisilicon.com \
--cc=marc.zyngier@arm.com \
--cc=wanghaibin.wang@huawei.com \
--cc=will.deacon@arm.com \
--cc=yuzenghui@huawei.com \
--cc=zhengxiang9@huawei.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