From: Marc Zyngier <maz@kernel.org>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: "jean-philippe@linaro.org" <jean-philippe@linaro.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>,
"will@kernel.org" <will@kernel.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach)
Date: Fri, 04 Jun 2021 14:54:37 +0100 [thread overview]
Message-ID: <87sg1xzqea.wl-maz@kernel.org> (raw)
In-Reply-To: <e62829990c50479292af94c4152011fc@huawei.com>
On Fri, 04 Jun 2021 09:13:10 +0100,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com> wrote:
>
> Hi,
>
> > -----Original Message-----
> > From: Shameerali Kolothum Thodi
> > Sent: 06 May 2021 17:52
> > To: linux-arm-kernel@lists.infradead.org; kvmarm@lists.cs.columbia.edu;
> > linux-kernel@vger.kernel.org
> > Cc: maz@kernel.org; will@kernel.org; catalin.marinas@arm.com;
> > james.morse@arm.com; julien.thierry.kdev@gmail.com;
> > suzuki.poulose@arm.com; jean-philippe@linaro.org; Linuxarm
> > <linuxarm@huawei.com>
> > Subject: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd
> > approach)
> >
> > This is based on a suggestion from Will [0] to try out the asid
> > based kvm vmid solution as a separate VMID allocator instead of
> > the shared lib approach attempted in v4[1].
> >
> > The idea is to compare both the approaches and see whether the
> > shared lib solution with callbacks make sense or not.
>
> A gentle ping on this. Please take a look and let me know.
I had a look and I don't overly dislike it. I'd like to see the code
without the pinned stuff though, at least to ease the reviewing. I
haven't tested it in anger, but I have pushed the rebased code at [1]
as it really didn't apply to 5.13-rc4.
One thing I'm a bit worried about is that we so far relied on VMID 0
never being allocated to a guest, which is now crucial for protected
KVM. I can't really convince myself that this can never happen with
this. Plus, I've found this nugget:
<quote
max_pinned_vmids = NUM_USER_VMIDS - num_possible_cpus() - 2;
</quote>
What is this "- 2"? My hunch is that it should really be "- 1" as VMID
0 is reserved, and we have no equivalent of KPTI for S2.
M.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/mmu/vmid
--
Without deviation from the norm, progress is not possible.
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"will@kernel.org" <will@kernel.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"julien.thierry.kdev@gmail.com" <julien.thierry.kdev@gmail.com>,
"suzuki.poulose@arm.com" <suzuki.poulose@arm.com>,
"jean-philippe@linaro.org" <jean-philippe@linaro.org>,
Alexandru Elisei <Alexandru.Elisei@arm.com>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach)
Date: Fri, 04 Jun 2021 14:54:37 +0100 [thread overview]
Message-ID: <87sg1xzqea.wl-maz@kernel.org> (raw)
In-Reply-To: <e62829990c50479292af94c4152011fc@huawei.com>
On Fri, 04 Jun 2021 09:13:10 +0100,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com> wrote:
>
> Hi,
>
> > -----Original Message-----
> > From: Shameerali Kolothum Thodi
> > Sent: 06 May 2021 17:52
> > To: linux-arm-kernel@lists.infradead.org; kvmarm@lists.cs.columbia.edu;
> > linux-kernel@vger.kernel.org
> > Cc: maz@kernel.org; will@kernel.org; catalin.marinas@arm.com;
> > james.morse@arm.com; julien.thierry.kdev@gmail.com;
> > suzuki.poulose@arm.com; jean-philippe@linaro.org; Linuxarm
> > <linuxarm@huawei.com>
> > Subject: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd
> > approach)
> >
> > This is based on a suggestion from Will [0] to try out the asid
> > based kvm vmid solution as a separate VMID allocator instead of
> > the shared lib approach attempted in v4[1].
> >
> > The idea is to compare both the approaches and see whether the
> > shared lib solution with callbacks make sense or not.
>
> A gentle ping on this. Please take a look and let me know.
I had a look and I don't overly dislike it. I'd like to see the code
without the pinned stuff though, at least to ease the reviewing. I
haven't tested it in anger, but I have pushed the rebased code at [1]
as it really didn't apply to 5.13-rc4.
One thing I'm a bit worried about is that we so far relied on VMID 0
never being allocated to a guest, which is now crucial for protected
KVM. I can't really convince myself that this can never happen with
this. Plus, I've found this nugget:
<quote
max_pinned_vmids = NUM_USER_VMIDS - num_possible_cpus() - 2;
</quote>
What is this "- 2"? My hunch is that it should really be "- 1" as VMID
0 is reserved, and we have no equivalent of KPTI for S2.
M.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/mmu/vmid
--
Without deviation from the norm, progress is not possible.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"will@kernel.org" <will@kernel.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"julien.thierry.kdev@gmail.com" <julien.thierry.kdev@gmail.com>,
"suzuki.poulose@arm.com" <suzuki.poulose@arm.com>,
"jean-philippe@linaro.org" <jean-philippe@linaro.org>,
Alexandru Elisei <Alexandru.Elisei@arm.com>,
Linuxarm <linuxarm@huawei.com>
Subject: Re: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach)
Date: Fri, 04 Jun 2021 14:54:37 +0100 [thread overview]
Message-ID: <87sg1xzqea.wl-maz@kernel.org> (raw)
In-Reply-To: <e62829990c50479292af94c4152011fc@huawei.com>
On Fri, 04 Jun 2021 09:13:10 +0100,
Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com> wrote:
>
> Hi,
>
> > -----Original Message-----
> > From: Shameerali Kolothum Thodi
> > Sent: 06 May 2021 17:52
> > To: linux-arm-kernel@lists.infradead.org; kvmarm@lists.cs.columbia.edu;
> > linux-kernel@vger.kernel.org
> > Cc: maz@kernel.org; will@kernel.org; catalin.marinas@arm.com;
> > james.morse@arm.com; julien.thierry.kdev@gmail.com;
> > suzuki.poulose@arm.com; jean-philippe@linaro.org; Linuxarm
> > <linuxarm@huawei.com>
> > Subject: [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd
> > approach)
> >
> > This is based on a suggestion from Will [0] to try out the asid
> > based kvm vmid solution as a separate VMID allocator instead of
> > the shared lib approach attempted in v4[1].
> >
> > The idea is to compare both the approaches and see whether the
> > shared lib solution with callbacks make sense or not.
>
> A gentle ping on this. Please take a look and let me know.
I had a look and I don't overly dislike it. I'd like to see the code
without the pinned stuff though, at least to ease the reviewing. I
haven't tested it in anger, but I have pushed the rebased code at [1]
as it really didn't apply to 5.13-rc4.
One thing I'm a bit worried about is that we so far relied on VMID 0
never being allocated to a guest, which is now crucial for protected
KVM. I can't really convince myself that this can never happen with
this. Plus, I've found this nugget:
<quote
max_pinned_vmids = NUM_USER_VMIDS - num_possible_cpus() - 2;
</quote>
What is this "- 2"? My hunch is that it should really be "- 1" as VMID
0 is reserved, and we have no equivalent of KPTI for S2.
M.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/mmu/vmid
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2021-06-04 13:54 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 16:52 [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach) Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` [RFC PATCH 1/3] arch/arm64: Introduce a capability to tell whether 16-bit VMID is available Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` [RFC PATCH 2/3] kvm/arm: Introduce a new vmid allocator for KVM Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` [RFC PATCH 3/3] kvm/arm: Align the VMID allocation with the arm64 ASID one Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-05-06 16:52 ` Shameer Kolothum
2021-06-04 8:13 ` [RFC PATCH 0/3] kvm/arm: New VMID allocator based on asid(2nd approach) Shameerali Kolothum Thodi
2021-06-04 8:13 ` Shameerali Kolothum Thodi
2021-06-04 8:13 ` Shameerali Kolothum Thodi
2021-06-04 13:54 ` Marc Zyngier [this message]
2021-06-04 13:54 ` Marc Zyngier
2021-06-04 13:54 ` Marc Zyngier
2021-06-04 14:51 ` Shameerali Kolothum Thodi
2021-06-04 14:51 ` Shameerali Kolothum Thodi
2021-06-04 14:51 ` Shameerali Kolothum Thodi
2021-06-04 15:27 ` Marc Zyngier
2021-06-04 15:27 ` Marc Zyngier
2021-06-04 15:27 ` Marc Zyngier
2021-06-07 8:48 ` Jean-Philippe Brucker
2021-06-07 8:48 ` Jean-Philippe Brucker
2021-06-07 8:48 ` Jean-Philippe Brucker
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=87sg1xzqea.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=jean-philippe@linaro.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.