All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>, julien.grall@arm.com
Cc: xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] [PATCH] xen/arm: remove special dom0 case in dump_hyp_walk
Date: Tue, 15 Oct 2019 06:21:22 +0200	[thread overview]
Message-ID: <3cdf0397-fd18-35af-6181-c7842dfc3e37@suse.com> (raw)
In-Reply-To: <alpine.DEB.2.21.1910142041270.6326@sstabellini-ThinkPad-T480s>

On 15.10.19 05:49, Stefano Stabellini wrote:
> There is no need to have a special dom0 case to convert the pgtable
> virtual address into a physical address. The virt_to_maddr function can
> work both in the dom0 case and the domU case.
> 
> This is more than a cleanup: when Xen is loaded at addresses lower than
> 2MB on arm32 phys_offset might not hold the right value and be unable to
> perform a virt to phys conversion properly. Reducing the unnecessary
> usage of phys_offset is a good idea.
> 
> Link: https://marc.info/?l=xen-devel&m=157081398022401
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
> 
> diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c
> index a6637ce347..b7883cfbab 100644
> --- a/xen/arch/arm/mm.c
> +++ b/xen/arch/arm/mm.c
> @@ -284,10 +284,7 @@ void dump_hyp_walk(vaddr_t addr)
>              "on CPU%d via TTBR 0x%016"PRIx64"\n",
>              addr, smp_processor_id(), ttbr);
>   
> -    if ( smp_processor_id() == 0 )
> -        BUG_ON( (lpae_t *)(unsigned long)(ttbr - phys_offset) != pgtable );
> -    else
> -        BUG_ON( virt_to_maddr(pgtable) != ttbr );
> +    BUG_ON( virt_to_maddr(pgtable) != ttbr );
>       dump_pt_walk(ttbr, addr, HYP_PT_ROOT_LEVEL, 1);
>   }

I can't make a connection between commit message ("special dom0 case")
and the code modification. The special case removed is about cpu 0, not
dom0.


Juergen

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

  reply	other threads:[~2019-10-15  4:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15  3:49 [Xen-devel] [PATCH] xen/arm: remove special dom0 case in dump_hyp_walk Stefano Stabellini
2019-10-15  4:21 ` Jürgen Groß [this message]
2019-10-15 15:50   ` Stefano Stabellini
2019-10-15 10:58 ` Julien Grall
2019-10-15 15:51   ` Stefano Stabellini
2019-10-15 15:59     ` Julien Grall

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=3cdf0397-fd18-35af-6181-c7842dfc3e37@suse.com \
    --to=jgross@suse.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.