On 29/03/2022 18:01, Quentin Perret wrote:
> On Monday 28 Mar 2022 at 18:58:35 (+), Sean Christopherson wrote:
>> On Mon, Mar 28, 2022, Quentin Perret wrote:
>>> Hi Sean,
>>>
>>> Thanks for the reply, this helps a lot.
>>>
>>> On Monday 28 Mar 2022 at 17:13:10 (+), Sean Christopherson wrote
On 23/02/2022 11:49, Chao Peng wrote:
> On Thu, Feb 17, 2022 at 11:09:35AM -0800, Andy Lutomirski wrote:
>> On Thu, Feb 17, 2022, at 5:06 AM, Chao Peng wrote:
>>> On Fri, Feb 11, 2022 at 03:33:35PM -0800, Andy Lutomirski wrote:
On 1/18/22 05:21, Chao Peng wrote:
> From: "Kirill A. Shutemov
Hi Jun,
On 02/02/2022 02:28, Nakajima, Jun wrote:
>
>> On Jan 28, 2022, at 8:47 AM, Steven Price wrote:
>>
>> On 18/01/2022 13:21, Chao Peng wrote:
>>> This is the v4 of this series which try to implement the fd-based KVM
>>> guest private memory. Th
On 18/01/2022 13:21, Chao Peng wrote:
> This is the v4 of this series which try to implement the fd-based KVM
> guest private memory. The patches are based on latest kvm/queue branch
> commit:
>
> fea31d169094 KVM: x86/pmu: Fix available_event_types check for
>REF_CPU_CYCLES even
On 18/01/2022 13:21, Chao Peng wrote:
> Introduce a new memfd_create() flag indicating the content of the
> created memfd is inaccessible from userspace. It does this by force
> setting F_SEAL_INACCESSIBLE seal when the file is created. It also set
> F_SEAL_SEAL to prevent future sealing, which mea
On 19/11/2021 13:47, Chao Peng wrote:
> Signed-off-by: Yu Zhang
> Signed-off-by: Chao Peng
> ---
> virt/kvm/kvm_main.c | 23 +++
> 1 file changed, 19 insertions(+), 4 deletions(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 271cef8d1cd0..b8673490d301 1
On 24/06/2021 14:35, Marc Zyngier wrote:
> Hi Steven,
>
> On Mon, 21 Jun 2021 12:17:15 +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 chec
On 22/06/2021 15:21, Marc Zyngier wrote:
> On Mon, 21 Jun 2021 12:17:10 +0100, Steven Price wrote:
>> This series adds support for using the Arm Memory Tagging Extensions
>> (MTE) in a KVM guest.
>>
>> Changes since v16[1]:
>>
>> - Dropped the first patc
On 22/06/2021 11:56, Fuad Tabba wrote:
> Hi Marc,
>
> On Tue, Jun 22, 2021 at 11:25 AM Marc Zyngier wrote:
>>
>> Hi Fuad,
>>
>> On Tue, 22 Jun 2021 09:56:22 +0100,
>> Fuad Tabba wrote:
>>>
>>> Hi,
>>>
>>>
>>>
the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 3 ++
arch/arm64/
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| 4
arch/arm64/kvm/sys_regs.c | 3 +++
3 files change
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/
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 ++
arch/arm64/include/asm/kvm_host.h| 3 ++
arch/arm64/kvm/hyp/e
e will not have been swapped out.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/mte.h | 4 ++--
arch/arm64/include/asm/pgtable.h | 22 +++---
arch/arm64/kernel/mte.c | 18 +-
3 files changed, 34 insertions(+), 10
mapping
in userspace. The above capability gates access to the ioctl.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 61 ++
1 file changed, 61 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation
8132826.54670-1-steven.price%40arm.com
Steven Price (6):
arm64: mte: Sync tags for pages where PTE is untagged
KVM: arm64: Introduce MTE VM feature
KVM: arm64: Save/restore MTE registers
KVM: arm64: Expose KVM_ARM_CAP_MTE
KVM: arm64: ioctl to fetch/store tags in a guest
KVM: arm6
On 21/06/2021 10:01, Marc Zyngier wrote:
> On Fri, 18 Jun 2021 14:28:22 +0100,
> Steven Price wrote:
>>
>> 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
>&g
On 18/06/2021 16:42, Marc Zyngier wrote:
> On 2021-06-18 15:40, Catalin Marinas wrote:
>> On Fri, Jun 18, 2021 at 02:28:20PM +0100, Steven Price wrote:
>>> mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag
>>> before restoring/zeroing the MTE tags
On 18/06/2021 15:52, Catalin Marinas wrote:
> On Fri, Jun 18, 2021 at 02:28:26PM +0100, Steven Price wrote:
>> +When this capability is enabled all memory in (non-device) memslots must not
>> +used VM_SHARED, attempts to create a memslot with a VM_SHARED mmap will
>> res
mapping
in userspace. The above capability gates access to the ioctl.
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 61 ++
1 file changed, 61 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index
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 inser
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/
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 ++
arch/arm64/include/asm/kvm_host.h| 3 ++
arch/arm64/kvm/hyp/exception.c | 3 +-
arch
the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 3 ++
arch/arm64/
e will not have been swapped out.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/mte.h | 4 ++--
arch/arm64/include/asm/pgtable.h | 22 +++---
arch/arm64/kernel/mte.c | 17 +
3 files changed, 34 insertions(+), 9
the Reviewed-by tags on patches 3 and 7 due to the changes.
[1] https://lore.kernel.org/r/20210614090525.4338-1-steven.price%40arm.com
Steven Price (7):
arm64: mte: Handle race when synchronising tags
arm64: mte: Sync tags for pages where PTE is untagged
KVM: arm64: Introduce MTE VM feat
g the process. Instead implement a new (global) spinlock to protect
the mte_sync_page_tags() function.
Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in
user-space with PROT_MTE")
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/ke
On 17/06/2021 14:15, Marc Zyngier wrote:
> On Thu, 17 Jun 2021 13:13:22 +0100,
> Catalin Marinas wrote:
>>
>> On Mon, Jun 14, 2021 at 10:05:18AM +0100, Steven Price wrote:
>>> I realise there are still open questions[1] around the performance of
>>> this s
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 ++
arch/arm64/include/asm/kvm_host.h| 3 ++
arch/arm64/include
74ke7z3ng.wl-maz%40kernel.org
[2]: https://lore.kernel.org/r/20210607110816.25762-1-steven.pr...@arm.com/
[3]: https://lore.kernel.org/r/20210602235230.3928842-4-...@google.com/
Steven Price (7):
arm64: mte: Handle race when synchronising tags
arm64: mte: Sync tags for pages where PTE is untagge
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 inser
e will not have been swapped out.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/mte.h | 4 ++--
arch/arm64/include/asm/pgtable.h | 22 +++---
arch/arm64/kernel/mte.c | 17 +
3 files changed, 34 insertions(+), 9
g the process. Instead implement a new (global) spinlock to protect
the mte_sync_page_tags() function.
Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in
user-space with PROT_MTE")
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/ke
mapping
in userspace. The above capability gates access to the ioctl.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 57 ++
1 file changed, 57 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation
the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 3 ++
arch/arm64/
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/
On 09/06/2021 18:41, Catalin Marinas wrote:
> On Wed, Jun 09, 2021 at 12:19:31PM +0100, Marc Zyngier wrote:
>> On Wed, 09 Jun 2021 11:51:34 +0100,
>> Steven Price wrote:
>>> On 09/06/2021 11:30, Marc Zyngier wrote:
>>>> On Mon, 07 Jun 2021 12:08:09 +0100,
On 09/06/2021 11:30, Marc Zyngier wrote:
> On Mon, 07 Jun 2021 12:08:09 +0100,
> Steven Price wrote:
>>
>> 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 a
On 07/06/2021 18:32, Catalin Marinas wrote:
> 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
>&g
On 07/06/2021 18:07, Catalin Marinas wrote:
> 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 tagge
e will not have been swapped out.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/mte.h | 4 ++--
arch/arm64/include/asm/pgtable.h | 22 +++---
arch/arm64/kernel/mte.c | 17 +
3 files changed, 34 insertions(+), 9
g the process. Instead implement a new (global) spinlock to protect
the mte_sync_page_tags() function.
Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in
user-space with PROT_MTE")
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/ke
the code thanks to pointers from
Catalin.
[1] https://lore.kernel.org/r/20210524104513.13258-1-steven.price%40arm.com
Catalin Marinas (1):
arm64: Handle MTE tags zeroing in __alloc_zeroed_user_highpage()
Steven Price (7):
arm64: mte: Handle race when synchronising tags
arm64: mte: Sync
the page
tags on allocation in __alloc_zeroed_user_highpage() if the vma flags
have VM_MTE set.
Signed-off-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/page.h | 6 --
arch/arm64/mm/fault.c | 21 +
2 files changed, 25 insertions(+)
the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 3 ++
arch/arm64/include/asm/mte-def.h |
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 ++
arch/arm64/include/asm/kvm_host.h| 3 ++
arch/arm64/include
mapping
in userspace. The above capability gates access to the ioctl.
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 57 ++
1 file changed, 57 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index
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 inser
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/
On 04/06/2021 12:42, Catalin Marinas wrote:
> On Fri, Jun 04, 2021 at 12:15:56PM +0100, Steven Price wrote:
>> On 03/06/2021 18:13, Catalin Marinas wrote:
>>> On Mon, May 24, 2021 at 11:45:12AM +0100, Steven Price wrote:
>>>> diff --git a/arch/arm64/include/uap
On 04/06/2021 12:36, Catalin Marinas wrote:
> On Fri, Jun 04, 2021 at 11:42:11AM +0100, Steven Price wrote:
>> On 03/06/2021 17:00, Catalin Marinas wrote:
>>> On Mon, May 24, 2021 at 11:45:09AM +0100, Steven Price wrote:
>>>> diff --git a/arch/arm64/kvm/mmu.c b/a
On 03/06/2021 18:13, Catalin Marinas wrote:
> On Mon, May 24, 2021 at 11:45:12AM +0100, Steven Price wrote:
>> diff --git a/arch/arm64/include/uapi/asm/kvm.h
>> b/arch/arm64/include/uapi/asm/kvm.h
>> index 24223adae150..b3edde68bc3e 100644
>> --- a/arch/arm64/include/u
On 03/06/2021 17:00, Catalin Marinas wrote:
> On Mon, May 24, 2021 at 11:45:09AM +0100, Steven Price wrote:
>> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
>> index c5d1f3c87dbd..226035cf7d6c 100644
>> --- a/arch/arm64/kvm/mmu.c
>> +++ b/arch/arm64/kvm
On 24/05/2021 19:11, Catalin Marinas wrote:
> On Fri, May 21, 2021 at 10:42:09AM +0100, Steven Price wrote:
>> On 20/05/2021 18:27, Catalin Marinas wrote:
>>> On Thu, May 20, 2021 at 04:58:01PM +0100, Steven Price wrote:
>>>> On 20/05/2021 13:05, Catalin Marinas wro
the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 3 ++
arch/arm64/include/asm/mte-def.h |
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.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 6 ++
arch/arm64/include/asm/kvm_
It's now safe for the VMM to enable MTE in a guest, so expose the
capability to user space.
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(+), 1 deletion(-)
diff
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 ++
arch/arm64/include/asm/kvm_host.h| 3 ++
arch/arm64/kvm/hyp/exception.c | 3 +-
arch
e will not have been swapped out.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/mte.h | 4 ++--
arch/arm64/include/asm/pgtable.h | 22 +++---
arch/arm64/kernel/mte.c | 16
3 files changed, 33 insertions(+), 9 deletions(-)
diff --git a/
the page
tags on allocation in __alloc_zeroed_user_highpage() if the vma flags
have VM_MTE set.
Signed-off-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/page.h | 6 --
arch/arm64/mm/fault.c | 21 +
2 files changed, 25 insertions(+)
mapping
in userspace. The above capability gates access to the ioctl.
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 52 ++
1 file changed, 52 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index
PAGE_SIZE / MTE_GRANULE_SIZE.
* Correct the definition of struct kvm_arm_copy_mte_tags in the docs.
Also avoid mentioning MTE_GRANULE_SIZE as it isn't exported to
userspace.
[1] https://lore.kernel.org/r/20210517123239.8025-1-steven.pr...@arm.com/
Catalin Marinas (1):
arm64: Handl
g the process. Instead implement a new (global) spinlock to protect
the mte_sync_page_tags() function.
Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in
user-space with PROT_MTE")
Reviewed-by: Catalin Marinas
Signed-off-by: Steven Price
---
---
arch/arm64/ke
On 20/05/2021 18:27, Catalin Marinas wrote:
> On Thu, May 20, 2021 at 04:58:01PM +0100, Steven Price wrote:
>> On 20/05/2021 13:05, Catalin Marinas wrote:
>>> On Mon, May 17, 2021 at 01:32:38PM +0100, Steven Price wrote:
>>>> diff --git a/arch/arm64/kvm/arm.c b/a
On 20/05/2021 18:50, Catalin Marinas wrote:
> On Thu, May 20, 2021 at 04:05:46PM +0100, Steven Price wrote:
>> On 20/05/2021 12:54, Catalin Marinas wrote:
>>> On Mon, May 17, 2021 at 01:32:35PM +0100, Steven Price wrote:
>>>> diff --git a/arch/arm64/kvm/mmu.c b/a
On 20/05/2021 13:05, Catalin Marinas wrote:
> On Mon, May 17, 2021 at 01:32:38PM +0100, Steven Price wrote:
>> diff --git a/arch/arm64/include/uapi/asm/kvm.h
>> b/arch/arm64/include/uapi/asm/kvm.h
>> index 24223adae150..b3edde68bc3e 100644
>> --- a/arch/arm64/include/u
On 20/05/2021 10:46, Marc Zyngier wrote:
> On Wed, 19 May 2021 14:04:20 +0100,
> Steven Price wrote:
>>
>> On 17/05/2021 18:17, Marc Zyngier wrote:
>>> On Mon, 17 May 2021 13:32:36 +0100,
>>> Steven Price wrote:
>>>>
>>>> Define the
On 20/05/2021 12:54, Catalin Marinas wrote:
> On Mon, May 17, 2021 at 01:32:35PM +0100, Steven Price wrote:
>> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
>> index c5d1f3c87dbd..8660f6a03f51 100644
>> --- a/arch/arm64/kvm/mmu.c
>> +++ b/arch/arm64/kvm
On 20/05/2021 09:51, Marc Zyngier wrote:
> On Wed, 19 May 2021 11:48:21 +0100,
> Steven Price wrote:
>>
>> On 17/05/2021 17:45, Marc Zyngier wrote:
>>> On Mon, 17 May 2021 13:32:35 +0100,
>>> Steven Price wrote:
[...]
>>>>
On 20/05/2021 13:25, Catalin Marinas wrote:
> On Thu, May 20, 2021 at 12:55:21PM +0100, Steven Price wrote:
>> On 19/05/2021 19:06, Catalin Marinas wrote:
>>> On Mon, May 17, 2021 at 01:32:34PM +0100, Steven Price wrote:
>>>> A KVM guest could store tags in a page
On 19/05/2021 19:06, Catalin Marinas wrote:
> On Mon, May 17, 2021 at 01:32:34PM +0100, Steven Price wrote:
>> 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
On 20/05/2021 11:24, Marc Zyngier wrote:
> On Wed, 19 May 2021 15:09:23 +0100,
> Steven Price wrote:
>>
>> On 17/05/2021 19:09, Marc Zyngier wrote:
>>> On Mon, 17 May 2021 13:32:39 +0100,
>>> Steven Price wrote:
[...]>>>> +bytes (i.e. 1/16th
On 20/05/2021 11:09, Marc Zyngier wrote:
> On Wed, 19 May 2021 14:26:31 +0100,
> Steven Price wrote:
>>
>> On 17/05/2021 18:40, Marc Zyngier wrote:
>>> On Mon, 17 May 2021 13:32:37 +0100,
>>> Steven Price wrote:
>>>>
>>>> It
On 17/05/2021 19:09, Marc Zyngier wrote:
> On Mon, 17 May 2021 13:32:39 +0100,
> Steven Price wrote:
>>
>> 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 t
On 17/05/2021 19:04, Marc Zyngier wrote:
> On Mon, 17 May 2021 13:32:38 +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
>> enab
On 17/05/2021 18:40, Marc Zyngier wrote:
> On Mon, 17 May 2021 13:32:37 +0100,
> Steven Price wrote:
>>
>> It's now safe for the VMM to enable MTE in a guest, so expose the
>> capability to user space.
>>
>> Signed-off-by: Steven Price
>> ---
>&
On 17/05/2021 18:17, Marc Zyngier wrote:
> On Mon, 17 May 2021 13:32:36 +0100,
> Steven Price wrote:
>>
>> 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
>> support
On 17/05/2021 17:45, Marc Zyngier wrote:
> On Mon, 17 May 2021 13:32:35 +0100,
> Steven Price wrote:
>>
>> 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
>&g
On 17/05/2021 17:14, Marc Zyngier wrote:
> On Mon, 17 May 2021 13:32:34 +0100,
> Steven Price wrote:
>>
>> 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
On 17/05/2021 15:03, Marc Zyngier wrote:
> Hi Steven,
Hi Marc,
> On Mon, 17 May 2021 13:32:32 +0100,
> Steven Price wrote:
>>
>> 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
the VMM to easily read/write the
tags from guest memory, allowing the VMM's mapping to be non-PROT_MTE
while the VMM can still read/write the tags for the purpose of
migration.
Signed-off-by: Steven Price
---
arch/arm64/include/uapi/asm/kvm.h | 11 +
arch/arm64/kvm/arm.c
It's now safe for the VMM to enable MTE in a guest, so expose the
capability to user space.
Signed-off-by: Steven Price
---
arch/arm64/kvm/arm.c | 9 +
arch/arm64/kvm/sys_regs.c | 3 +++
2 files changed, 12 insertions(+)
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/
mapping
in userspace. The above capability gates access to the ioctl.
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 53 ++
1 file changed, 53 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index
e will not have been swapped out.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/pgtable.h | 9 +++--
arch/arm64/kernel/mte.c | 16 ++--
2 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm
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.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 6 ++
arch/arm64/include/asm/kvm_
the page
tags on allocation in __alloc_zeroed_user_highpage() if the vma flags
have VM_MTE set.
Signed-off-by: Catalin Marinas
Signed-off-by: Steven Price
---
arch/arm64/include/asm/page.h | 6 --
arch/arm64/mm/fault.c | 21 +
2 files changed, 25 insertions(+)
g the process. Instead implement a new (global) spinlock to protect
the mte_sync_page_tags() function.
Fixes: 34bfeea4a9e9 ("arm64: mte: Clear the tags when a page is mapped in
user-space with PROT_MTE")
Signed-off-by: Steven Price
---
---
arch/arm64/kernel/mte.c | 21 ++
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 +++
arch/arm64/include/asm/kvm_host.h| 3 +++
arch/arm64/kvm/hyp/exception.c | 3 ++-
arch
andle MTE tags zeroing in __alloc_zeroed_user_highpage()
Steven Price (7):
arm64: mte: Handle race when synchronising tags
arm64: mte: Sync tags for pages where PTE is untagged
arm64: kvm: Introduce MTE VM feature
arm64: kvm: Save/restore MTE registers
arm64: kvm: Expose KVM_ARM_CAP_MTE
KVM: arm64: ioctl
On 12/05/2021 18:45, Catalin Marinas wrote:
> On Wed, May 12, 2021 at 04:46:48PM +0100, Steven Price wrote:
>> On 10/05/2021 19:35, Catalin Marinas wrote:
>>> On Fri, May 07, 2021 at 07:25:39PM +0100, Catalin Marinas wrote:
>>>> On Thu, May 06, 2021 at 05:15:
On 10/05/2021 19:35, Catalin Marinas wrote:
On Fri, May 07, 2021 at 07:25:39PM +0100, Catalin Marinas wrote:
On Thu, May 06, 2021 at 05:15:25PM +0100, Steven Price wrote:
On 04/05/2021 18:40, Catalin Marinas wrote:
On Thu, Apr 29, 2021 at 05:06:41PM +0100, Steven Price wrote:
Given the
On 04/05/2021 18:44, Catalin Marinas wrote:
On Thu, Apr 29, 2021 at 05:06:07PM +0100, Steven Price wrote:
On 27/04/2021 18:58, Catalin Marinas wrote:
On Fri, Apr 16, 2021 at 04:43:08PM +0100, Steven Price wrote:
diff --git a/arch/arm64/include/uapi/asm/kvm.h
b/arch/arm64/include/uapi/asm
On 04/05/2021 18:40, Catalin Marinas wrote:
On Thu, Apr 29, 2021 at 05:06:41PM +0100, Steven Price wrote:
On 28/04/2021 18:07, Catalin Marinas wrote:
I probably asked already but is the only way to map a standard RAM page
(not device) in stage 2 via the fault handler? One case I had in mind
On 28/04/2021 18:07, Catalin Marinas wrote:
On Fri, Apr 16, 2021 at 04:43:05PM +0100, Steven Price wrote:
diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
index 77cb2d28f2a4..5f8e165ea053 100644
--- a/arch/arm64/kvm/mmu.c
+++ b/arch/arm64/kvm/mmu.c
@@ -879,6 +879,26 @@ static int
On 27/04/2021 18:58, Catalin Marinas wrote:
On Fri, Apr 16, 2021 at 04:43:08PM +0100, Steven Price wrote:
diff --git a/arch/arm64/include/uapi/asm/kvm.h
b/arch/arm64/include/uapi/asm/kvm.h
index 24223adae150..2b85a047c37d 100644
--- a/arch/arm64/include/uapi/asm/kvm.h
+++ b/arch/arm64/include
On 27/04/2021 18:43, Catalin Marinas wrote:
On Fri, Apr 16, 2021 at 04:43:04PM +0100, Steven Price wrote:
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
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.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_host.h | 6 ++
arch/arm64/include/asm/kvm_
e tags are correctly saved/restored across swap.
Actually exposing the new capability to user space happens in a later
patch.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/kvm_emulate.h | 3 +++
arch/arm64/include/asm/kvm_host.h| 3 +++
arch/arm64/kvm/hyp/exception.c | 3 ++-
arch
mapping
in userspace. The above capability gates access to the ioctl.
Signed-off-by: Steven Price
---
Documentation/virt/kvm/api.rst | 53 ++
1 file changed, 53 insertions(+)
diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst
index
en swapped out.
Signed-off-by: Steven Price
---
arch/arm64/include/asm/pgtable.h | 2 +-
arch/arm64/kernel/mte.c | 16
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index e1
1 - 100 of 182 matches
Mail list logo