Skip to contentSkip to conversation

hyperv: refactor HvSintRoute management

PATCH In review Roman Kagan 3 participants 12 messages Jul 2, 2018 – Jul 3, 2018

lore
Share & tools
lore
#0 lore raw

cover hyperv: refactor HvSintRoute management

This series modifies the management of HvSintRoute, which is an important building block in Hyper-V emulation infrastructure, to make it easier to maintain and enhance, and paves the way to the more complete Synthetic Interrupt Controller (SynIC) emulation.

This series applies on top of "[PATCH 0/2] hyperv: ensure VP index equal to QEMU cpu_index" series (message-id:
<[email protected]>).

Roman Kagan (6):
hyperv_testdev: refactor for better maintainability
hyperv: cosmetic: g_malloc -> g_new
hyperv: synic: only setup ack notifier if there's a callback
hyperv: allow passing arbitrary data to sint ack callback
hyperv: address HvSintRoute by X86CPU pointer
hyperv: make HvSintRoute reference-counted

---
For the reference, all of the Hyper-V / VMBus stuff can be found at
https://src.openvz.org/scm/up/qemu

 target/i386/hyperv.h     |  20 ++-----
 hw/misc/hyperv_testdev.c | 116 +++++++++++++++++++--------------------
 target/i386/hyperv.c     |  78 +++++++++++++++++++-------
 3 files changed, 120 insertions(+), 94 deletions(-)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/6 hyperv_testdev: refactor for better maintainability

Make hyperv_testdev slightly easier to follow and enhance in future. For that, put the hyperv sint routes (wrapped in a helper structure) on a linked list rather than a fixed-size array. Besides, this way HvSintRoute can be treated as an opaque structure, allowing for easier refactoring of the core Hyper-V SynIC code in followup pathches.

---
 hw/misc/hyperv_testdev.c | 116 +++++++++++++++++++--------------------
 1 file changed, 55 insertions(+), 61 deletions(-)
hw/misc/hyperv_testdev.c +55 -61
index bf6bbfa8cf..de07d7e8c3 100644
@@ -12,6 +12,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "qemu/queue.h"
 #include <linux/kvm.h>
 #include "hw/hw.h"
 #include "hw/qdev.h"
@@ -20,12 +21,17 @@
 #include "target/i386/hyperv.h"
 #include "kvm_i386.h"
 
-#define HV_TEST_DEV_MAX_SINT_ROUTES 64
+typedef struct TestSintRoute {
+    QLIST_ENTRY(TestSintRoute) le;
+    uint8_t vp_index;
+    uint8_t sint;
+    HvSintRoute *sint_route;
+} TestSintRoute;
 
 struct HypervTestDev {
     ISADevice parent_obj;
     MemoryRegion sint_control;
-    HvSintRoute *sint_route[HV_TEST_DEV_MAX_SINT_ROUTES];
+    QLIST_HEAD(, TestSintRoute) sint_routes;
 };
 typedef struct HypervTestDev HypervTestDev;
 
@@ -39,88 +45,76 @@ enum {
     HV_TEST_DEV_SINT_ROUTE_SET_SINT
 };
 
-static int alloc_sint_route_index(HypervTestDev *dev)
+static void sint_route_create(HypervTestDev *dev,
+                              uint8_t vp_index, uint8_t sint)
 {
-    int i;
+    TestSintRoute *sint_route;
 
-    for (i = 0; i < ARRAY_SIZE(dev->sint_route); i++) {
-        if (dev->sint_route[i] == NULL) {
-            return i;
-        }
-    }
-    return -1;
-}
+    sint_route = g_new0(TestSintRoute, 1);
+    assert(sint_route);
 
-static void free_sint_route_index(HypervTestDev *dev, int i)
-{
-    assert(i >= 0 && i < ARRAY_SIZE(dev->sint_route));
-    dev->sint_route[i] = NULL;
+    sint_route->vp_index = vp_index;
+    sint_route->sint = sint;
+
+    sint_route->sint_route = kvm_hv_sint_route_create(vp_index, sint, NULL);
+    assert(sint_route->sint_route);
+
+    QLIST_INSERT_HEAD(&dev->sint_routes, sint_route, le);
 }
 
-static int find_sint_route_index(HypervTestDev *dev, uint32_t vp_index,
-                                 uint32_t sint)
+static TestSintRoute *sint_route_find(HypervTestDev *dev,
+                                      uint8_t vp_index, uint8_t sint)
 {
-    HvSintRoute *sint_route;
-    int i;
+    TestSintRoute *sint_route;
 
-    for (i = 0; i < ARRAY_SIZE(dev->sint_route); i++) {
-        sint_route = dev->sint_route[i];
-        if (sint_route && sint_route->vp_index == vp_index &&
-            sint_route->sint == sint) {
-            return i;
+    QLIST_FOREACH(sint_route, &dev->sint_routes, le) {
+        if (sint_route->vp_index == vp_index && sint_route->sint == sint) {
+            return sint_route;
         }
     }
-    return -1;
+    assert(false);
+    return NULL;
 }
 
-static void hv_synic_test_dev_control(HypervTestDev *dev, uint32_t ctl,
-                                      uint32_t vp_index, uint32_t sint)
+static void sint_route_destroy(HypervTestDev *dev,
+                               uint8_t vp_index, uint8_t sint)
 {
-    int i;
-    HvSintRoute *sint_route;
+    TestSintRoute *sint_route;
 
-    switch (ctl) {
-    case HV_TEST_DEV_SINT_ROUTE_CREATE:
-        i = alloc_sint_route_index(dev);
-        assert(i >= 0);
-        sint_route = kvm_hv_sint_route_create(vp_index, sint, NULL);
-        assert(sint_route);
-        dev->sint_route[i] = sint_route;
-        break;
-    case HV_TEST_DEV_SINT_ROUTE_DESTROY:
-        i = find_sint_route_index(dev, vp_index, sint);
-        assert(i >= 0);
-        sint_route = dev->sint_route[i];
-        kvm_hv_sint_route_destroy(sint_route);
-        free_sint_route_index(dev, i);
-        break;
-    case HV_TEST_DEV_SINT_ROUTE_SET_SINT:
-        i = find_sint_route_index(dev, vp_index, sint);
-        assert(i >= 0);
-        sint_route = dev->sint_route[i];
-        kvm_hv_sint_route_set_sint(sint_route);
-        break;
-    default:
-        break;
-    }
+    sint_route = sint_route_find(dev, vp_index, sint);
+    QLIST_REMOVE(sint_route, le);
+    kvm_hv_sint_route_destroy(sint_route->sint_route);
+    g_free(sint_route);
+}
+
+static void sint_route_set_sint(HypervTestDev *dev,
+                                uint8_t vp_index, uint8_t sint)
+{
+    TestSintRoute *sint_route;
+
+    sint_route = sint_route_find(dev, vp_index, sint);
+
+    kvm_hv_sint_route_set_sint(sint_route->sint_route);
 }
 
 static void hv_test_dev_control(void *opaque, hwaddr addr, uint64_t data,
                                 uint32_t len)
 {
     HypervTestDev *dev = HYPERV_TEST_DEV(opaque);
-    uint8_t ctl;
+    uint8_t sint = data & 0xFF;
+    uint8_t vp_index = (data >> 8ULL) & 0xFF;
+    uint8_t ctl = (data >> 16ULL) & 0xFF;
 
-    ctl = (data >> 16ULL) & 0xFF;
     switch (ctl) {
     case HV_TEST_DEV_SINT_ROUTE_CREATE:
+        sint_route_create(dev, vp_index, sint);
+        break;
     case HV_TEST_DEV_SINT_ROUTE_DESTROY:
-    case HV_TEST_DEV_SINT_ROUTE_SET_SINT: {
-        uint8_t sint = data & 0xFF;
-        uint8_t vp_index = (data >> 8ULL) & 0xFF;
-        hv_synic_test_dev_control(dev, ctl, vp_index, sint);
+        sint_route_destroy(dev, vp_index, sint);
+        break;
+    case HV_TEST_DEV_SINT_ROUTE_SET_SINT:
+        sint_route_set_sint(dev, vp_index, sint);
         break;
-    }
     default:
         break;
     }
@@ -139,7 +133,7 @@ static void hv_test_dev_realizefn(DeviceState *d, Error **errp)
     HypervTestDev *dev = HYPERV_TEST_DEV(d);
     MemoryRegion *io = isa_address_space_io(isa);
 
-    memset(dev->sint_route, 0, sizeof(dev->sint_route));
+    QLIST_INIT(&dev->sint_routes);
     memory_region_init_io(&dev->sint_control, OBJECT(dev),
                           &synic_test_sint_ops, dev,
                           "hyperv-testdev-ctl", 4);
Signature · 1 line
2.17.1
#2 lore raw

PATCH 2/6 hyperv: cosmetic: g_malloc -> g_new

In reply to Roman Kagan
---
 target/i386/hyperv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target/i386/hyperv.c +1 -1
index 3065d765ed..47368b77c0 100644
@@ -88,7 +88,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
     HvSintRoute *sint_route;
     int r, gsi;
 
-    sint_route = g_malloc0(sizeof(*sint_route));
+    sint_route = g_new0(HvSintRoute, 1);
     r = event_notifier_init(&sint_route->sint_set_notifier, false);
     if (r) {
         goto err;
Signature · 1 line
2.17.1
#3 lore raw

PATCH 3/6 hyperv: synic: only setup ack notifier if there's a callback

In reply to Roman Kagan

There's no point setting up an sint ack notifier if no callback is specified.

---
 target/i386/hyperv.c | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)
target/i386/hyperv.c +19 -14
index 47368b77c0..acdb0ca9df 100644
@@ -77,15 +77,14 @@ static void kvm_hv_sint_ack_handler(EventNotifier *notifier)
     HvSintRoute *sint_route = container_of(notifier, HvSintRoute,
                                            sint_ack_notifier);
     event_notifier_test_and_clear(notifier);
-    if (sint_route->sint_ack_clb) {
-        sint_route->sint_ack_clb(sint_route);
-    }
+    sint_route->sint_ack_clb(sint_route);
 }
 
 HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
                                       HvSintAckClb sint_ack_clb)
 {
     HvSintRoute *sint_route;
+    EventNotifier *ack_notifier;
     int r, gsi;
 
     sint_route = g_new0(HvSintRoute, 1);
@@ -94,13 +93,15 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
         goto err;
     }
 
-    r = event_notifier_init(&sint_route->sint_ack_notifier, false);
-    if (r) {
-        goto err_sint_set_notifier;
-    }
+    ack_notifier = sint_ack_clb ? &sint_route->sint_ack_notifier : NULL;
+    if (ack_notifier) {
+        r = event_notifier_init(ack_notifier, false);
+        if (r) {
+            goto err_sint_set_notifier;
+        }
 
-    event_notifier_set_handler(&sint_route->sint_ack_notifier,
-                               kvm_hv_sint_ack_handler);
+        event_notifier_set_handler(ack_notifier, kvm_hv_sint_ack_handler);
+    }
 
     gsi = kvm_irqchip_add_hv_sint_route(kvm_state, vp_index, sint);
     if (gsi < 0) {
@@ -109,7 +110,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
 
     r = kvm_irqchip_add_irqfd_notifier_gsi(kvm_state,
                                            &sint_route->sint_set_notifier,
-                                           &sint_route->sint_ack_notifier, gsi);
+                                           ack_notifier, gsi);
     if (r) {
         goto err_irqfd;
     }
@@ -123,8 +124,10 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
 err_irqfd:
     kvm_irqchip_release_virq(kvm_state, gsi);
 err_gsi:
-    event_notifier_set_handler(&sint_route->sint_ack_notifier, NULL);
-    event_notifier_cleanup(&sint_route->sint_ack_notifier);
+    if (ack_notifier) {
+        event_notifier_set_handler(ack_notifier, NULL);
+        event_notifier_cleanup(ack_notifier);
+    }
 err_sint_set_notifier:
     event_notifier_cleanup(&sint_route->sint_set_notifier);
 err:
@@ -139,8 +142,10 @@ void kvm_hv_sint_route_destroy(HvSintRoute *sint_route)
                                           &sint_route->sint_set_notifier,
                                           sint_route->gsi);
     kvm_irqchip_release_virq(kvm_state, sint_route->gsi);
-    event_notifier_set_handler(&sint_route->sint_ack_notifier, NULL);
-    event_notifier_cleanup(&sint_route->sint_ack_notifier);
+    if (sint_route->sint_ack_clb) {
+        event_notifier_set_handler(&sint_route->sint_ack_notifier, NULL);
+        event_notifier_cleanup(&sint_route->sint_ack_notifier);
+    }
     event_notifier_cleanup(&sint_route->sint_set_notifier);
     g_free(sint_route);
 }
Signature · 1 line
2.17.1
#4 lore raw

PATCH 4/6 hyperv: allow passing arbitrary data to sint ack callback

In reply to Roman Kagan

Make sint ack callback accept an opaque pointer, that is stored on sint_route at creation time.

This allows for more convenient interaction with the callback.

Besides, nothing outside hyperv.c should need to know the layout of HvSintRoute fields any more so its declaration can be removed from the header.

---
 target/i386/hyperv.h     | 14 +++-----------
 hw/misc/hyperv_testdev.c |  2 +-
 target/i386/hyperv.c     | 16 ++++++++++++++--
 3 files changed, 18 insertions(+), 14 deletions(-)
target/i386/hyperv.h +3 -11
index 00c9b454bb..93f7300dd6 100644
@@ -19,21 +19,13 @@
 #include "qemu/event_notifier.h"
 
 typedef struct HvSintRoute HvSintRoute;
-typedef void (*HvSintAckClb)(HvSintRoute *sint_route);
-
-struct HvSintRoute {
-    uint32_t sint;
-    uint32_t vp_index;
-    int gsi;
-    EventNotifier sint_set_notifier;
-    EventNotifier sint_ack_notifier;
-    HvSintAckClb sint_ack_clb;
-};
+typedef void (*HvSintAckClb)(void *data);
 
 int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit);
 
 HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
-                                      HvSintAckClb sint_ack_clb);
+                                      HvSintAckClb sint_ack_clb,
+                                      void *sint_ack_clb_data);
 
 void kvm_hv_sint_route_destroy(HvSintRoute *sint_route);
 
hw/misc/hyperv_testdev.c +1 -1
index de07d7e8c3..50dfa6af64 100644
@@ -56,7 +56,7 @@ static void sint_route_create(HypervTestDev *dev,
     sint_route->vp_index = vp_index;
     sint_route->sint = sint;
 
-    sint_route->sint_route = kvm_hv_sint_route_create(vp_index, sint, NULL);
+    sint_route->sint_route = kvm_hv_sint_route_create(vp_index, sint, NULL, NULL);
     assert(sint_route->sint_route);
 
     QLIST_INSERT_HEAD(&dev->sint_routes, sint_route, le);
target/i386/hyperv.c +14 -2
index acdb0ca9df..11fd1add2c 100644
@@ -16,6 +16,16 @@
 #include "hyperv.h"
 #include "hyperv-proto.h"
 
+struct HvSintRoute {
+    uint32_t sint;
+    uint32_t vp_index;
+    int gsi;
+    EventNotifier sint_set_notifier;
+    EventNotifier sint_ack_notifier;
+    HvSintAckClb sint_ack_clb;
+    void *sint_ack_clb_data;
+};
+
 uint32_t hyperv_vp_index(X86CPU *cpu)
 {
     return CPU(cpu)->cpu_index;
@@ -77,11 +87,12 @@ static void kvm_hv_sint_ack_handler(EventNotifier *notifier)
     HvSintRoute *sint_route = container_of(notifier, HvSintRoute,
                                            sint_ack_notifier);
     event_notifier_test_and_clear(notifier);
-    sint_route->sint_ack_clb(sint_route);
+    sint_route->sint_ack_clb(sint_route->sint_ack_clb_data);
 }
 
 HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
-                                      HvSintAckClb sint_ack_clb)
+                                      HvSintAckClb sint_ack_clb,
+                                      void *sint_ack_clb_data)
 {
     HvSintRoute *sint_route;
     EventNotifier *ack_notifier;
@@ -116,6 +127,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
     }
     sint_route->gsi = gsi;
     sint_route->sint_ack_clb = sint_ack_clb;
+    sint_route->sint_ack_clb_data = sint_ack_clb_data;
     sint_route->vp_index = vp_index;
     sint_route->sint = sint;
 
Signature · 1 line
2.17.1
#5 lore raw

PATCH 5/6 hyperv: address HvSintRoute by X86CPU pointer

In reply to Roman Kagan

Use X86CPU pointer to refer to the respective HvSintRoute instead of vp_index. This is more convenient and also paves the way for future enhancements.

---
 target/i386/hyperv.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
target/i386/hyperv.c +8 -2
index 11fd1add2c..0ce8a7aa2f 100644
@@ -18,7 +18,7 @@
 
 struct HvSintRoute {
     uint32_t sint;
-    uint32_t vp_index;
+    X86CPU *cpu;
     int gsi;
     EventNotifier sint_set_notifier;
     EventNotifier sint_ack_notifier;
@@ -97,6 +97,12 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
     HvSintRoute *sint_route;
     EventNotifier *ack_notifier;
     int r, gsi;
+    X86CPU *cpu;
+
+    cpu = hyperv_find_vcpu(vp_index);
+    if (!cpu) {
+        return NULL;
+    }
 
     sint_route = g_new0(HvSintRoute, 1);
     r = event_notifier_init(&sint_route->sint_set_notifier, false);
@@ -128,7 +134,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
     sint_route->gsi = gsi;
     sint_route->sint_ack_clb = sint_ack_clb;
     sint_route->sint_ack_clb_data = sint_ack_clb_data;
-    sint_route->vp_index = vp_index;
+    sint_route->cpu = cpu;
     sint_route->sint = sint;
 
     return sint_route;
Signature · 1 line
2.17.1
#6 lore raw

PATCH 6/6 hyperv: make HvSintRoute reference-counted

In reply to Roman Kagan

Multiple entities (e.g. VMBus devices) can use the same SINT route. To make their lives easier in maintaining SINT route ownership, make it reference-counted. Adjust the respective API names accordingly.

---
 target/i386/hyperv.h     | 10 +++++-----
 hw/misc/hyperv_testdev.c |  4 ++--
 target/i386/hyperv.c     | 25 +++++++++++++++++++++----
 3 files changed, 28 insertions(+), 11 deletions(-)
target/i386/hyperv.h +5 -5
index 93f7300dd6..af5fc05ea4 100644
@@ -23,11 +23,11 @@ typedef void (*HvSintAckClb)(void *data);
 
 int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit);
 
-HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
-                                      HvSintAckClb sint_ack_clb,
-                                      void *sint_ack_clb_data);
-
-void kvm_hv_sint_route_destroy(HvSintRoute *sint_route);
+HvSintRoute *hyperv_sint_route_new(uint32_t vp_index, uint32_t sint,
+                                   HvSintAckClb sint_ack_clb,
+                                   void *sint_ack_clb_data);
+void hyperv_sint_route_ref(HvSintRoute *sint_route);
+void hyperv_sint_route_unref(HvSintRoute *sint_route);
 
 int kvm_hv_sint_route_set_sint(HvSintRoute *sint_route);
 
hw/misc/hyperv_testdev.c +2 -2
index 50dfa6af64..d29201b5ee 100644
@@ -56,7 +56,7 @@ static void sint_route_create(HypervTestDev *dev,
     sint_route->vp_index = vp_index;
     sint_route->sint = sint;
 
-    sint_route->sint_route = kvm_hv_sint_route_create(vp_index, sint, NULL, NULL);
+    sint_route->sint_route = hyperv_sint_route_new(vp_index, sint, NULL, NULL);
     assert(sint_route->sint_route);
 
     QLIST_INSERT_HEAD(&dev->sint_routes, sint_route, le);
@@ -83,7 +83,7 @@ static void sint_route_destroy(HypervTestDev *dev,
 
     sint_route = sint_route_find(dev, vp_index, sint);
     QLIST_REMOVE(sint_route, le);
-    kvm_hv_sint_route_destroy(sint_route->sint_route);
+    hyperv_sint_route_unref(sint_route->sint_route);
     g_free(sint_route);
 }
 
target/i386/hyperv.c +21 -4
index 0ce8a7aa2f..4d8ef6f2da 100644
@@ -24,6 +24,7 @@ struct HvSintRoute {
     EventNotifier sint_ack_notifier;
     HvSintAckClb sint_ack_clb;
     void *sint_ack_clb_data;
+    unsigned refcount;
 };
 
 uint32_t hyperv_vp_index(X86CPU *cpu)
@@ -90,9 +91,9 @@ static void kvm_hv_sint_ack_handler(EventNotifier *notifier)
     sint_route->sint_ack_clb(sint_route->sint_ack_clb_data);
 }
 
-HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
-                                      HvSintAckClb sint_ack_clb,
-                                      void *sint_ack_clb_data)
+HvSintRoute *hyperv_sint_route_new(uint32_t vp_index, uint32_t sint,
+                                   HvSintAckClb sint_ack_clb,
+                                   void *sint_ack_clb_data)
 {
     HvSintRoute *sint_route;
     EventNotifier *ack_notifier;
@@ -136,6 +137,7 @@ HvSintRoute *kvm_hv_sint_route_create(uint32_t vp_index, uint32_t sint,
     sint_route->sint_ack_clb_data = sint_ack_clb_data;
     sint_route->cpu = cpu;
     sint_route->sint = sint;
+    sint_route->refcount = 1;
 
     return sint_route;
 
@@ -154,8 +156,23 @@ err:
     return NULL;
 }
 
-void kvm_hv_sint_route_destroy(HvSintRoute *sint_route)
+void hyperv_sint_route_ref(HvSintRoute *sint_route)
 {
+    sint_route->refcount++;
+}
+
+void hyperv_sint_route_unref(HvSintRoute *sint_route)
+{
+    if (!sint_route) {
+        return;
+    }
+
+    assert(sint_route->refcount > 0);
+
+    if (--sint_route->refcount) {
+        return;
+    }
+
     kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state,
                                           &sint_route->sint_set_notifier,
                                           sint_route->gsi);
Signature · 1 line
2.17.1
#7 lore raw
In reply to Roman Kagan
Quoted 8 lines · Roman Kagan

This series modifies the management of HvSintRoute, which is an important building block in Hyper-V emulation infrastructure, to make it easier to maintain and enhance, and paves the way to the more complete Synthetic Interrupt Controller (SynIC) emulation.

This series applies on top of "[PATCH 0/2] hyperv: ensure VP index equal to QEMU cpu_index" series (message-id:
<[email protected]>).

Rewriting that in a form that patchew can parse:

Based-on: [email protected]

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#8 lore raw

[Qemu-devel] patchew header docs [was: Re: [PATCH 0/6] hyperv: refactor HvSintRoute management]

Quoted 6 lines · Eric Blake
Quoted 5 lines · Roman Kagan

This series modifies the management of HvSintRoute, which is an important building block in Hyper-V emulation infrastructure, to make it easier to maintain and enhance, and paves the way to the more complete Synthetic Interrupt Controller (SynIC) emulation.

Quoted 7 lines
Quoted 3 lines

This series applies on top of "[PATCH 0/2] hyperv: ensure VP index equal to QEMU cpu_index" series (message-id:
<[email protected]>).

Rewriting that in a form that patchew can parse:

Based-on: [email protected]

Thanks!

Are patchew-recognized headers documented anywhere?

Roman.

#9 lore raw

Re: [Qemu-devel] patchew header docs [was: Re: [PATCH 0/6] hyperv: refactor HvSintRoute management]

Quoted 11 lines · Roman Kagan
Quoted 10 lines · Eric Blake
Quoted 8 lines · Roman Kagan

This series modifies the management of HvSintRoute, which is an important building block in Hyper-V emulation infrastructure, to make it easier to maintain and enhance, and paves the way to the more complete Synthetic Interrupt Controller (SynIC) emulation.

This series applies on top of "[PATCH 0/2] hyperv: ensure VP index equal to QEMU cpu_index" series (message-id:
<[email protected]>).

Quoted 7 lines
Quoted 3 lines

Rewriting that in a form that patchew can parse:

Based-on: [email protected]

Thanks!

Are patchew-recognized headers documented anywhere?

No dedicated documentation so far becasue the only recognized syntax is this "^Based-on: $MESSAGE_ID$" line, which is mentioned in

https://wiki.qemu.org/Contribute/SubmitAPatch

There are requests to support more, such as the git base tree information:

https://github.com/patchew-project/patchew/issues/79

and once we get there, we'll find a better place to document these features so that people can read about it more easily.

Fam

#10 lore raw

Re: [Qemu-devel] patchew header docs [was: Re: [PATCH 0/6] hyperv: refactor HvSintRoute management]

Quoted 14 lines · Fam Zheng
Quoted 13 lines · Roman Kagan
Quoted 12 lines · Eric Blake
Quoted 8 lines · Roman Kagan

This series modifies the management of HvSintRoute, which is an important building block in Hyper-V emulation infrastructure, to make it easier to maintain and enhance, and paves the way to the more complete Synthetic Interrupt Controller (SynIC) emulation.

This series applies on top of "[PATCH 0/2] hyperv: ensure VP index equal to QEMU cpu_index" series (message-id:
<[email protected]>).

Rewriting that in a form that patchew can parse:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Based-on: [email protected]

Thanks!

Are patchew-recognized headers documented anywhere?

No dedicated documentation so far becasue the only recognized syntax is this "^Based-on: $MESSAGE_ID$" line, which is mentioned in

I seem to recall that "^Based-on: $URL$" also works, when $URL points to a message within https://lists.gnu.org/archive/html/qemu-devel/ (at least, I've used it in a few cases, rather than further looking up the translation from $URL to $MESSAGE_ID myself).

Quoted 6 lines

https://wiki.qemu.org/Contribute/SubmitAPatch

There are requests to support more, such as the git base tree information:

https://github.com/patchew-project/patchew/issues/79

And if my recollection was wrong, adding $URL support would be one of those requests, and perhaps ought to be given an issue so we don't forget it.

Quoted 6 lines

and once we get there, we'll find a better place to document these features so that people can read about it more easily.

Fam

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org
#11 lore raw

Re: [Qemu-devel] patchew header docs [was: Re: [PATCH 0/6] hyperv: refactor HvSintRoute management]

Quoted 30 lines · Eric Blake
Quoted 14 lines · Fam Zheng
Quoted 13 lines · Roman Kagan
Quoted 12 lines · Eric Blake
Quoted 8 lines · Roman Kagan

This series modifies the management of HvSintRoute, which is an important building block in Hyper-V emulation infrastructure, to make it easier to maintain and enhance, and paves the way to the more complete Synthetic Interrupt Controller (SynIC) emulation.

This series applies on top of "[PATCH 0/2] hyperv: ensure VP index equal to QEMU cpu_index" series (message-id:
<[email protected]>).

Rewriting that in a form that patchew can parse:

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Based-on: [email protected]

Thanks!

Are patchew-recognized headers documented anywhere?

No dedicated documentation so far becasue the only recognized syntax is this "^Based-on: $MESSAGE_ID$" line, which is mentioned in

I seem to recall that "^Based-on: $URL$" also works, when $URL points to a message within https://lists.gnu.org/archive/html/qemu-devel/ (at least, I've used it in a few cases, rather than further looking up the translation from $URL to $MESSAGE_ID myself).

Quoted 1 line
Quoted 8 lines
Quoted 5 lines

https://wiki.qemu.org/Contribute/SubmitAPatch

There are requests to support more, such as the git base tree information:

https://github.com/patchew-project/patchew/issues/79

And if my recollection was wrong, adding $URL support would be one of those requests, and perhaps ought to be given an issue so we don't forget it.

I've created one now:

https://github.com/patchew-project/patchew/issues/84

Thanks,
Fam