All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: Peter Maydell <Peter.Maydell@arm.com>,
	linux-kernel@vger.kernel.org, Juan Quintela <quintela@redhat.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Steven Price <steven.price@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org,
	Dave Martin <Dave.Martin@arm.com>
Subject: Re: [PATCH v2 0/2] MTE support for KVM guest
Date: Thu, 10 Sep 2020 14:27:48 +0100	[thread overview]
Message-ID: <20200910132748.GF2814@work-vm> (raw)
In-Reply-To: <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com>

* Andrew Jones (drjones@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 easy way to
> > >>    read bulk tag data from guest memory (since the LDGM instruction
> > >>    isn't available at EL0).
> > > 
> > > Maybe we need a new version of KVM_GET_DIRTY_LOG that also provides
> > > the tags for all addresses of each dirty page.
> > 
> > KVM_GET_DIRTY_LOG just provides one bit per dirty page, no?  Then VMM copies
> > the data out from its local address to guest memory.
> > 
> > There'd be no difference with or without tags, afaik.  It's just about how VMM
> > copies the data, with or without tags.
> 
> Right, as long as it's fast enough to do
> 
>   for_each_dirty_page(page, dirty_log)
>     for (i = 0; i < host-page-size/16; i += 16)
>       append_tag(LDG(page + i))
> 
> to get all the tags for each dirty page. I understood it would be faster
> to use LDGM, but we'd need a new ioctl for that. So I was proposing we
> just piggyback on a new dirty-log ioctl instead.

That feels a bad idea to me; there's a couple of different ways dirty
page checking work; lets keep extracting the tags separate.

Dave

> Thanks,
> drew 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

_______________________________________________
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: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: Peter Maydell <Peter.Maydell@arm.com>,
	linux-kernel@vger.kernel.org, Juan Quintela <quintela@redhat.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Steven Price <steven.price@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org,
	Dave Martin <Dave.Martin@arm.com>
Subject: Re: [PATCH v2 0/2] MTE support for KVM guest
Date: Thu, 10 Sep 2020 14:27:48 +0100	[thread overview]
Message-ID: <20200910132748.GF2814@work-vm> (raw)
In-Reply-To: <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com>

* Andrew Jones (drjones@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 easy way to
> > >>    read bulk tag data from guest memory (since the LDGM instruction
> > >>    isn't available at EL0).
> > > 
> > > Maybe we need a new version of KVM_GET_DIRTY_LOG that also provides
> > > the tags for all addresses of each dirty page.
> > 
> > KVM_GET_DIRTY_LOG just provides one bit per dirty page, no?  Then VMM copies
> > the data out from its local address to guest memory.
> > 
> > There'd be no difference with or without tags, afaik.  It's just about how VMM
> > copies the data, with or without tags.
> 
> Right, as long as it's fast enough to do
> 
>   for_each_dirty_page(page, dirty_log)
>     for (i = 0; i < host-page-size/16; i += 16)
>       append_tag(LDG(page + i))
> 
> to get all the tags for each dirty page. I understood it would be faster
> to use LDGM, but we'd need a new ioctl for that. So I was proposing we
> just piggyback on a new dirty-log ioctl instead.

That feels a bad idea to me; there's a couple of different ways dirty
page checking work; lets keep extracting the tags separate.

Dave

> Thanks,
> drew 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


_______________________________________________
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: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: Richard Henderson <richard.henderson@linaro.org>,
	Steven Price <steven.price@arm.com>,
	Peter Maydell <Peter.Maydell@arm.com>,
	Juan Quintela <quintela@redhat.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	qemu-devel@nongnu.org, kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org,
	Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>, Dave Martin <Dave.Martin@arm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/2] MTE support for KVM guest
Date: Thu, 10 Sep 2020 14:27:48 +0100	[thread overview]
Message-ID: <20200910132748.GF2814@work-vm> (raw)
In-Reply-To: <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com>

* Andrew Jones (drjones@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 easy way to
> > >>    read bulk tag data from guest memory (since the LDGM instruction
> > >>    isn't available at EL0).
> > > 
> > > Maybe we need a new version of KVM_GET_DIRTY_LOG that also provides
> > > the tags for all addresses of each dirty page.
> > 
> > KVM_GET_DIRTY_LOG just provides one bit per dirty page, no?  Then VMM copies
> > the data out from its local address to guest memory.
> > 
> > There'd be no difference with or without tags, afaik.  It's just about how VMM
> > copies the data, with or without tags.
> 
> Right, as long as it's fast enough to do
> 
>   for_each_dirty_page(page, dirty_log)
>     for (i = 0; i < host-page-size/16; i += 16)
>       append_tag(LDG(page + i))
> 
> to get all the tags for each dirty page. I understood it would be faster
> to use LDGM, but we'd need a new ioctl for that. So I was proposing we
> just piggyback on a new dirty-log ioctl instead.

That feels a bad idea to me; there's a couple of different ways dirty
page checking work; lets keep extracting the tags separate.

Dave

> Thanks,
> drew 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK


WARNING: multiple messages have this Message-ID (diff)
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Andrew Jones <drjones@redhat.com>
Cc: Peter Maydell <Peter.Maydell@arm.com>,
	linux-kernel@vger.kernel.org, Juan Quintela <quintela@redhat.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	qemu-devel@nongnu.org, Steven Price <steven.price@arm.com>,
	Marc Zyngier <maz@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>,
	kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org,
	Dave Martin <Dave.Martin@arm.com>
Subject: Re: [PATCH v2 0/2] MTE support for KVM guest
Date: Thu, 10 Sep 2020 14:27:48 +0100	[thread overview]
Message-ID: <20200910132748.GF2814@work-vm> (raw)
In-Reply-To: <20200910054440.pvnzk7p7riiy45e2@kamzik.brq.redhat.com>

* Andrew Jones (drjones@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 easy way to
> > >>    read bulk tag data from guest memory (since the LDGM instruction
> > >>    isn't available at EL0).
> > > 
> > > Maybe we need a new version of KVM_GET_DIRTY_LOG that also provides
> > > the tags for all addresses of each dirty page.
> > 
> > KVM_GET_DIRTY_LOG just provides one bit per dirty page, no?  Then VMM copies
> > the data out from its local address to guest memory.
> > 
> > There'd be no difference with or without tags, afaik.  It's just about how VMM
> > copies the data, with or without tags.
> 
> Right, as long as it's fast enough to do
> 
>   for_each_dirty_page(page, dirty_log)
>     for (i = 0; i < host-page-size/16; i += 16)
>       append_tag(LDG(page + i))
> 
> to get all the tags for each dirty page. I understood it would be faster
> to use LDGM, but we'd need a new ioctl for that. So I was proposing we
> just piggyback on a new dirty-log ioctl instead.

That feels a bad idea to me; there's a couple of different ways dirty
page checking work; lets keep extracting the tags separate.

Dave

> Thanks,
> drew 
-- 
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK



  reply	other threads:[~2020-09-10 13:28 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-04 16:00 [PATCH v2 0/2] MTE support for KVM guest Steven Price
2020-09-04 16:00 ` Steven Price
2020-09-04 16:00 ` Steven Price
2020-09-04 16:00 ` Steven Price
2020-09-04 16:00 ` [PATCH v2 1/2] arm64: kvm: Save/restore MTE registers Steven Price
2020-09-04 16:00   ` Steven Price
2020-09-04 16:00   ` Steven Price
2020-09-04 16:00   ` Steven Price
2020-09-04 16:00 ` [PATCH v2 2/2] arm64: kvm: Introduce MTE VCPU feature Steven Price
2020-09-04 16:00   ` Steven Price
2020-09-04 16:00   ` Steven Price
2020-09-04 16:00   ` Steven Price
2020-09-09 15:48   ` Andrew Jones
2020-09-09 15:48     ` Andrew Jones
2020-09-09 15:48     ` Andrew Jones
2020-09-09 15:48     ` Andrew Jones
2020-09-09 15:53     ` Peter Maydell
2020-09-09 15:53       ` Peter Maydell
2020-09-09 15:53       ` Peter Maydell
2020-09-09 15:53       ` Peter Maydell
2020-09-10  6:38       ` Andrew Jones
2020-09-10  6:38         ` Andrew Jones
2020-09-10  6:38         ` Andrew Jones
2020-09-10  6:38         ` Andrew Jones
2020-09-10 10:01         ` Andrew Jones
2020-09-10 10:01           ` Andrew Jones
2020-09-10 10:01           ` Andrew Jones
2020-09-10 10:01           ` Andrew Jones
2020-09-10  9:21     ` Steven Price
2020-09-10  9:21       ` Steven Price
2020-09-10  9:21       ` Steven Price
2020-09-10  9:21       ` Steven Price
2020-09-10 11:49       ` Andrew Jones
2020-09-10 11:49         ` Andrew Jones
2020-09-10 11:49         ` Andrew Jones
2020-09-10 11:49         ` Andrew Jones
2020-09-07 15:28 ` [PATCH v2 0/2] MTE support for KVM guest Dr. David Alan Gilbert
2020-09-07 15:28   ` Dr. David Alan Gilbert
2020-09-07 15:28   ` Dr. David Alan Gilbert
2020-09-07 15:28   ` Dr. David Alan Gilbert
2020-09-09  9:15   ` Steven Price
2020-09-09  9:15     ` Steven Price
2020-09-09  9:15     ` Steven Price
2020-09-09  9:15     ` Steven Price
2020-09-09 15:25 ` Andrew Jones
2020-09-09 15:25   ` Andrew Jones
2020-09-09 15:25   ` Andrew Jones
2020-09-09 15:25   ` Andrew Jones
2020-09-09 16:04   ` Steven Price
2020-09-09 16:04     ` Steven Price
2020-09-09 16:04     ` Steven Price
2020-09-09 16:04     ` Steven Price
2020-09-10  6:29     ` Andrew Jones
2020-09-10  6:29       ` Andrew Jones
2020-09-10  6:29       ` Andrew Jones
2020-09-10  6:29       ` Andrew Jones
2020-09-10  9:21       ` Steven Price
2020-09-10  9:21         ` Steven Price
2020-09-10  9:21         ` Steven Price
2020-09-10  9:21         ` Steven Price
2020-09-10 13:56         ` Andrew Jones
2020-09-10 13:56           ` Andrew Jones
2020-09-10 13:56           ` Andrew Jones
2020-09-10 13:56           ` Andrew Jones
2020-09-10 14:14           ` Steven Price
2020-09-10 14:14             ` Steven Price
2020-09-10 14:14             ` Steven Price
2020-09-10 14:14             ` Steven Price
2020-09-10  1:45   ` Richard Henderson
2020-09-10  1:45     ` Richard Henderson
2020-09-10  1:45     ` Richard Henderson
2020-09-10  1:45     ` Richard Henderson
2020-09-10  5:44     ` Andrew Jones
2020-09-10  5:44       ` Andrew Jones
2020-09-10  5:44       ` Andrew Jones
2020-09-10  5:44       ` Andrew Jones
2020-09-10 13:27       ` Dr. David Alan Gilbert [this message]
2020-09-10 13:27         ` Dr. David Alan Gilbert
2020-09-10 13:27         ` Dr. David Alan Gilbert
2020-09-10 13:27         ` Dr. David Alan Gilbert
2020-09-10 13:39         ` Andrew Jones
2020-09-10 13:39           ` Andrew Jones
2020-09-10 13:39           ` Andrew Jones
2020-09-10 13:39           ` Andrew Jones
2020-09-10  0:33 ` Richard Henderson
2020-09-10  0:33   ` Richard Henderson
2020-09-10  0:33   ` Richard Henderson
2020-09-10  0:33   ` Richard Henderson
2020-09-10 10:24   ` Steven Price
2020-09-10 10:24     ` Steven Price
2020-09-10 10:24     ` Steven Price
2020-09-10 10:24     ` Steven Price
2020-09-10 15:36     ` Richard Henderson
2020-09-10 15:36       ` Richard Henderson
2020-09-10 15:36       ` Richard Henderson
2020-09-10 15:36       ` Richard Henderson

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=20200910132748.GF2814@work-vm \
    --to=dgilbert@redhat.com \
    --cc=Dave.Martin@arm.com \
    --cc=Peter.Maydell@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=drjones@redhat.com \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.org \
    --cc=steven.price@arm.com \
    --cc=tglx@linutronix.de \
    --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.