Displaying 18 results from an estimated 18 matches for "legacy_stat".
Did you mean:
legacy_stats
2015 Apr 12
2
[PATCH 1/2] virtio_balloon: header update for virtio 1
add modern header.
This patch is for virtio 1.0 branch, doesn't
apply to master.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/hw/virtio/virtio-balloon.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h
index f863bfe..79eca67 100644
--- a/include/hw/virtio/virtio-balloon.h
+++
2015 Apr 12
2
[PATCH 1/2] virtio_balloon: header update for virtio 1
add modern header.
This patch is for virtio 1.0 branch, doesn't
apply to master.
Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
---
include/hw/virtio/virtio-balloon.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h
index f863bfe..79eca67 100644
--- a/include/hw/virtio/virtio-balloon.h
+++
2015 Apr 13
3
[PATCH 2/2] virtio-balloon: virtio 1 support
...virtio-balloon.c
> @@ -239,7 +239,8 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
> {
> VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
> VirtQueueElement *elem = &s->stats_vq_elem;
> - VirtIOBalloonStat stat;
> + VirtIOBalloonStat legacy_stat;
> + VirtIOBalloonStatModern modern_stat;
> size_t offset = 0;
> qemu_timeval tv;
>
> @@ -253,14 +254,28 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
> */
> reset_stats(s);
>
> - while (iov_to_buf(elem->out...
2015 Apr 13
3
[PATCH 2/2] virtio-balloon: virtio 1 support
...virtio-balloon.c
> @@ -239,7 +239,8 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
> {
> VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
> VirtQueueElement *elem = &s->stats_vq_elem;
> - VirtIOBalloonStat stat;
> + VirtIOBalloonStat legacy_stat;
> + VirtIOBalloonStatModern modern_stat;
> size_t offset = 0;
> qemu_timeval tv;
>
> @@ -253,14 +254,28 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
> */
> reset_stats(s);
>
> - while (iov_to_buf(elem->out...
2015 Apr 12
0
[PATCH 2/2] virtio-balloon: virtio 1 support
...tio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -239,7 +239,8 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
VirtQueueElement *elem = &s->stats_vq_elem;
- VirtIOBalloonStat stat;
+ VirtIOBalloonStat legacy_stat;
+ VirtIOBalloonStatModern modern_stat;
size_t offset = 0;
qemu_timeval tv;
@@ -253,14 +254,28 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
*/
reset_stats(s);
- while (iov_to_buf(elem->out_sg, elem->out_num, offset, &stat, s...
2015 Apr 13
0
[PATCH 2/2] virtio-balloon: virtio 1 support
...-239,7 +239,8 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
> > {
> > VirtIOBalloon *s = VIRTIO_BALLOON(vdev);
> > VirtQueueElement *elem = &s->stats_vq_elem;
> > - VirtIOBalloonStat stat;
> > + VirtIOBalloonStat legacy_stat;
> > + VirtIOBalloonStatModern modern_stat;
> > size_t offset = 0;
> > qemu_timeval tv;
> >
> > @@ -253,14 +254,28 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq)
> > */
> > reset_stats(s);
> >...
2015 Apr 14
0
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...tag, u64 val)
> > {
> > BUG_ON(idx >= VIRTIO_BALLOON_S_NR);
> > - if (virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) {
> > - vb->stats[idx].tag = cpu_to_le32(tag);
> > - vb->stats[idx].val = cpu_to_le64(val);
> > - } else {
> > - vb->legacy_stats[idx].tag = tag;
> > - vb->legacy_stats[idx].val = val;
> > - }
> > + vb->stats[idx].tag = cpu_to_virtio16(vb->vdev, tag);
>
> Seems that nobody seemed to care much about statistics...
Or about BE guests ;)
> > + vb->stats[idx].val = cpu_to_virtio64(vb-...
2015 Apr 14
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...*vb, int idx,
> u16 tag, u64 val)
> {
> BUG_ON(idx >= VIRTIO_BALLOON_S_NR);
> - if (virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) {
> - vb->stats[idx].tag = cpu_to_le32(tag);
> - vb->stats[idx].val = cpu_to_le64(val);
> - } else {
> - vb->legacy_stats[idx].tag = tag;
> - vb->legacy_stats[idx].val = val;
> - }
> + vb->stats[idx].tag = cpu_to_virtio16(vb->vdev, tag);
Seems that nobody seemed to care much about statistics...
> + vb->stats[idx].val = cpu_to_virtio64(vb->vdev, val);
> }
>
> #define pages_to_...
2015 Apr 14
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...*vb, int idx,
> u16 tag, u64 val)
> {
> BUG_ON(idx >= VIRTIO_BALLOON_S_NR);
> - if (virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) {
> - vb->stats[idx].tag = cpu_to_le32(tag);
> - vb->stats[idx].val = cpu_to_le64(val);
> - } else {
> - vb->legacy_stats[idx].tag = tag;
> - vb->legacy_stats[idx].val = val;
> - }
> + vb->stats[idx].tag = cpu_to_virtio16(vb->vdev, tag);
Seems that nobody seemed to care much about statistics...
> + vb->stats[idx].val = cpu_to_virtio64(vb->vdev, val);
> }
>
> #define pages_to_...
2015 Apr 14
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
On Tue, 14 Apr 2015 10:42:56 +0930
Rusty Russell <rusty at rustcorp.com.au> wrote:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
> > On Wed, Apr 01, 2015 at 02:57:35PM +0200, Michael S. Tsirkin wrote:
> >> Virtio 1.0 doesn't include a modern balloon device. At some point we'll likely
> >> define an incompatible interface with a
2015 Apr 14
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
On Tue, 14 Apr 2015 10:42:56 +0930
Rusty Russell <rusty at rustcorp.com.au> wrote:
> "Michael S. Tsirkin" <mst at redhat.com> writes:
> > On Wed, Apr 01, 2015 at 02:57:35PM +0200, Michael S. Tsirkin wrote:
> >> Virtio 1.0 doesn't include a modern balloon device. At some point we'll likely
> >> define an incompatible interface with a
2015 Apr 14
2
[PATCH] virtio_balloon: drop virtio_balloon_stat_modern
...583720..9db546e 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -77,10 +77,7 @@ struct virtio_balloon {
/* Memory statistics */
int need_stats_update;
- union {
- struct virtio_balloon_stat_modern stats[VIRTIO_BALLOON_S_NR];
- struct virtio_balloon_stat legacy_stats[VIRTIO_BALLOON_S_NR];
- };
+ struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR];
/* To register callback in oom notifier call chain */
struct notifier_block nb;
@@ -93,10 +90,7 @@ static struct virtio_device_id id_table[] = {
static void stats_sg_init(struct virtio_balloon *vb, struct...
2015 Apr 14
2
[PATCH] virtio_balloon: drop virtio_balloon_stat_modern
...583720..9db546e 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -77,10 +77,7 @@ struct virtio_balloon {
/* Memory statistics */
int need_stats_update;
- union {
- struct virtio_balloon_stat_modern stats[VIRTIO_BALLOON_S_NR];
- struct virtio_balloon_stat legacy_stats[VIRTIO_BALLOON_S_NR];
- };
+ struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR];
/* To register callback in oom notifier call chain */
struct notifier_block nb;
@@ -93,10 +90,7 @@ static struct virtio_device_id id_table[] = {
static void stats_sg_init(struct virtio_balloon *vb, struct...
2015 Apr 14
0
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...583720..9db546e 100644
--- a/drivers/virtio/virtio_balloon.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -77,10 +77,7 @@ struct virtio_balloon {
/* Memory statistics */
int need_stats_update;
- union {
- struct virtio_balloon_stat_modern stats[VIRTIO_BALLOON_S_NR];
- struct virtio_balloon_stat legacy_stats[VIRTIO_BALLOON_S_NR];
- };
+ struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR];
/* To register callback in oom notifier call chain */
struct notifier_block nb;
@@ -93,10 +90,7 @@ static struct virtio_device_id id_table[] = {
static void stats_sg_init(struct virtio_balloon *vb, struct...
2015 Apr 01
2
[PATCH v3 1/6] virtio_balloon: transitional interface
...n.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -77,7 +77,10 @@ struct virtio_balloon {
/* Memory statistics */
int need_stats_update;
- struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR];
+ union {
+ struct virtio_balloon_stat_modern stats[VIRTIO_BALLOON_S_NR];
+ struct virtio_balloon_stat legacy_stats[VIRTIO_BALLOON_S_NR];
+ };
/* To register callback in oom notifier call chain */
struct notifier_block nb;
@@ -88,6 +91,14 @@ static struct virtio_device_id id_table[] = {
{ 0 },
};
+static void stats_sg_init(struct virtio_balloon *vb, struct scatterlist *sg)
+{
+ if (virtio_has_feature...
2015 Apr 01
2
[PATCH v3 1/6] virtio_balloon: transitional interface
...n.c
+++ b/drivers/virtio/virtio_balloon.c
@@ -77,7 +77,10 @@ struct virtio_balloon {
/* Memory statistics */
int need_stats_update;
- struct virtio_balloon_stat stats[VIRTIO_BALLOON_S_NR];
+ union {
+ struct virtio_balloon_stat_modern stats[VIRTIO_BALLOON_S_NR];
+ struct virtio_balloon_stat legacy_stats[VIRTIO_BALLOON_S_NR];
+ };
/* To register callback in oom notifier call chain */
struct notifier_block nb;
@@ -88,6 +91,14 @@ static struct virtio_device_id id_table[] = {
{ 0 },
};
+static void stats_sg_init(struct virtio_balloon *vb, struct scatterlist *sg)
+{
+ if (virtio_has_feature...
2015 Apr 15
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...{
>> > BUG_ON(idx >= VIRTIO_BALLOON_S_NR);
>> > - if (virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) {
>> > - vb->stats[idx].tag = cpu_to_le32(tag);
>> > - vb->stats[idx].val = cpu_to_le64(val);
>> > - } else {
>> > - vb->legacy_stats[idx].tag = tag;
>> > - vb->legacy_stats[idx].val = val;
>> > - }
>> > + vb->stats[idx].tag = cpu_to_virtio16(vb->vdev, tag);
>>
>> Seems that nobody seemed to care much about statistics...
>
> Or about BE guests ;)
>
>> > + vb->...
2015 Apr 15
2
[PATCH v3 0/6] virtio_balloon: virtio 1 support
...{
>> > BUG_ON(idx >= VIRTIO_BALLOON_S_NR);
>> > - if (virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) {
>> > - vb->stats[idx].tag = cpu_to_le32(tag);
>> > - vb->stats[idx].val = cpu_to_le64(val);
>> > - } else {
>> > - vb->legacy_stats[idx].tag = tag;
>> > - vb->legacy_stats[idx].val = val;
>> > - }
>> > + vb->stats[idx].tag = cpu_to_virtio16(vb->vdev, tag);
>>
>> Seems that nobody seemed to care much about statistics...
>
> Or about BE guests ;)
>
>> > + vb->...