All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Alexander Graf <agraf@suse.de>
Cc: Scott Wood <scottwood@freescale.com>,
	Yoder Stuart-B08248 <B08248@freescale.com>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: RFC: New API for PPC for vcpu mmu access
Date: Fri, 11 Feb 2011 01:22:37 +0100	[thread overview]
Message-ID: <63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de> (raw)
In-Reply-To: <8ACEDFEA-AA7F-400F-88F1-5F99864E8AAF@suse.de>


On 11.02.2011, at 01:20, Alexander Graf wrote:

> 
> On 10.02.2011, at 19:51, Scott Wood wrote:
> 
>> On Thu, 10 Feb 2011 12:45:38 +0100
>> Alexander Graf <agraf@suse.de> wrote:
>> 
>>> Ok, thinking about this a bit more. You're basically proposing a list of
>>> tlb set calls, with each array field identifying one tlb set call. What
>>> I was thinking of was a full TLB sync, so we could keep qemu's internal
>>> TLB representation identical to the ioctl layout and then just call that
>>> one ioctl to completely overwrite all of qemu's internal data (and vice
>>> versa).
>> 
>> No, this is a full sync -- the list replaces any existing TLB entries (need
>> to make that explicit in the doc).  Basically it's an invalidate plus a
>> list of tlb set operations.
>> 
>> Qemu's internal representation will want to be ordered with no missing
>> entries.  If we require that of the transfer representation we can't do
>> early termination.  It would also limit Qemu's flexibility in choosing its
>> internal representation, and make it more awkward to support multiple MMU
>> types.
> 
> Well, but this way it means we'll have to assemble/disassemble a list of entries multiple times:
> 
> SET:
> * qemu assembles the list from its internal representation
> * kvm disassembles the list into its internal structure
> 
> GET:
> * kvm assembles the list from its internal representation
> * qemu disassembles the list into its internal structure
> 
> Maybe we should go with Avi's proposal after all and simply keep the full soft-mmu synced between kernel and user space? That way we only need a setup call at first, no copying in between and simply update the user space version whenever something changes in the guest. We need to store the TLB's contents off somewhere anyways, so all we need is an additional in-kernel array with internal translation data, but that can be separate from the guest visible data, right?

If we could then keep qemu's internal representation == shared data with kvm == kvm's internal data for guest visible stuff, we get this done with almost no additional overhead. And I don't see any problem with this. Should be easily doable.


Alex

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Alexander Graf <agraf@suse.de>
Cc: Scott Wood <scottwood@freescale.com>,
	Yoder Stuart-B08248 <B08248@freescale.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] Re: RFC: New API for PPC for vcpu mmu access
Date: Fri, 11 Feb 2011 01:22:37 +0100	[thread overview]
Message-ID: <63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de> (raw)
In-Reply-To: <8ACEDFEA-AA7F-400F-88F1-5F99864E8AAF@suse.de>


On 11.02.2011, at 01:20, Alexander Graf wrote:

> 
> On 10.02.2011, at 19:51, Scott Wood wrote:
> 
>> On Thu, 10 Feb 2011 12:45:38 +0100
>> Alexander Graf <agraf@suse.de> wrote:
>> 
>>> Ok, thinking about this a bit more. You're basically proposing a list of
>>> tlb set calls, with each array field identifying one tlb set call. What
>>> I was thinking of was a full TLB sync, so we could keep qemu's internal
>>> TLB representation identical to the ioctl layout and then just call that
>>> one ioctl to completely overwrite all of qemu's internal data (and vice
>>> versa).
>> 
>> No, this is a full sync -- the list replaces any existing TLB entries (need
>> to make that explicit in the doc).  Basically it's an invalidate plus a
>> list of tlb set operations.
>> 
>> Qemu's internal representation will want to be ordered with no missing
>> entries.  If we require that of the transfer representation we can't do
>> early termination.  It would also limit Qemu's flexibility in choosing its
>> internal representation, and make it more awkward to support multiple MMU
>> types.
> 
> Well, but this way it means we'll have to assemble/disassemble a list of entries multiple times:
> 
> SET:
> * qemu assembles the list from its internal representation
> * kvm disassembles the list into its internal structure
> 
> GET:
> * kvm assembles the list from its internal representation
> * qemu disassembles the list into its internal structure
> 
> Maybe we should go with Avi's proposal after all and simply keep the full soft-mmu synced between kernel and user space? That way we only need a setup call at first, no copying in between and simply update the user space version whenever something changes in the guest. We need to store the TLB's contents off somewhere anyways, so all we need is an additional in-kernel array with internal translation data, but that can be separate from the guest visible data, right?

If we could then keep qemu's internal representation == shared data with kvm == kvm's internal data for guest visible stuff, we get this done with almost no additional overhead. And I don't see any problem with this. Should be easily doable.


Alex

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Graf <agraf@suse.de>
To: Alexander Graf <agraf@suse.de>
Cc: Scott Wood <scottwood@freescale.com>,
	Yoder Stuart-B08248 <B08248@freescale.com>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: RFC: New API for PPC for vcpu mmu access
Date: Fri, 11 Feb 2011 00:22:37 +0000	[thread overview]
Message-ID: <63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de> (raw)
In-Reply-To: <8ACEDFEA-AA7F-400F-88F1-5F99864E8AAF@suse.de>


On 11.02.2011, at 01:20, Alexander Graf wrote:

> 
> On 10.02.2011, at 19:51, Scott Wood wrote:
> 
>> On Thu, 10 Feb 2011 12:45:38 +0100
>> Alexander Graf <agraf@suse.de> wrote:
>> 
>>> Ok, thinking about this a bit more. You're basically proposing a list of
>>> tlb set calls, with each array field identifying one tlb set call. What
>>> I was thinking of was a full TLB sync, so we could keep qemu's internal
>>> TLB representation identical to the ioctl layout and then just call that
>>> one ioctl to completely overwrite all of qemu's internal data (and vice
>>> versa).
>> 
>> No, this is a full sync -- the list replaces any existing TLB entries (need
>> to make that explicit in the doc).  Basically it's an invalidate plus a
>> list of tlb set operations.
>> 
>> Qemu's internal representation will want to be ordered with no missing
>> entries.  If we require that of the transfer representation we can't do
>> early termination.  It would also limit Qemu's flexibility in choosing its
>> internal representation, and make it more awkward to support multiple MMU
>> types.
> 
> Well, but this way it means we'll have to assemble/disassemble a list of entries multiple times:
> 
> SET:
> * qemu assembles the list from its internal representation
> * kvm disassembles the list into its internal structure
> 
> GET:
> * kvm assembles the list from its internal representation
> * qemu disassembles the list into its internal structure
> 
> Maybe we should go with Avi's proposal after all and simply keep the full soft-mmu synced between kernel and user space? That way we only need a setup call at first, no copying in between and simply update the user space version whenever something changes in the guest. We need to store the TLB's contents off somewhere anyways, so all we need is an additional in-kernel array with internal translation data, but that can be separate from the guest visible data, right?

If we could then keep qemu's internal representation = shared data with kvm = kvm's internal data for guest visible stuff, we get this done with almost no additional overhead. And I don't see any problem with this. Should be easily doable.


Alex


  reply	other threads:[~2011-02-11  0:22 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 20:33 RFC: New API for PPC for vcpu mmu access Yoder Stuart-B08248
2011-02-02 20:33 ` Yoder Stuart-B08248
2011-02-02 20:33 ` [Qemu-devel] " Yoder Stuart-B08248
2011-02-02 21:33 ` Alexander Graf
2011-02-02 21:33   ` Alexander Graf
2011-02-02 21:33   ` [Qemu-devel] " Alexander Graf
2011-02-02 22:08   ` Scott Wood
2011-02-02 22:08     ` Scott Wood
2011-02-02 22:08     ` [Qemu-devel] " Scott Wood
2011-02-03  9:19     ` Alexander Graf
2011-02-03  9:19       ` Alexander Graf
2011-02-03  9:19       ` [Qemu-devel] " Alexander Graf
2011-02-04 22:33       ` Scott Wood
2011-02-04 22:33         ` Scott Wood
2011-02-04 22:33         ` [Qemu-devel] " Scott Wood
2011-02-07 15:43         ` Alexander Graf
2011-02-07 15:43           ` Alexander Graf
2011-02-07 15:43           ` [Qemu-devel] " Alexander Graf
2011-02-07 16:40           ` Yoder Stuart-B08248
2011-02-07 16:40             ` Yoder Stuart-B08248
2011-02-07 16:40             ` [Qemu-devel] " Yoder Stuart-B08248
2011-02-07 16:49             ` Alexander Graf
2011-02-07 16:49               ` Alexander Graf
2011-02-07 16:49               ` [Qemu-devel] " Alexander Graf
2011-02-07 18:52               ` Scott Wood
2011-02-07 18:52                 ` Scott Wood
2011-02-07 18:52                 ` [Qemu-devel] " Scott Wood
2011-02-07 19:56                 ` Yoder Stuart-B08248
2011-02-07 19:56                   ` Yoder Stuart-B08248
2011-02-07 19:56                   ` [Qemu-devel] " Yoder Stuart-B08248
2011-02-09 17:03                   ` Alexander Graf
2011-02-09 17:03                     ` Alexander Graf
2011-02-09 17:03                     ` [Qemu-devel] " Alexander Graf
2011-02-07 20:15           ` Scott Wood
2011-02-07 20:15             ` Scott Wood
2011-02-07 20:15             ` [Qemu-devel] " Scott Wood
2011-02-09 17:21             ` Alexander Graf
2011-02-09 17:21               ` Alexander Graf
2011-02-09 17:21               ` [Qemu-devel] " Alexander Graf
2011-02-09 23:09               ` Scott Wood
2011-02-09 23:09                 ` Scott Wood
2011-02-09 23:09                 ` [Qemu-devel] " Scott Wood
2011-02-10 11:45                 ` Alexander Graf
2011-02-10 11:45                   ` Alexander Graf
2011-02-10 11:45                   ` [Qemu-devel] " Alexander Graf
2011-02-10 18:51                   ` Scott Wood
2011-02-10 18:51                     ` Scott Wood
2011-02-10 18:51                     ` [Qemu-devel] " Scott Wood
2011-02-11  0:20                     ` Alexander Graf
2011-02-11  0:20                       ` Alexander Graf
2011-02-11  0:20                       ` [Qemu-devel] " Alexander Graf
2011-02-11  0:22                       ` Alexander Graf [this message]
2011-02-11  0:22                         ` Alexander Graf
2011-02-11  0:22                         ` [Qemu-devel] " Alexander Graf
2011-02-11  1:41                         ` Alexander Graf
2011-02-11  1:41                           ` Alexander Graf
2011-02-11  1:41                           ` [Qemu-devel] " Alexander Graf
2011-02-11 20:53                           ` Scott Wood
2011-02-11 20:53                             ` Scott Wood
2011-02-11 20:53                             ` [Qemu-devel] " Scott Wood
2011-02-11 21:07                             ` Alexander Graf
2011-02-11 21:07                               ` Alexander Graf
2011-02-11 21:07                               ` [Qemu-devel] " Alexander Graf
2011-02-12  0:57                               ` Scott Wood
2011-02-12  0:57                                 ` Scott Wood
2011-02-12  0:57                                 ` [Qemu-devel] " Scott Wood
2011-02-13 22:43                                 ` Alexander Graf
2011-02-13 22:43                                   ` Alexander Graf
2011-02-13 22:43                                   ` [Qemu-devel] " Alexander Graf
2011-02-14 17:11                                   ` Scott Wood
2011-02-14 17:11                                     ` Scott Wood
2011-02-14 17:11                                     ` [Qemu-devel] " Scott Wood
2011-02-14 20:19                                     ` Alexander Graf
2011-02-14 20:19                                       ` Alexander Graf
2011-02-14 20:19                                       ` [Qemu-devel] " Alexander Graf
2011-02-14 21:16                                       ` Scott Wood
2011-02-14 21:16                                         ` Scott Wood
2011-02-14 21:16                                         ` [Qemu-devel] " Scott Wood
2011-02-14 23:39                                         ` Alexander Graf
2011-02-14 23:39                                           ` Alexander Graf
2011-02-14 23:39                                           ` [Qemu-devel] " Alexander Graf
2011-02-14 23:49                                           ` Scott Wood
2011-02-14 23:49                                             ` Scott Wood
2011-02-14 23:49                                             ` [Qemu-devel] " Scott Wood
2011-02-15  0:00                                             ` Alexander Graf
2011-02-15  0:00                                               ` Alexander Graf
2011-02-15  0:00                                               ` [Qemu-devel] " Alexander Graf
2011-02-07 17:13       ` Avi Kivity
2011-02-07 17:13         ` Avi Kivity
2011-02-07 17:13         ` [Qemu-devel] " Avi Kivity
2011-02-07 17:30         ` Yoder Stuart-B08248
2011-02-07 17:30           ` Yoder Stuart-B08248
2011-02-07 17:30           ` [Qemu-devel] " Yoder Stuart-B08248
2011-02-08  9:10           ` Avi Kivity
2011-02-08  9:10             ` Avi Kivity
2011-02-08  9:10             ` [Qemu-devel] " Avi Kivity
2011-02-10  0:04       ` Scott Wood
2011-02-10  0:04         ` Scott Wood
2011-02-10  0:04         ` [Qemu-devel] " Scott Wood
2011-02-10 11:55         ` Alexander Graf
2011-02-10 11:55           ` Alexander Graf
2011-02-10 11:55           ` [Qemu-devel] " Alexander Graf
2011-02-10 12:31           ` Edgar E. Iglesias
2011-02-10 12:31             ` Edgar E. Iglesias
2011-02-10 12:31             ` [Qemu-devel] " Edgar E. Iglesias
2011-02-02 22:34   ` Yoder Stuart-B08248
2011-02-02 22:34     ` Yoder Stuart-B08248
2011-02-02 22:34     ` [Qemu-devel] " Yoder Stuart-B08248
2011-02-03  9:29     ` Alexander Graf
2011-02-03  9:29       ` Alexander Graf
2011-02-03  9:29       ` [Qemu-devel] " Alexander Graf
  -- strict thread matches above, loose matches on Subject: below --
2011-02-02 20:30 Yoder Stuart-B08248

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=63E8AA2B-685F-4360-9BC8-E760A2CAD570@suse.de \
    --to=agraf@suse.de \
    --cc=B08248@freescale.com \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=scottwood@freescale.com \
    /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.