qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 01/66] int128: optimize and add test cases
Date: Thu,  4 Jul 2013 17:12:57 +0200	[thread overview]
Message-ID: <1372950842-32422-2-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1372950842-32422-1-git-send-email-pbonzini@redhat.com>

For add, the carry only requires checking one of the arguments.
For sub and neg, we can similarly optimize computation of the
carry.

For ge, we can just do lexicographic order.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/qemu/int128.h |  25 ++++--
 tests/Makefile        |   6 +-
 tests/test-int128.c   | 212 ++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 234 insertions(+), 9 deletions(-)
 create mode 100644 tests/test-int128.c

diff --git a/include/qemu/int128.h b/include/qemu/int128.h
index bfe7678..9ed47aa 100644
--- a/include/qemu/int128.h
+++ b/include/qemu/int128.h
@@ -1,6 +1,10 @@
 #ifndef INT128_H
 #define INT128_H
 
+#include <assert.h>
+#include <stdint.h>
+#include <stdbool.h>
+
 typedef struct Int128 Int128;
 
 struct Int128 {
@@ -55,21 +59,26 @@ static inline Int128 int128_rshift(Int128 a, int n)
 
 static inline Int128 int128_add(Int128 a, Int128 b)
 {
-    Int128 r = { a.lo + b.lo, a.hi + b.hi };
-    r.hi += (r.lo < a.lo) || (r.lo < b.lo);
-    return r;
+    uint64_t lo = a.lo + b.lo;
+
+    /* a.lo <= a.lo + b.lo < a.lo + k (k is the base, 2^64).  Hence,
+     * a.lo + b.lo >= k implies 0 <= lo = a.lo + b.lo - k < a.lo.
+     * Similarly, a.lo + b.lo < k implies a.lo <= lo = a.lo + b.lo < k.
+     *
+     * So the carry is lo < a.lo.
+     */
+    return (Int128) { lo, (uint64_t)a.hi + b.hi + (lo < a.lo) };
 }
 
 static inline Int128 int128_neg(Int128 a)
 {
-    a.lo = ~a.lo;
-    a.hi = ~a.hi;
-    return int128_add(a, int128_one());
+    uint64_t lo = -a.lo;
+    return (Int128) { lo, ~(uint64_t)a.hi + !lo };
 }
 
 static inline Int128 int128_sub(Int128 a, Int128 b)
 {
-    return int128_add(a, int128_neg(b));
+    return (Int128){ a.lo - b.lo, a.hi - b.hi - (a.lo < b.lo) };
 }
 
 static inline bool int128_nonneg(Int128 a)
@@ -89,7 +98,7 @@ static inline bool int128_ne(Int128 a, Int128 b)
 
 static inline bool int128_ge(Int128 a, Int128 b)
 {
-    return int128_nonneg(int128_sub(a, b));
+    return a.hi > b.hi || (a.hi == b.hi && a.lo >= b.lo);
 }
 
 static inline bool int128_lt(Int128 a, Int128 b)
diff --git a/tests/Makefile b/tests/Makefile
index c107489..279d5f8 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -44,6 +44,9 @@ check-unit-y += tests/test-cutils$(EXESUF)
 gcov-files-test-cutils-y += util/cutils.c
 check-unit-y += tests/test-mul64$(EXESUF)
 gcov-files-test-mul64-y = util/host-utils.c
+check-unit-y += tests/test-int128$(EXESUF)
+# all code tested by test-int128 is inside int128.h
+gcov-files-test-int128-y =
 
 check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh
 
@@ -75,7 +78,7 @@ test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \
 	tests/test-string-input-visitor.o tests/test-qmp-output-visitor.o \
 	tests/test-qmp-input-visitor.o tests/test-qmp-input-strict.o \
 	tests/test-qmp-commands.o tests/test-visitor-serialization.o \
-	tests/test-x86-cpuid.o tests/test-mul64.o
+	tests/test-x86-cpuid.o tests/test-mul64.o tests/test-int128.o
 
 test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o
 
@@ -98,6 +101,7 @@ tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o libqemuutil.a libqemustub.a
 tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o
 tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o xbzrle.o page_cache.o libqemuutil.a
 tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o
+tests/test-int128$(EXESUF): tests/test-int128.o
 
 tests/test-qapi-types.c tests/test-qapi-types.h :\
 $(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
diff --git a/tests/test-int128.c b/tests/test-int128.c
new file mode 100644
index 0000000..5aca032
--- /dev/null
+++ b/tests/test-int128.c
@@ -0,0 +1,212 @@
+/*
+ * Test Int128 arithmetic
+ *
+ * This work is licensed under the terms of the GNU LGPL, version 2 or later.
+ * See the COPYING.LIB file in the top-level directory.
+ *
+ */
+
+#include <glib.h>
+#include <stdio.h>
+#include "qemu/int128.h"
+#include "qemu/osdep.h"
+
+static uint32_t tests[8] = {
+    0x00000000, 0x00000001, 0x7FFFFFFE, 0x7FFFFFFF,
+    0x80000000, 0x80000001, 0xFFFFFFFE, 0xFFFFFFFF,
+};
+
+#define LOW    3ULL
+#define HIGH   (1ULL << 63)
+#define MIDDLE (-1ULL & ~LOW & ~HIGH)
+
+static uint64_t expand16(unsigned x)
+{
+    return (x & LOW) | ((x & 4) ? MIDDLE : 0) | (x & 0x8000 ? HIGH : 0);
+}
+
+static Int128 expand(uint32_t x)
+{
+    uint64_t l, h;
+    l = expand16(x & 65535);
+    h = expand16(x >> 16);
+    return (Int128) {l, h};
+};
+
+static void test_and(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            Int128 a = expand(tests[i]);
+            Int128 b = expand(tests[j]);
+            Int128 r = expand(tests[i] & tests[j]);
+            Int128 s = int128_and(a, b);
+            g_assert_cmpuint(r.lo, ==, s.lo);
+            g_assert_cmpuint(r.hi, ==, s.hi);
+        }
+    }
+}
+
+static void test_add(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            Int128 a = expand(tests[i]);
+            Int128 b = expand(tests[j]);
+            Int128 r = expand(tests[i] + tests[j]);
+            Int128 s = int128_add(a, b);
+            g_assert_cmpuint(r.lo, ==, s.lo);
+            g_assert_cmpuint(r.hi, ==, s.hi);
+        }
+    }
+}
+
+static void test_sub(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            Int128 a = expand(tests[i]);
+            Int128 b = expand(tests[j]);
+            Int128 r = expand(tests[i] - tests[j]);
+            Int128 s = int128_sub(a, b);
+            g_assert_cmpuint(r.lo, ==, s.lo);
+            g_assert_cmpuint(r.hi, ==, s.hi);
+        }
+    }
+}
+
+static void test_neg(void)
+{
+    int i;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        Int128 a = expand(tests[i]);
+        Int128 r = expand(-tests[i]);
+        Int128 s = int128_neg(a);
+        g_assert_cmpuint(r.lo, ==, s.lo);
+        g_assert_cmpuint(r.hi, ==, s.hi);
+    }
+}
+
+static void test_nz(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            Int128 a = expand(tests[i]);
+            g_assert_cmpuint(int128_nz(a), ==, tests[i] != 0);
+        }
+    }
+}
+
+static void test_le(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            /* Signed comparison */
+            int32_t a = (int32_t) tests[i];
+            int32_t b = (int32_t) tests[j];
+            g_assert_cmpuint(int128_le(expand(a), expand(b)), ==, a <= b);
+        }
+    }
+}
+
+static void test_lt(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            /* Signed comparison */
+            int32_t a = (int32_t) tests[i];
+            int32_t b = (int32_t) tests[j];
+            g_assert_cmpuint(int128_lt(expand(a), expand(b)), ==, a < b);
+        }
+    }
+}
+
+static void test_ge(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            /* Signed comparison */
+            int32_t a = (int32_t) tests[i];
+            int32_t b = (int32_t) tests[j];
+            g_assert_cmpuint(int128_ge(expand(a), expand(b)), ==, a >= b);
+        }
+    }
+}
+
+static void test_gt(void)
+{
+    int i, j;
+
+    for (i = 0; i < ARRAY_SIZE(tests); ++i) {
+        for (j = 0; j < ARRAY_SIZE(tests); ++j) {
+            /* Signed comparison */
+            int32_t a = (int32_t) tests[i];
+            int32_t b = (int32_t) tests[j];
+            g_assert_cmpuint(int128_gt(expand(a), expand(b)), ==, a > b);
+        }
+    }
+}
+
+/* Make sure to test undefined behavior at runtime! */
+
+static void __attribute__((__noinline__, __noclone__))
+test_rshift_one(uint32_t x, int n, uint64_t h, uint64_t l)
+{
+    Int128 a = expand(x);
+    Int128 r = int128_rshift(a, n);
+    g_assert_cmpuint(r.lo, ==, l);
+    g_assert_cmpuint(r.hi, ==, h);
+}
+
+static void test_rshift(void)
+{
+    test_rshift_one(0x00010000U, 64, 0x0000000000000000ULL, 0x0000000000000001ULL);
+    test_rshift_one(0x80010000U, 64, 0xFFFFFFFFFFFFFFFFULL, 0x8000000000000001ULL);
+    test_rshift_one(0x7FFE0000U, 64, 0x0000000000000000ULL, 0x7FFFFFFFFFFFFFFEULL);
+    test_rshift_one(0xFFFE0000U, 64, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFFEULL);
+    test_rshift_one(0x00010000U, 60, 0x0000000000000000ULL, 0x0000000000000010ULL);
+    test_rshift_one(0x80010000U, 60, 0xFFFFFFFFFFFFFFF8ULL, 0x0000000000000010ULL);
+    test_rshift_one(0x00018000U, 60, 0x0000000000000000ULL, 0x0000000000000018ULL);
+    test_rshift_one(0x80018000U, 60, 0xFFFFFFFFFFFFFFF8ULL, 0x0000000000000018ULL);
+    test_rshift_one(0x7FFE0000U, 60, 0x0000000000000007ULL, 0xFFFFFFFFFFFFFFE0ULL);
+    test_rshift_one(0xFFFE0000U, 60, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFE0ULL);
+    test_rshift_one(0x7FFE8000U, 60, 0x0000000000000007ULL, 0xFFFFFFFFFFFFFFE8ULL);
+    test_rshift_one(0xFFFE8000U, 60, 0xFFFFFFFFFFFFFFFFULL, 0xFFFFFFFFFFFFFFE8ULL);
+    test_rshift_one(0x00018000U,  0, 0x0000000000000001ULL, 0x8000000000000000ULL);
+    test_rshift_one(0x80018000U,  0, 0x8000000000000001ULL, 0x8000000000000000ULL);
+    test_rshift_one(0x7FFE0000U,  0, 0x7FFFFFFFFFFFFFFEULL, 0x0000000000000000ULL);
+    test_rshift_one(0xFFFE0000U,  0, 0xFFFFFFFFFFFFFFFEULL, 0x0000000000000000ULL);
+    test_rshift_one(0x7FFE8000U,  0, 0x7FFFFFFFFFFFFFFEULL, 0x8000000000000000ULL);
+    test_rshift_one(0xFFFE8000U,  0, 0xFFFFFFFFFFFFFFFEULL, 0x8000000000000000ULL);
+}
+
+int main(int argc, char **argv)
+{
+    g_test_init(&argc, &argv, NULL);
+    g_test_add_func("/int128/int128_and", test_and);
+    g_test_add_func("/int128/int128_add", test_add);
+    g_test_add_func("/int128/int128_sub", test_sub);
+    g_test_add_func("/int128/int128_neg", test_neg);
+    g_test_add_func("/int128/int128_nz", test_nz);
+    g_test_add_func("/int128/int128_le", test_le);
+    g_test_add_func("/int128/int128_lt", test_lt);
+    g_test_add_func("/int128/int128_ge", test_ge);
+    g_test_add_func("/int128/int128_gt", test_gt);
+    g_test_add_func("/int128/int128_rshift", test_rshift);
+    return g_test_run();
+}
-- 
1.8.1.4

  reply	other threads:[~2013-07-04 15:14 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04 15:12 [Qemu-devel] [PULL 00/66] Memory API changes for 1.6: ownership, I/O ports, RCU preparation Paolo Bonzini
2013-07-04 15:12 ` Paolo Bonzini [this message]
2013-07-04 15:12 ` [Qemu-devel] [PATCH 02/66] scsi: keep device alive while it has requests Paolo Bonzini
2013-07-04 15:12 ` [Qemu-devel] [PATCH 03/66] dma: keep a device alive while it has SGLists Paolo Bonzini
2013-07-04 15:51   ` Jan Kiszka
2013-07-04 15:59     ` Jan Kiszka
2013-07-04 16:00     ` Paolo Bonzini
2013-07-04 16:17       ` Jan Kiszka
2013-07-04 15:13 ` [Qemu-devel] [PATCH 04/66] adlib: replace register_ioport* Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 05/66] applesmc: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 06/66] wdt_ib700: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 07/66] i82374: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 08/66] prep: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 09/66] vt82c686: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 10/66] Privatize register_ioport_read/write Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 11/66] isa: implement isa_is_ioport_assigned via memory_region_find Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 12/66] vmware-vga: Accept unaligned I/O accesses Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 13/66] xen: Mark fixed platform I/O as unaligned Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 14/66] ioport: Switch dispatching to memory core layer Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 15/66] ioport: Remove unused old dispatching services Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 16/66] vmport: Disentangle read handler type from portio Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 17/66] ioport: Move portio types to ioport.h Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 19/66] memory: destroy phys_sections one by one Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 20/66] exec: simplify destruction of the phys map Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 21/66] memory: add getter for owner Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 22/66] memory: add ref/unref Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 23/66] memory: introduce memory_region_present Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 24/66] memory: add ref/unref calls Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 25/66] exec: check MRU in qemu_ram_addr_from_host Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 26/66] exec: move qemu_ram_addr_from_host_nofail to cputlb.c Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 27/66] memory: return MemoryRegion from qemu_ram_addr_from_host Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 28/66] exec: reorganize address_space_map Paolo Bonzini
2013-07-08  8:21   ` Peter Maydell
2013-07-04 15:13 ` [Qemu-devel] [PATCH 29/66] memory: ref/unref memory across address_space_map/unmap Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 30/66] escc: rename struct to ESCCState Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 31/66] vga: pass owner to vga_init Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 32/66] vga: pass owner to vga_common_init Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 33/66] vga: pass owner to cirrus_init_common Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 34/66] vga: pass owner to vga_init_vbe Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 35/66] vga: pass owner to vga_init_io Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 36/66] vga: set owner in vga_update_memory_access Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 37/66] ne2000: pass device to ne2000_setup_io, use it as owner Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 38/66] vfio: pass device to vfio_mmap_bar and use it to set owner Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 39/66] spapr_iommu: pass device to spapr_tce_new_table " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 40/66] pam: pass device to init_pam " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 41/66] piolist: add owner argument to initialization functions and pass devices Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 42/66] hw/a*: pass owner to memory_region_init* functions Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 43/66] hw/block: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 44/66] hw/c*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 45/66] hw/d*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 46/66] hw/gpio: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 47/66] hw/i*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 48/66] hw/m*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 49/66] hw/n*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 50/66] hw/p*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 51/66] hw/s*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 52/66] hw/t*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 53/66] hw/[u-x]*: " Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 54/66] add a header file for atomic operations Paolo Bonzini
2013-10-20 16:20   ` Peter Maydell
2013-10-21  6:06     ` Paolo Bonzini
2013-10-21 13:53       ` Peter Maydell
2013-10-22  5:45         ` Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 55/66] memory: access FlatView from a local variable Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 56/66] memory: use a new FlatView pointer on every topology update Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 57/66] memory: add reference counting to FlatView Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 58/66] qom: Use atomics for object refcounting Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 59/66] exec: change well-known physical sections to macros Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 60/66] exec: separate current memory map from the one being built Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 61/66] memory: move MemoryListener declaration earlier Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 62/66] exec: move listener from AddressSpaceDispatch to AddressSpace Paolo Bonzini
2013-07-04 15:13 ` [Qemu-devel] [PATCH 63/66] exec: separate current radix tree from the one being built Paolo Bonzini
2013-07-04 15:14 ` [Qemu-devel] [PATCH 64/66] exec: put memory map in AddressSpaceDispatch Paolo Bonzini
2013-07-04 15:14 ` [Qemu-devel] [PATCH 65/66] exec: remove cur_map Paolo Bonzini
2013-07-04 15:14 ` [Qemu-devel] [PATCH 66/66] exec: change some APIs to take AddressSpaceDispatch Paolo Bonzini
2013-07-04 15:52 ` [Qemu-devel] [PULL 00/66] Memory API changes for 1.6: ownership, I/O ports, RCU preparation Paolo Bonzini
2013-07-04 16:08   ` Paolo Bonzini
2013-07-08 13:20   ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372950842-32422-2-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).