From patchwork Thu Dec 17 12:56:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 41316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 62E8FB7B3E for ; Thu, 17 Dec 2009 23:58:03 +1100 (EST) Received: from localhost ([127.0.0.1]:38029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLFv6-0005wQ-Kw for incoming@patchwork.ozlabs.org; Thu, 17 Dec 2009 07:57:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLFue-0005vw-Q7 for qemu-devel@nongnu.org; Thu, 17 Dec 2009 07:57:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLFuZ-0005uo-Rh for qemu-devel@nongnu.org; Thu, 17 Dec 2009 07:57:00 -0500 Received: from [199.232.76.173] (port=56348 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLFuZ-0005ul-LL for qemu-devel@nongnu.org; Thu, 17 Dec 2009 07:56:55 -0500 Received: from cantor2.suse.de ([195.135.220.15]:42286 helo=mx2.suse.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NLFuY-0001vQ-DU for qemu-devel@nongnu.org; Thu, 17 Dec 2009 07:56:55 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 40F7189783; Thu, 17 Dec 2009 13:56:48 +0100 (CET) From: Alexander Graf To: qemu-devel@nongnu.org Date: Thu, 17 Dec 2009 13:56:47 +0100 Message-Id: <1261054607-8661-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 Cc: aurelien@aurel32.net Subject: [Qemu-devel] [PATCH] S390: Fail on unknown instructions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We were being a bit too nice and didn't give the guest an invalid instruction interrupt. While that works, it's not exactly the fastest thing to do, since now the guest doesn't know that we're not really implementing that instruction, so it continues doing it. We run into this with the set_page_unstable hint instruction. So let's bail out in these cases. Signed-off-by: Alexander Graf --- target-s390x/kvm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index b6aac42..0992563 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -405,7 +405,7 @@ static int handle_instruction(CPUState *env, struct kvm_run *run) unsigned int ipa0 = (run->s390_sieic.ipa & 0xff00); uint8_t ipa1 = run->s390_sieic.ipa & 0x00ff; int ipb_code = (run->s390_sieic.ipb & 0x0fff0000) >> 16; - int r = 0; + int r = -1; dprintf("handle_instruction 0x%x 0x%x\n", run->s390_sieic.ipa, run->s390_sieic.ipb); switch (ipa0) {