Skip to contentSkip to conversation

s390x/pci: add common fmb

PATCH In review Yi Min Zhao 5 participants 10 messages Oct 22, 2018 – Dec 13, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 s390x/pci: add common fmb

Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to update fmb failed, an event error would be generated. After pcilg/stg/stb and rpcit interception handlers issue successfully, increase the related counter. The guest could pass null address to switch off FMB and stop corresponding timer.

---
Change Log:
v2:
1. Use QEMU_BUILD_BUG_MSG for ZpciFmb struct instead of QEMU_PACKED.

---
 hw/s390x/s390-pci-bus.c  |   3 +-
 hw/s390x/s390-pci-bus.h  |  25 ++++++++++
 hw/s390x/s390-pci-inst.c | 105 +++++++++++++++++++++++++++++++++++++--
 hw/s390x/s390-pci-inst.h |   1 +
 4 files changed, 130 insertions(+), 4 deletions(-)
hw/s390x/s390-pci-bus.c +2 -1
index e42e1b80d6..6cd23175cd 100644
@@ -976,6 +976,7 @@ static void s390_pcihost_hot_unplug(HotplugHandler *hotplug_dev,
     bus = pci_get_bus(pci_dev);
     devfn = pci_dev->devfn;
     object_unparent(OBJECT(pci_dev));
+    fmb_timer_free(pbdev);
     s390_pci_msix_free(pbdev);
     s390_pci_iommu_free(s, bus, devfn);
     pbdev->pdev = NULL;
@@ -1147,7 +1148,7 @@ static void s390_pci_device_reset(DeviceState *dev)
         pci_dereg_ioat(pbdev->iommu);
     }
 
-    pbdev->fmb_addr = 0;
+    fmb_timer_free(pbdev);
 }
 
 static void s390_pci_get_fid(Object *obj, Visitor *v, const char *name,
hw/s390x/s390-pci-bus.h +25 -0
index 1f7f9b5814..bfbbaca26c 100644
@@ -286,6 +286,29 @@ typedef struct S390PCIIOMMUTable {
     S390PCIIOMMU *iommu[PCI_SLOT_MAX];
 } S390PCIIOMMUTable;
 
+/* Function Measurement Block */
+#define DEFAULT_MUI 4000
+#define UPDATE_U_BIT 0x1ULL
+#define FMBK_MASK 0xfULL
+
+typedef struct ZpciFmbFmt0 {
+    uint64_t dma_rbytes;
+    uint64_t dma_wbytes;
+} ZpciFmbFmt0;
+
+typedef struct ZpciFmb {
+    uint8_t format;
+    uint8_t fmt_ind[3];
+    uint32_t sample;
+    uint64_t last_update;
+    uint64_t ld_ops;
+    uint64_t st_ops;
+    uint64_t stb_ops;
+    uint64_t rpcit_ops;
+    ZpciFmbFmt0 fmt0;
+} ZpciFmb;
+QEMU_BUILD_BUG_MSG(offsetof(ZpciFmb, fmt0) != 48, "padding in ZpciFmb");
+
 struct S390PCIBusDevice {
     DeviceState qdev;
     PCIDevice *pdev;
@@ -297,6 +320,8 @@ struct S390PCIBusDevice {
     uint32_t fid;
     bool fid_defined;
     uint64_t fmb_addr;
+    ZpciFmb fmb;
+    QEMUTimer *fmb_timer;
     uint8_t isc;
     uint16_t noi;
     uint16_t maxstbl;
hw/s390x/s390-pci-inst.c +102 -3

154 lines not on this page · raw message

hw/s390x/s390-pci-inst.h +1 -0
index 91c3d61f2a..fa3bf8b5aa 100644
@@ -303,6 +303,7 @@ int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
                         uintptr_t ra);
 int stpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar,
                          uintptr_t ra);
+void fmb_timer_free(S390PCIBusDevice *pbdev);
 
 #define ZPCI_IO_BAR_MIN 0
 #define ZPCI_IO_BAR_MAX 5
Signature · 1 line
Yi Min
#1 lore raw
Quoted 13 lines · Yi Min Zhao

Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to update fmb failed, an event error would be generated. After pcilg/stg/stb and rpcit interception handlers issue successfully, increase the related counter. The guest could pass null address to switch off FMB and stop corresponding timer.

---

[...]

Quoted 35 lines
hw/s390x/s390-pci-inst.c +35 -0
+static int fmb_do_update(S390PCIBusDevice *pbdev, uint8_t offset, int len)
+{
+    MemTxResult ret;
+
+    ret = address_space_write(&address_space_memory,
+                              pbdev->fmb_addr + (uint64_t)offset,
+                              MEMTXATTRS_UNSPECIFIED,
+                              (uint8_t *)&pbdev->fmb + offset,
+                              len);
+    if (ret) {
+        s390_pci_generate_error_event(ERR_EVENT_FMBA, pbdev->fh, pbdev->fid,
+                                      pbdev->fmb_addr, 0);
+        fmb_timer_free(pbdev);
+    }
+
+    return ret;
+}
+
+static void fmb_update(void *opaque)
+{
+    S390PCIBusDevice *pbdev = opaque;
+    int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);
+    uint8_t offset = offsetof(ZpciFmb, last_update);
+
+    /* Update U bit */
+    pbdev->fmb.last_update |= UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    /* Update FMB counters */
+    pbdev->fmb.sample++;
+    if (fmb_do_update(pbdev, 0, sizeof(ZpciFmb))) {
+        return;
+    }

hw/s390x/s390-pci-inst.c void pci_dereg_ioat(S390PCIIOMMU *iommu) · line 963

Quoted 10 lines
hw/s390x/s390-pci-inst.c +10 -0
+
+    /* Clear U bit and update the time */
+    pbdev->fmb.last_update = time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+    pbdev->fmb.last_update &= ~UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    timer_mod(pbdev->fmb_timer, t + DEFAULT_MUI);
+}

Sorry for noticing this in v1 already, but is this code endianess-safe? I.e. can this also work with qemu-system-s390x running with TCG on a x86 host? I think you might have to use something like this here instead:

  pbdev->fmb.sample = cpu_to_be32(be32_to_cpu(pbdev->fmb.sample) + 1);

etc.

Thomas

#2 lore raw
Quoted 64 lines · Thomas Huth
Quoted 13 lines · Yi Min Zhao

Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to update fmb failed, an event error would be generated. After pcilg/stg/stb and rpcit interception handlers issue successfully, increase the related counter. The guest could pass null address to switch off FMB and stop corresponding timer.

---

[...]

Quoted 35 lines
hw/s390x/s390-pci-inst.c +35 -0
+static int fmb_do_update(S390PCIBusDevice *pbdev, uint8_t offset, int len)
+{
+    MemTxResult ret;
+
+    ret = address_space_write(&address_space_memory,
+                              pbdev->fmb_addr + (uint64_t)offset,
+                              MEMTXATTRS_UNSPECIFIED,
+                              (uint8_t *)&pbdev->fmb + offset,
+                              len);
+    if (ret) {
+        s390_pci_generate_error_event(ERR_EVENT_FMBA, pbdev->fh, pbdev->fid,
+                                      pbdev->fmb_addr, 0);
+        fmb_timer_free(pbdev);
+    }
+
+    return ret;
+}
+
+static void fmb_update(void *opaque)
+{
+    S390PCIBusDevice *pbdev = opaque;
+    int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);
+    uint8_t offset = offsetof(ZpciFmb, last_update);
+
+    /* Update U bit */
+    pbdev->fmb.last_update |= UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    /* Update FMB counters */
+    pbdev->fmb.sample++;
+    if (fmb_do_update(pbdev, 0, sizeof(ZpciFmb))) {
+        return;
+    }

hw/s390x/s390-pci-inst.c void pci_dereg_ioat(S390PCIIOMMU *iommu) · line 963

Quoted 10 lines
hw/s390x/s390-pci-inst.c +10 -0
+
+    /* Clear U bit and update the time */
+    pbdev->fmb.last_update = time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+    pbdev->fmb.last_update &= ~UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    timer_mod(pbdev->fmb_timer, t + DEFAULT_MUI);
+}

Sorry for noticing this in v1 already, but is this code endianess-safe? I.e. can this also work with qemu-system-s390x running with TCG on a x86 host? I think you might have to use something like this here instead:

Quoted 7 lines
   pbdev->fmb.sample = cpu_to_be32(be32_to_cpu(pbdev->fmb.sample) + 1);

etc.

Thomas

Aha!!! Yes, I think you're right. Indeed, we should consider endianess.

Signature · 1 line
Yi Min
#3 lore raw
In reply to Thomas Huth
Quoted 65 lines · On Mon, 22 Oct 2018 13:17:34 +0100 Thomas Huth <[email protected]> wrote:
Quoted 13 lines · Yi Min Zhao

Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to update fmb failed, an event error would be generated. After pcilg/stg/stb and rpcit interception handlers issue successfully, increase the related counter. The guest could pass null address to switch off FMB and stop corresponding timer.

---

[...]

Quoted 35 lines
hw/s390x/s390-pci-inst.c +35 -0
+static int fmb_do_update(S390PCIBusDevice *pbdev, uint8_t offset, int len)
+{
+    MemTxResult ret;
+
+    ret = address_space_write(&address_space_memory,
+                              pbdev->fmb_addr + (uint64_t)offset,
+                              MEMTXATTRS_UNSPECIFIED,
+                              (uint8_t *)&pbdev->fmb + offset,
+                              len);
+    if (ret) {
+        s390_pci_generate_error_event(ERR_EVENT_FMBA, pbdev->fh, pbdev->fid,
+                                      pbdev->fmb_addr, 0);
+        fmb_timer_free(pbdev);
+    }
+
+    return ret;
+}
+
+static void fmb_update(void *opaque)
+{
+    S390PCIBusDevice *pbdev = opaque;
+    int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);
+    uint8_t offset = offsetof(ZpciFmb, last_update);
+
+    /* Update U bit */
+    pbdev->fmb.last_update |= UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    /* Update FMB counters */
+    pbdev->fmb.sample++;
+    if (fmb_do_update(pbdev, 0, sizeof(ZpciFmb))) {
+        return;
+    }

hw/s390x/s390-pci-inst.c void pci_dereg_ioat(S390PCIIOMMU *iommu) · line 963

Quoted 10 lines
hw/s390x/s390-pci-inst.c +10 -0
+
+    /* Clear U bit and update the time */
+    pbdev->fmb.last_update = time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+    pbdev->fmb.last_update &= ~UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    timer_mod(pbdev->fmb_timer, t + DEFAULT_MUI);
+}  

Sorry for noticing this in v1 already, but is this code endianess-safe? I.e. can this also work with qemu-system-s390x running with TCG on a x86 host? I think you might have to use something like this here instead:

Quoted 3 lines
  pbdev->fmb.sample = cpu_to_be32(be32_to_cpu(pbdev->fmb.sample) + 1);

etc.

Agreed, that may need some endianness handling.

I would test this with tcg on a LE host, but how can I verify this? Yi Min, do you have some kind of test tooling you can share?

#4 lore raw
Quoted 67 lines · Cornelia Huck
Quoted 64 lines · On Mon, 22 Oct 2018 13:17:34 +0100 Thomas Huth <[email protected]> wrote:
Quoted 13 lines · Yi Min Zhao

Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to update fmb failed, an event error would be generated. After pcilg/stg/stb and rpcit interception handlers issue successfully, increase the related counter. The guest could pass null address to switch off FMB and stop corresponding timer.

---

[...]

Quoted 35 lines
hw/s390x/s390-pci-inst.c +35 -0
+static int fmb_do_update(S390PCIBusDevice *pbdev, uint8_t offset, int len)
+{
+    MemTxResult ret;
+
+    ret = address_space_write(&address_space_memory,
+                              pbdev->fmb_addr + (uint64_t)offset,
+                              MEMTXATTRS_UNSPECIFIED,
+                              (uint8_t *)&pbdev->fmb + offset,
+                              len);
+    if (ret) {
+        s390_pci_generate_error_event(ERR_EVENT_FMBA, pbdev->fh, pbdev->fid,
+                                      pbdev->fmb_addr, 0);
+        fmb_timer_free(pbdev);
+    }
+
+    return ret;
+}
+
+static void fmb_update(void *opaque)
+{
+    S390PCIBusDevice *pbdev = opaque;
+    int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);
+    uint8_t offset = offsetof(ZpciFmb, last_update);
+
+    /* Update U bit */
+    pbdev->fmb.last_update |= UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    /* Update FMB counters */
+    pbdev->fmb.sample++;
+    if (fmb_do_update(pbdev, 0, sizeof(ZpciFmb))) {
+        return;
+    }

hw/s390x/s390-pci-inst.c void pci_dereg_ioat(S390PCIIOMMU *iommu) · line 963

Quoted 10 lines
hw/s390x/s390-pci-inst.c +10 -0
+
+    /* Clear U bit and update the time */
+    pbdev->fmb.last_update = time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+    pbdev->fmb.last_update &= ~UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    timer_mod(pbdev->fmb_timer, t + DEFAULT_MUI);
+}

Sorry for noticing this in v1 already, but is this code endianess-safe? I.e. can this also work with qemu-system-s390x running with TCG on a x86 host? I think you might have to use something like this here instead:

Quoted 9 lines
Quoted 3 lines
   pbdev->fmb.sample = cpu_to_be32(be32_to_cpu(pbdev->fmb.sample) + 1);

etc.

Agreed, that may need some endianness handling.

I would test this with tcg on a LE host, but how can I verify this? Yi Min, do you have some kind of test tooling you can share?

There's no tool now. You could startup a guest. And then in the guest, install PCI driver and read FMB values from /sys/kernel/debug/pci/****/statistics.

If endianness has error, I think the values must looks wrong. The right thing is that values increase from 0 and intervally.

Signature · 1 line
Yi Min
#5 lore raw
Quoted 77 lines · On Wed, 24 Oct 2018 11:58:33 +0800 Yi Min Zhao <[email protected]> wrote:
Quoted 67 lines · Cornelia Huck
Quoted 64 lines · On Mon, 22 Oct 2018 13:17:34 +0100 Thomas Huth <[email protected]> wrote:
Quoted 13 lines · Yi Min Zhao

Common function measurement block is used to report counters of successfully issued pcilg/stg/stb and rpcit instructions. This patch introduces a new struct ZpciFmb and schedules a timer callback to copy fmb to the guest memory at a interval time which is set to 4s by default. While attemping to update fmb failed, an event error would be generated. After pcilg/stg/stb and rpcit interception handlers issue successfully, increase the related counter. The guest could pass null address to switch off FMB and stop corresponding timer.

---

[...]

Quoted 35 lines
hw/s390x/s390-pci-inst.c +35 -0
+static int fmb_do_update(S390PCIBusDevice *pbdev, uint8_t offset, int len)
+{
+    MemTxResult ret;
+
+    ret = address_space_write(&address_space_memory,
+                              pbdev->fmb_addr + (uint64_t)offset,
+                              MEMTXATTRS_UNSPECIFIED,
+                              (uint8_t *)&pbdev->fmb + offset,
+                              len);
+    if (ret) {
+        s390_pci_generate_error_event(ERR_EVENT_FMBA, pbdev->fh, pbdev->fid,
+                                      pbdev->fmb_addr, 0);
+        fmb_timer_free(pbdev);
+    }
+
+    return ret;
+}
+
+static void fmb_update(void *opaque)
+{
+    S390PCIBusDevice *pbdev = opaque;
+    int64_t t = qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL);
+    uint8_t offset = offsetof(ZpciFmb, last_update);
+
+    /* Update U bit */
+    pbdev->fmb.last_update |= UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    /* Update FMB counters */
+    pbdev->fmb.sample++;
+    if (fmb_do_update(pbdev, 0, sizeof(ZpciFmb))) {
+        return;
+    }

hw/s390x/s390-pci-inst.c void pci_dereg_ioat(S390PCIIOMMU *iommu) · line 963

Quoted 10 lines
hw/s390x/s390-pci-inst.c +10 -0
+
+    /* Clear U bit and update the time */
+    pbdev->fmb.last_update = time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
+    pbdev->fmb.last_update &= ~UPDATE_U_BIT;
+    if (fmb_do_update(pbdev, offset, sizeof(uint64_t))) {
+        return;
+    }
+
+    timer_mod(pbdev->fmb_timer, t + DEFAULT_MUI);
+}  

Sorry for noticing this in v1 already, but is this code endianess-safe? I.e. can this also work with qemu-system-s390x running with TCG on a x86 host? I think you might have to use something like this here instead:

Quoted 9 lines
Quoted 3 lines
   pbdev->fmb.sample = cpu_to_be32(be32_to_cpu(pbdev->fmb.sample) + 1);

etc.

Agreed, that may need some endianness handling.

I would test this with tcg on a LE host, but how can I verify this? Yi Min, do you have some kind of test tooling you can share?

Quoted 7 lines

There's no tool now. You could startup a guest. And then in the guest, install
PCI driver and read FMB values from /sys/kernel/debug/pci/****/statistics.

If endianness has error, I think the values must looks wrong. The right thing is that values increase from 0 and intervally.

Thanks for pointing me to that file; when I run under tcg, the values indeed look like they have an endianness issue:

Update interval: 4000 ms
Samples: 637534208
Last update TOD: f4c01d0098000000
Load operations: 10520408729537478656
Store operations: 5980780305148018688
Store block operations: 0
Refresh operations: 0
Allocated pages: 0
Mapped pages: 0
Unmapped pages: 0

(virtio-net-pci device on a just-booted guest)

#6 lore raw
Quoted 7 lines · Cornelia Huck
Quoted 4 lines · On Wed, 24 Oct 2018 11:58:33 +0800 Yi Min Zhao <[email protected]> wrote:
Quoted 3 lines · Cornelia Huck

On Mon, 22 Oct 2018 13:17:34 +0100
Thomas Huth <[email protected]> wrote:

...snip...

Quoted 18 lines
Quoted 3 lines

If endianness has error, I think the values must looks wrong. The right thing is that values increase from 0 and intervally.

Thanks for pointing me to that file; when I run under tcg, the values indeed look like they have an endianness issue:

Update interval: 4000 ms
Samples: 637534208
Last update TOD: f4c01d0098000000
Load operations: 10520408729537478656
Store operations: 5980780305148018688
Store block operations: 0
Refresh operations: 0
Allocated pages: 0
Mapped pages: 0
Unmapped pages: 0

Quoted 2 lines

(virtio-net-pci device on a just-booted guest)

Hy Conny,

I saw we lack a response to Thomas.
Otherwise have you any remark?

Regards,
Pierre

Signature · 2 lines
Pierre Morel
Linux/KVM/QEMU in Böblingen - Germany
#7 lore raw
Quoted 29 lines · On Fri, 30 Nov 2018 10:23:14 +0100 Pierre Morel <[email protected]> wrote:
Quoted 7 lines · Cornelia Huck
Quoted 4 lines · On Wed, 24 Oct 2018 11:58:33 +0800 Yi Min Zhao <[email protected]> wrote:
Quoted 3 lines · Cornelia Huck

On Mon, 22 Oct 2018 13:17:34 +0100
Thomas Huth <[email protected]> wrote:

...snip...

Quoted 18 lines
Quoted 3 lines

If endianness has error, I think the values must looks wrong. The right thing is that values increase from 0 and intervally.

Thanks for pointing me to that file; when I run under tcg, the values indeed look like they have an endianness issue:

Update interval: 4000 ms
Samples: 637534208
Last update TOD: f4c01d0098000000
Load operations: 10520408729537478656
Store operations: 5980780305148018688
Store block operations: 0
Refresh operations: 0
Allocated pages: 0
Mapped pages: 0
Unmapped pages: 0

Quoted 7 lines
Quoted 2 lines

(virtio-net-pci device on a just-booted guest)

Hy Conny,

I saw we lack a response to Thomas.
Otherwise have you any remark?

I don't remember anything beyond the endianess issue.

#8 lore raw
Quoted 35 lines · Cornelia Huck
Quoted 32 lines · On Fri, 30 Nov 2018 10:23:14 +0100 Pierre Morel <[email protected]> wrote:
Quoted 7 lines · Cornelia Huck
Quoted 4 lines · On Wed, 24 Oct 2018 11:58:33 +0800 Yi Min Zhao <[email protected]> wrote:
Quoted 3 lines · Cornelia Huck

On Mon, 22 Oct 2018 13:17:34 +0100
Thomas Huth <[email protected]> wrote:

...snip...

Quoted 20 lines
Quoted 3 lines

If endianness has error, I think the values must looks wrong. The right thing is that values increase from 0 and intervally.

Thanks for pointing me to that file; when I run under tcg, the values indeed look like they have an endianness issue:

Update interval: 4000 ms
Samples: 637534208
Last update TOD: f4c01d0098000000
Load operations: 10520408729537478656
Store operations: 5980780305148018688
Store block operations: 0
Refresh operations: 0
Allocated pages: 0
Mapped pages: 0
Unmapped pages: 0

(virtio-net-pci device on a just-booted guest)

Quoted 7 lines
Quoted 4 lines

Hy Conny,

I saw we lack a response to Thomas.
Otherwise have you any remark?

I don't remember anything beyond the endianess issue.

This patch looks sane to me (I've lost the parent email on my client, else I would've replied directly to that).

I'm currently awaiting getting my system up-and-running to test this thoroughly. Shall we do one more round with the endianess addressed in the mean time?

Signature · 2 lines
Respectfully,
- Collin Walling
#9 lore raw
Quoted 44 lines · On Wed, 12 Dec 2018 15:25:57 -0500 Collin Walling <[email protected]> wrote:
Quoted 35 lines · Cornelia Huck
Quoted 32 lines · On Fri, 30 Nov 2018 10:23:14 +0100 Pierre Morel <[email protected]> wrote:
Quoted 7 lines · Cornelia Huck
Quoted 4 lines · On Wed, 24 Oct 2018 11:58:33 +0800 Yi Min Zhao <[email protected]> wrote:
Quoted 3 lines · Cornelia Huck

On Mon, 22 Oct 2018 13:17:34 +0100
Thomas Huth <[email protected]> wrote:

...snip...

Quoted 20 lines
Quoted 3 lines

If endianness has error, I think the values must looks wrong. The right thing is that values increase from 0 and intervally.

Thanks for pointing me to that file; when I run under tcg, the values indeed look like they have an endianness issue:

Update interval: 4000 ms
Samples: 637534208
Last update TOD: f4c01d0098000000
Load operations: 10520408729537478656
Store operations: 5980780305148018688
Store block operations: 0
Refresh operations: 0
Allocated pages: 0
Mapped pages: 0
Unmapped pages: 0

(virtio-net-pci device on a just-booted guest)

Quoted 7 lines
Quoted 4 lines

Hy Conny,

I saw we lack a response to Thomas.
Otherwise have you any remark?

I don't remember anything beyond the endianess issue.

Quoted 6 lines

This patch looks sane to me (I've lost the parent email on my client, else I would've replied directly to that).

I'm currently awaiting getting my system up-and-running to test this thoroughly. Shall we do one more round with the endianess addressed in the mean time?

Sure; I'll need to rely on your testing anyway (but I'll give it a whirl with virtio-pci).