mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
hw/char/virtio-serial: Do not expose the 'emergency-write' property
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. VirtIOSerial::host_features mask is now unused, remove it. Reviewed-by: Mark Cave-Ayland <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Reviewed-by: Igor Mammedov <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Signed-off-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
This commit is contained in:
1 parent
da5c0274ea
commit
d0660e5b7f
2 files changed
+3
-8
No files matched your search
@@ -557,7 +557,7 @@ static uint64_t get_features(VirtIODevice *vdev, uint64_t features,
|
||||
|
||||
vser = VIRTIO_SERIAL(vdev);
|
||||
|
||||
features |= vser->host_features;
|
||||
features |= 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;
|
||||
|
||||
if (!virtio_has_feature(vser->host_features,
|
||||
VIRTIO_CONSOLE_F_EMERG_WRITE) || !config->emerg_wr) {
|
||||
if (!config->emerg_wr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1040,7 +1039,7 @@ static void virtio_serial_device_realize(DeviceState *dev, Error **errp)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!virtio_has_feature(vser->host_features,
|
||||
if (!virtio_has_feature(vdev->host_features,
|
||||
VIRTIO_CONSOLE_F_EMERG_WRITE)) {
|
||||
config_size = offsetof(struct virtio_console_config, emerg_wr);
|
||||
}
|
||||
@@ -1156,8 +1155,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)
|
||||
|
||||
@@ -186,8 +186,6 @@ struct VirtIOSerial {
|
||||
struct VirtIOSerialPostLoad *post_load;
|
||||
|
||||
virtio_serial_conf serial;
|
||||
|
||||
uint64_t host_features;
|
||||
};
|
||||
|
||||
/* Interface to the virtio-serial bus */
|
||||
|
||||
Reference in new issue
Block a user