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: 3333301 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8499DC0D4A for ; Thu, 12 Dec 2013 17:01:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 613B5205C4 for ; Thu, 12 Dec 2013 17:01:08 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CC0DE205C2 for ; Thu, 12 Dec 2013 17:01:06 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr8uu-0005MV-UJ; Thu, 12 Dec 2013 16:15:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr8uC-0001YP-U2; Thu, 12 Dec 2013 16:14:28 +0000 Received: from mail-pd0-f169.google.com ([209.85.192.169]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr8t2-0001MO-6G for linux-arm-kernel@lists.infradead.org; Thu, 12 Dec 2013 16:13:18 +0000 Received: by mail-pd0-f169.google.com with SMTP id v10so747846pde.14 for ; Thu, 12 Dec 2013 08:12:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Wa/nju4W2DQ+KnWveaTmFX07yY22mD6CK1997Ij3Bps=; b=ZAAo/DfJPN8RMtmDoDQSVLIGWVHbnM6OMpLgt6f9T9EZ0dPRnu4scBAioSFCoVysLz Eoi9g7tCYkHBlabfqkF/oo5YsHuEZbf37D0r2k6161w9JjHVyEKSMEZ0Gsi9nTI3JW/4 Y38gQ/llgE91UwV3DxjQMfCXbjOCMlcrObAqysJFc+KxAsrx/jRv623ZwaiE+L53ybqZ 7QEP5RPIgzNdHQTuK6hzQT2GVTwDaUV27lJSJ/yJgP72IxnjlDKwQPjG5KdPYPtSdYl3 4gbiQebj8SPQnuozS2Nkhpe6SKdiMLTZyOwQRLALFXF7ZazS9p1Xfi30yz79hs9AoKwJ AEDA== X-Gm-Message-State: ALoCoQl3GiVFC6s4BT0TNwegFul3+XaEtW/O5l+An/tyyn3XmCEX66K/jsWLRyUi43Os2fpp52LV 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131212_111316_371230_BCDDD0F6 X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: linaro-kernel@lists.linaro.org, Anup Patel , patches@linaro.org, Marc Zyngier , patches@apm.com, linux-arm-kernel@lists.infradead.org, Christoffer Dall , Pranavkumar Sawargaonkar X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }