From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D889379C4A for ; Thu, 11 Jun 2026 08:29:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781166597; cv=none; b=Y5Xk4sUHbnV4sCxUudXFooxyPp68F5GokjVaXQVymbPtp/Z2THPin/XsgqPT6aUyefbBNtR6PgGwzo2tQRLUiffypcPUHsU3K5Ca4kcyQvh33WPnTz1P4WHuRoVAzwGDdcIb/3f70tUrS+dlkrFei45KmPT7ihMjqDT601saH08= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781166597; c=relaxed/simple; bh=whvvN/CFOrH7RKQ7/X6y05Xcv0qmS303mrgZsYhKQmM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=BBnpDoDDbATIVPSs7NoEB9VpZF07HsVlClOaW7NpTsVGMngdvpfNmAStMImSISjd86SM2V8LkrenZPrMLYkxuWm4i0Dq1LIFOsthejVFnQopaZ0K6aqP3TQQLvADoq8J3xUAtd3ajtFAuStDQb7ABVtieiSMGTeMklvbYuEP8GA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kbYVr5n0; arc=none smtp.client-ip=209.85.221.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kbYVr5n0" Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-45ef1198766so407634f8f.0 for ; Thu, 11 Jun 2026 01:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781166591; x=1781771391; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=m+l1JvRvpuhT+IO3ofm3vlIHgC92Wn7wBaCPOWtqMNM=; b=kbYVr5n08a8jyaKD24aSisEtbB/xj8EDhqokeMZLi+Vn0AOWcQqQZ2Kkpvu+Yg9DDy hsBG5skCj8O8KyjzKX1mi/HFiuZa3L/RhyDoYmOMJi9DphGNGOD7MIH7J+9mOXVMD2F5 s6SLUsIJbd1iiuK2sTCoBasuQKw4IwLp8Z3MniaUWkZzKHCfp4ZisZGSNxRtjZviMyAW xz0hnE2FsAiFaR01M7GOfrvWa4uM6Gb6iaH/b47PA8CStWZJqvkDt4r24z9FJyhcl8cE KFecYQU5Nh9DB+h+fDMyRunAmsZijQCeyrI+YIFEwYXg0KbEWq5290VJWOtUQqidXM0+ eetg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781166591; x=1781771391; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=m+l1JvRvpuhT+IO3ofm3vlIHgC92Wn7wBaCPOWtqMNM=; b=PEI/iC4XwxvLWIYBBaoWFZTxGYtTYlOJtGHpzWPee7kfWCQDw6FECixwKoRcoiwFfu vDKPdolFxI8AeXg0UkpkR0cuByU5kDR+eryitPjAGSzgK371jRrBT9wBzkqd99xx8QeG XWXQRXMptGUT9sgagquMHUVWRXOayJf6os0GcR9yiumJdoQcdwFNTAGEjzklNMgDbych dCBunD/HyzarykdWa/JrN9XzC40Pw4BE+nrVVixkvrB5sl9nXaYn2DosI2WfrmGfyjyg V8tmj6/E+nZmLuOfa4GxBdQarytro9IGuALO9ElU/jVQWjt+tMhcwadEZcF+fT7f11BD vocw== X-Forwarded-Encrypted: i=1; AFNElJ+uV8a4BurRDrujSCRfDUAFQn1Y/hQ88Ce62l9xF3qsmOUTjLTJiv22c2i/SSoLUtbm8iboL3xwt9epJWQ=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0Dk9sN7ZAcbSljrMNkWLKD/NaNoqP8U9+JeQ5uB1CSWzD/3j4 dCSCLY6RbhgaUgiYubsfbSemIwp8KA02peUO/OCsU6ae3gTSPV0W1fkJGxCUwg== X-Gm-Gg: Acq92OEEO4kevjLY/EgH9mTJuKQoRed4c85x04fub1as3IvnubcXfyI63VMXDlAIe+O C0UDd/y1JJmuAttZod6HTuujHax9tE7Tm1ewQ5JZdSZkAieL0xlo1RqufsknvbDhdfhNaYoVFvE jsUdD76Sz+i2WmNbEhy8Uy2H2W/3mw/ySjzV/jRQHomu02Sf5PQVdDiAuY1MYMcIYCaJPYe7GFf Zedj+BQOsnCgXADwoew3GWQqYqG1RODaSd3deopbnN2R0JXOA3+lGoz8nTzqc5L78dipEqqsPpd 06yBkQY5h+dI5mfdMbdbWOsdjuGfLMfLH0kLMk6lxw4wJidAQh5PzThpQlKweN3hn0K6YbAB3RY uf6pkOR8ZnVsWdua5NkbGCfebG8QrUriI5bo9a4g9rAFyT/dwrJZFwRdFOnHqmjn3KCOcjCC8QY KOL56SFsgPnzYOqf9eFsclV3EjAsdbx5EbQltMijSUngkmAdKFs3EmDFxIcyvdKE8JWu68 X-Received: by 2002:a05:6000:4606:b0:45e:f387:77a0 with SMTP id ffacd0b85a97d-46067c36a3fmr2166645f8f.31.1781166591495; Thu, 11 Jun 2026 01:29:51 -0700 (PDT) Received: from [10.33.80.40] (mem-185.47.220.165.jmnet.cz. [185.47.220.165]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4601f2dcad5sm87367171f8f.5.2026.06.11.01.29.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jun 2026 01:29:51 -0700 (PDT) Message-ID: <831dca185e55f56a14c0c580ab33ce84361eb67b.camel@gmail.com> Subject: Re: [PATCH RESEND] virtio_console: read size from config space during device init From: Filip Hejsek To: "Michael S. Tsirkin" Cc: Amit Shah , Arnd Bergmann , Greg Kroah-Hartman , Rusty Russell , virtualization@lists.linux.dev, linux-kernel@vger.kernel.org Date: Thu, 11 Jun 2026 10:29:50 +0200 In-Reply-To: <20260611033747-mutt-send-email-mst@kernel.org> References: <20260223-virtio-console-fix-v1-1-0cf08303b428@gmail.com> <20260610030318-mutt-send-email-mst@kernel.org> <20260611033747-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.60.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2026-06-11 at 03:38 -0400, Michael S. Tsirkin wrote: > [...] > > >=20 > > > Wait a second. Why is there this rproc test here? > > > Was not in the original code and commit log says nothing about it. > > >=20 > >=20 > > Previously, this code was in config_work_handler(), which was never > > called for rproc_serial (it's scheduled from config_intr(), which is > > the config_changed handler only for virtio_console). > >=20 > > Now update_size_from_config() is called unconditionally from > > virtcons_probe(), so it will be called for rproc_serial too, which > > doesn't have the F_SIZE feature. >=20 > So why not test it?=C2=A0 The virtio_console driver implements two similar but distinct virtio devices: VIRTIO_ID_CONSOLE and VIRTIO_ID_RPROC_SERIAL. Although some of the implementation code is shared, the devices are different. In particular, rproc_serial doesn't support multiport nor any of the tty specific features. This means that the relevant feature bits are not valid for this device and must not be tested. I have to admit though that I don't quite understand what the RPROC_SERIAL device is supposed to be used for. It was added by commit 1b6370463e88b0c1c317de16d7b962acc1dab4f2, which describes it as "a simple serial connection driver called VIRTIO_ID_RPROC_SERIAL (11) for communicating with a remote processor in an asymmetric multi-processing configuration". It seems that it was never standardized, as the virtio spec only says that its ID is reserved. > What does "not a valid feature" mean? I copied the "not a valid feature" comment form other instances in the same file where a feature is tested, e.g. in resize_console(): /* Don't test F_SIZE at all if we're rproc: not a valid feature! */ if (!is_rproc_serial(vdev) && virtio_has_feature(vdev, VIRTIO_CONSOLE_F_SIZE)) hvc_resize(port->cons.hvc, port->cons.ws); Best regards, Filip Hejsek > >=20