summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-06-11 12:15:51 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-06-11 12:15:51 -0500
commit3525c42fd3b70182b1f98d74439e8aeabb565803 (patch)
treecec952b64cbf2222bb0817ea1fc181cc021af6f8
parent39cde84517ce1bcef294dc9e9e0940475c46fab2 (diff)
parent263ddcc81bf45d475ef86100a8567b3fb2129b8d (diff)
downloadqemu-3525c42fd3b70182b1f98d74439e8aeabb565803.tar.gz
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches: configure: report missing libraries for virtfs trace/simple.c: fix deprecated glib2 interface Clarify comments of tb_invalidate_phys_[page_]range
-rwxr-xr-xconfigure3
-rw-r--r--exec.c22
-rw-r--r--trace/simple.c5
3 files changed, 18 insertions, 12 deletions
diff --git a/configure b/configure
index dd0d2b3b11..c2366eef45 100755
--- a/configure
+++ b/configure
@@ -2916,7 +2916,8 @@ if test "$softmmu" = yes ; then
tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
else
if test "$virtfs" = yes; then
- feature_not_found "virtfs"
+ echo "VirtFS is supported only on Linux and requires libcap-devel and libattr-devel"
+ exit 1
fi
virtfs=no
fi
diff --git a/exec.c b/exec.c
index a587e7a122..5c9b7627bf 100644
--- a/exec.c
+++ b/exec.c
@@ -1076,11 +1076,11 @@ TranslationBlock *tb_gen_code(CPUArchState *env,
}
/*
- * invalidate all TBs which intersect with the target physical pages
- * starting in range [start;end[. NOTE: start and end may refer to
- * different physical pages. 'is_cpu_write_access' should be true if called
- * from a real cpu write access: the virtual CPU will exit the current
- * TB if code is modified inside this TB.
+ * Invalidate all TBs which intersect with the target physical address range
+ * [start;end[. NOTE: start and end may refer to *different* physical pages.
+ * 'is_cpu_write_access' should be true if called from a real cpu write
+ * access: the virtual CPU will exit the current TB if code is modified inside
+ * this TB.
*/
void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end,
int is_cpu_write_access)
@@ -1092,11 +1092,13 @@ void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end,
}
}
-/* invalidate all TBs which intersect with the target physical page
- starting in range [start;end[. NOTE: start and end must refer to
- the same physical page. 'is_cpu_write_access' should be true if called
- from a real cpu write access: the virtual CPU will exit the current
- TB if code is modified inside this TB. */
+/*
+ * Invalidate all TBs which intersect with the target physical address range
+ * [start;end[. NOTE: start and end must refer to the *same* physical page.
+ * 'is_cpu_write_access' should be true if called from a real cpu write
+ * access: the virtual CPU will exit the current TB if code is modified inside
+ * this TB.
+ */
void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
int is_cpu_write_access)
{
diff --git a/trace/simple.c b/trace/simple.c
index 33ae48696d..b4a3c6e950 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -161,8 +161,11 @@ static void trace(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3,
}
timestamp = get_clock();
-
+#if GLIB_CHECK_VERSION(2, 30, 0)
+ idx = g_atomic_int_add((gint *)&trace_idx, 1) % TRACE_BUF_LEN;
+#else
idx = g_atomic_int_exchange_and_add((gint *)&trace_idx, 1) % TRACE_BUF_LEN;
+#endif
trace_buf[idx] = (TraceRecord){
.event = event,
.timestamp_ns = timestamp,