From patchwork Thu Aug 29 17:28:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 19617 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E040325E4D for ; Thu, 29 Aug 2013 17:28:13 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id ha11sf781760vcb.8 for ; Thu, 29 Aug 2013 10:28:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=3xhJufcxcSzv3nsGgwbZeT2xSnzO8IP/3QgNiGlDymQ=; b=AzT7n+RBTsokscMtXJ6Y+BcazOGZeOIgN6622iwVAULbZQ+NsaPbF013njaZ+LvwQe dFZ2HvOhBXSMNgfHpU00MKrafslUqKl3r/0uAOhsY2QUgs97v+54vFIVwBAq2mgpGGbf +7ojyabuEG/2WWMLSt6P1dNcaN8vbRLPNgcQCSPVTM/8zREc+bb8cfIw73L3GN54O30C ewvL+uh5tDofdGabCqQbxgKVqoru1HZQsIyQJPu6EIJxoKVNun8M7WH88EnXQde0/7fP jOwVFjol5wv7YtNu7cwjbq5FLOXNRA+K/BPxDEgCoNCqUdQR72HK4/C0hwj7J5QH4zqq 7p7g== X-Received: by 10.236.2.5 with SMTP id 5mr1589987yhe.23.1377797293564; Thu, 29 Aug 2013 10:28:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.24.194 with SMTP id w2ls904614qef.96.gmail; Thu, 29 Aug 2013 10:28:13 -0700 (PDT) X-Received: by 10.220.16.73 with SMTP id n9mr2224869vca.24.1377797293315; Thu, 29 Aug 2013 10:28:13 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id y4si8404260vcx.24.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 10:28:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so523848vbg.25 for ; Thu, 29 Aug 2013 10:28:13 -0700 (PDT) X-Gm-Message-State: ALoCoQkpeIVNxWlj7iUDeKrxPs4BiLPxkv3o+HKOsw8lKGHoLpAiWuDv4alofkNi1D9bt7WQoKZs X-Received: by 10.52.164.16 with SMTP id ym16mr1655525vdb.32.1377797293245; Thu, 29 Aug 2013 10:28:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp35893vcz; Thu, 29 Aug 2013 10:28:12 -0700 (PDT) X-Received: by 10.180.11.37 with SMTP id n5mr15791698wib.25.1377797292007; Thu, 29 Aug 2013 10:28:12 -0700 (PDT) Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by mx.google.com with ESMTPS id br10si12370254wjc.71.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 10:28:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.176 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=209.85.212.176; Received: by mail-wi0-f176.google.com with SMTP id l12so8425404wiv.3 for ; Thu, 29 Aug 2013 10:28:11 -0700 (PDT) X-Received: by 10.180.126.97 with SMTP id mx1mr934166wib.10.1377797291201; Thu, 29 Aug 2013 10:28:11 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id fv10sm12983030wic.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 10:28:10 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH] xen/arm: Don't set the ACTLR SMP bit for 64 bit guests Date: Thu, 29 Aug 2013 18:28:03 +0100 Message-Id: <1377797283-19954-1-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The ACTLR register is implementation defined. The SMP bit is CA15 and CA7 specific. Also replace ACTLR_CA15_SMP by ACTLR_V7_SMP. Signed-off-by: Julien Grall --- xen/arch/arm/domain.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index cb0424d..00f2d14 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -470,11 +470,19 @@ int vcpu_initialise(struct vcpu *v) v->arch.actlr = READ_SYSREG32(ACTLR_EL1); - /* XXX: Handle other than CA15 cpus */ - if ( v->domain->max_vcpus > 1 ) - v->arch.actlr |= ACTLR_CA15_SMP; - else - v->arch.actlr &= ~ACTLR_CA15_SMP; + if ( is_pv32_domain(v->domain) ) + { + /* + * ACTLR is implementation defined. For CA7 and CA15, the SMP + * is always at the same position. + * Enable SMP bit if the domain has more than 1 VCPU + * TODO: Handle others CPUs (ie non CA7 and CA15) + */ + if ( v->domain->max_vcpus > 1 ) + v->arch.actlr |= ACTLR_V7_SMP; + else + v->arch.actlr &= ~ACTLR_V7_SMP; + } if ( (rc = vcpu_vgic_init(v)) != 0 ) return rc;