Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [Xen-devel] [PATCH] xen/arm: traps: Remove all zero padding before PRIregister format
@ 2019-08-14  9:36 Julien Grall
  2019-08-14 11:18 ` Volodymyr Babchuk
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2019-08-14  9:36 UTC (permalink / raw)
  To: xen-devel; +Cc: Julien Grall, Stefano Stabellini, Volodymyr Babchuk

Commit af156ff085 "xen/arm: types: Specify the zero padding in the
definition of PRIregister" moved the zero padding within the definition
of PRIregister.

However, some of the users still had zero padding before which result
to print tens of zero when dumping the CPU state.

To prevent this, remove the last users of zero padding before
PRIregister.

Signed-off-by: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/traps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index f062ae6f6a..a3b961bd06 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -938,7 +938,7 @@ static void _show_registers(const struct cpu_user_regs *regs,
     printk(" TTBR0_EL2: %016"PRIx64"\n", READ_SYSREG64(TTBR0_EL2));
     printk("\n");
     printk("   ESR_EL2: %08"PRIx32"\n", regs->hsr);
-    printk(" HPFAR_EL2: %016"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
+    printk(" HPFAR_EL2: %"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
 
 #ifdef CONFIG_ARM_32
     printk("     HDFAR: %08"PRIx32"\n", READ_CP32(HDFAR));
@@ -1759,7 +1759,7 @@ void dump_guest_s1_walk(struct domain *d, vaddr_t addr)
     mfn = gfn_to_mfn(d, gaddr_to_gfn(ttbr0));
 
     printk("dom%d VA 0x%08"PRIvaddr"\n", d->domain_id, addr);
-    printk("    TTBCR: 0x%08"PRIregister"\n", ttbcr);
+    printk("    TTBCR: 0x%"PRIregister"\n", ttbcr);
     printk("    TTBR0: 0x%016"PRIx64" = 0x%"PRIpaddr"\n",
            ttbr0, mfn_to_maddr(mfn));
 
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] xen/arm: traps: Remove all zero padding before PRIregister format
  2019-08-14  9:36 [Xen-devel] [PATCH] xen/arm: traps: Remove all zero padding before PRIregister format Julien Grall
@ 2019-08-14 11:18 ` Volodymyr Babchuk
  2019-08-27 20:16   ` Stefano Stabellini
  0 siblings, 1 reply; 3+ messages in thread
From: Volodymyr Babchuk @ 2019-08-14 11:18 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, Stefano Stabellini, Volodymyr Babchuk


Hi Julien,

Julien Grall writes:

> Commit af156ff085 "xen/arm: types: Specify the zero padding in the
> definition of PRIregister" moved the zero padding within the definition
> of PRIregister.
>
> However, some of the users still had zero padding before which result
> to print tens of zero when dumping the CPU state.
>
> To prevent this, remove the last users of zero padding before
> PRIregister.
>
> Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Volodymyr Babchuk <volodymyr.babchuk@epam.com>

> ---
>  xen/arch/arm/traps.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index f062ae6f6a..a3b961bd06 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -938,7 +938,7 @@ static void _show_registers(const struct cpu_user_regs *regs,
>      printk(" TTBR0_EL2: %016"PRIx64"\n", READ_SYSREG64(TTBR0_EL2));
>      printk("\n");
>      printk("   ESR_EL2: %08"PRIx32"\n", regs->hsr);
> -    printk(" HPFAR_EL2: %016"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
> +    printk(" HPFAR_EL2: %"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
>  
>  #ifdef CONFIG_ARM_32
>      printk("     HDFAR: %08"PRIx32"\n", READ_CP32(HDFAR));
> @@ -1759,7 +1759,7 @@ void dump_guest_s1_walk(struct domain *d, vaddr_t addr)
>      mfn = gfn_to_mfn(d, gaddr_to_gfn(ttbr0));
>  
>      printk("dom%d VA 0x%08"PRIvaddr"\n", d->domain_id, addr);
> -    printk("    TTBCR: 0x%08"PRIregister"\n", ttbcr);
> +    printk("    TTBCR: 0x%"PRIregister"\n", ttbcr);
>      printk("    TTBR0: 0x%016"PRIx64" = 0x%"PRIpaddr"\n",
>             ttbr0, mfn_to_maddr(mfn));


-- 
Volodymyr Babchuk at EPAM
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xen-devel] [PATCH] xen/arm: traps: Remove all zero padding before PRIregister format
  2019-08-14 11:18 ` Volodymyr Babchuk
@ 2019-08-27 20:16   ` Stefano Stabellini
  0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2019-08-27 20:16 UTC (permalink / raw)
  To: Volodymyr Babchuk; +Cc: xen-devel, Julien Grall, Stefano Stabellini

On Wed, 14 Aug 2019, Volodymyr Babchuk wrote:
> Hi Julien,
> 
> Julien Grall writes:
> 
> > Commit af156ff085 "xen/arm: types: Specify the zero padding in the
> > definition of PRIregister" moved the zero padding within the definition
> > of PRIregister.
> >
> > However, some of the users still had zero padding before which result
> > to print tens of zero when dumping the CPU state.
> >
> > To prevent this, remove the last users of zero padding before
> > PRIregister.
> >
> > Signed-off-by: Julien Grall <julien.grall@arm.com>
> Reviewed-by: Volodymyr Babchuk <volodymyr.babchuk@epam.com>

Thanks, committed

> > ---
> >  xen/arch/arm/traps.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> > index f062ae6f6a..a3b961bd06 100644
> > --- a/xen/arch/arm/traps.c
> > +++ b/xen/arch/arm/traps.c
> > @@ -938,7 +938,7 @@ static void _show_registers(const struct cpu_user_regs *regs,
> >      printk(" TTBR0_EL2: %016"PRIx64"\n", READ_SYSREG64(TTBR0_EL2));
> >      printk("\n");
> >      printk("   ESR_EL2: %08"PRIx32"\n", regs->hsr);
> > -    printk(" HPFAR_EL2: %016"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
> > +    printk(" HPFAR_EL2: %"PRIregister"\n", READ_SYSREG(HPFAR_EL2));
> >  
> >  #ifdef CONFIG_ARM_32
> >      printk("     HDFAR: %08"PRIx32"\n", READ_CP32(HDFAR));
> > @@ -1759,7 +1759,7 @@ void dump_guest_s1_walk(struct domain *d, vaddr_t addr)
> >      mfn = gfn_to_mfn(d, gaddr_to_gfn(ttbr0));
> >  
> >      printk("dom%d VA 0x%08"PRIvaddr"\n", d->domain_id, addr);
> > -    printk("    TTBCR: 0x%08"PRIregister"\n", ttbcr);
> > +    printk("    TTBCR: 0x%"PRIregister"\n", ttbcr);
> >      printk("    TTBR0: 0x%016"PRIx64" = 0x%"PRIpaddr"\n",
> >             ttbr0, mfn_to_maddr(mfn));
> 
> 
> -- 
> Volodymyr Babchuk at EPAM

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14  9:36 [Xen-devel] [PATCH] xen/arm: traps: Remove all zero padding before PRIregister format Julien Grall
2019-08-14 11:18 ` Volodymyr Babchuk
2019-08-27 20:16   ` Stefano Stabellini

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@archiver.kernel.org
	public-inbox-index xen-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox