From patchwork Thu May 1 18:36:27 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 886359 Delivered-To: patch@linaro.org Received: by 2002:a5d:430f:0:b0:38f:210b:807b with SMTP id h15csp464212wrq; Thu, 1 May 2025 11:40:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX9d0vAKy3V5jai5B0aflcs/N1W8f4FHHQBzEW84xe/BWMqI8DWdF0B7HsoaEcT3YhLBoy/Hw==@linaro.org X-Google-Smtp-Source: AGHT+IHHMHf/n3P+xAaYKJoN1yjhXP3Q1AH8VVmxZPIQrOtZP3zsFQwBmLyBNq8d/I9NnTSRyoJS X-Received: by 2002:a05:622a:5a95:b0:476:9847:7c6e with SMTP id d75a77b69052e-489e4991324mr141477071cf.19.1746124828413; Thu, 01 May 2025 11:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1746124828; cv=none; d=google.com; s=arc-20240605; b=CMeo/uvbc/EQI36VmhGxo9fQ2pMFNPbLIB8WUkvHsqEZbhL3yXBwrbrQ4yd/GiV+dP iPRRb3H6arxbxaIIeN2GbFWyp+lyTNKJvwzk3Ix3TLydM0Fx513+A63qgWvwUAiAqjQs r79jV+IwWHfq8pwihoAlNzkTjQ14hwY3ZQNdcJaZvUTvCD/SJ/gAz+2aws50kYTcv1mc s7B186PZJCxam7QMKezqWSQZ/0praKpSwHYs+gPartsqJby5RfIv5n+sj4AUpbt4uvsA P4uWxzi2sSiwCaZma4yXOK6HJraix3K5QVODkDkqQvTtJ0wjTtBnfZvFdKOZk8hZfYYI iC1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/F9wfO6J1RL2avC/Q42x6BrmpISj7RT0yS78rOyo2P0=; fh=hoe06aprcDnk5P3d0vwgQt6uC5al0E2l9mfTIGTxZjA=; b=YZDAAkPu2o+qWVd+4N0kB1+lIwRRkb36CdMBGgSKLj77uHjSlE24r9QcgXAdveCvFp SZTXevzH7hnUaecb3t8Ij/DAdH5U4ok75002rFm/RWVEDcmbnyKePV4Ir3D4Do0NApVq kT7pw25YS1TEbHzLaALJ7qzJwKxgZZ1bYVhfIlaooSvFxxNogDq3N9TQD37Tz5HCkM3B lixp1IP5VabboLv4XoNS3NSxjgfQZco8Ty6dh124bpScpcHmkoINqig0PBy5x4TsM2Rv RYSGp01yoDULlSfXmXtr5iPkUKcuO7lxtQoZIHdCT7MHBoyw/6kxEsAIzFHtvS8Hoq7d xz5g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMye31R1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-48b960cdc9csi12038211cf.117.2025.05.01.11.40.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 May 2025 11:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMye31R1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAYpA-0003S4-V9; Thu, 01 May 2025 14:39:58 -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 1uAYo6-0002pw-H7 for qemu-devel@nongnu.org; Thu, 01 May 2025 14:38:52 -0400 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAYo4-0008LM-Ri for qemu-devel@nongnu.org; Thu, 01 May 2025 14:38:50 -0400 Received: by mail-il1-x12c.google.com with SMTP id e9e14a558f8ab-3d4436ba324so10399275ab.2 for ; Thu, 01 May 2025 11:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1746124727; x=1746729527; 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=/F9wfO6J1RL2avC/Q42x6BrmpISj7RT0yS78rOyo2P0=; b=uMye31R1iLvvLbO4tsNih+pI50YAluPlYoUOi9kBeBrU9w0/rgwZlSSpFWdudGY4Jw UDjq29lCQd5ZhjIYC6jWyuGq3lcYpZZECi4jea38fym29nrXXJiGFSjMo7b/0SdpAJnc ZxEIWmraZkdzQ6Vq273ICnrTZ3NLxR2w5mNQuI1l1Kj8DmM3Ns8rBqWU9YYiO+98eb29 Ae8S8ARCGbXibryOtIHGr2wyRmjSr8UaqzI6LbW4stgmp9+5Wwuh8KcbSJywN65M23iM 340bfhayr9vZe7uJC7UuY9jaMua47UH5m4c5BwOIrVjpcd/xywvz0oJu5/hjqPtVePFV vtJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746124727; x=1746729527; 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=/F9wfO6J1RL2avC/Q42x6BrmpISj7RT0yS78rOyo2P0=; b=QGkQ2GOp6m1o+dR+HLSMvZlgCkFaMQNkX3PC6DUOCe2r4zG5J1uLAQdihiWVlonfaj xLsE6NHhXKYgdjKBF6tw9UUGG3oXpVzsqgzOJzEF70AQrhfdtsUQQI0lHUrof8Iq1jhG epHvPD1Fk3TsCfzLLyCALInWc2NUstSBBcXB2/9+4KZGDhKA0A5g52gbSTVhaXCXYZDB Ob0ccZmRW6ww9uz2xID+Yj0XXaxWZDYU2wyWeVKKtAk7aZsbzyetqpzDgu9hTMs9fWRy lN0UC4hCjqbDzSJqptDzr3GgRtzIjVcBvHOE2elV0obHc1thp9NR1h4UIxa+Wk+LcUYq Fq8Q== X-Gm-Message-State: AOJu0Yyf0WbGDC/wZf+9NtWZO0dwURsGctnA+Dffz+Cpj69yNzUPoFTQ BLFwW+AEA6f219Rd8pAbPudx9p0UDSCVOJpw96f26venh6ekWY+sfqrL4ihd/QYsLhCqay5dT/+ v X-Gm-Gg: ASbGncs2XZ89pNXnS4uNssH5QZ863lz9+6UdW66NuJPVX2RCvkU/16Au0VkUOIumBV4 FEebjUUZYjHpKa+2VuGjbybDUSD4RsAJn0aNpbukeqmNJzulRE7ea4d6S2BWXCDdUNV7nv9023y 7qbELp+0kzOkuzin99F6nfxKeMO3uakSa0Z48rTesi5NDUjOOp7CzRR/ZGTjrlcmDDB7deo9E7x 8xMoUwVgbxzYnBUkq8jrJwKHI7vVTmvXhN8n/0/yj2OqhhZNlViGTX6zMnrFT36WkU9z2sm7ikC a6ORhShS5me4pGSgyoa+g3JDLeKJo6qZFCFObIFFL2+OkKX/hk2jwFRuFzrCCQNCq9nrU4HpPDw Iw22K4Ne/LasBK2ESJonp X-Received: by 2002:a05:6e02:1fe8:b0:3d9:66ba:1ad2 with SMTP id e9e14a558f8ab-3d97be3aee1mr38235ab.0.1746124727244; Thu, 01 May 2025 11:38:47 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4f882ee3f65sm307854173.52.2025.05.01.11.38.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 01 May 2025 11:38:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Igor Mammedov , Gerd Hoffmann , =?utf-8?q?Cl=C3=A9ment_Mathieu--Drif?= , Yi Liu , Paolo Bonzini , Amit Shah , Zhao Liu , "Michael S. Tsirkin" , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Richard Henderson , Sergio Lopez , Laurent Vivier , Jason Wang , Eduardo Habkost , Yanan Wang , Marcel Apfelbaum , Ani Sinha , Thomas Huth Subject: [PATCH v2 15/16] hw/char/virtio-serial: Do not expose the 'emergency-write' property Date: Thu, 1 May 2025 20:36:27 +0200 Message-ID: <20250501183628.87479-16-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250501183628.87479-1-philmd@linaro.org> References: <20250501183628.87479-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-il1-x12c.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The VIRTIO_CONSOLE_F_EMERG_WRITE feature bit was only set in the hw_compat_2_7[] array, via the 'emergency-write=off' 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. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/virtio-serial-bus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index eb79f5258b6..31bd1b7535d 100644 --- a/hw/char/virtio-serial-bus.c +++ b/hw/char/virtio-serial-bus.c @@ -1019,6 +1019,13 @@ static void virtser_port_device_unrealize(DeviceState *dev) } } +static void virtio_serial_instance_init(Object *obj) +{ + VirtIOSerial *vser = VIRTIO_SERIAL(obj); + + vser->host_features |= BIT_ULL(VIRTIO_CONSOLE_F_EMERG_WRITE); +} + static void virtio_serial_device_realize(DeviceState *dev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(dev); @@ -1155,8 +1162,6 @@ static const VMStateDescription vmstate_virtio_console = { static const Property virtio_serial_properties[] = { DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports, 31), - DEFINE_PROP_BIT64("emergency-write", VirtIOSerial, host_features, - VIRTIO_CONSOLE_F_EMERG_WRITE, true), }; static void virtio_serial_class_init(ObjectClass *klass, const void *data) @@ -1186,6 +1191,7 @@ static void virtio_serial_class_init(ObjectClass *klass, const void *data) static const TypeInfo virtio_device_info = { .name = TYPE_VIRTIO_SERIAL, .parent = TYPE_VIRTIO_DEVICE, + .instance_init = virtio_serial_instance_init, .instance_size = sizeof(VirtIOSerial), .class_init = virtio_serial_class_init, .interfaces = (const InterfaceInfo[]) {