From nobody Mon Feb 9 19:54:20 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1658244319; cv=none; d=zohomail.com; s=zohoarc; b=eeka3r4QfzNAS7Iq/IKfl7GiYDXkW/UO1UdUXvanXCaNmv6y0gQfkfvv5nBtDfzzaivDK4ML/sBLbKL7RJx77Gvj/dfusXseF2mxrxX9jfJhlJXfevU58q7UYgCZULToffpvaQFyyAgk22P0ZSSU6v9mpTedNKPSUWszQHMsfX4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658244319; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5W0EriOW4TtUqK7nH7aWghsdYJOyySWmt4Lg4iixYnE=; b=hb8xk3nnRa/vAuzscUvAZuOGg73kibla4r2UbamlubW5bt/gGGO0yt97lpAggFA+lnjH2zuTg0YP1e78EtC2eumgutlepu+9k+XnGH5+dqt2ulh8Q0AGyg6w7DVOqfWORqHH4QJTGC1HIsK+m+CL0gRABMGFDkIcMoJWWTGxTqw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1658244319078709.1676703977885; Tue, 19 Jul 2022 08:25:19 -0700 (PDT) Received: from localhost ([::1]:60962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDp64-0002SH-Vk for importer@patchew.org; Tue, 19 Jul 2022 11:25:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDp3U-00080E-Vd for qemu-devel@nongnu.org; Tue, 19 Jul 2022 11:22:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49395) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDp3S-0001jM-Fn for qemu-devel@nongnu.org; Tue, 19 Jul 2022 11:22:36 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-Itvd0ig_OxWCp112NSyq6w-1; Tue, 19 Jul 2022 11:22:25 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A3898802D1C; Tue, 19 Jul 2022 15:22:24 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 43C4F40CFD0A; Tue, 19 Jul 2022 15:22:24 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E5596180061C; Tue, 19 Jul 2022 17:22:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658244153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5W0EriOW4TtUqK7nH7aWghsdYJOyySWmt4Lg4iixYnE=; b=RdloUsuWSubUqfTyXXRtfdKx68y4hoxgLnqlVS6Nk9Vw6HLkbHFU8LlCCTJeZVKVtXLCsM RfmW7GqATrVAcIeJSsFxNj3eBQL1/4JqTZmUgWHHUq0PQPk4WJPIdaEF8uYSO6htdaVbq6 h9onwRzulM7VN/wRF5qT/MCXU7XJSi0= X-MC-Unique: Itvd0ig_OxWCp112NSyq6w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Sergio Lopez , Markus Armbruster , Gerd Hoffmann , Eduardo Habkost , Eric Blake , Paolo Bonzini , Richard Henderson , =?UTF-8?q?Michal=20Pr=C3=ADvozn=C3=ADk?= Subject: [PULL 4/6] usb: document guest-reset and guest-reset-all Date: Tue, 19 Jul 2022 17:22:16 +0200 Message-Id: <20220719152218.825707-5-kraxel@redhat.com> In-Reply-To: <20220719152218.825707-1-kraxel@redhat.com> References: <20220719152218.825707-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658244321625100001 Suggested-by: Michal Pr=C3=ADvozn=C3=ADk Signed-off-by: Gerd Hoffmann Reviewed-by: Michal Privoznik Message-Id: <20220711094437.3995927-2-kraxel@redhat.com> Signed-off-by: Gerd Hoffmann --- docs/system/devices/usb.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/system/devices/usb.rst b/docs/system/devices/usb.rst index 872d9167589b..18e7c8b4d716 100644 --- a/docs/system/devices/usb.rst +++ b/docs/system/devices/usb.rst @@ -353,3 +353,32 @@ and also assign it to the correct USB bus in QEMU like= this: -device usb-ehci,id=3Dehci \\ -device usb-host,bus=3Dusb-bus.0,hostbus=3D3,hostport=3D1 \\ -device usb-host,bus=3Dehci.0,hostbus=3D1,hostport=3D1 + +``usb-host`` properties for reset behavior +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The ``guest-reset`` and ``guest-reset-all`` properties control +whenever the guest is allowed to reset the physical usb device on the +host. There are three cases: + +``guest-reset=3Dfalse`` + The guest is not allowed to reset the (physical) usb device. + +``guest-reset=3Dtrue,guest-resets-all=3Dfalse`` + The guest is allowed to reset the device when it is not yet + initialized (aka no usb bus address assigned). Usually this results + in one guest reset being allowed. This is the default behavior. + +``guest-reset=3Dtrue,guest-resets-all=3Dtrue`` + The guest is allowed to reset the device as it pleases. + +The reason for this existing are broken usb devices. In theory one +should be able to reset (and re-initialize) usb devices at any time. +In practice that may result in shitty usb device firmware crashing and +the device not responding any more until you power-cycle (aka un-plug +and re-plug) it. + +What works best pretty much depends on the behavior of the specific +usb device at hand, so it's a trial-and-error game. If the default +doesn't work, try another option and see whenever the situation +improves. --=20 2.36.1