From patchwork Wed Jul 3 08:42:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 18249 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E62D225E09 for ; Wed, 3 Jul 2013 08:42:39 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id o1sf514074ggn.6 for ; Wed, 03 Jul 2013 01:42:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=1ymEq6GJEuzSZPxDUqyXMMRqWna+MFY/Wbstvws+wAI=; b=mirDyZKxWHTvKwW+SmpW2C3QP8mFvbL7l8XsE4bMNmsK0RQh3WhfL4tKXYCQkSJUwj TWQi4oLJjjLDkjh8WKk4AP6rceMvE2gXieNhmE/1Qg+/RJtKKj/K+UGUZXqCH88ic+9s KkiFU3xfR1TfEAC7xjHFjs+x8RHVegs7zykXlEUdIAPYJig6Fsay9J1Vm7agNNB4RJMH xs7P09cdLcbqOZ/52EC6ZgiJCjv3pB5XiZFBHfO+PmOeMvTfH7tbfi0McDKSgL3tmKoF L2SN4M2O1Zy9Tw+MXom4aiUHlcFwFKtyrtWjVT7UrJ9Hne+lhxMa0CX34QPwyoWXpGMe /FWw== X-Received: by 10.224.89.68 with SMTP id d4mr1505078qam.8.1372840959194; Wed, 03 Jul 2013 01:42:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.18.100 with SMTP id v4ls116884qed.77.gmail; Wed, 03 Jul 2013 01:42:38 -0700 (PDT) X-Received: by 10.220.88.68 with SMTP id z4mr4802546vcl.10.1372840958920; Wed, 03 Jul 2013 01:42:38 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id tk7si6580590vdc.143.2013.07.03.01.42.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jul 2013 01:42:38 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 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.45; Received: by mail-vb0-f45.google.com with SMTP id p14so5392291vbm.18 for ; Wed, 03 Jul 2013 01:42:38 -0700 (PDT) X-Received: by 10.220.67.10 with SMTP id p10mr12399512vci.85.1372840958665; Wed, 03 Jul 2013 01:42:38 -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.58.165.8 with SMTP id yu8csp42787veb; Wed, 3 Jul 2013 01:42:38 -0700 (PDT) X-Received: by 10.66.136.49 with SMTP id px17mr1402098pab.133.1372840957403; Wed, 03 Jul 2013 01:42:37 -0700 (PDT) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id pt2si16110859pac.127.2013.07.03.01.42.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jul 2013 01:42:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of anup.patel@linaro.org) client-ip=209.85.160.53; Received: by mail-pb0-f53.google.com with SMTP id xb12so7182371pbc.12 for ; Wed, 03 Jul 2013 01:42:36 -0700 (PDT) X-Received: by 10.68.197.136 with SMTP id iu8mr32631113pbc.183.1372840956905; Wed, 03 Jul 2013 01:42:36 -0700 (PDT) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id i16sm32954959pag.18.2013.07.03.01.42.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Jul 2013 01:42:36 -0700 (PDT) From: Anup Patel To: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org, linaro-kernel@lists.linaro.org, patches@linaro.org, marc.zyngier@arm.com, catalin.marinas@arm.com, Anup Patel , Pranavkumar Sawargaonkar Subject: [PATCH] arm64: KVM: Support Cortex-A57 guest CPU on APM X-Gene host Date: Wed, 3 Jul 2013 14:12:03 +0530 Message-Id: <1372840923-12808-1-git-send-email-anup.patel@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQmUEw2TnJ3Tbdzrrn0hHu6//O7ZrneaVQxv/FceBaqkLRlmt34Vw3IS60yOPenOC1ANHO9a X-Original-Sender: anup.patel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.45 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: , Update kvm_target_cpu() to allow Cortex-A57 guest CPU on APM X-Gene. Signed-off-by: Anup Patel Signed-off-by: Pranavkumar Sawargaonkar --- arch/arm64/kvm/guest.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index 2c3ff67..765f56f 100644 --- a/arch/arm64/kvm/guest.c +++ b/arch/arm64/kvm/guest.c @@ -207,8 +207,13 @@ int __attribute_const__ kvm_target_cpu(void) unsigned long implementor = read_cpuid_implementor(); unsigned long part_number = read_cpuid_part_number(); - if (implementor != ARM_CPU_IMP_ARM) - return -EINVAL; + switch (implementor) { + case ARM_CPU_IMP_ARM: + case ARM_CPU_IMP_APM: + break; + default: + return -EINVAL; + } switch (part_number) { case ARM_CPU_PART_AEM_V8: @@ -216,6 +221,7 @@ int __attribute_const__ kvm_target_cpu(void) case ARM_CPU_PART_FOUNDATION: return KVM_ARM_TARGET_FOUNDATION_V8; case ARM_CPU_PART_CORTEX_A57: + case APM_CPU_PART_POTENZA: /* Currently handled by the generic backend */ return KVM_ARM_TARGET_CORTEX_A57; default: