All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Peng Fan <peng.fan@nxp.com>, Peng Fan <van.freenix@gmail.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH v4 0/7] unsafe big.LITTLE support
Date: Thu, 8 Mar 2018 12:30:08 +0000	[thread overview]
Message-ID: <ee741bd9-a12a-4d5b-baea-0630b827609d@arm.com> (raw)
In-Reply-To: <DB6PR04MB32219D215C6691B6640089DF88DF0@DB6PR04MB3221.eurprd04.prod.outlook.com>

Hi,

On 08/03/18 12:23, Peng Fan wrote:
> 
> 
>> -----Original Message-----
>> From: Xen-devel [mailto:xen-devel-bounces@lists.xenproject.org] On Behalf Of
>> Julien Grall
>> Sent: 2018年3月8日 19:04
>> To: Peng Fan <van.freenix@gmail.com>; Stefano Stabellini
>> <sstabellini@kernel.org>
>> Cc: xen-devel@lists.xen.org
>> Subject: Re: [Xen-devel] [PATCH v4 0/7] unsafe big.LITTLE support
>>
>> Hello,
>>
>> On 08/03/18 06:15, Peng Fan wrote:
>>> Hi Stefano,
>>> On Fri, Mar 02, 2018 at 11:05:54AM -0800, Stefano Stabellini wrote:
>>>> Hi all,
>>>>
>>>> This series changes the initialization of two virtual registers to
>>>> make sure they match the value of the underlying physical cpu.
>>>>
>>>> It also disables cpus different from the boot cpu, unless a newly
>>>> introduced command line option is specified. In that case, it
>>>> explains how to setup the system to avoid corruptions, which involves
>>>> manually specifying the cpu affinity of all domains, because the
>>>> scheduler still lacks big.LITTLE support.
>>>>
>>>> In the uncommon case of a system where the cacheline sizes are
>>>> different  across cores, it disables all cores that have a different
>>>> dcache line size from the boot cpu. In fact, it is not sufficient to
>>>> use the dcache line  size of the current cpu, it would be necessary to
>>>> use the minimum across  all dcache line sizes of all cores.  Given
>>>> that it is actually uncommon  even in big.LITTLE systems, just disable cpus
>> for now.
>>>>
>>>> The first patch in the series is a fix for the way we read the dcache
>>>> line size.
>>>
>>> I am trying the patchset, but I meet issue that Guest Big/Little with
>>> vcpu not working properly. As my current hardware has an issue which
>>> has fix in Kernel,
>>> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsou
>>>
>> rce.codeaurora.org%2Fexternal%2Fimx%2Flinux-imx%2Fcommit%2F%3Fh%3Di
>> mx_
>>>
>> 4.9.51_imx8_beta2%26id%3D917cc3a8db2f3609ef8e2f59e7bcd31aa2cd4e59&
>> data
>>>
>> =02%7C01%7Cpeng.fan%40nxp.com%7Cc7f074c6708647441f2b08d584e45fec
>> %7C686
>>>
>> ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636561038755176475&sdata
>> =S%2BI
>>> 7g1BwUDgAnXGP8%2FFc1bVZZTIimd3J7%2FkTIdeWL4o%3D&reserved=0
>>
>> Can you describe what you mean by not working properly? Also what is your
>> setup? Did you pin the different vCPUs as requested by the documentation.
>>
> 
> I may not describe clearly. It is domu with big/little guest could not bootup correctly.

What do you mean by "could not bootup correctly"? Can you please provide 
logs or a bit more feedback. Without them, it is nearly impossible to me 
to help to debugging the problem.

> For dom0, the args are
> dom0_mem=2048M dom0_max_vcpus=6 dom0_vcpus_pin=true hmp-unsafe=true
> 
> For domu
> vcpus = 4
> 
> #vcpu pin
> cpus = ['2-3', '2-3', '4-5', '4-5']
> 
> The hardware is cpu0-3 is A53, cpu4-5 is A72.

What does "xl vcpu-list" give you?

> 
> I do not met issue for dom0.
> 
>>>
>>> I am not sure whether this issue cause DomU big/Little not work.
>>
>> Well, I would recommend to speak with NXP whether this errata affects TLB
>> flush for Hypervisor Page-Table or Stage-2 Page-Table.
> 
> I tried the following, but no help. Not sure my patch is correct. I think it
> affects stage2 TLB.
> 
> --- a/xen/include/asm-arm/arm64/flushtlb.h
> +++ b/xen/include/asm-arm/arm64/flushtlb.h
> @@ -6,7 +6,7 @@ static inline void flush_tlb_local(void)
>   {
>       asm volatile(
>           "dsb sy;"
> -        "tlbi vmalls12e1;"
> +        "tlbi alle1;"
>           "dsb sy;"
>           "isb;"
>           : : : "memory");
> @@ -17,7 +17,7 @@ static inline void flush_tlb(void)
>   {
>       asm volatile(
>           "dsb sy;"
> -        "tlbi vmalls12e1is;"
> +        "tlbi alle1;"

I am not sure why you drop the innershareable here?

>           "dsb sy;"
>           "isb;"
>           : : : "memory");
> @@ -39,7 +39,7 @@ static inline void flush_tlb_all(void)
>   {
>       asm volatile(
>           "dsb sy;"
> -        "tlbi alle1is;"
> +        "tlbi alle1;"

Ditto.

>           "dsb sy;"
>           "isb;"
>           : : : "memory");
> --- a/xen/include/asm-arm/arm64/page.h
> +++ b/xen/include/asm-arm/arm64/page.h
> @@ -74,14 +74,16 @@ static inline void flush_xen_data_tlb_local(void)
>   /* Flush TLB of local processor for address va. */
>   static inline void  __flush_xen_data_tlb_one_local(vaddr_t va)
>   {
> -    asm volatile("tlbi vae2, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
> +       flush_xen_data_tlb_local();
> +    //asm volatile("tlbi vae2, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
>   }
> 
>   /* Flush TLB of all processors in the inner-shareable domain for
>    * address va. */
>   static inline void __flush_xen_data_tlb_one(vaddr_t va)
>   {
> -    asm volatile("tlbi vae2is, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
> +       flush_xen_data_tlb_local();

Why do you replace an innershareable call to a local call? Is it part of 
the errata?

> +    //asm volatile("tlbi vae2is, %0;" : : "r" (va>>PAGE_SHIFT) : "memory");
>   }
> 
>>
>>> So wonder has this patchset been tested on Big/Little Hardware?
>>
>> This series only adds facility to report the correct MIDR to the guest.
>> If your platform requires more, then it would be necessary send a patch for Xen.
> 
> Do you have any suggestions? Besides MIDR/ACTLR/Cacheline, are there more needed?

Having a bit more details from your side would be helpful. At the 
moment, I have no clue what's going on.

Cheers,

-- 
Julien Grall

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

  reply	other threads:[~2018-03-08 12:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-02 19:05 [PATCH v4 0/7] unsafe big.LITTLE support Stefano Stabellini
2018-03-02 19:06 ` [PATCH v4 1/7] xen/arm: Read the dcache line size from CTR register Stefano Stabellini
2018-03-02 19:06   ` [PATCH v4 2/7] xen/arm: Park CPUs with a MIDR different from the boot CPU Stefano Stabellini
2018-03-02 19:06   ` [PATCH v4 3/7] xen/arm: make processor a per cpu variable Stefano Stabellini
2018-03-02 19:06   ` [PATCH v4 4/7] xen/arm: read ACTLR on the pcpu where the vcpu will run Stefano Stabellini
2018-03-02 19:06   ` [PATCH v4 5/7] xen/arm: set VPIDR based on the MIDR value of the underlying pCPU Stefano Stabellini
2018-03-02 19:06   ` [PATCH v4 6/7] xen/arm: update the docs about heterogeneous computing Stefano Stabellini
2018-03-02 19:06   ` [PATCH v4 7/7] xen/arm: disable CPUs with different dcache line sizes Stefano Stabellini
2018-03-06 10:59     ` Julien Grall
2018-03-06 19:41       ` Stefano Stabellini
2018-03-06 10:46   ` [PATCH v4 1/7] xen/arm: Read the dcache line size from CTR register Julien Grall
2018-03-08  6:15 ` [PATCH v4 0/7] unsafe big.LITTLE support Peng Fan
2018-03-08 11:03   ` Julien Grall
2018-03-08 12:23     ` Peng Fan
2018-03-08 12:30       ` Julien Grall [this message]
2018-03-08 12:43         ` Peng Fan
2018-03-08 15:13           ` Julien Grall
2018-03-09  9:05             ` Peng Fan
2018-03-09 10:22               ` Julien Grall
2018-03-09 13:30                 ` Peng Fan
2018-03-09 14:40                   ` Julien Grall
2018-03-10  1:09                     ` Stefano Stabellini
2018-03-12  2:57                       ` Peng Fan
2018-03-12 11:02                         ` Julien Grall
2018-03-12  2:32                     ` Peng Fan
2018-03-12 10:34                       ` 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=ee741bd9-a12a-4d5b-baea-0630b827609d@arm.com \
    --to=julien.grall@arm.com \
    --cc=peng.fan@nxp.com \
    --cc=sstabellini@kernel.org \
    --cc=van.freenix@gmail.com \
    --cc=xen-devel@lists.xen.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.