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

2020-12-16 Thread Haibo Xu
On Wed, 16 Dec 2020 at 18:23, Steven Price wrote: > > On 16/12/2020 07:31, Haibo Xu wrote: > [...] > > Hi Steve, > > Hi Haibo > > > I have finished verifying the POC on a FVP setup, and the MTE test case can > > be migrated from one VM to another successfully. Since the test case is very > >

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

2020-12-16 Thread Steven Price
On 16/12/2020 07:31, Haibo Xu wrote: [...] Hi Steve, Hi Haibo I have finished verifying the POC on a FVP setup, and the MTE test case can be migrated from one VM to another successfully. Since the test case is very simple which just maps one page with MTE enabled and does some memory access,

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

2020-12-15 Thread Haibo Xu
On Mon, 7 Dec 2020 at 22:48, Steven Price wrote: > > On 04/12/2020 08:25, Haibo Xu wrote: > > On Fri, 20 Nov 2020 at 17:51, Steven Price wrote: > >> > >> On 19/11/2020 19:11, Marc Zyngier wrote: > >>> On 2020-11-19 18:42, Andrew Jones wrote: > On Thu, Nov 19, 2020 at 03:45:40PM +, Peter

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

2020-12-09 Thread Peter Maydell
On Wed, 9 Dec 2020 at 20:13, Richard Henderson wrote: > > On 12/9/20 12:39 PM, Catalin Marinas wrote: > >> I would have thought that the best way is to use TCO, so that we don't > >> have to > >> have dual mappings (and however many MB of extra page tables that might > >> imply). > > > > The

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

2020-12-09 Thread Richard Henderson
On 12/9/20 12:39 PM, Catalin Marinas wrote: >> I would have thought that the best way is to use TCO, so that we don't have >> to >> have dual mappings (and however many MB of extra page tables that might >> imply). > > The problem appears when the VMM wants to use MTE itself (e.g. linked >

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

2020-12-09 Thread Catalin Marinas
On Wed, Dec 09, 2020 at 12:27:59PM -0600, Richard Henderson wrote: > On 12/9/20 9:27 AM, Catalin Marinas wrote: > > On Wed, Dec 09, 2020 at 01:25:18PM +, Marc Zyngier wrote: > >> Would this syscall operate on the guest address space? Or on the VMM's > >> own mapping? > ... > > Whatever is

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

2020-12-09 Thread Richard Henderson
On 12/9/20 9:27 AM, Catalin Marinas wrote: > On Wed, Dec 09, 2020 at 01:25:18PM +, Marc Zyngier wrote: >> Would this syscall operate on the guest address space? Or on the VMM's >> own mapping? ... > Whatever is easier for the VMM, I don't think it matters as long as the > host kernel can get

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

2020-12-09 Thread Catalin Marinas
On Wed, Dec 09, 2020 at 01:25:18PM +, Marc Zyngier wrote: > On 2020-12-09 12:44, Catalin Marinas wrote: > > On Tue, Dec 08, 2020 at 06:21:12PM +, Marc Zyngier wrote: > > > On 2020-12-08 17:21, Catalin Marinas wrote: > > > > On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: > >

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

2020-12-09 Thread Marc Zyngier
On 2020-12-09 12:44, Catalin Marinas wrote: On Tue, Dec 08, 2020 at 06:21:12PM +, Marc Zyngier wrote: On 2020-12-08 17:21, Catalin Marinas wrote: > On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: > > I wonder whether we will have to have something kernel side to > >

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

2020-12-09 Thread Catalin Marinas
On Tue, Dec 08, 2020 at 06:21:12PM +, Marc Zyngier wrote: > On 2020-12-08 17:21, Catalin Marinas wrote: > > On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: > > > I wonder whether we will have to have something kernel side to > > > dump/reload tags in a way that matches the

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

2020-12-08 Thread Marc Zyngier
On 2020-12-08 17:21, Catalin Marinas wrote: On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: On Mon, 07 Dec 2020 16:34:05 +, Catalin Marinas wrote: > On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote: > > What I'd really like to see is a description of how shared

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

2020-12-08 Thread Catalin Marinas
On Mon, Dec 07, 2020 at 07:03:13PM +, Marc Zyngier wrote: > On Mon, 07 Dec 2020 16:34:05 +, > Catalin Marinas wrote: > > On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote: > > > What I'd really like to see is a description of how shared memory > > > is, in general, supposed to

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

2020-12-08 Thread Haibo Xu
On Tue, 8 Dec 2020 at 18:01, Marc Zyngier wrote: > > On 2020-12-08 09:51, Haibo Xu wrote: > > On Mon, 7 Dec 2020 at 22:48, Steven Price wrote: > >> > > [...] > > >> Sounds like you are making good progress - thanks for the update. Have > >> you thought about how the PROT_MTE mappings might work

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

2020-12-08 Thread Haibo Xu
On Tue, 8 Dec 2020 at 00:44, Dr. David Alan Gilbert wrote: > > * Steven Price (steven.pr...@arm.com) wrote: > > On 07/12/2020 15:27, Peter Maydell wrote: > > > On Mon, 7 Dec 2020 at 14:48, Steven Price wrote: > > > > Sounds like you are making good progress - thanks for the update. Have > > > >

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

2020-12-08 Thread Marc Zyngier
On 2020-12-08 09:51, Haibo Xu wrote: On Mon, 7 Dec 2020 at 22:48, Steven Price wrote: [...] Sounds like you are making good progress - thanks for the update. Have you thought about how the PROT_MTE mappings might work if QEMU itself were to use MTE? My worry is that we end up with MTE in

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

2020-12-08 Thread Haibo Xu
On Mon, 7 Dec 2020 at 22:48, Steven Price wrote: > > On 04/12/2020 08:25, Haibo Xu wrote: > > On Fri, 20 Nov 2020 at 17:51, Steven Price wrote: > >> > >> On 19/11/2020 19:11, Marc Zyngier wrote: > >>> On 2020-11-19 18:42, Andrew Jones wrote: > On Thu, Nov 19, 2020 at 03:45:40PM +, Peter

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

2020-12-07 Thread Marc Zyngier
On Mon, 07 Dec 2020 16:34:05 +, Catalin Marinas wrote: > > On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote: > > What I'd really like to see is a description of how shared memory > > is, in general, supposed to work with MTE. My gut feeling is that > > it doesn't, and that you

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

2020-12-07 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Mon, 7 Dec 2020 at 16:44, Dr. David Alan Gilbert > wrote: > > * Steven Price (steven.pr...@arm.com) wrote: > > > Sorry, I know I simplified it rather by saying it's similar to protected > > > VM. > > > Basically as I see it there are three

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

2020-12-07 Thread Peter Maydell
On Mon, 7 Dec 2020 at 16:44, Dr. David Alan Gilbert wrote: > * Steven Price (steven.pr...@arm.com) wrote: > > Sorry, I know I simplified it rather by saying it's similar to protected VM. > > Basically as I see it there are three types of memory access: > > > > 1) Debug case - has to go via a

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

2020-12-07 Thread Dr. David Alan Gilbert
* Steven Price (steven.pr...@arm.com) wrote: > On 07/12/2020 15:27, Peter Maydell wrote: > > On Mon, 7 Dec 2020 at 14:48, Steven Price wrote: > > > Sounds like you are making good progress - thanks for the update. Have > > > you thought about how the PROT_MTE mappings might work if QEMU itself >

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

2020-12-07 Thread Catalin Marinas
On Mon, Dec 07, 2020 at 04:05:55PM +, Marc Zyngier wrote: > On 2020-12-07 15:45, Steven Price wrote: > > On 07/12/2020 15:27, Peter Maydell wrote: > > > On Mon, 7 Dec 2020 at 14:48, Steven Price > > > wrote: > > > > Sounds like you are making good progress - thanks for the > > > > update.

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

2020-12-07 Thread Marc Zyngier
On 2020-12-07 15:45, Steven Price wrote: On 07/12/2020 15:27, Peter Maydell wrote: On Mon, 7 Dec 2020 at 14:48, Steven Price wrote: Sounds like you are making good progress - thanks for the update. Have you thought about how the PROT_MTE mappings might work if QEMU itself were to use MTE? My

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

2020-12-07 Thread Steven Price
On 07/12/2020 15:27, Peter Maydell wrote: On Mon, 7 Dec 2020 at 14:48, Steven Price wrote: Sounds like you are making good progress - thanks for the update. Have you thought about how the PROT_MTE mappings might work if QEMU itself were to use MTE? My worry is that we end up with MTE in a

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

2020-12-07 Thread Peter Maydell
On Mon, 7 Dec 2020 at 14:48, Steven Price wrote: > Sounds like you are making good progress - thanks for the update. Have > you thought about how the PROT_MTE mappings might work if QEMU itself > were to use MTE? My worry is that we end up with MTE in a guest > preventing QEMU from using MTE

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

2020-12-07 Thread Steven Price
On 04/12/2020 08:25, Haibo Xu wrote: On Fri, 20 Nov 2020 at 17:51, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: On 2020-11-19 18:42, Andrew Jones wrote: On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: This

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

2020-12-04 Thread Haibo Xu
On Fri, 20 Nov 2020 at 17:51, Steven Price wrote: > > On 19/11/2020 19:11, Marc Zyngier wrote: > > On 2020-11-19 18:42, Andrew Jones wrote: > >> On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: > >>> On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > >>> > This series adds support

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

2020-11-23 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > > This series adds support for Arm's Memory Tagging Extension (MTE) to > > KVM, allowing KVM guests to make use of it. This builds on the existing > > user space support already in v5.10-rc1,

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

2020-11-20 Thread Steven Price
On 20/11/2020 09:56, Marc Zyngier wrote: On 2020-11-20 09:50, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: Does this sound reasonable? I'll clean up the set_pte_at() change and post a v6 later today. Please hold on. I still haven't reviewed your v5, nor have I had time to

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

2020-11-20 Thread Marc Zyngier
On 2020-11-20 09:50, Steven Price wrote: On 19/11/2020 19:11, Marc Zyngier wrote: Does this sound reasonable? I'll clean up the set_pte_at() change and post a v6 later today. Please hold on. I still haven't reviewed your v5, nor have I had time to read your reply to my comments on v4.

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

2020-11-20 Thread Steven Price
On 19/11/2020 19:11, Marc Zyngier wrote: On 2020-11-19 18:42, Andrew Jones wrote: On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > This series adds support for Arm's Memory Tagging Extension (MTE) to > KVM, allowing KVM guests

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

2020-11-19 Thread Marc Zyngier
On 2020-11-19 18:42, Andrew Jones wrote: On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > This series adds support for Arm's Memory Tagging Extension (MTE) to > KVM, allowing KVM guests to make use of it. This builds on the

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

2020-11-19 Thread Andrew Jones
On Thu, Nov 19, 2020 at 03:45:40PM +, Peter Maydell wrote: > On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > > This series adds support for Arm's Memory Tagging Extension (MTE) to > > KVM, allowing KVM guests to make use of it. This builds on the existing > > user space support already in

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

2020-11-19 Thread Peter Maydell
On Thu, 19 Nov 2020 at 15:57, Steven Price wrote: > On 19/11/2020 15:45, Peter Maydell wrote: > > I'm a bit dubious about requring the VMM to map the guest memory > > PROT_MTE unless somebody's done at least a sketch of the design > > for how this would work on the QEMU side. Currently QEMU just

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

2020-11-19 Thread Steven Price
On 19/11/2020 15:45, Peter Maydell wrote: On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: This series adds support for Arm's Memory Tagging Extension (MTE) to KVM, allowing KVM guests to make use of it. This builds on the existing user space support already in v5.10-rc1, see [1] for an

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

2020-11-19 Thread Peter Maydell
On Thu, 19 Nov 2020 at 15:39, Steven Price wrote: > This series adds support for Arm's Memory Tagging Extension (MTE) to > KVM, allowing KVM guests to make use of it. This builds on the existing > user space support already in v5.10-rc1, see [1] for an overview. > The change to require the VMM

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

2020-11-19 Thread Steven Price
This series adds support for Arm's Memory Tagging Extension (MTE) to KVM, allowing KVM guests to make use of it. This builds on the existing user space support already in v5.10-rc1, see [1] for an overview. [1] https://lwn.net/Articles/834289/ Changes since v4[2]: * Rebased on v5.10-rc4. *