diff mbox

[02/16] target-ppc: Rework storage of VPA registration state

Message ID 1351567512-17278-3-git-send-email-david@gibson.dropbear.id.au
State New
Headers show

Commit Message

David Gibson Oct. 30, 2012, 3:24 a.m. UTC
With PAPR guests, hypercalls allow registration of the Virtual Processor
Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow
for certain communication between the guest and hypervisor.  Currently, we
store the addresses of the three areas and the size of the dtl in
CPUPPCState.

The SLB shadow and DTL are variable sized, with the size being retrieved
from within the registered memory area at the hypercall time.  This size
can later be overwritten with other information, however, so we need to
save the size as of registration time.  We already do this for the DTL,
but not for the SLB shadow, so this patch fixes that.

In addition, we change the storage of the VPA information to use fixed
size integer types which will make life easier for syncing this data with
KVM, which we will need in future.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 target-ppc/cpu.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Alexander Graf Nov. 1, 2012, 10:10 a.m. UTC | #1
On 30.10.2012, at 04:24, David Gibson wrote:

> With PAPR guests, hypercalls allow registration of the Virtual Processor
> Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow
> for certain communication between the guest and hypervisor.  Currently, we
> store the addresses of the three areas and the size of the dtl in
> CPUPPCState.
> 
> The SLB shadow and DTL are variable sized, with the size being retrieved
> from within the registered memory area at the hypercall time.  This size
> can later be overwritten with other information, however, so we need to
> save the size as of registration time.  We already do this for the DTL,
> but not for the SLB shadow, so this patch fixes that.
> 
> In addition, we change the storage of the VPA information to use fixed
> size integer types which will make life easier for syncing this data with
> KVM, which we will need in future.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>

The commit message seems to not match the patch contents. I'll fix that up.


Alex

> ---
> target-ppc/cpu.h |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
> index 286f42a..e603d9f 100644
> --- a/target-ppc/cpu.h
> +++ b/target-ppc/cpu.h
> @@ -1045,9 +1045,9 @@ struct CPUPPCState {
> #endif
> 
> #if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
> -    hwaddr vpa_addr;
> -    hwaddr slb_shadow_addr, slb_shadow_size;
> -    hwaddr dtl_addr, dtl_size;
> +    uint64_t vpa_addr;
> +    uint64_t slb_shadow_addr, slb_shadow_size;
> +    uint64_t dtl_addr, dtl_size;
> #endif /* TARGET_PPC64 */
> 
>     int error_code;
> -- 
> 1.7.10.4
>
David Gibson Nov. 2, 2012, 2:07 a.m. UTC | #2
On Thu, Nov 01, 2012 at 11:10:33AM +0100, Alexander Graf wrote:
> 
> On 30.10.2012, at 04:24, David Gibson wrote:
> 
> > With PAPR guests, hypercalls allow registration of the Virtual Processor
> > Area (VPA), SLB shadow and dispatch trace log (DTL), each of which allow
> > for certain communication between the guest and hypervisor.  Currently, we
> > store the addresses of the three areas and the size of the dtl in
> > CPUPPCState.
> > 
> > The SLB shadow and DTL are variable sized, with the size being retrieved
> > from within the registered memory area at the hypercall time.  This size
> > can later be overwritten with other information, however, so we need to
> > save the size as of registration time.  We already do this for the DTL,
> > but not for the SLB shadow, so this patch fixes that.
> > 
> > In addition, we change the storage of the VPA information to use fixed
> > size integer types which will make life easier for syncing this data with
> > KVM, which we will need in future.
> > 
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> 
> The commit message seems to not match the patch contents. I'll fix
> that up.

Sorry, thanks.  I think the described change was in an earlier
version, but I'm not sure wuite when it fell out.
diff mbox

Patch

diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 286f42a..e603d9f 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -1045,9 +1045,9 @@  struct CPUPPCState {
 #endif
 
 #if defined(TARGET_PPC64) && !defined(CONFIG_USER_ONLY)
-    hwaddr vpa_addr;
-    hwaddr slb_shadow_addr, slb_shadow_size;
-    hwaddr dtl_addr, dtl_size;
+    uint64_t vpa_addr;
+    uint64_t slb_shadow_addr, slb_shadow_size;
+    uint64_t dtl_addr, dtl_size;
 #endif /* TARGET_PPC64 */
 
     int error_code;