From nobody Sat Nov 15 23:36:29 2025 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1746212501; cv=none; d=zohomail.com; s=zohoarc; b=atjAYh6VhVpYVNDrceD9BNaXLm7BGvh9LiMZ8S5OY3bM4Tcj0BFJp7+ByT+RnbbIMkUhQpGG/Mno3M6DXTAJF2PVkwVLyv54WSViKj6OKYNsaJ92zjS+UiMIxHrGUXJYFkyPHmn1bLOY100sJJoBIDV+YD7aOplA2awsRP+J32M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1746212501; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ns6abkUGaM6ukyij9Yk70LzU+Vns27nmI4rpIretkkk=; b=IHH+H4TK2OK56ZgbU/3y6t7hGhLfhJ81/IbGS5XIYBJaWwg84OinUd34sIXlDtK/sQzdP9ndG61Tfrdgkh8uDlRJaux/PTCxqzqojAIR25oZquaPCcaq/JBTfFkenX5cA742ncaGoLR9n/iIqR9pRRU+OpIUkjD08l5TLcvejF0= 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 17462125014024.349965385363134; Fri, 2 May 2025 12:01:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAvcD-0001mw-Ok; Fri, 02 May 2025 15:00:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uAvat-0007WS-Dk for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:43 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAvar-0005iI-LB for qemu-devel@nongnu.org; Fri, 02 May 2025 14:58:43 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5f4d28d9fd8so3268052a12.3 for ; Fri, 02 May 2025 11:58:41 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5fa77816ffbsm1558875a12.34.2025.05.02.11.58.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 02 May 2025 11:58:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746212320; x=1746817120; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ns6abkUGaM6ukyij9Yk70LzU+Vns27nmI4rpIretkkk=; b=GjB5VlRJwG2MFEdyIm2nevJQf3UlnnEJhs2ykew65Leh2t8PluWMdUkmew2dJ7bUW9 dtVGfeMYLEak9vyEBN0OaJ4ChMP7yTNDgrAQSHGIjbBvXAz28vyKH3PPxv2mwRxf2cIV VLrpyXYeIyQirhYxh5/lUkkqy1N2jrjExLUza+AIPZ0p/oESX6z4rtJ+2TGtSZ46Qo6+ a0Ou/uGZDVdDKFCfSP9BU4RKIJz/p3p98YelowUUURGFAYinGp2m7DCv0Fht4gX1wglB v3IlYlkG62N6b/ovA22jxHsPbK23ZSVpo/RGm0nVx9yGqICKGxfnLhTEtTtRmOOEYe+n /gGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746212320; x=1746817120; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ns6abkUGaM6ukyij9Yk70LzU+Vns27nmI4rpIretkkk=; b=V9CsSGZ5fItVmBdkDnehzeYUkuRy1cs6xp6NWZQ21HDKFuLju0Xf4uUToNTIfeiHwq 9EBeFFXHW+RzLNt5EuS//JhPoukeR93VdjLVVkiTowylFNcbf07gieTF4kZZkHBJ33BY qre/oXa57KUrqWDjwRDv2gaO5QJ7U3p0+MAGOkG8rhBIn91oMoRUIxwUVA4o8tsw/2rG Pbl9bTgRzzvSJnXjBD4au7uv2zdUIwCg39DHpdjMZ1NrZCl1lwTENMOQNzy/ex0IL6mq xfmFcM9PJEwk3//8iIRygTaGn0hGElmfV3knMRTqm/EEtIFEBHOPkJhAnRBG9UmaLMnm /Lrw== X-Gm-Message-State: AOJu0Yx9vgMbwSu/rZ8CHIMvIo4tTrn/KiytM8Ib+cxcV1jwwem/YoyH hNtGNZqlmVCX5tcpOmRAmPQMxyFKgE3rXBKTGBjqmASsGuvEkk1e7CUNFsGhwkKG9wODVoPFwlq i X-Gm-Gg: ASbGncsqjmz4ri4k3cvDJQHFYTg2YpZkKXx1E53LBr2FHh6Zeyl4WPYz+Jdms/GCN+A 0zNCrBicGur89kXyZjoBWQdJZd8mFW41Lou4L1PxZvawgXNDApEY3B9aYkenzbUFpchpmVAh/OA Cr74t1AEXL2ZohhNYbMU3RywtdoXevtlIqFby71yv+QjQnHLAu3slvwEJo/9a1WXUKvyLtUqSnG 9+Kmi3AdWXdAIyIw9TTYS2ZnfnJyIXAv0IJS+oMYfrpVQX1WA+o0P76Hm7Y49GvW7uGmiaMYRws Y1sz40YwMKCmy3CzKdPC9HUYjlBqNqQvdhu7mGeItYbuNA67UNPxIOAo4VkkkqNpWoLCqRLY4/O nzQiHiOEbgellIrBghI4p X-Google-Smtp-Source: AGHT+IGfsIrdFbhprmcGkjN7nBsEbzpBtce/Ct00AnBiJYlS7w4X2H4GU7jTA1vXIeP2OEYtXHKkZQ== X-Received: by 2002:a05:6402:84c:b0:5fa:82a4:4c03 with SMTP id 4fb4d7f45d1cf-5fa82a44cc2mr2325996a12.13.1746212319716; Fri, 02 May 2025 11:58:39 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Igor Mammedov , Huacai Chen , Amit Shah , Marcel Apfelbaum , Sergio Lopez , Ani Sinha , Paolo Bonzini , Eduardo Habkost , Jiaxun Yang , Jason Wang , Richard Henderson , Yanan Wang , Gerd Hoffmann , =?UTF-8?q?Cl=C3=A9ment=20Mathieu--Drif?= , Zhao Liu , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Yi Liu , "Michael S. Tsirkin" Subject: [PATCH v3 18/19] hw/char/virtio-serial: Do not expose the 'emergency-write' property Date: Fri, 2 May 2025 20:56:50 +0200 Message-ID: <20250502185652.67370-19-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250502185652.67370-1-philmd@linaro.org> References: <20250502185652.67370-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, 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 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1746212503609019000 The VIRTIO_CONSOLE_F_EMERG_WRITE feature bit was only set in the hw_compat_2_7[] array, via the 'emergency-write=3Doff' property. We removed all machines using that array, lets remove that property. All instances have this feature bit set and it can not be disabled. VirtIOSerial::host_features mask is now unused, remove it. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/virtio/virtio-serial.h | 2 -- hw/char/virtio-serial-bus.c | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-s= erial.h index d87c62eab7a..e6ceacec309 100644 --- a/include/hw/virtio/virtio-serial.h +++ b/include/hw/virtio/virtio-serial.h @@ -185,8 +185,6 @@ struct VirtIOSerial { struct VirtIOSerialPostLoad *post_load; =20 virtio_serial_conf serial; - - uint64_t host_features; }; =20 /* Interface to the virtio-serial bus */ diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index eb79f5258b6..cfc8fa42186 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -557,7 +557,7 @@ static uint64_t get_features(VirtIODevice *vdev, uint64= _t features, =20 vser =3D VIRTIO_SERIAL(vdev); =20 - features |=3D vser->host_features; + features |=3D BIT_ULL(VIRTIO_CONSOLE_F_EMERG_WRITE); if (vser->bus.max_nr_ports > 1) { virtio_add_feature(&features, VIRTIO_CONSOLE_F_MULTIPORT); } @@ -587,8 +587,7 @@ static void set_config(VirtIODevice *vdev, const uint8_= t *config_data) VirtIOSerialPortClass *vsc; uint8_t emerg_wr_lo; =20 - if (!virtio_has_feature(vser->host_features, - VIRTIO_CONSOLE_F_EMERG_WRITE) || !config->emerg_wr) { + if (!config->emerg_wr) { return; } =20 @@ -1039,7 +1038,7 @@ static void virtio_serial_device_realize(DeviceState = *dev, Error **errp) return; } =20 - if (!virtio_has_feature(vser->host_features, + if (!virtio_has_feature(vdev->host_features, VIRTIO_CONSOLE_F_EMERG_WRITE)) { config_size =3D offsetof(struct virtio_console_config, emerg_wr); } @@ -1155,8 +1154,6 @@ static const VMStateDescription vmstate_virtio_consol= e =3D { static const Property virtio_serial_properties[] =3D { DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_po= rts, 31), - DEFINE_PROP_BIT64("emergency-write", VirtIOSerial, host_features, - VIRTIO_CONSOLE_F_EMERG_WRITE, true), }; =20 static void virtio_serial_class_init(ObjectClass *klass, const void *data) --=20 2.47.1