Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-08 Thread Stefano Stabellini
On Thu, 8 Oct 2020, Masami Hiramatsu wrote: > On Tue, 6 Oct 2020 10:56:52 -0700 (PDT) > Stefano Stabellini wrote: > > > On Tue, 6 Oct 2020, Masami Hiramatsu wrote: > > > On Mon, 5 Oct 2020 18:13:22 -0700 (PDT) > > > Stefano Stabellini wrote: > > > > > > > On Mon, 5 Oct 2020, Julien Grall

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-08 Thread Masami Hiramatsu
On Tue, 6 Oct 2020 10:56:52 -0700 (PDT) Stefano Stabellini wrote: > On Tue, 6 Oct 2020, Masami Hiramatsu wrote: > > On Mon, 5 Oct 2020 18:13:22 -0700 (PDT) > > Stefano Stabellini wrote: > > > > > On Mon, 5 Oct 2020, Julien Grall wrote: > > > > Hi Masami, > > > > > > > > On 05/10/2020 14:39,

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-06 Thread Masami Hiramatsu
On Tue, 6 Oct 2020 10:56:52 -0700 (PDT) Stefano Stabellini wrote: > On Tue, 6 Oct 2020, Masami Hiramatsu wrote: > > On Mon, 5 Oct 2020 18:13:22 -0700 (PDT) > > Stefano Stabellini wrote: > > > > > On Mon, 5 Oct 2020, Julien Grall wrote: > > > > Hi Masami, > > > > > > > > On 05/10/2020 14:39,

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-06 Thread Stefano Stabellini
On Tue, 6 Oct 2020, Masami Hiramatsu wrote: > On Mon, 5 Oct 2020 18:13:22 -0700 (PDT) > Stefano Stabellini wrote: > > > On Mon, 5 Oct 2020, Julien Grall wrote: > > > Hi Masami, > > > > > > On 05/10/2020 14:39, Masami Hiramatsu wrote: > > > > Use per_cpu_ptr_to_phys() instead of virt_to_phys()

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Masami Hiramatsu
On Tue, 6 Oct 2020 11:40:58 +0900 Masami Hiramatsu wrote: > On Mon, 5 Oct 2020 18:13:22 -0700 (PDT) > Stefano Stabellini wrote: > > > On Mon, 5 Oct 2020, Julien Grall wrote: > > > Hi Masami, > > > > > > On 05/10/2020 14:39, Masami Hiramatsu wrote: > > > > Use per_cpu_ptr_to_phys() instead of

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Masami Hiramatsu
On Mon, 5 Oct 2020 18:13:22 -0700 (PDT) Stefano Stabellini wrote: > On Mon, 5 Oct 2020, Julien Grall wrote: > > Hi Masami, > > > > On 05/10/2020 14:39, Masami Hiramatsu wrote: > > > Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu > > > address conversion. > > > > > > In

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Stefano Stabellini
On Mon, 5 Oct 2020, Julien Grall wrote: > Hi Masami, > > On 05/10/2020 14:39, Masami Hiramatsu wrote: > > Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu > > address conversion. > > > > In xen_starting_cpu(), per-cpu xen_vcpu_info address is converted > > to gfn by virt_to_gfn()

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Masami Hiramatsu
On Mon, 5 Oct 2020 19:18:47 +0100 Julien Grall wrote: > Hi Masami, > > On 05/10/2020 14:39, Masami Hiramatsu wrote: > > Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu > > address conversion. > > > > In xen_starting_cpu(), per-cpu xen_vcpu_info address is converted > > to gfn

Re: [PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Julien Grall
Hi Masami, On 05/10/2020 14:39, Masami Hiramatsu wrote: Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu address conversion. In xen_starting_cpu(), per-cpu xen_vcpu_info address is converted to gfn by virt_to_gfn() macro. However, since the virt_to_gfn(v) assumes the given

[PATCH] arm/arm64: xen: Fix to convert percpu address to gfn correctly

2020-10-05 Thread Masami Hiramatsu
Use per_cpu_ptr_to_phys() instead of virt_to_phys() for per-cpu address conversion. In xen_starting_cpu(), per-cpu xen_vcpu_info address is converted to gfn by virt_to_gfn() macro. However, since the virt_to_gfn(v) assumes the given virtual address is in contiguous kernel memory area, it can not