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: 9697995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 29F68601D3 for ; Tue, 25 Apr 2017 11:47:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AE882026B for ; Tue, 25 Apr 2017 11:47:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D66122B26; Tue, 25 Apr 2017 11:47:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 93EC52026B for ; Tue, 25 Apr 2017 11:47:07 +0000 (UTC) Received: from localhost ([::1]:48670 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2yvy-0003VR-Gn for patchwork-qemu-devel@patchwork.kernel.org; Tue, 25 Apr 2017 07:47:06 -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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 */