From patchwork Tue Nov 27 06:49:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 1003638 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433vcg1mjrz9s3l for ; Tue, 27 Nov 2018 17:53:07 +1100 (AEDT) Received: from localhost ([::1]:40303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXF2-0004BO-PO for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2018 01:53:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXBl-0001n3-S9 for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRXBi-0001Kx-Kg for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55144) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRXBi-0001G5-Bl for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:38 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ECC873086259 for ; Tue, 27 Nov 2018 06:49:35 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 93DD75DD7A; Tue, 27 Nov 2018 06:49:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id CFD4E5E4E2; Tue, 27 Nov 2018 07:49:32 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 07:49:27 +0100 Message-Id: <20181127064932.7299-2-kraxel@redhat.com> In-Reply-To: <20181127064932.7299-1-kraxel@redhat.com> References: <20181127064932.7299-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 27 Nov 2018 06:49:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/6] fmops: fix off-by-one in AR_TABLE and DR_TABLE array size 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: Paolo Bonzini , P J P , Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: P J P Reported-by: Wangjunqing Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Gerd Hoffmann Message-id: 20181030082340.17170-1-kraxel@redhat.com Suggested-by: Paolo Bonzini Signed-off-by: Gerd Hoffmann --- hw/audio/fmopl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/fmopl.h b/hw/audio/fmopl.h index e7e578a48e..e008e72d7a 100644 --- a/hw/audio/fmopl.h +++ b/hw/audio/fmopl.h @@ -72,8 +72,8 @@ typedef struct fm_opl_f { /* Rhythm sention */ uint8_t rhythm; /* Rhythm mode , key flag */ /* time tables */ - int32_t AR_TABLE[75]; /* atttack rate tables */ - int32_t DR_TABLE[75]; /* decay rate tables */ + int32_t AR_TABLE[76]; /* attack rate tables */ + int32_t DR_TABLE[76]; /* decay rate tables */ uint32_t FN_TABLE[1024]; /* fnumber -> increment counter */ /* LFO */ int32_t *ams_table; From patchwork Tue Nov 27 06:49:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 1003632 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433vYc10cpz9s29 for ; Tue, 27 Nov 2018 17:50:28 +1100 (AEDT) Received: from localhost ([::1]:40284 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXCT-0001nq-MF for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2018 01:50:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38458) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXBl-0001n5-SV for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRXBi-0001L4-LB for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41780) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRXBi-0001G3-C9 for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:38 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DEEA281DEB; Tue, 27 Nov 2018 06:49:35 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 901A45DD63; Tue, 27 Nov 2018 06:49:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D77CB5E4E3; Tue, 27 Nov 2018 07:49:32 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 07:49:28 +0100 Message-Id: <20181127064932.7299-3-kraxel@redhat.com> In-Reply-To: <20181127064932.7299-1-kraxel@redhat.com> References: <20181127064932.7299-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 27 Nov 2018 06:49:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/6] ps2kbd: default to scan enabled after reset 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: Paolo Bonzini , =?utf-8?q?Herv=C3=A9_Poussineau?= , Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Hervé Poussineau A check for scan_enabled has been added to ps2_keyboard_event in commit 143c04c7e0639e53086519592ead15d2556bfbf2 to prevent stream corruption. This works well as long as operating system is resetting keyboard, or enabling it. This fixes IBM 40p firmware, which doesn't bother sending KBD_CMD_RESET, KBD_CMD_ENABLE or KBD_CMD_RESET_ENABLE before trying to use the keyboard. Signed-off-by: Hervé Poussineau Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181021190721.2148-1-hpoussin@reactos.org Signed-off-by: Gerd Hoffmann --- hw/input/ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index 6c43fc2912..eb33ee9b6f 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -942,7 +942,7 @@ static void ps2_kbd_reset(void *opaque) trace_ps2_kbd_reset(opaque); ps2_common_reset(&s->common); - s->scan_enabled = 0; + s->scan_enabled = 1; s->translate = 0; s->scancode_set = 2; s->modifiers = 0; From patchwork Tue Nov 27 06:49:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 1003633 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433vYc1vZNz9s3Z for ; Tue, 27 Nov 2018 17:50:28 +1100 (AEDT) Received: from localhost ([::1]:40286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXCT-0001o9-LJ for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2018 01:50:25 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXBl-0001n4-SL for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRXBi-0001L6-L7 for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45886) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRXBi-0001G1-Bx for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:38 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E0BFE31256C5; Tue, 27 Nov 2018 06:49:35 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 98AEF17C13; Tue, 27 Nov 2018 06:49:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DFA395E4E4; Tue, 27 Nov 2018 07:49:32 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 07:49:29 +0100 Message-Id: <20181127064932.7299-4-kraxel@redhat.com> In-Reply-To: <20181127064932.7299-1-kraxel@redhat.com> References: <20181127064932.7299-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 27 Nov 2018 06:49:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/6] cirrus_vga/migration: update the bank offset before use 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: Paolo Bonzini , Wang Xin , Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Wang Xin The cirrus bank0/1 offset should be updated before we update the vram's alias offset. Signed-off-by: Wang Xin Message-id: 20181123064646.23036-1-linzhecheng@huawei.com Signed-off-by: Gerd Hoffmann --- hw/display/cirrus_vga.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c index d9b854d74d..a0e71469f4 100644 --- a/hw/display/cirrus_vga.c +++ b/hw/display/cirrus_vga.c @@ -2746,11 +2746,12 @@ static int cirrus_post_load(void *opaque, int version_id) s->vga.gr[0x00] = s->cirrus_shadow_gr0 & 0x0f; s->vga.gr[0x01] = s->cirrus_shadow_gr1 & 0x0f; - cirrus_update_memory_access(s); - /* force refresh */ - s->vga.graphic_mode = -1; cirrus_update_bank_ptr(s, 0); cirrus_update_bank_ptr(s, 1); + cirrus_update_memory_access(s); + /* force refresh */ + s->vga.graphic_mode = -1; + return 0; } From patchwork Tue Nov 27 06:49:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 1003637 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433vcf1xZmz9s3Z for ; Tue, 27 Nov 2018 17:53:06 +1100 (AEDT) Received: from localhost ([::1]:40302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXF1-0004AN-NH for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2018 01:53:03 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXBl-0001n8-SW for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRXBi-0001LE-LV for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54190) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRXBi-0001G4-CC for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:38 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 00F64C045776 for ; Tue, 27 Nov 2018 06:49:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96817608C3; Tue, 27 Nov 2018 06:49:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E76BD5E4E5; Tue, 27 Nov 2018 07:49:32 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 07:49:30 +0100 Message-Id: <20181127064932.7299-5-kraxel@redhat.com> In-Reply-To: <20181127064932.7299-1-kraxel@redhat.com> References: <20181127064932.7299-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 27 Nov 2018 06:49:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/6] audio/hda: fix guest triggerable assert 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: Paolo Bonzini , Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Guest writes to a readonly register trigger the assert in intel_hda_reg_write(). Add a check and just ignore them. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1628433 Signed-off-by: Gerd Hoffmann Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Message-id: 20181123063957.9515-1-kraxel@redhat.com --- hw/audio/intel-hda.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/audio/intel-hda.c b/hw/audio/intel-hda.c index 23a2cf6484..33e333cc26 100644 --- a/hw/audio/intel-hda.c +++ b/hw/audio/intel-hda.c @@ -23,6 +23,7 @@ #include "hw/pci/msi.h" #include "qemu/timer.h" #include "qemu/bitops.h" +#include "qemu/log.h" #include "hw/audio/soundhw.h" #include "intel-hda.h" #include "intel-hda-defs.h" @@ -929,6 +930,11 @@ static void intel_hda_reg_write(IntelHDAState *d, const IntelHDAReg *reg, uint32 if (!reg) { return; } + if (!reg->wmask) { + qemu_log_mask(LOG_GUEST_ERROR, "intel-hda: write to r/o reg %s\n", + reg->name); + return; + } if (d->debug) { time_t now = time(NULL); From patchwork Tue Nov 27 06:49:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 1003634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433vYd4dXfz9s29 for ; Tue, 27 Nov 2018 17:50:29 +1100 (AEDT) Received: from localhost ([::1]:40287 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXCV-0001p0-7C for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2018 01:50:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXBl-0001n6-SV for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRXBj-0001NU-0A for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51062) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRXBi-0001GJ-Oi for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:38 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E1BF63001932; Tue, 27 Nov 2018 06:49:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99507608C3; Tue, 27 Nov 2018 06:49:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EF3455E4E6; Tue, 27 Nov 2018 07:49:32 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 07:49:31 +0100 Message-Id: <20181127064932.7299-6-kraxel@redhat.com> In-Reply-To: <20181127064932.7299-1-kraxel@redhat.com> References: <20181127064932.7299-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Tue, 27 Nov 2018 06:49:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 5/6] usb-host: set ifs.detached as true if kernel driver is not active 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: Paolo Bonzini , Gerd Hoffmann , linzhecheng , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: linzhecheng If no kernel driver is active, we can already claim and perform I/O on it without detaching it. Signed-off-by: linzhecheng Message-id: 20181120083419.17716-1-linzhecheng@huawei.com Signed-off-by: Gerd Hoffmann --- hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index f31e9cbbb8..b6602ded4e 100644 --- a/hw/usb/host-libusb.c +++ b/hw/usb/host-libusb.c @@ -1120,6 +1120,9 @@ static void usb_host_detach_kernel(USBHostDevice *s) rc = libusb_kernel_driver_active(s->dh, i); usb_host_libusb_error("libusb_kernel_driver_active", rc); if (rc != 1) { + if (rc == 0) { + s->ifs[i].detached = true; + } continue; } trace_usb_host_detach_kernel(s->bus_num, s->addr, i); From patchwork Tue Nov 27 06:49:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 1003641 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 433vgl0lCyz9s3Z for ; Tue, 27 Nov 2018 17:55:47 +1100 (AEDT) Received: from localhost ([::1]:40315 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXHc-0007Bv-J1 for incoming@patchwork.ozlabs.org; Tue, 27 Nov 2018 01:55:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38468) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRXBm-0001n9-1p for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRXBl-0001e8-A1 for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gRXBl-0001Vt-3e for qemu-devel@nongnu.org; Tue, 27 Nov 2018 01:49:41 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 35969307DAAE for ; Tue, 27 Nov 2018 06:49:40 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-59.ams2.redhat.com [10.36.116.59]) by smtp.corp.redhat.com (Postfix) with ESMTP id 96EA660141; Tue, 27 Nov 2018 06:49:36 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 041B85E4E7; Tue, 27 Nov 2018 07:49:33 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 27 Nov 2018 07:49:32 +0100 Message-Id: <20181127064932.7299-7-kraxel@redhat.com> In-Reply-To: <20181127064932.7299-1-kraxel@redhat.com> References: <20181127064932.7299-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 27 Nov 2018 06:49:40 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 6/6] qapi: add query-display-options command 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: Paolo Bonzini , Gerd Hoffmann , Markus Armbruster Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Add query-display-options command, which allows querying the qemu display configuration. This isn't particularly useful, except it exposes QAPI type DisplayOptions in query-qmp-schema, so that libvirt can discover recently added -display parameter rendernode (commit d4dc4ab133b). Works around lack of sufficiently powerful command line introspection. Signed-off-by: Gerd Hoffmann Reviewed-by: Eric Blake Tested-by: Eric Blake Tested-by: Erik Skultety Message-id: 20181122071613.2889-1-kraxel@redhat.com [ kraxel: reworded commit message as suggested by armbru ] --- vl.c | 6 ++++++ qapi/ui.json | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/vl.c b/vl.c index fa25d1ae2d..d6fd95c227 100644 --- a/vl.c +++ b/vl.c @@ -128,6 +128,7 @@ int main(int argc, char **argv) #include "qapi/qapi-commands-block-core.h" #include "qapi/qapi-commands-misc.h" #include "qapi/qapi-commands-run-state.h" +#include "qapi/qapi-commands-ui.h" #include "qapi/qmp/qerror.h" #include "sysemu/iothread.h" @@ -2055,6 +2056,11 @@ static void parse_display_qapi(const char *optarg) visit_free(v); } +DisplayOptions *qmp_query_display_options(Error **errp) +{ + return QAPI_CLONE(DisplayOptions, &dpy); +} + static void parse_display(const char *p) { const char *opts; diff --git a/qapi/ui.json b/qapi/ui.json index e0000248d3..fd39acb5c3 100644 --- a/qapi/ui.json +++ b/qapi/ui.json @@ -1102,3 +1102,16 @@ 'discriminator' : 'type', 'data' : { 'gtk' : 'DisplayGTK', 'egl-headless' : 'DisplayEGLHeadless'} } + +## +# @query-display-options: +# +# Returns information about display configuration +# +# Returns: @DisplayOptions +# +# Since: 3.1 +# +## +{ 'command': 'query-display-options', + 'returns': 'DisplayOptions' }