提交 09999a5f 编写于 作者: M Michael S. Tsirkin

virtio: set any_layout in virtio core

Exceptions:
    - virtio-blk
    - compat machine types
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 cd4bfbb2
...@@ -731,6 +731,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features) ...@@ -731,6 +731,7 @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features)
virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY); virtio_add_feature(&features, VIRTIO_BLK_F_TOPOLOGY);
virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE); virtio_add_feature(&features, VIRTIO_BLK_F_BLK_SIZE);
virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); virtio_add_feature(&features, VIRTIO_BLK_F_SCSI);
virtio_clear_feature(&features, VIRTIO_F_ANY_LAYOUT);
if (s->conf.config_wce) { if (s->conf.config_wce) {
virtio_add_feature(&features, VIRTIO_BLK_F_CONFIG_WCE); virtio_add_feature(&features, VIRTIO_BLK_F_CONFIG_WCE);
......
...@@ -1777,8 +1777,6 @@ static void virtio_net_instance_init(Object *obj) ...@@ -1777,8 +1777,6 @@ static void virtio_net_instance_init(Object *obj)
} }
static Property virtio_net_properties[] = { static Property virtio_net_properties[] = {
DEFINE_PROP_BIT("any_layout", VirtIONet, host_features,
VIRTIO_F_ANY_LAYOUT, true),
DEFINE_PROP_BIT("csum", VirtIONet, host_features, VIRTIO_NET_F_CSUM, true), DEFINE_PROP_BIT("csum", VirtIONet, host_features, VIRTIO_NET_F_CSUM, true),
DEFINE_PROP_BIT("guest_csum", VirtIONet, host_features, DEFINE_PROP_BIT("guest_csum", VirtIONet, host_features,
VIRTIO_NET_F_GUEST_CSUM, true), VIRTIO_NET_F_GUEST_CSUM, true),
......
...@@ -953,8 +953,6 @@ static Property virtio_scsi_properties[] = { ...@@ -953,8 +953,6 @@ static Property virtio_scsi_properties[] = {
0xFFFF), 0xFFFF),
DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSI, parent_obj.conf.cmd_per_lun, DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSI, parent_obj.conf.cmd_per_lun,
128), 128),
DEFINE_PROP_BIT("any_layout", VirtIOSCSI, host_features,
VIRTIO_F_ANY_LAYOUT, true),
DEFINE_PROP_BIT("hotplug", VirtIOSCSI, host_features, DEFINE_PROP_BIT("hotplug", VirtIOSCSI, host_features,
VIRTIO_SCSI_F_HOTPLUG, true), VIRTIO_SCSI_F_HOTPLUG, true),
DEFINE_PROP_BIT("param_change", VirtIOSCSI, host_features, DEFINE_PROP_BIT("param_change", VirtIOSCSI, host_features,
......
...@@ -2,7 +2,27 @@ ...@@ -2,7 +2,27 @@
#define HW_COMPAT_H #define HW_COMPAT_H
#define HW_COMPAT_2_3 \ #define HW_COMPAT_2_3 \
/* empty */ {\
.driver = "virtio-blk-pci",\
.property = "any_layout",\
.value = "off",\
},{\
.driver = "virtio-balloon-pci",\
.property = "any_layout",\
.value = "off",\
},{\
.driver = "virtio-serial-pci",\
.property = "any_layout",\
.value = "off",\
},{\
.driver = "virtio-9p-pci",\
.property = "any_layout",\
.value = "off",\
},{\
.driver = "virtio-rng-pci",\
.property = "any_layout",\
.value = "off",\
},
#define HW_COMPAT_2_2 \ #define HW_COMPAT_2_2 \
/* empty */ /* empty */
......
...@@ -218,7 +218,9 @@ typedef struct VirtIORNGConf VirtIORNGConf; ...@@ -218,7 +218,9 @@ typedef struct VirtIORNGConf VirtIORNGConf;
DEFINE_PROP_BIT64("event_idx", _state, _field, \ DEFINE_PROP_BIT64("event_idx", _state, _field, \
VIRTIO_RING_F_EVENT_IDX, true), \ VIRTIO_RING_F_EVENT_IDX, true), \
DEFINE_PROP_BIT64("notify_on_empty", _state, _field, \ DEFINE_PROP_BIT64("notify_on_empty", _state, _field, \
VIRTIO_F_NOTIFY_ON_EMPTY, true) VIRTIO_F_NOTIFY_ON_EMPTY, true), \
DEFINE_PROP_BIT64("any_layout", _state, _field, \
VIRTIO_F_ANY_LAYOUT, true)
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n); hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n);
hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n); hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册