From patchwork Tue Apr 25 11:44:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 754771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wC1ds2cx8z9s8Q for ; Tue, 25 Apr 2017 21:46:56 +1000 (AEST) Received: from localhost ([::1]:48670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2yvl-0003VR-Kl for incoming@patchwork.ozlabs.org; Tue, 25 Apr 2017 07:46:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2ytW-0002OL-RF for qemu-devel@nongnu.org; Tue, 25 Apr 2017 07:44:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2ytW-0002UR-0R for qemu-devel@nongnu.org; Tue, 25 Apr 2017 07:44:34 -0400 Received: from mx2.suse.de ([195.135.220.15]:53373 helo=mx1.suse.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2ytV-0002TV-QQ for qemu-devel@nongnu.org; Tue, 25 Apr 2017 07:44:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A7328AC69; Tue, 25 Apr 2017 11:44:32 +0000 (UTC) From: Alexander Graf To: qemu-devel@nongnu.org Date: Tue, 25 Apr 2017 13:44:54 +0200 Message-Id: <1493120694-120464-1-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.8.5.6 In-Reply-To: <1493120560-117434-1-git-send-email-agraf@suse.de> References: <1493120560-117434-1-git-send-email-agraf@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Received-From: 195.135.220.15 Subject: [Qemu-devel] [PULL 2/2] s390x/misc_helper.c: wrap s390_virtio_hypercall in BQL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Aurelien Jarno s390_virtio_hypercall can trigger IO events and interrupts, most notably when using virtio-ccw devices. Reviewed-by: Alexander Graf Signed-off-by: Aurelien Jarno Reviewed-by: Philippe Mathieu-Daudé Fixes: 278f5e98c647 ("s390x/misc_helper.c: wrap IO instructions in BQL") Signed-off-by: Alexander Graf --- target/s390x/misc_helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 83d3894..eca8244 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -288,7 +288,9 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num) switch (num) { case 0x500: /* KVM hypercall */ + qemu_mutex_lock_iothread(); r = s390_virtio_hypercall(env); + qemu_mutex_unlock_iothread(); break; case 0x44: /* yield */