All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoder Stuart-B08248 <B08248@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: "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: Wed, 2 Feb 2011 22:34:32 +0000	[thread overview]
Message-ID: <9F6FE96B71CF29479FF1CDC8046E15030BCF46@039-SN1MPN1-002.039d.mgd.msft.net> (raw)
In-Reply-To: <C196C887-9CB9-418B-AEFE-0D98B02D1B07@suse.de>



> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Wednesday, February 02, 2011 3:34 PM
> To: Yoder Stuart-B08248
> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; qemu-devel@nongnu.org
> Subject: Re: RFC: New API for PPC for vcpu mmu access
> 
> 
> On 02.02.2011, at 21:33, Yoder Stuart-B08248 wrote:
> 
> > Below is a proposal for a new API for PPC to allow KVM clients to set
> > MMU state in a vcpu.
> >
> > BookE processors have one or more software managed TLBs and currently
> > there is no mechanism for Qemu to initialize or access them.  This is
> > needed for normal initialization as well as debug.
> >
> > There are 4 APIs:
> >
> > -KVM_PPC_SET_MMU_TYPE allows the client to negotiate the type of MMU
> > with KVM-- the type determines the size and format of the data in the
> > other APIs
> 
> This should be done through the PVR hint in sregs, no? Usually a single CPU
> type only has a single MMU type.
> 
> > -KVM_PPC_INVALIDATE_TLB invalidates all TLB entries in all TLBs in the
> > vcpu
> >
> > -KVM_PPC_SET_TLBE sets a TLB entry-- the Power architecture specifies
> > the format of the MMU data passed in
> 
> This seems to fine-grained. I'd prefer a list of all TLB entries to be
> pushed in either direction. What's the foreseeable number of TLB entries
> within the next 10 years?
> 
> Having the whole stack available would make the sync with qemu easier and
> also allows us to only do a single ioctl for all the TLB management. Thanks
> to the PVR we know the size of the TLB, so we don't have to shove that
> around.

Yes, we thought about that approach but the idea here, as Scott 
described, was to provide an API that could work if user space
is unaware of the geometry of the TLB.

Take a look at Power ISA Version 2.06.1 (on power.org) at the definition
of TLBnCFG in Book E.  The NENTRY and ASSOC fields now have meaning that
allow TLB geometries that cannot be described in the TLBnCFG
registers.

I think the use case where this API would be used the most
would be from a gdb stub that needed to look up an effective
address.

Stuart

WARNING: multiple messages have this Message-ID (diff)
From: Yoder Stuart-B08248 <B08248@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: "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: Wed, 2 Feb 2011 22:34:32 +0000	[thread overview]
Message-ID: <9F6FE96B71CF29479FF1CDC8046E15030BCF46@039-SN1MPN1-002.039d.mgd.msft.net> (raw)
In-Reply-To: <C196C887-9CB9-418B-AEFE-0D98B02D1B07@suse.de>



> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Wednesday, February 02, 2011 3:34 PM
> To: Yoder Stuart-B08248
> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; qemu-devel@nongnu.org
> Subject: Re: RFC: New API for PPC for vcpu mmu access
> 
> 
> On 02.02.2011, at 21:33, Yoder Stuart-B08248 wrote:
> 
> > Below is a proposal for a new API for PPC to allow KVM clients to set
> > MMU state in a vcpu.
> >
> > BookE processors have one or more software managed TLBs and currently
> > there is no mechanism for Qemu to initialize or access them.  This is
> > needed for normal initialization as well as debug.
> >
> > There are 4 APIs:
> >
> > -KVM_PPC_SET_MMU_TYPE allows the client to negotiate the type of MMU
> > with KVM-- the type determines the size and format of the data in the
> > other APIs
> 
> This should be done through the PVR hint in sregs, no? Usually a single CPU
> type only has a single MMU type.
> 
> > -KVM_PPC_INVALIDATE_TLB invalidates all TLB entries in all TLBs in the
> > vcpu
> >
> > -KVM_PPC_SET_TLBE sets a TLB entry-- the Power architecture specifies
> > the format of the MMU data passed in
> 
> This seems to fine-grained. I'd prefer a list of all TLB entries to be
> pushed in either direction. What's the foreseeable number of TLB entries
> within the next 10 years?
> 
> Having the whole stack available would make the sync with qemu easier and
> also allows us to only do a single ioctl for all the TLB management. Thanks
> to the PVR we know the size of the TLB, so we don't have to shove that
> around.

Yes, we thought about that approach but the idea here, as Scott 
described, was to provide an API that could work if user space
is unaware of the geometry of the TLB.

Take a look at Power ISA Version 2.06.1 (on power.org) at the definition
of TLBnCFG in Book E.  The NENTRY and ASSOC fields now have meaning that
allow TLB geometries that cannot be described in the TLBnCFG
registers.

I think the use case where this API would be used the most
would be from a gdb stub that needed to look up an effective
address.

Stuart

WARNING: multiple messages have this Message-ID (diff)
From: Yoder Stuart-B08248 <B08248@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: "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: Wed, 02 Feb 2011 22:34:32 +0000	[thread overview]
Message-ID: <9F6FE96B71CF29479FF1CDC8046E15030BCF46@039-SN1MPN1-002.039d.mgd.msft.net> (raw)
In-Reply-To: <C196C887-9CB9-418B-AEFE-0D98B02D1B07@suse.de>



> -----Original Message-----
> From: Alexander Graf [mailto:agraf@suse.de]
> Sent: Wednesday, February 02, 2011 3:34 PM
> To: Yoder Stuart-B08248
> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; qemu-devel@nongnu.org
> Subject: Re: RFC: New API for PPC for vcpu mmu access
> 
> 
> On 02.02.2011, at 21:33, Yoder Stuart-B08248 wrote:
> 
> > Below is a proposal for a new API for PPC to allow KVM clients to set
> > MMU state in a vcpu.
> >
> > BookE processors have one or more software managed TLBs and currently
> > there is no mechanism for Qemu to initialize or access them.  This is
> > needed for normal initialization as well as debug.
> >
> > There are 4 APIs:
> >
> > -KVM_PPC_SET_MMU_TYPE allows the client to negotiate the type of MMU
> > with KVM-- the type determines the size and format of the data in the
> > other APIs
> 
> This should be done through the PVR hint in sregs, no? Usually a single CPU
> type only has a single MMU type.
> 
> > -KVM_PPC_INVALIDATE_TLB invalidates all TLB entries in all TLBs in the
> > vcpu
> >
> > -KVM_PPC_SET_TLBE sets a TLB entry-- the Power architecture specifies
> > the format of the MMU data passed in
> 
> This seems to fine-grained. I'd prefer a list of all TLB entries to be
> pushed in either direction. What's the foreseeable number of TLB entries
> within the next 10 years?
> 
> Having the whole stack available would make the sync with qemu easier and
> also allows us to only do a single ioctl for all the TLB management. Thanks
> to the PVR we know the size of the TLB, so we don't have to shove that
> around.

Yes, we thought about that approach but the idea here, as Scott 
described, was to provide an API that could work if user space
is unaware of the geometry of the TLB.

Take a look at Power ISA Version 2.06.1 (on power.org) at the definition
of TLBnCFG in Book E.  The NENTRY and ASSOC fields now have meaning that
allow TLB geometries that cannot be described in the TLBnCFG
registers.

I think the use case where this API would be used the most
would be from a gdb stub that needed to look up an effective
address.

Stuart


  parent reply	other threads:[~2011-02-02 22:34 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
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 [this message]
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=9F6FE96B71CF29479FF1CDC8046E15030BCF46@039-SN1MPN1-002.039d.mgd.msft.net \
    --to=b08248@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.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.