Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Andrew Jones
On Thu, Sep 10, 2020 at 02:27:48PM +0100, Dr. David Alan Gilbert wrote: > * Andrew Jones (drjo...@redhat.com) wrote: > > On Wed, Sep 09, 2020 at 06:45:33PM -0700, Richard Henderson wrote: > > > On 9/9/20 8:25 AM, Andrew Jones wrote: > > > >> * Provide a KVM-specific method to extract the tags

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Steven Price
On 10/09/2020 14:56, Andrew Jones wrote: On Thu, Sep 10, 2020 at 10:21:04AM +0100, Steven Price wrote: On 10/09/2020 07:29, Andrew Jones wrote: But if userspace created the memslots with memory already set with PROT_MTE, then this wouldn't be necessary, right? And, as long as there's still a

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Andrew Jones
On Thu, Sep 10, 2020 at 10:21:04AM +0100, Steven Price wrote: > On 10/09/2020 07:29, Andrew Jones wrote: > > But if userspace created the memslots with memory already set with > > PROT_MTE, then this wouldn't be necessary, right? And, as long as > > there's still a way to access the memory with

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Richard Henderson
On 9/10/20 3:24 AM, Steven Price wrote: > It is a shame, however I suspect this is because to use those instructions you > need to know the block size held in GMID_EL1. And at least in theory that > could > vary between CPUs. Which is no different from having to read DCZID_EL0 in order to

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Dr. David Alan Gilbert
* Andrew Jones (drjo...@redhat.com) wrote: > On Wed, Sep 09, 2020 at 06:45:33PM -0700, Richard Henderson wrote: > > On 9/9/20 8:25 AM, Andrew Jones wrote: > > >> * Provide a KVM-specific method to extract the tags from guest memory. > > >>This might also have benefits in terms of providing an

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Steven Price
On 10/09/2020 01:33, Richard Henderson wrote: On 9/4/20 9:00 AM, Steven Price wrote: 3. Doesn't provide any new methods for the VMM to access the tags on memory. ... (3) may be problematic and I'd welcome input from those familiar with VMMs. User space cannot access tags unless the

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Steven Price
On 10/09/2020 07:29, Andrew Jones wrote: On Wed, Sep 09, 2020 at 05:04:15PM +0100, Steven Price wrote: On 09/09/2020 16:25, Andrew Jones wrote: On Fri, Sep 04, 2020 at 05:00:16PM +0100, Steven Price wrote: 2. Automatically promotes (normal host) memory given to the guest to be tag

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-10 Thread Andrew Jones
On Wed, Sep 09, 2020 at 05:04:15PM +0100, Steven Price wrote: > On 09/09/2020 16:25, Andrew Jones wrote: > > On Fri, Sep 04, 2020 at 05:00:16PM +0100, Steven Price wrote: > > > 2. Automatically promotes (normal host) memory given to the guest to be > > > tag enabled (sets PG_mte_tagged), if

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Andrew Jones
On Wed, Sep 09, 2020 at 06:45:33PM -0700, Richard Henderson wrote: > On 9/9/20 8:25 AM, Andrew Jones wrote: > >> * Provide a KVM-specific method to extract the tags from guest memory. > >>This might also have benefits in terms of providing an easy way to > >>read bulk tag data from guest

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Richard Henderson
On 9/4/20 9:00 AM, Steven Price wrote: > 3. Doesn't provide any new methods for the VMM to access the tags on > memory. ... > (3) may be problematic and I'd welcome input from those familiar with > VMMs. User space cannot access tags unless the memory is mapped with the > PROT_MTE flag.

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Richard Henderson
On 9/9/20 8:25 AM, Andrew Jones wrote: >> * Provide a KVM-specific method to extract the tags from guest memory. >>This might also have benefits in terms of providing an easy way to >>read bulk tag data from guest memory (since the LDGM instruction >>isn't available at EL0). > >

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Andrew Jones
On Fri, Sep 04, 2020 at 05:00:16PM +0100, Steven Price wrote: > Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 > bytes of memory in the system. This along with stashing a tag within the > high bit of virtual addresses allows runtime checking of memory > accesses. > >

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Steven Price
On 09/09/2020 16:25, Andrew Jones wrote: On Fri, Sep 04, 2020 at 05:00:16PM +0100, Steven Price wrote: Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 bytes of memory in the system. This along with stashing a tag within the high bit of virtual addresses allows runtime

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-09 Thread Steven Price
On 07/09/2020 16:28, Dr. David Alan Gilbert wrote: (cc'ing in Eric Auger) * Steven Price (steven.pr...@arm.com) wrote: Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 bytes of memory in the system. This along with stashing a tag within the high bit of virtual addresses

Re: [PATCH v2 0/2] MTE support for KVM guest

2020-09-07 Thread Dr. David Alan Gilbert
(cc'ing in Eric Auger) * Steven Price (steven.pr...@arm.com) wrote: > Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 > bytes of memory in the system. This along with stashing a tag within the > high bit of virtual addresses allows runtime checking of memory > accesses. >

[PATCH v2 0/2] MTE support for KVM guest

2020-09-04 Thread Steven Price
Arm's Memory Tagging Extension (MTE) adds 4 bits of tag data to every 16 bytes of memory in the system. This along with stashing a tag within the high bit of virtual addresses allows runtime checking of memory accesses. These patches add support to KVM to enable MTE within a guest. They are based