On Fri, Jun 04, 2021 at 04:27:39PM +0100, Marc Zyngier wrote:
> > > Plus, I've found this nugget:
> > >
> > > > > max_pinned_vmids = NUM_USER_VMIDS - num_possible_cpus() - 2;
> > >
> > >
> > > What is this "- 2"? My hunch is that it should really be "- 1" as VMID
> > > 0 is reserved, and we h
On Thu, Jun 03, 2021 at 09:39:09AM +0100, Marc Zyngier wrote:
> Hi Jamie,
>
> Funny, your email has a "Mail-Followup-To:" field that contains
> everyone but you... Not ideal! ;-)
Oops, new mutt config, thanks.
> On Thu, 03 Jun 2021 08:07:22 +0100,
> Jamie Iles wrote:
> >
> > Hi Marc,
> >
> >
This series adds support for using the Arm Memory Tagging Extensions
(MTE) in a KVM guest.
Changes since v13[1]:
* Add Reviewed-by tags from Catalin - thanks!
* Introduce a new function mte_prepare_page_tags() for handling the
initialisation of pages ready for a KVM guest. This takes the bi
mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag
before restoring/zeroing the MTE tags. However if another thread were to
race and attempt to sync the tags on the same page before the first
thread had completed restoring/zeroing then it would see the flag is
already set and con
From: Catalin Marinas
Currently, on an anonymous page fault, the kernel allocates a zeroed
page and maps it in user space. If the mapping is tagged (PROT_MTE),
set_pte_at() additionally clears the tags under a spinlock to avoid a
race on the page->flags. In order to optimise the lock, clear the p
A KVM guest could store tags in a page even if the VMM hasn't mapped
the page with PROT_MTE. So when restoring pages from swap we will
need to check to see if there are any saved tags even if !pte_tagged().
However don't check pages for which pte_access_permitted() returns false
as these will not
Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging
for a VM. This will expose the feature to the guest and automatically
tag memory pages touched by the VM as PG_mte_tagged (and clear the tag
storage) to ensure that the guest cannot see stale tags, and so that
the tags are correctl
Define the new system registers that MTE introduces and context switch
them. The MTE feature is still hidden from the ID register as it isn't
supported in a VM yet.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_arm.h | 3 +-
arch/arm64/includ
It's now safe for the VMM to enable MTE in a guest, so expose the
capability to user space.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/kvm/arm.c | 9 +
arch/arm64/kvm/reset.c| 3 ++-
arch/arm64/kvm/sys_regs.c | 3 +++
3 files changed, 14 insertions(
A new capability (KVM_CAP_ARM_MTE) identifies that the kernel supports
granting a guest access to the tags, and provides a mechanism for the
VMM to enable it.
A new ioctl (KVM_ARM_MTE_COPY_TAGS) provides a simple way for a VMM to
access the tags of a guest without having to maintain a PROT_MTE map
The VMM may not wish to have it's own mapping of guest memory mapped
with PROT_MTE because this causes problems if the VMM has tag checking
enabled (the guest controls the tags in physical RAM and it's unlikely
the tags are correct for the VMM).
Instead add a new ioctl which allows the VMM to easi
On Sunday 06 Jun 2021 at 11:31:20 (+0100), Marc Zyngier wrote:
> On 2021-06-02 10:43, Quentin Perret wrote:
> > We currently maintain two separate memory pools for the host stage-2,
> > one for pages used in the page-table when mapping memory regions, and
> > the other to map MMIO regions. The form
On Mon, 07 Jun 2021 17:07:40 +0100,
Sean Christopherson wrote:
>
> On Sun, Jun 06, 2021, Marc Zyngier wrote:
> > This is becoming a bit messy. I'd rather drop the whole series from
> > -next, and get something that doesn't break in the middle. Please
> > resend the series tested on top of -rc4.
>
On Mon, 07 Jun 2021 17:05:01 +0100,
"Jain, Jinank" wrote:
>
> On Thu, 2021-06-03 at 17:03 +0100, Marc Zyngier wrote:
> >
> > Hi Jinank,
> >
> > On Thu, 03 Jun 2021 12:05:54 +0100,
> > Jinank Jain wrote:
> > > Currently if a guest is live-migrated while it is actively using
> > > perf
> > > coun
On Mon, Jun 07, 2021 at 12:08:10PM +0100, Steven Price wrote:
> From: Catalin Marinas
>
> Currently, on an anonymous page fault, the kernel allocates a zeroed
> page and maps it in user space. If the mapping is tagged (PROT_MTE),
> set_pte_at() additionally clears the tags under a spinlock to avo
On Mon, 07 Jun 2021 17:56:59 +0100,
Ricardo Koller wrote:
>
> On Mon, Jun 07, 2021 at 05:19:03PM +0100, Marc Zyngier wrote:
> > On Mon, 07 Jun 2021 17:07:40 +0100,
> > Sean Christopherson wrote:
> > >
> > > On Sun, Jun 06, 2021, Marc Zyngier wrote:
> > > > This is becoming a bit messy. I'd rath
On Mon, Jun 07, 2021 at 12:08:15PM +0100, Steven Price wrote:
> The VMM may not wish to have it's own mapping of guest memory mapped
> with PROT_MTE because this causes problems if the VMM has tag checking
> enabled (the guest controls the tags in physical RAM and it's unlikely
> the tags are corre
On Mon, Jun 07, 2021 at 12:08:16PM +0100, Steven Price wrote:
> diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
> index 22d077562149..fc6f0cbc30b3 100644
> --- a/Documentation/virt/kvm/api.rst
> +++ b/Documentation/virt/kvm/api.rst
> @@ -5034,6 +5034,42 @@ see KVM_XEN_V
On Fri, Jun 04, 2021 at 03:01:17PM +0100, Mark Rutland wrote:
> On Thu, Jun 03, 2021 at 07:33:44PM +0100, Will Deacon wrote:
> > Ignore 'kvm-arm.mode=protected' when using VHE so that kvm_get_mode()
> > only returns KVM_MODE_PROTECTED on systems where the feature is available.
>
> IIUC, since the
On Mon, Jun 07, 2021 at 05:19:03PM +0100, Marc Zyngier wrote:
> On Mon, 07 Jun 2021 17:07:40 +0100,
> Sean Christopherson wrote:
> >
> > On Sun, Jun 06, 2021, Marc Zyngier wrote:
> > > This is becoming a bit messy. I'd rather drop the whole series from
> > > -next, and get something that doesn't
On Thu, 2021-06-03 at 17:03 +0100, Marc Zyngier wrote:
> CAUTION: This email originated from outside of the organization. Do
> not click links or open attachments unless you can confirm the sender
> and know the content is safe.
>
>
>
> Hi Jinank,
>
> On Thu, 03 Jun 2021 12:05:54 +0100,
> Jinan
On Sun, Jun 06, 2021, Marc Zyngier wrote:
> This is becoming a bit messy. I'd rather drop the whole series from
> -next, and get something that doesn't break in the middle. Please
> resend the series tested on top of -rc4.
That'd be my preference too. I almost asked if it could be (temporarily)
d
On Mon, Jun 7, 2021 at 2:23 PM Krish Sadhukhan
wrote:
>
>
> On 6/3/21 2:14 PM, Jing Zhang wrote:
> > Update KVM API documentation for binary statistics.
> >
> > Reviewed-by: David Matlack
> > Reviewed-by: Ricardo Koller
> > Signed-off-by: Jing Zhang
> > ---
> > Documentation/virt/kvm/api.rst
On Mon, Jun 7, 2021 at 2:23 PM Krish Sadhukhan
wrote:
>
>
> On 6/3/21 2:14 PM, Jing Zhang wrote:
> > Provides a file descriptor per VM to read VM stats info/data.
> > Provides a file descriptor per vCPU to read vCPU stats info/data.
> >
> > Reviewed-by: David Matlack
> > Reviewed-by: Ricardo Koll
On Mon, Jun 7, 2021 at 2:23 PM Krish Sadhukhan
wrote:
>
>
> On 6/3/21 2:14 PM, Jing Zhang wrote:
> > Add selftest to check KVM stats descriptors validity.
> >
> > Reviewed-by: David Matlack
> > Reviewed-by: Ricardo Koller
> > Signed-off-by: Jing Zhang
> > ---
> > tools/testing/selftests/kvm/.
25 matches
Mail list logo