From nobody Fri May 3 18:07:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505295243776281.5298806183405; Wed, 13 Sep 2017 02:34:03 -0700 (PDT) Received: from localhost ([::1]:41186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds43W-0007AI-OL for importer@patchew.org; Wed, 13 Sep 2017 05:34:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49256) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds41v-00068F-6K for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds41s-0004L4-6h for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50740) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds41r-0004Jz-VU for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:20 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1212A356CE; Wed, 13 Sep 2017 09:32:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-51.ams2.redhat.com [10.36.117.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id BDDE561989; Wed, 13 Sep 2017 09:32:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 54BF13F105; Wed, 13 Sep 2017 11:32:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1212A356CE Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 11:32:12 +0200 Message-Id: <20170913093215.10043-2-kraxel@redhat.com> In-Reply-To: <20170913093215.10043-1-kraxel@redhat.com> References: <20170913093215.10043-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 13 Sep 2017 09:32:19 +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/4] xhci: Avoid DMA when ERSTBA is set to zero 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: Alexey Kardashevskiy , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Alexey Kardashevskiy The existing XHCI code reads the Event Ring Segment Table Base Address Register (ERSTBA) every time when it is changed. However zero is its default state so one would think that zero there means it is not in use. This adds a check for ERSTBA in addition to the existing check for the Event Ring Segment Table Size Register (ERSTSZ). Signed-off-by: Alexey Kardashevskiy Message-id: 20170911065606.40600-1-aik@ozlabs.ru Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-xhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 204ea69d3f..d75c085d94 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -811,8 +811,9 @@ static void xhci_er_reset(XHCIState *xhci, int v) { XHCIInterrupter *intr =3D &xhci->intr[v]; XHCIEvRingSeg seg; + dma_addr_t erstba =3D xhci_addr64(intr->erstba_low, intr->erstba_high); =20 - if (intr->erstsz =3D=3D 0) { + if (intr->erstsz =3D=3D 0 || erstba =3D=3D 0) { /* disabled */ intr->er_start =3D 0; intr->er_size =3D 0; @@ -824,7 +825,6 @@ static void xhci_er_reset(XHCIState *xhci, int v) xhci_die(xhci); return; } - dma_addr_t erstba =3D xhci_addr64(intr->erstba_low, intr->erstba_high); pci_dma_read(PCI_DEVICE(xhci), erstba, &seg, sizeof(seg)); le32_to_cpus(&seg.addr_low); le32_to_cpus(&seg.addr_high); --=20 2.9.3 From nobody Fri May 3 18:07:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505295337980143.3284215929276; Wed, 13 Sep 2017 02:35:37 -0700 (PDT) Received: from localhost ([::1]:41197 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds453-0000KT-CW for importer@patchew.org; Wed, 13 Sep 2017 05:35:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds41v-00068H-7p for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds41s-0004MO-TA for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33324) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds41s-0004Kt-No for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:20 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CAC7EC057FA7; Wed, 13 Sep 2017 09:32:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-51.ams2.redhat.com [10.36.117.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id D22171835B; Wed, 13 Sep 2017 09:32:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 5C6BB31FC8; Wed, 13 Sep 2017 11:32:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CAC7EC057FA7 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 11:32:13 +0200 Message-Id: <20170913093215.10043-3-kraxel@redhat.com> In-Reply-To: <20170913093215.10043-1-kraxel@redhat.com> References: <20170913093215.10043-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 13 Sep 2017 09:32:19 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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/4] MAINTAINERS: add missing USB entry 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Signed-off-by: Gerd Hoffmann --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 36eeb42d19..2c333aba21 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -999,6 +999,7 @@ F: docs/usb2.txt F: docs/usb-storage.txt F: include/hw/usb.h F: include/hw/usb/ +F: default-configs/usb.mak =20 USB (serial adapter) M: Gerd Hoffmann --=20 2.9.3 From nobody Fri May 3 18:07:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 150529525108931.638761365687515; Wed, 13 Sep 2017 02:34:11 -0700 (PDT) Received: from localhost ([::1]:41187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds43e-0007IQ-AJ for importer@patchew.org; Wed, 13 Sep 2017 05:34:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49257) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds41v-00068G-6p for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds41s-0004Kg-35 for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41286) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds41r-0004Jx-Tn for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:20 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0744281DF6 for ; Wed, 13 Sep 2017 09:32:19 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-51.ams2.redhat.com [10.36.117.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEED76199C; Wed, 13 Sep 2017 09:32:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 652F23F10D; Wed, 13 Sep 2017 11:32:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0744281DF6 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 11:32:14 +0200 Message-Id: <20170913093215.10043-4-kraxel@redhat.com> In-Reply-To: <20170913093215.10043-1-kraxel@redhat.com> References: <20170913093215.10043-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 13 Sep 2017 09:32:19 +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/4] usb: drop HOST_USB 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Nowdays we use libusb for usb-host, so we don't have different code for linux vs. bsd any more. So there is little reason to have the HOST_USB variable, we can just write things directly into the Makefile and avoid a pointless indirection. Signed-off-by: Gerd Hoffmann Reviewed-by: Fam Zheng Reviewed-by: Thomas Huth Message-id: 20170908111217.21985-2-kraxel@redhat.com --- configure | 7 ------- hw/usb/Makefile.objs | 6 +++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/configure b/configure index fd7e3a5e81..5367260c80 100755 --- a/configure +++ b/configure @@ -5967,13 +5967,6 @@ if test "$live_block_migration" =3D "yes" ; then echo "CONFIG_LIVE_BLOCK_MIGRATION=3Dy" >> $config_host_mak fi =20 -# USB host support -if test "$libusb" =3D "yes"; then - echo "HOST_USB=3Dlibusb legacy" >> $config_host_mak -else - echo "HOST_USB=3Dstub" >> $config_host_mak -fi - # TPM passthrough support? if test "$tpm" =3D "yes"; then echo 'CONFIG_TPM=3D$(CONFIG_SOFTMMU)' >> $config_host_mak diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index 97f1c4561a..a43ebbc17f 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -38,7 +38,11 @@ endif common-obj-$(CONFIG_USB_REDIR) +=3D redirect.o quirks.o =20 # usb pass-through -common-obj-y +=3D $(patsubst %,host-%.o,$(HOST_USB)) +ifeq ($(CONFIG_LIBUSB),y) +common-obj-y +=3D host-libusb.o host-legacy.o +else +common-obj-y +=3D host-stub.o +endif =20 ifeq ($(CONFIG_USB_LIBUSB),y) common-obj-$(CONFIG_XEN) +=3D xen-usb.o --=20 2.9.3 From nobody Fri May 3 18:07:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1505295243767883.4693542062414; Wed, 13 Sep 2017 02:34:03 -0700 (PDT) Received: from localhost ([::1]:41185 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds43W-00079H-Q9 for importer@patchew.org; Wed, 13 Sep 2017 05:34:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds41v-00068I-7v for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds41s-0004KP-0x for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59316) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ds41r-0004Js-Ra for qemu-devel@nongnu.org; Wed, 13 Sep 2017 05:32:19 -0400 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 E76814E4F3 for ; Wed, 13 Sep 2017 09:32:18 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-51.ams2.redhat.com [10.36.117.51]) by smtp.corp.redhat.com (Postfix) with ESMTP id D6DEC17CD6; Wed, 13 Sep 2017 09:32:16 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6DB213F10E; Wed, 13 Sep 2017 11:32:15 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E76814E4F3 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 13 Sep 2017 11:32:15 +0200 Message-Id: <20170913093215.10043-5-kraxel@redhat.com> In-Reply-To: <20170913093215.10043-1-kraxel@redhat.com> References: <20170913093215.10043-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.38]); Wed, 13 Sep 2017 09:32:19 +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/4] usb: only build usb-host with CONFIG_USB=y 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: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann Reviewed-by: Fam Zheng Reviewed-by: Thomas Huth Tested-by: Thomas Huth Message-id: 20170908111217.21985-3-kraxel@redhat.com --- hw/usb/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/Makefile.objs b/hw/usb/Makefile.objs index a43ebbc17f..757e365562 100644 --- a/hw/usb/Makefile.objs +++ b/hw/usb/Makefile.objs @@ -38,7 +38,7 @@ endif common-obj-$(CONFIG_USB_REDIR) +=3D redirect.o quirks.o =20 # usb pass-through -ifeq ($(CONFIG_LIBUSB),y) +ifeq ($(CONFIG_LIBUSB)$(CONFIG_USB),yy) common-obj-y +=3D host-libusb.o host-legacy.o else common-obj-y +=3D host-stub.o --=20 2.9.3