xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: julien.grall@arm.com
Cc: sstabellini@kernel.org, wei.liu2@citrix.com,
	George.Dunlap@eu.citrix.com, andrew.cooper3@citrix.com,
	tim@xen.org, xen-devel@lists.xen.org, jbeulich@suse.com,
	ian.jackson@eu.citrix.com
Subject: [PATCH 4/4] xen/arm: update the docs about heterogeneous computing
Date: Thu, 15 Feb 2018 15:17:00 -0800	[thread overview]
Message-ID: <1518736620-13802-4-git-send-email-sstabellini@kernel.org> (raw)
In-Reply-To: <1518736620-13802-1-git-send-email-sstabellini@kernel.org>

Update the documentation of the hmp-unsafe option to explain how to use
it safely, together with the right cpu affinity setting, on big.LITTLE
systems.

Also update the warning message to point users to the docs.

Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
CC: jbeulich@suse.com
CC: konrad.wilk@oracle.com
CC: tim@xen.org
CC: wei.liu2@citrix.com
CC: andrew.cooper3@citrix.com
CC: George.Dunlap@eu.citrix.com
CC: ian.jackson@eu.citrix.com

---
 docs/misc/xen-command-line.markdown | 10 +++++++++-
 xen/arch/arm/smpboot.c              |  9 +++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/docs/misc/xen-command-line.markdown b/docs/misc/xen-command-line.markdown
index 2184cb9..a1ebeea 100644
--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -1007,7 +1007,15 @@ Control Xens use of the APEI Hardware Error Source Table, should one be found.
 
 Say yes at your own risk if you want to enable heterogenous computing
 (such as big.LITTLE). This may result to an unstable and insecure
-platform. When the option is disabled (default), CPUs that are not
+platform, unless you manually specify the cpu affinity of all domains so
+that all vcpus are scheduled on the same class of pcpus (big or LITTLE
+but not both). vcpu migration between big cores and LITTLE cores is not
+supported. Thus, if the first 4 pcpus are big and the last 4 are LITTLE,
+all domains need to have either cpus = "0-3" or cpus = "4-7" in their VM
+config. Moreover, dom0_vcpus_pin needs to be passed on the Xen command
+line.
+
+When the hmp-unsafe option is disabled (default), CPUs that are not
 identical to the boot CPU will be parked and not used by Xen.
 
 ### hpetbroadcast
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 7ea4e41..20c1b4a 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -265,7 +265,7 @@ void __init smp_init_cpus(void)
 
     if ( opt_hmp_unsafe )
         warning_add("WARNING: HMP COMPUTING HAS BEEN ENABLED.\n"
-                    "It has implications on the security and stability of the system.\n");
+                    "Make sure to pass dom0_vcpus_pin, and specify the cpu affinity of all domains.\n");
 }
 
 int __init
@@ -306,13 +306,14 @@ void start_secondary(unsigned long boot_phys_offset,
     /*
      * Currently Xen assumes the platform has only one kind of CPUs.
      * This assumption does not hold on big.LITTLE platform and may
-     * result to instability and insecure platform. Better to park them
-     * for now.
+     * result to instability and insecure platform (unless cpu affinity
+     * is manually specified for all domains). Better to park them for
+     * now.
      */
     if ( !opt_hmp_unsafe &&
          current_cpu_data.midr.bits != boot_cpu_data.midr.bits )
     {
-        printk(XENLOG_ERR "CPU%u MIDR (0x%x) does not match boot CPU MIDR (0x%x).\n",
+        printk(XENLOG_ERR "CPU%u MIDR (0x%x) does not match boot CPU MIDR (0x%x), disable cpu. See hmp-unsafe.\n",
                smp_processor_id(), current_cpu_data.midr.bits,
                boot_cpu_data.midr.bits);
         stop_cpu();
-- 
1.9.1


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

  parent reply	other threads:[~2018-02-15 23:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 23:16 [PATCH 0/4] unsafe big.LITTLE support Stefano Stabellini
2018-02-15 23:16 ` [PATCH 1/4] xen/arm: Park CPUs with a MIDR different from the boot CPU Stefano Stabellini
2018-02-15 23:16   ` [PATCH 2/4] xen/arm: read ACTLR on the pcpu where the vcpu will run Stefano Stabellini
2018-02-16 10:45     ` Julien Grall
2018-02-17  1:39       ` Stefano Stabellini
2018-02-15 23:16   ` [PATCH 3/4] xen/arm: set vpidr " Stefano Stabellini
2018-02-16 11:01     ` Julien Grall
2018-02-16 20:31       ` Stefano Stabellini
2018-02-16 20:45         ` Julien Grall
2018-02-16 20:59           ` Stefano Stabellini
2018-02-16 21:09             ` Julien Grall
2018-02-16 21:34               ` Stefano Stabellini
2018-02-16 21:39                 ` Julien Grall
2018-02-15 23:17   ` Stefano Stabellini [this message]
2018-02-16 11:22     ` [PATCH 4/4] xen/arm: update the docs about heterogeneous computing Julien Grall
2018-02-16 20:50       ` Stefano Stabellini
2018-02-16 21:01         ` Julien Grall
2018-02-16 21:15           ` Stefano Stabellini
2018-02-16 21:57             ` Julien Grall
2018-02-17  0:31               ` Stefano Stabellini
2018-02-17 10:23                 ` Julien Grall
2018-02-19 20:28                   ` Stefano Stabellini
2018-02-19 20:47                     ` Julien Grall
2018-02-19 21:05                       ` Stefano Stabellini
2018-02-19 21:17                         ` Julien Grall
2018-02-19 21:34                           ` Stefano Stabellini
2018-02-16 11:58 ` [PATCH 0/4] unsafe big.LITTLE support Julien Grall
2018-02-16 22:07   ` Stefano Stabellini

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=1518736620-13802-4-git-send-email-sstabellini@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien.grall@arm.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).