From patchwork Thu Dec 12 16:12:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 22297 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1230B23FC7 for ; Thu, 12 Dec 2013 16:12:56 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id oz11sf1255589veb.8 for ; Thu, 12 Dec 2013 08:12:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=Wa/nju4W2DQ+KnWveaTmFX07yY22mD6CK1997Ij3Bps=; b=cJc9lCJVi9wmgYVZunbK9bNSc9QqiIbTjNWUESHasMfRYi1djPAHmgnCscEmAyQRkk 5wc6+Tdv86MF/mabFcBsTMFconaYMHtLy/sGA4tP0cexIXN8s8qiUK1NIvg1M4y/+PRm celJDjX5WWQeYwbT3yidKz2B7QXgdNl6w59Ph0TnwemCnE3RlT2vhN3ShLSEr8m6N501 6FKZLdh/Uf9BB3zMmnnPP3tylXRy/up7z01lz3eedT7hIyJZROqgt2mddb+QSNskgvI9 pkpI95i8ON9xN9MoVhAU86TS/cB22mHXU1lN1r9iiOVxvGiCiB/xMHmw4y3+17o+1xM8 j/KQ== X-Gm-Message-State: ALoCoQmTIL42AvvKWuTkuRrysa+KjK21EE8z2ggULPcsJLPJ0QK/KSGcmSq6KYfEc4m0W9sPJdX8 X-Received: by 10.58.50.161 with SMTP id d1mr2997852veo.24.1386864775624; Thu, 12 Dec 2013 08:12:55 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.120.5 with SMTP id ky5ls606773qeb.26.gmail; Thu, 12 Dec 2013 08:12:55 -0800 (PST) X-Received: by 10.58.254.200 with SMTP id ak8mr4341825ved.12.1386864775532; Thu, 12 Dec 2013 08:12:55 -0800 (PST) Received: from mail-ve0-f173.google.com (mail-ve0-f173.google.com [209.85.128.173]) by mx.google.com with ESMTPS id hs8si7871379veb.22.2013.12.12.08.12.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 08:12:55 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.173 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.173; Received: by mail-ve0-f173.google.com with SMTP id oz11so459662veb.4 for ; Thu, 12 Dec 2013 08:12:55 -0800 (PST) X-Received: by 10.220.159.4 with SMTP id h4mr4398389vcx.1.1386864775385; Thu, 12 Dec 2013 08:12:55 -0800 (PST) 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 u4csp366933vcz; Thu, 12 Dec 2013 08:12:54 -0800 (PST) X-Received: by 10.69.11.228 with SMTP id el4mr13790053pbd.8.1386864774589; Thu, 12 Dec 2013 08:12:54 -0800 (PST) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id cz3si11427545pbc.273.2013.12.12.08.12.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 08:12:54 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of anup.patel@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id up15so769491pbc.38 for ; Thu, 12 Dec 2013 08:12:54 -0800 (PST) X-Received: by 10.68.209.133 with SMTP id mm5mr13448213pbc.157.1386864774072; Thu, 12 Dec 2013 08:12:54 -0800 (PST) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id jk16sm41193694pbb.34.2013.12.12.08.12.49 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 12 Dec 2013 08:12:52 -0800 (PST) From: Anup Patel To: kvmarm@lists.cs.columbia.edu Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.org, patches@apm.com, linaro-kernel@lists.linaro.org, Christoffer Dall , Marc Zyngier , Pranavkumar Sawargaonkar , Anup Patel Subject: [PATCH] arm64: KVM: Force undefined exception for Guest SMC intructions Date: Thu, 12 Dec 2013 21:42:23 +0530 Message-Id: <1386864747-29006-2-git-send-email-anup.patel@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386864747-29006-1-git-send-email-anup.patel@linaro.org> References: <1386864747-29006-1-git-send-email-anup.patel@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anup.patel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.173 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 SMC-based PSCI emulation for Guest is going to be very different from the in-kernel HVC-based PSCI emulation hence for now just inject undefined exception when Guest executes SMC instruction. Signed-off-by: Anup Patel Signed-off-by: Pranavkumar Sawargaonkar Acked-by: Marc Zyngier Acked-by: Christoffer Dall --- arch/arm64/kvm/handle_exit.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm64/kvm/handle_exit.c b/arch/arm64/kvm/handle_exit.c index 8da5606..df84d7b 100644 --- a/arch/arm64/kvm/handle_exit.c +++ b/arch/arm64/kvm/handle_exit.c @@ -39,9 +39,6 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run) static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run) { - if (kvm_psci_call(vcpu)) - return 1; - kvm_inject_undefined(vcpu); return 1; }