On 11/19/2009 05:06 PM, Adam Litke wrote:
Avi and Anthony,
If you agree that I've addressed all outstanding issues, please consider this
patch for inclusion.  Thanks.


I'd like to see this (and all other virtio-ABI-modifying patches) first go into the virtio pci spec, then propagated to guest and host.

Changes since V3:
  - Increase stat field size to 64 bits
  - Report all sizes in kb (not pages)

Why not bytes?  It's the most natural unit.

-static ram_addr_t virtio_balloon_to_target(void *opaque, ram_addr_t target)
+static void request_stats(VirtIOBalloon *vb)
+{
+    vb->stats_requested = 1;
+    reset_stats(vb);
+    monitor_suspend(cur_mon);

You allow the guest to kill a monitor here.

+    virtqueue_push(vb->svq,&vb->stats_vq_elem, vb->stats_vq_offset);
+    virtio_notify(&vb->vdev, vb->svq);
+}
+



+typedef struct VirtIOBalloonStat {
+    uint16_t tag;
+    uint64_t val;
+} VirtIOBalloonStat;

Alignment here depends on word size. This needs to be padded to be aligned the same way on 32 and 64 bit hosts and guests.


--
error compiling committee.c: too many arguments to function



Reply via email to