* [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-30 13:49 ` Cornelia Huck
2015-04-29 15:24 ` [Qemu-devel] [PATCH 2/7] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES Shannon Zhao
` (9 subsequent siblings)
10 siblings, 1 reply; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
As only one place in virtio-net.c uses DEFINE_VIRTIO_NET_FEATURES,
there is no need to expose it. Inline it into virtio-net.c to avoid
wrongly use.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/net/virtio-net.c | 42 +++++++++++++++++++++++++++++++++++++++++-
include/hw/virtio/virtio-net.h | 24 ------------------------
2 files changed, 41 insertions(+), 25 deletions(-)
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 5c38ac2..6ed2e78 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1725,7 +1725,47 @@ static void virtio_net_instance_init(Object *obj)
}
static Property virtio_net_properties[] = {
- DEFINE_VIRTIO_NET_FEATURES(VirtIONet, host_features),
+ 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("guest_csum", VirtIONet, host_features,
+ VIRTIO_NET_F_GUEST_CSUM, true),
+ DEFINE_PROP_BIT("gso", VirtIONet, host_features, VIRTIO_NET_F_GSO, true),
+ DEFINE_PROP_BIT("guest_tso4", VirtIONet, host_features,
+ VIRTIO_NET_F_GUEST_TSO4, true),
+ DEFINE_PROP_BIT("guest_tso6", VirtIONet, host_features,
+ VIRTIO_NET_F_GUEST_TSO6, true),
+ DEFINE_PROP_BIT("guest_ecn", VirtIONet, host_features,
+ VIRTIO_NET_F_GUEST_ECN, true),
+ DEFINE_PROP_BIT("guest_ufo", VirtIONet, host_features,
+ VIRTIO_NET_F_GUEST_UFO, true),
+ DEFINE_PROP_BIT("guest_announce", VirtIONet, host_features,
+ VIRTIO_NET_F_GUEST_ANNOUNCE, true),
+ DEFINE_PROP_BIT("host_tso4", VirtIONet, host_features,
+ VIRTIO_NET_F_HOST_TSO4, true),
+ DEFINE_PROP_BIT("host_tso6", VirtIONet, host_features,
+ VIRTIO_NET_F_HOST_TSO6, true),
+ DEFINE_PROP_BIT("host_ecn", VirtIONet, host_features, VIRTIO_NET_F_HOST_ECN,
+ true),
+ DEFINE_PROP_BIT("host_ufo", VirtIONet, host_features, VIRTIO_NET_F_HOST_UFO,
+ true),
+ DEFINE_PROP_BIT("mrg_rxbuf", VirtIONet, host_features,
+ VIRTIO_NET_F_MRG_RXBUF, true),
+ DEFINE_PROP_BIT("status", VirtIONet, host_features, VIRTIO_NET_F_STATUS,
+ true),
+ DEFINE_PROP_BIT("ctrl_vq", VirtIONet, host_features, VIRTIO_NET_F_CTRL_VQ,
+ true),
+ DEFINE_PROP_BIT("ctrl_rx", VirtIONet, host_features, VIRTIO_NET_F_CTRL_RX,
+ true),
+ DEFINE_PROP_BIT("ctrl_vlan", VirtIONet, host_features,
+ VIRTIO_NET_F_CTRL_VLAN, true),
+ DEFINE_PROP_BIT("ctrl_rx_extra", VirtIONet, host_features,
+ VIRTIO_NET_F_CTRL_RX_EXTRA, true),
+ DEFINE_PROP_BIT("ctrl_mac_addr", VirtIONet, host_features,
+ VIRTIO_NET_F_CTRL_MAC_ADDR, true),
+ DEFINE_PROP_BIT("ctrl_guest_offloads", VirtIONet, host_features,
+ VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, true),
+ DEFINE_PROP_BIT("mq", VirtIONet, host_features, VIRTIO_NET_F_MQ, false),
DEFINE_NIC_PROPERTIES(VirtIONet, nic_conf),
DEFINE_PROP_UINT32("x-txtimer", VirtIONet, net_conf.txtimer,
TX_TIMER_INTERVAL),
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index e0dbb41..c142b42 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -109,30 +109,6 @@ typedef struct VirtIONet {
#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
-#define DEFINE_VIRTIO_NET_FEATURES(_state, _field) \
- DEFINE_PROP_BIT("any_layout", _state, _field, VIRTIO_F_ANY_LAYOUT, true), \
- DEFINE_PROP_BIT("csum", _state, _field, VIRTIO_NET_F_CSUM, true), \
- DEFINE_PROP_BIT("guest_csum", _state, _field, VIRTIO_NET_F_GUEST_CSUM, true), \
- DEFINE_PROP_BIT("gso", _state, _field, VIRTIO_NET_F_GSO, true), \
- DEFINE_PROP_BIT("guest_tso4", _state, _field, VIRTIO_NET_F_GUEST_TSO4, true), \
- DEFINE_PROP_BIT("guest_tso6", _state, _field, VIRTIO_NET_F_GUEST_TSO6, true), \
- DEFINE_PROP_BIT("guest_ecn", _state, _field, VIRTIO_NET_F_GUEST_ECN, true), \
- DEFINE_PROP_BIT("guest_ufo", _state, _field, VIRTIO_NET_F_GUEST_UFO, true), \
- DEFINE_PROP_BIT("guest_announce", _state, _field, VIRTIO_NET_F_GUEST_ANNOUNCE, true), \
- DEFINE_PROP_BIT("host_tso4", _state, _field, VIRTIO_NET_F_HOST_TSO4, true), \
- DEFINE_PROP_BIT("host_tso6", _state, _field, VIRTIO_NET_F_HOST_TSO6, true), \
- DEFINE_PROP_BIT("host_ecn", _state, _field, VIRTIO_NET_F_HOST_ECN, true), \
- DEFINE_PROP_BIT("host_ufo", _state, _field, VIRTIO_NET_F_HOST_UFO, true), \
- DEFINE_PROP_BIT("mrg_rxbuf", _state, _field, VIRTIO_NET_F_MRG_RXBUF, true), \
- DEFINE_PROP_BIT("status", _state, _field, VIRTIO_NET_F_STATUS, true), \
- DEFINE_PROP_BIT("ctrl_vq", _state, _field, VIRTIO_NET_F_CTRL_VQ, true), \
- DEFINE_PROP_BIT("ctrl_rx", _state, _field, VIRTIO_NET_F_CTRL_RX, true), \
- DEFINE_PROP_BIT("ctrl_vlan", _state, _field, VIRTIO_NET_F_CTRL_VLAN, true), \
- DEFINE_PROP_BIT("ctrl_rx_extra", _state, _field, VIRTIO_NET_F_CTRL_RX_EXTRA, true), \
- DEFINE_PROP_BIT("ctrl_mac_addr", _state, _field, VIRTIO_NET_F_CTRL_MAC_ADDR, true), \
- DEFINE_PROP_BIT("ctrl_guest_offloads", _state, _field, VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, true), \
- DEFINE_PROP_BIT("mq", _state, _field, VIRTIO_NET_F_MQ, false)
-
#define DEFINE_VIRTIO_NET_PROPERTIES(_state, _field) \
DEFINE_PROP_UINT32("x-txtimer", _state, _field.txtimer, TX_TIMER_INTERVAL),\
DEFINE_PROP_INT32("x-txburst", _state, _field.txburst, TX_BURST), \
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c
2015-04-29 15:24 ` [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c Shannon Zhao
@ 2015-04-30 13:49 ` Cornelia Huck
0 siblings, 0 replies; 22+ messages in thread
From: Cornelia Huck @ 2015-04-30 13:49 UTC (permalink / raw)
To: Shannon Zhao
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, qemu-devel,
zhaoshenglong, pbonzini, christoffer.dall
On Wed, 29 Apr 2015 23:24:03 +0800
Shannon Zhao <shannon.zhao@linaro.org> wrote:
> As only one place in virtio-net.c uses DEFINE_VIRTIO_NET_FEATURES,
> there is no need to expose it. Inline it into virtio-net.c to avoid
> wrongly use.
>
> Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> hw/net/virtio-net.c | 42 +++++++++++++++++++++++++++++++++++++++++-
> include/hw/virtio/virtio-net.h | 24 ------------------------
> 2 files changed, 41 insertions(+), 25 deletions(-)
>
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 5c38ac2..6ed2e78 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -1725,7 +1725,47 @@ static void virtio_net_instance_init(Object *obj)
> }
>
> static Property virtio_net_properties[] = {
> - DEFINE_VIRTIO_NET_FEATURES(VirtIONet, host_features),
> + DEFINE_PROP_BIT("any_layout", VirtIONet, host_features, VIRTIO_F_ANY_LAYOUT,
> + true),
Hm, the indentation after the line break looks a bit off here (same for
some of the feature bits further down).
> + DEFINE_PROP_BIT("csum", VirtIONet, host_features, VIRTIO_NET_F_CSUM, true),
> + DEFINE_PROP_BIT("guest_csum", VirtIONet, host_features,
> + VIRTIO_NET_F_GUEST_CSUM, true),
> + DEFINE_PROP_BIT("gso", VirtIONet, host_features, VIRTIO_NET_F_GSO, true),
> + DEFINE_PROP_BIT("guest_tso4", VirtIONet, host_features,
> + VIRTIO_NET_F_GUEST_TSO4, true),
> + DEFINE_PROP_BIT("guest_tso6", VirtIONet, host_features,
> + VIRTIO_NET_F_GUEST_TSO6, true),
> + DEFINE_PROP_BIT("guest_ecn", VirtIONet, host_features,
> + VIRTIO_NET_F_GUEST_ECN, true),
> + DEFINE_PROP_BIT("guest_ufo", VirtIONet, host_features,
> + VIRTIO_NET_F_GUEST_UFO, true),
> + DEFINE_PROP_BIT("guest_announce", VirtIONet, host_features,
> + VIRTIO_NET_F_GUEST_ANNOUNCE, true),
> + DEFINE_PROP_BIT("host_tso4", VirtIONet, host_features,
> + VIRTIO_NET_F_HOST_TSO4, true),
> + DEFINE_PROP_BIT("host_tso6", VirtIONet, host_features,
> + VIRTIO_NET_F_HOST_TSO6, true),
> + DEFINE_PROP_BIT("host_ecn", VirtIONet, host_features, VIRTIO_NET_F_HOST_ECN,
> + true),
> + DEFINE_PROP_BIT("host_ufo", VirtIONet, host_features, VIRTIO_NET_F_HOST_UFO,
> + true),
> + DEFINE_PROP_BIT("mrg_rxbuf", VirtIONet, host_features,
> + VIRTIO_NET_F_MRG_RXBUF, true),
> + DEFINE_PROP_BIT("status", VirtIONet, host_features, VIRTIO_NET_F_STATUS,
> + true),
> + DEFINE_PROP_BIT("ctrl_vq", VirtIONet, host_features, VIRTIO_NET_F_CTRL_VQ,
> + true),
> + DEFINE_PROP_BIT("ctrl_rx", VirtIONet, host_features, VIRTIO_NET_F_CTRL_RX,
> + true),
> + DEFINE_PROP_BIT("ctrl_vlan", VirtIONet, host_features,
> + VIRTIO_NET_F_CTRL_VLAN, true),
> + DEFINE_PROP_BIT("ctrl_rx_extra", VirtIONet, host_features,
> + VIRTIO_NET_F_CTRL_RX_EXTRA, true),
> + DEFINE_PROP_BIT("ctrl_mac_addr", VirtIONet, host_features,
> + VIRTIO_NET_F_CTRL_MAC_ADDR, true),
> + DEFINE_PROP_BIT("ctrl_guest_offloads", VirtIONet, host_features,
> + VIRTIO_NET_F_CTRL_GUEST_OFFLOADS, true),
> + DEFINE_PROP_BIT("mq", VirtIONet, host_features, VIRTIO_NET_F_MQ, false),
> DEFINE_NIC_PROPERTIES(VirtIONet, nic_conf),
> DEFINE_PROP_UINT32("x-txtimer", VirtIONet, net_conf.txtimer,
> TX_TIMER_INTERVAL),
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 2/7] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 3/7] virtio-scsi: move qdev properties into virtio-scsi.c Shannon Zhao
` (8 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
Remove unsed DEFINE_VIRTIO_NET_PROPERTIES in virtio-net.h and delete a
space typo.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
include/hw/virtio/virtio-net.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/hw/virtio/virtio-net.h b/include/hw/virtio/virtio-net.h
index c142b42..280dacf 100644
--- a/include/hw/virtio/virtio-net.h
+++ b/include/hw/virtio/virtio-net.h
@@ -107,12 +107,7 @@ typedef struct VirtIONet {
* VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature bit.
*/
#define VIRTIO_NET_CTRL_GUEST_OFFLOADS 5
- #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
-
-#define DEFINE_VIRTIO_NET_PROPERTIES(_state, _field) \
- DEFINE_PROP_UINT32("x-txtimer", _state, _field.txtimer, TX_TIMER_INTERVAL),\
- DEFINE_PROP_INT32("x-txburst", _state, _field.txburst, TX_BURST), \
- DEFINE_PROP_STRING("tx", _state, _field.tx)
+#define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET 0
void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
const char *type);
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 3/7] virtio-scsi: move qdev properties into virtio-scsi.c
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 1/7] virtio-net: move qdev properties into virtio-net.c Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 2/7] virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 4/7] virtio-rng: move qdev properties into virtio-rng.c Shannon Zhao
` (7 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
As only one place in virtio-scsi.c uses DEFINE_VIRTIO_SCSI_PROPERTIES
and DEFINE_VIRTIO_SCSI_FEATURES, there is no need to expose them. Inline
them into virtio-scsi.c to avoid wrongly use.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/scsi/virtio-scsi.c | 13 +++++++++++--
include/hw/virtio/virtio-scsi.h | 13 -------------
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index e242fef..166bb37 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -948,8 +948,17 @@ static void virtio_scsi_device_unrealize(DeviceState *dev, Error **errp)
}
static Property virtio_scsi_properties[] = {
- DEFINE_VIRTIO_SCSI_PROPERTIES(VirtIOSCSI, parent_obj.conf),
- DEFINE_VIRTIO_SCSI_FEATURES(VirtIOSCSI, host_features),
+ DEFINE_PROP_UINT32("num_queues", VirtIOSCSI, parent_obj.conf.num_queues, 1),
+ DEFINE_PROP_UINT32("max_sectors", VirtIOSCSI, parent_obj.conf.max_sectors,
+ 0xFFFF),
+ DEFINE_PROP_UINT32("cmd_per_lun", VirtIOSCSI, parent_obj.conf.cmd_per_lun,
+ 128),
+ DEFINE_PROP_BIT("any_layout", VirtIOSCSI, host_features,
+ VIRTIO_F_ANY_LAYOUT, true),
+ DEFINE_PROP_BIT("hotplug", VirtIOSCSI, host_features,
+ VIRTIO_SCSI_F_HOTPLUG, true),
+ DEFINE_PROP_BIT("param_change", VirtIOSCSI, host_features,
+ VIRTIO_SCSI_F_CHANGE, true),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/virtio/virtio-scsi.h b/include/hw/virtio/virtio-scsi.h
index b42e7f1..088fe9f 100644
--- a/include/hw/virtio/virtio-scsi.h
+++ b/include/hw/virtio/virtio-scsi.h
@@ -141,19 +141,6 @@ typedef struct VirtIOSCSIReq {
} req;
} VirtIOSCSIReq;
-#define DEFINE_VIRTIO_SCSI_PROPERTIES(_state, _conf_field) \
- DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \
- DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF),\
- DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
-
-#define DEFINE_VIRTIO_SCSI_FEATURES(_state, _feature_field) \
- DEFINE_PROP_BIT("any_layout", _state, _feature_field, \
- VIRTIO_F_ANY_LAYOUT, true), \
- DEFINE_PROP_BIT("hotplug", _state, _feature_field, VIRTIO_SCSI_F_HOTPLUG, \
- true), \
- DEFINE_PROP_BIT("param_change", _state, _feature_field, \
- VIRTIO_SCSI_F_CHANGE, true)
-
typedef void (*HandleOutput)(VirtIODevice *, VirtQueue *);
void virtio_scsi_common_realize(DeviceState *dev, Error **errp,
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 4/7] virtio-rng: move qdev properties into virtio-rng.c
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (2 preceding siblings ...)
2015-04-29 15:24 ` [Qemu-devel] [PATCH 3/7] virtio-scsi: move qdev properties into virtio-scsi.c Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 5/7] virtio-serial-bus: move qdev properties into virtio-serial-bus.c Shannon Zhao
` (6 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
As only one place in virtio-rng.c uses DEFINE_VIRTIO_RNG_PROPERTIES,
there is no need to expose it. Inline it into virtio-rng.c to avoid
wrongly use.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/virtio/virtio-rng.c | 8 +++++++-
include/hw/virtio/virtio-rng.h | 10 ----------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c
index 06e7178..66973b5 100644
--- a/hw/virtio/virtio-rng.c
+++ b/hw/virtio/virtio-rng.c
@@ -219,7 +219,13 @@ static void virtio_rng_device_unrealize(DeviceState *dev, Error **errp)
}
static Property virtio_rng_properties[] = {
- DEFINE_VIRTIO_RNG_PROPERTIES(VirtIORNG, conf),
+ /* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s. If
+ * you have an entropy source capable of generating more entropy than this
+ * and you can pass it through via virtio-rng, then hats off to you. Until
+ * then, this is unlimited for all practical purposes.
+ */
+ DEFINE_PROP_UINT64("max-bytes", VirtIORNG, conf.max_bytes, INT64_MAX),
+ DEFINE_PROP_UINT32("period", VirtIORNG, conf.period_ms, 1 << 16),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/virtio/virtio-rng.h b/include/hw/virtio/virtio-rng.h
index 7702ff4..0316488 100644
--- a/include/hw/virtio/virtio-rng.h
+++ b/include/hw/virtio/virtio-rng.h
@@ -46,14 +46,4 @@ typedef struct VirtIORNG {
int64_t quota_remaining;
} VirtIORNG;
-/* Set a default rate limit of 2^47 bytes per minute or roughly 2TB/s. If
- you have an entropy source capable of generating more entropy than this
- and you can pass it through via virtio-rng, then hats off to you. Until
- then, this is unlimited for all practical purposes.
-*/
-#define DEFINE_VIRTIO_RNG_PROPERTIES(_state, _conf_field) \
- DEFINE_PROP_UINT64("max-bytes", _state, _conf_field.max_bytes, \
- INT64_MAX), \
- DEFINE_PROP_UINT32("period", _state, _conf_field.period_ms, 1 << 16)
-
#endif
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 5/7] virtio-serial-bus: move qdev properties into virtio-serial-bus.c
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (3 preceding siblings ...)
2015-04-29 15:24 ` [Qemu-devel] [PATCH 4/7] virtio-rng: move qdev properties into virtio-rng.c Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 6/7] virtio-9p-device: move qdev properties into virtio-9p-device.c Shannon Zhao
` (5 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
As only one place in virtio-serial-bus.c uses
DEFINE_VIRTIO_SERIAL_PROPERTIES, there is no need to expose it. Inline
it into virtio-serial-bus.c to avoid wrongly use.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/char/virtio-serial-bus.c | 3 ++-
include/hw/virtio/virtio-serial.h | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c
index e336bdb..70189b7 100644
--- a/hw/char/virtio-serial-bus.c
+++ b/hw/char/virtio-serial-bus.c
@@ -1083,7 +1083,8 @@ static void virtio_serial_device_unrealize(DeviceState *dev, Error **errp)
}
static Property virtio_serial_properties[] = {
- DEFINE_VIRTIO_SERIAL_PROPERTIES(VirtIOSerial, serial),
+ DEFINE_PROP_UINT32("max_ports", VirtIOSerial, serial.max_virtserial_ports,
+ 31),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/virtio/virtio-serial.h b/include/hw/virtio/virtio-serial.h
index 18d1bcc..527d0bf 100644
--- a/include/hw/virtio/virtio-serial.h
+++ b/include/hw/virtio/virtio-serial.h
@@ -221,7 +221,4 @@ void virtio_serial_throttle_port(VirtIOSerialPort *port, bool throttle);
#define VIRTIO_SERIAL(obj) \
OBJECT_CHECK(VirtIOSerial, (obj), TYPE_VIRTIO_SERIAL)
-#define DEFINE_VIRTIO_SERIAL_PROPERTIES(_state, _field) \
- DEFINE_PROP_UINT32("max_ports", _state, _field.max_virtserial_ports, 31)
-
#endif
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 6/7] virtio-9p-device: move qdev properties into virtio-9p-device.c
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (4 preceding siblings ...)
2015-04-29 15:24 ` [Qemu-devel] [PATCH 5/7] virtio-serial-bus: move qdev properties into virtio-serial-bus.c Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-29 15:24 ` [Qemu-devel] [PATCH 7/7] vhost-scsi: move qdev properties into vhost-scsi.c Shannon Zhao
` (4 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
As only one place in virtio-9p-device.c uses
DEFINE_VIRTIO_9P_PROPERTIES, there is no need to expose it. Inline it
into virtio-9p-device.c to avoid wrongly use.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/9pfs/virtio-9p-device.c | 3 ++-
hw/9pfs/virtio-9p.h | 4 ----
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c
index 30492ec..8b604af 100644
--- a/hw/9pfs/virtio-9p-device.c
+++ b/hw/9pfs/virtio-9p-device.c
@@ -140,7 +140,8 @@ out:
/* virtio-9p device */
static Property virtio_9p_properties[] = {
- DEFINE_VIRTIO_9P_PROPERTIES(V9fsState, fsconf),
+ DEFINE_PROP_STRING("mount_tag", V9fsState, fsconf.tag),
+ DEFINE_PROP_STRING("fsdev", V9fsState, fsconf.fsdev_id),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/hw/9pfs/virtio-9p.h b/hw/9pfs/virtio-9p.h
index 58dafa9..2e7d488 100644
--- a/hw/9pfs/virtio-9p.h
+++ b/hw/9pfs/virtio-9p.h
@@ -391,8 +391,4 @@ extern int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath,
#define VIRTIO_9P(obj) \
OBJECT_CHECK(V9fsState, (obj), TYPE_VIRTIO_9P)
-#define DEFINE_VIRTIO_9P_PROPERTIES(_state, _field) \
- DEFINE_PROP_STRING("mount_tag", _state, _field.tag), \
- DEFINE_PROP_STRING("fsdev", _state, _field.fsdev_id)
-
#endif
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Qemu-devel] [PATCH 7/7] vhost-scsi: move qdev properties into vhost-scsi.c
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (5 preceding siblings ...)
2015-04-29 15:24 ` [Qemu-devel] [PATCH 6/7] virtio-9p-device: move qdev properties into virtio-9p-device.c Shannon Zhao
@ 2015-04-29 15:24 ` Shannon Zhao
2015-04-29 16:42 ` [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Paolo Bonzini
` (3 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-04-29 15:24 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, shannon.zhao,
zhaoshenglong, pbonzini, christoffer.dall
As only one place in vhost-scsi.c uses DEFINE_VHOST_SCSI_PROPERTIES,
there is no need to expose it. Inline it into vhost-scsi.c to avoid
wrongly use.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/scsi/vhost-scsi.c | 9 ++++++++-
include/hw/virtio/vhost-scsi.h | 9 ---------
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c
index 335f442..c28ad3d 100644
--- a/hw/scsi/vhost-scsi.c
+++ b/hw/scsi/vhost-scsi.c
@@ -294,7 +294,14 @@ static char *vhost_scsi_get_fw_dev_path(FWPathProvider *p, BusState *bus,
}
static Property vhost_scsi_properties[] = {
- DEFINE_VHOST_SCSI_PROPERTIES(VHostSCSI, parent_obj.conf),
+ DEFINE_PROP_STRING("vhostfd", VHostSCSI, parent_obj.conf.vhostfd),
+ DEFINE_PROP_STRING("wwpn", VHostSCSI, parent_obj.conf.wwpn),
+ DEFINE_PROP_UINT32("boot_tpgt", VHostSCSI, parent_obj.conf.boot_tpgt, 0),
+ DEFINE_PROP_UINT32("num_queues", VHostSCSI, parent_obj.conf.num_queues, 1),
+ DEFINE_PROP_UINT32("max_sectors", VHostSCSI, parent_obj.conf.max_sectors,
+ 0xFFFF),
+ DEFINE_PROP_UINT32("cmd_per_lun", VHostSCSI, parent_obj.conf.cmd_per_lun,
+ 128),
DEFINE_PROP_END_OF_LIST(),
};
diff --git a/include/hw/virtio/vhost-scsi.h b/include/hw/virtio/vhost-scsi.h
index dea0075..701bfee 100644
--- a/include/hw/virtio/vhost-scsi.h
+++ b/include/hw/virtio/vhost-scsi.h
@@ -66,13 +66,4 @@ typedef struct VHostSCSI {
int lun;
} VHostSCSI;
-#define DEFINE_VHOST_SCSI_PROPERTIES(_state, _conf_field) \
- DEFINE_PROP_STRING("vhostfd", _state, _conf_field.vhostfd), \
- DEFINE_PROP_STRING("wwpn", _state, _conf_field.wwpn), \
- DEFINE_PROP_UINT32("boot_tpgt", _state, _conf_field.boot_tpgt, 0), \
- DEFINE_PROP_UINT32("num_queues", _state, _conf_field.num_queues, 1), \
- DEFINE_PROP_UINT32("max_sectors", _state, _conf_field.max_sectors, 0xFFFF), \
- DEFINE_PROP_UINT32("cmd_per_lun", _state, _conf_field.cmd_per_lun, 128)
-
-
#endif
--
2.1.0
^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (6 preceding siblings ...)
2015-04-29 15:24 ` [Qemu-devel] [PATCH 7/7] vhost-scsi: move qdev properties into vhost-scsi.c Shannon Zhao
@ 2015-04-29 16:42 ` Paolo Bonzini
2015-04-30 13:50 ` Cornelia Huck
` (2 subsequent siblings)
10 siblings, 0 replies; 22+ messages in thread
From: Paolo Bonzini @ 2015-04-29 16:42 UTC (permalink / raw)
To: Shannon Zhao, qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, zhaoshenglong,
christoffer.dall
On 29/04/2015 17:24, Shannon Zhao wrote:
> The private qdev properties of virtio devices are only used by
> themselves. As Peter suggested and like what virtio-blk has done, we
> should move the private qdev properties into devices and don't expose
> them to avoid wrongly use.
>
> This patchset is based on following patchset which moves host features
> to backends.
> http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
Nice cleanup.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (7 preceding siblings ...)
2015-04-29 16:42 ` [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Paolo Bonzini
@ 2015-04-30 13:50 ` Cornelia Huck
2015-05-03 12:33 ` Shannon Zhao
2015-05-08 1:23 ` Shannon Zhao
2015-06-10 13:18 ` Shannon Zhao
10 siblings, 1 reply; 22+ messages in thread
From: Cornelia Huck @ 2015-04-30 13:50 UTC (permalink / raw)
To: Shannon Zhao
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, qemu-devel,
zhaoshenglong, pbonzini, christoffer.dall
On Wed, 29 Apr 2015 23:24:02 +0800
Shannon Zhao <shannon.zhao@linaro.org> wrote:
> The private qdev properties of virtio devices are only used by
> themselves. As Peter suggested and like what virtio-blk has done, we
> should move the private qdev properties into devices and don't expose
> them to avoid wrongly use.
>
> This patchset is based on following patchset which moves host features
> to backends.
> http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
>
> Shannon Zhao (7):
> virtio-net: move qdev properties into virtio-net.c
> virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
> virtio-scsi: move qdev properties into virtio-scsi.c
> virtio-rng: move qdev properties into virtio-rng.c
> virtio-serial-bus: move qdev properties into virtio-serial-bus.c
> virtio-9p-device: move qdev properties into virtio-9p-device.c
> vhost-scsi: move qdev properties into vhost-scsi.c
>
> hw/9pfs/virtio-9p-device.c | 3 ++-
> hw/9pfs/virtio-9p.h | 4 ----
> hw/char/virtio-serial-bus.c | 3 ++-
> hw/net/virtio-net.c | 42 ++++++++++++++++++++++++++++++++++++++-
> hw/scsi/vhost-scsi.c | 9 ++++++++-
> hw/scsi/virtio-scsi.c | 13 ++++++++++--
> hw/virtio/virtio-rng.c | 8 +++++++-
> include/hw/virtio/vhost-scsi.h | 9 ---------
> include/hw/virtio/virtio-net.h | 31 +----------------------------
> include/hw/virtio/virtio-rng.h | 10 ----------
> include/hw/virtio/virtio-scsi.h | 13 ------------
> include/hw/virtio/virtio-serial.h | 3 ---
> 12 files changed, 72 insertions(+), 76 deletions(-)
>
Other than my minor nit regarding indentation for virtio-net:
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-04-30 13:50 ` Cornelia Huck
@ 2015-05-03 12:33 ` Shannon Zhao
0 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-05-03 12:33 UTC (permalink / raw)
To: Cornelia Huck
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, qemu-devel,
zhaoshenglong, pbonzini, christoffer.dall
On 2015/4/30 21:50, Cornelia Huck wrote:
> On Wed, 29 Apr 2015 23:24:02 +0800
> Shannon Zhao <shannon.zhao@linaro.org> wrote:
>
>> The private qdev properties of virtio devices are only used by
>> themselves. As Peter suggested and like what virtio-blk has done, we
>> should move the private qdev properties into devices and don't expose
>> them to avoid wrongly use.
>>
>> This patchset is based on following patchset which moves host features
>> to backends.
>> http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
>>
>> Shannon Zhao (7):
>> virtio-net: move qdev properties into virtio-net.c
>> virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
>> virtio-scsi: move qdev properties into virtio-scsi.c
>> virtio-rng: move qdev properties into virtio-rng.c
>> virtio-serial-bus: move qdev properties into virtio-serial-bus.c
>> virtio-9p-device: move qdev properties into virtio-9p-device.c
>> vhost-scsi: move qdev properties into vhost-scsi.c
>>
>> hw/9pfs/virtio-9p-device.c | 3 ++-
>> hw/9pfs/virtio-9p.h | 4 ----
>> hw/char/virtio-serial-bus.c | 3 ++-
>> hw/net/virtio-net.c | 42 ++++++++++++++++++++++++++++++++++++++-
>> hw/scsi/vhost-scsi.c | 9 ++++++++-
>> hw/scsi/virtio-scsi.c | 13 ++++++++++--
>> hw/virtio/virtio-rng.c | 8 +++++++-
>> include/hw/virtio/vhost-scsi.h | 9 ---------
>> include/hw/virtio/virtio-net.h | 31 +----------------------------
>> include/hw/virtio/virtio-rng.h | 10 ----------
>> include/hw/virtio/virtio-scsi.h | 13 ------------
>> include/hw/virtio/virtio-serial.h | 3 ---
>> 12 files changed, 72 insertions(+), 76 deletions(-)
>>
>
> Other than my minor nit regarding indentation for virtio-net:
>
Thanks, need to respin or maintainer could handle it when merged?
> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (8 preceding siblings ...)
2015-04-30 13:50 ` Cornelia Huck
@ 2015-05-08 1:23 ` Shannon Zhao
2015-05-08 6:53 ` Paolo Bonzini
2015-06-10 13:18 ` Shannon Zhao
10 siblings, 1 reply; 22+ messages in thread
From: Shannon Zhao @ 2015-05-08 1:23 UTC (permalink / raw)
To: qemu-devel
Cc: peter.maydell, hangaohuai, mst, peter.huangpeng, zhaoshenglong,
pbonzini, christoffer.dall
On 2015/4/29 23:24, Shannon Zhao wrote:
> The private qdev properties of virtio devices are only used by
> themselves. As Peter suggested and like what virtio-blk has done, we
> should move the private qdev properties into devices and don't expose
> them to avoid wrongly use.
>
> This patchset is based on following patchset which moves host features
> to backends.
> http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
>
> Shannon Zhao (7):
> virtio-net: move qdev properties into virtio-net.c
> virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
> virtio-scsi: move qdev properties into virtio-scsi.c
> virtio-rng: move qdev properties into virtio-rng.c
> virtio-serial-bus: move qdev properties into virtio-serial-bus.c
> virtio-9p-device: move qdev properties into virtio-9p-device.c
> vhost-scsi: move qdev properties into vhost-scsi.c
Have any maintainer picked up these patches?
--
Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-05-08 1:23 ` Shannon Zhao
@ 2015-05-08 6:53 ` Paolo Bonzini
2015-05-08 12:29 ` Shannon Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Paolo Bonzini @ 2015-05-08 6:53 UTC (permalink / raw)
To: shannon.zhao, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
No, he is on vacation this week. Sorry for the delay!
Of you are doing cleanups in virtio, perhaps you can look into using alias properties for virtio-balloon's QOM properties (for example the statistics). The code is currently using object_property_add and manually-written getters/setters.
Thanks,
Paolo
-----Original Message-----
From: Shannon Zhao [shannon.zhao@linaro.org]
Received: venerdì, 08 mag 2015, 3:24
To: qemu-devel@nongnu.org
CC: peter.maydell@linaro.org, christoffer.dall@linaro.org, mst@redhat.com, pbonzini@redhat.com, peter.huangpeng@huawei.com, hangaohuai@huawei.com, zhaoshenglong@huawei.com
Subject: Re: [PATCH 0/7] virtio: inline private qdev properties into virtio devices
On 2015/4/29 23:24, Shannon Zhao wrote:
> The private qdev properties of virtio devices are only used by
> themselves. As Peter suggested and like what virtio-blk has done, we
> should move the private qdev properties into devices and don't expose
> them to avoid wrongly use.
>
> This patchset is based on following patchset which moves host features
> to backends.
> http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
>
> Shannon Zhao (7):
> virtio-net: move qdev properties into virtio-net.c
> virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
> virtio-scsi: move qdev properties into virtio-scsi.c
> virtio-rng: move qdev properties into virtio-rng.c
> virtio-serial-bus: move qdev properties into virtio-serial-bus.c
> virtio-9p-device: move qdev properties into virtio-9p-device.c
> vhost-scsi: move qdev properties into vhost-scsi.c
Have any maintainer picked up these patches?
--
Shannon
[-- Attachment #2: Type: text/html, Size: 2061 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-05-08 6:53 ` Paolo Bonzini
@ 2015-05-08 12:29 ` Shannon Zhao
0 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-05-08 12:29 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel
Hi Paolo,
Thanks for your reply. I just check whether I need to respin this
patchset. I will look at the virtio-balloon.
Thanks,
Shannon
On 2015/5/8 14:53, Paolo Bonzini wrote:
> No, he is on vacation this week. Sorry for the delay!
>
> Of you are doing cleanups in virtio, perhaps you can look into using
> alias properties for virtio-balloon's QOM properties (for example the
> statistics). The code is currently using object_property_add and
> manually-written getters/setters.
>
> Thanks,
>
> Paolo
>
>
> -----Original Message-----
> From: Shannon Zhao [shannon.zhao@linaro.org]
> Received: venerdì, 08 mag 2015, 3:24
> To: qemu-devel@nongnu.org
> CC: peter.maydell@linaro.org, christoffer.dall@linaro.org,
> mst@redhat.com, pbonzini@redhat.com, peter.huangpeng@huawei.com,
> hangaohuai@huawei.com, zhaoshenglong@huawei.com
> Subject: Re: [PATCH 0/7] virtio: inline private qdev properties into
> virtio devices
>
>
>
> On 2015/4/29 23:24, Shannon Zhao wrote:
> > The private qdev properties of virtio devices are only used by
> > themselves. As Peter suggested and like what virtio-blk has done, we
> > should move the private qdev properties into devices and don't expose
> > them to avoid wrongly use.
> >
> > This patchset is based on following patchset which moves host features
> > to backends.
> > http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
> >
> > Shannon Zhao (7):
> > virtio-net: move qdev properties into virtio-net.c
> > virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
> > virtio-scsi: move qdev properties into virtio-scsi.c
> > virtio-rng: move qdev properties into virtio-rng.c
> > virtio-serial-bus: move qdev properties into virtio-serial-bus.c
> > virtio-9p-device: move qdev properties into virtio-9p-device.c
> > vhost-scsi: move qdev properties into vhost-scsi.c
>
> Have any maintainer picked up these patches?
>
> --
> Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-04-29 15:24 [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices Shannon Zhao
` (9 preceding siblings ...)
2015-05-08 1:23 ` Shannon Zhao
@ 2015-06-10 13:18 ` Shannon Zhao
2015-06-10 13:21 ` Michael S. Tsirkin
10 siblings, 1 reply; 22+ messages in thread
From: Shannon Zhao @ 2015-06-10 13:18 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, peter.maydell, pbonzini, zhaoshenglong, mst
Ping?
Have these patches been missed?
On 2015/4/29 23:24, Shannon Zhao wrote:
> The private qdev properties of virtio devices are only used by
> themselves. As Peter suggested and like what virtio-blk has done, we
> should move the private qdev properties into devices and don't expose
> them to avoid wrongly use.
>
> This patchset is based on following patchset which moves host features
> to backends.
> http://lists.gnu.org/archive/html/qemu-devel/2015-04/msg03785.html
>
> Shannon Zhao (7):
> virtio-net: move qdev properties into virtio-net.c
> virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES
> virtio-scsi: move qdev properties into virtio-scsi.c
> virtio-rng: move qdev properties into virtio-rng.c
> virtio-serial-bus: move qdev properties into virtio-serial-bus.c
> virtio-9p-device: move qdev properties into virtio-9p-device.c
> vhost-scsi: move qdev properties into vhost-scsi.c
>
> hw/9pfs/virtio-9p-device.c | 3 ++-
> hw/9pfs/virtio-9p.h | 4 ----
> hw/char/virtio-serial-bus.c | 3 ++-
> hw/net/virtio-net.c | 42 ++++++++++++++++++++++++++++++++++++++-
> hw/scsi/vhost-scsi.c | 9 ++++++++-
> hw/scsi/virtio-scsi.c | 13 ++++++++++--
> hw/virtio/virtio-rng.c | 8 +++++++-
> include/hw/virtio/vhost-scsi.h | 9 ---------
> include/hw/virtio/virtio-net.h | 31 +----------------------------
> include/hw/virtio/virtio-rng.h | 10 ----------
> include/hw/virtio/virtio-scsi.h | 13 ------------
> include/hw/virtio/virtio-serial.h | 3 ---
> 12 files changed, 72 insertions(+), 76 deletions(-)
>
--
Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-06-10 13:18 ` Shannon Zhao
@ 2015-06-10 13:21 ` Michael S. Tsirkin
2015-06-10 13:38 ` Shannon Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Michael S. Tsirkin @ 2015-06-10 13:21 UTC (permalink / raw)
To: Shannon Zhao
Cc: qemu-trivial, peter.maydell, zhaoshenglong, qemu-devel, pbonzini
On Wed, Jun 10, 2015 at 09:18:27PM +0800, Shannon Zhao wrote:
> Ping?
> Have these patches been missed?
I see them upstream. See e.g. da3e8a23492dbc13c4b70d90b6ae42970624e63a.
What's missing?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-06-10 13:21 ` Michael S. Tsirkin
@ 2015-06-10 13:38 ` Shannon Zhao
2015-06-10 14:01 ` Michael S. Tsirkin
0 siblings, 1 reply; 22+ messages in thread
From: Shannon Zhao @ 2015-06-10 13:38 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: qemu-trivial, peter.maydell, zhaoshenglong, qemu-devel, pbonzini
On 2015/6/10 21:21, Michael S. Tsirkin wrote:
> On Wed, Jun 10, 2015 at 09:18:27PM +0800, Shannon Zhao wrote:
>> Ping?
>> Have these patches been missed?
>
> I see them upstream. See e.g. da3e8a23492dbc13c4b70d90b6ae42970624e63a.
> What's missing?
>
da3e8a23492dbc13c4b70d90b6ae42970624e63a is "virtio-net: Move
DEFINE_VIRTIO_NET_FEATURES to virtio-net", not this patchset.
--
Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-06-10 13:38 ` Shannon Zhao
@ 2015-06-10 14:01 ` Michael S. Tsirkin
2015-06-10 14:28 ` Shannon Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Michael S. Tsirkin @ 2015-06-10 14:01 UTC (permalink / raw)
To: Shannon Zhao
Cc: qemu-trivial, peter.maydell, zhaoshenglong, qemu-devel, pbonzini
On Wed, Jun 10, 2015 at 09:38:24PM +0800, Shannon Zhao wrote:
>
>
> On 2015/6/10 21:21, Michael S. Tsirkin wrote:
> >On Wed, Jun 10, 2015 at 09:18:27PM +0800, Shannon Zhao wrote:
> >>Ping?
> >>Have these patches been missed?
> >
> >I see them upstream. See e.g. da3e8a23492dbc13c4b70d90b6ae42970624e63a.
> >What's missing?
> >
>
> da3e8a23492dbc13c4b70d90b6ae42970624e63a is "virtio-net: Move
> DEFINE_VIRTIO_NET_FEATURES to virtio-net", not this patchset.
Oh right, I just saw Cornelia sent a minor comment which wasn't
addressed.
Also, I'd rather this is rebased on top of Gerd's virtio 1 tree -
I plan to merge them today.
> --
> Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-06-10 14:01 ` Michael S. Tsirkin
@ 2015-06-10 14:28 ` Shannon Zhao
2015-06-10 14:36 ` Michael S. Tsirkin
0 siblings, 1 reply; 22+ messages in thread
From: Shannon Zhao @ 2015-06-10 14:28 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: qemu-trivial, peter.maydell, zhaoshenglong, qemu-devel, pbonzini
On 2015/6/10 22:01, Michael S. Tsirkin wrote:
> On Wed, Jun 10, 2015 at 09:38:24PM +0800, Shannon Zhao wrote:
>>
>>
>> On 2015/6/10 21:21, Michael S. Tsirkin wrote:
>>> On Wed, Jun 10, 2015 at 09:18:27PM +0800, Shannon Zhao wrote:
>>>> Ping?
>>>> Have these patches been missed?
>>>
>>> I see them upstream. See e.g. da3e8a23492dbc13c4b70d90b6ae42970624e63a.
>>> What's missing?
>>>
>>
>> da3e8a23492dbc13c4b70d90b6ae42970624e63a is "virtio-net: Move
>> DEFINE_VIRTIO_NET_FEATURES to virtio-net", not this patchset.
>
> Oh right, I just saw Cornelia sent a minor comment which wasn't
> addressed.
>
Yeah, and I ask whether it needs to repin. Could you help deal the
indentations?
> Also, I'd rather this is rebased on top of Gerd's virtio 1 tree -
> I plan to merge them today.
>
I pull master, apply Gerd's virtio-1 patchset "[PATCH 00/33] virtio 1.0
patch series rebased", then apply these patches. No conflicts and
compile pass. I guess you could apply these directly.
PS: The [PATCH 01/33] of Gerd's virtio-1 patchset is already in master.
Thanks,
--
Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-06-10 14:28 ` Shannon Zhao
@ 2015-06-10 14:36 ` Michael S. Tsirkin
2015-06-10 14:38 ` Shannon Zhao
0 siblings, 1 reply; 22+ messages in thread
From: Michael S. Tsirkin @ 2015-06-10 14:36 UTC (permalink / raw)
To: Shannon Zhao
Cc: qemu-trivial, peter.maydell, zhaoshenglong, qemu-devel, pbonzini
On Wed, Jun 10, 2015 at 10:28:21PM +0800, Shannon Zhao wrote:
>
>
> On 2015/6/10 22:01, Michael S. Tsirkin wrote:
> >On Wed, Jun 10, 2015 at 09:38:24PM +0800, Shannon Zhao wrote:
> >>
> >>
> >>On 2015/6/10 21:21, Michael S. Tsirkin wrote:
> >>>On Wed, Jun 10, 2015 at 09:18:27PM +0800, Shannon Zhao wrote:
> >>>>Ping?
> >>>>Have these patches been missed?
> >>>
> >>>I see them upstream. See e.g. da3e8a23492dbc13c4b70d90b6ae42970624e63a.
> >>>What's missing?
> >>>
> >>
> >>da3e8a23492dbc13c4b70d90b6ae42970624e63a is "virtio-net: Move
> >>DEFINE_VIRTIO_NET_FEATURES to virtio-net", not this patchset.
> >
> >Oh right, I just saw Cornelia sent a minor comment which wasn't
> >addressed.
> >
> Yeah, and I ask whether it needs to repin. Could you help deal the
> indentations?
Sorry I can't. Too many patches flying around, trying to make 2.4.
> >Also, I'd rather this is rebased on top of Gerd's virtio 1 tree -
> >I plan to merge them today.
> >
>
> I pull master, apply Gerd's virtio-1 patchset "[PATCH 00/33] virtio 1.0
> patch series rebased", then apply these patches. No conflicts and compile
> pass. I guess you could apply these directly.
>
> PS: The [PATCH 01/33] of Gerd's virtio-1 patchset is already in master.
Thanks.
> Thanks,
>
> --
> Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Qemu-devel] [PATCH 0/7] virtio: inline private qdev properties into virtio devices
2015-06-10 14:36 ` Michael S. Tsirkin
@ 2015-06-10 14:38 ` Shannon Zhao
0 siblings, 0 replies; 22+ messages in thread
From: Shannon Zhao @ 2015-06-10 14:38 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: qemu-trivial, peter.maydell, zhaoshenglong, qemu-devel, pbonzini
On 2015/6/10 22:36, Michael S. Tsirkin wrote:
> On Wed, Jun 10, 2015 at 10:28:21PM +0800, Shannon Zhao wrote:
>>
>>
>> On 2015/6/10 22:01, Michael S. Tsirkin wrote:
>>> On Wed, Jun 10, 2015 at 09:38:24PM +0800, Shannon Zhao wrote:
>>>>
>>>>
>>>> On 2015/6/10 21:21, Michael S. Tsirkin wrote:
>>>>> On Wed, Jun 10, 2015 at 09:18:27PM +0800, Shannon Zhao wrote:
>>>>>> Ping?
>>>>>> Have these patches been missed?
>>>>>
>>>>> I see them upstream. See e.g. da3e8a23492dbc13c4b70d90b6ae42970624e63a.
>>>>> What's missing?
>>>>>
>>>>
>>>> da3e8a23492dbc13c4b70d90b6ae42970624e63a is "virtio-net: Move
>>>> DEFINE_VIRTIO_NET_FEATURES to virtio-net", not this patchset.
>>>
>>> Oh right, I just saw Cornelia sent a minor comment which wasn't
>>> addressed.
>>>
>> Yeah, and I ask whether it needs to repin. Could you help deal the
>> indentations?
>
> Sorry I can't. Too many patches flying around, trying to make 2.4.
>
Ok, will send out v2 later. Thanks.
>>> Also, I'd rather this is rebased on top of Gerd's virtio 1 tree -
>>> I plan to merge them today.
>>>
>>
>> I pull master, apply Gerd's virtio-1 patchset "[PATCH 00/33] virtio 1.0
>> patch series rebased", then apply these patches. No conflicts and compile
>> pass. I guess you could apply these directly.
>>
>> PS: The [PATCH 01/33] of Gerd's virtio-1 patchset is already in master.
>
> Thanks.
>
>> Thanks,
>>
>> --
>> Shannon
--
Shannon
^ permalink raw reply [flat|nested] 22+ messages in thread