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
This commit is contained in:
Anthony Liguori 2012-06-11 12:15:51 -05:00
commit 3525c42fd3
3 changed files with 18 additions and 12 deletions

3
configure vendored
View File

@ -2916,7 +2916,8 @@ if test "$softmmu" = yes ; then
tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)" tools="$tools fsdev/virtfs-proxy-helper\$(EXESUF)"
else else
if test "$virtfs" = yes; then 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 fi
virtfs=no virtfs=no
fi fi

22
exec.c
View File

@ -1076,11 +1076,11 @@ TranslationBlock *tb_gen_code(CPUArchState *env,
} }
/* /*
* invalidate all TBs which intersect with the target physical pages * Invalidate all TBs which intersect with the target physical address range
* starting in range [start;end[. NOTE: start and end may refer to * [start;end[. NOTE: start and end may refer to *different* physical pages.
* different physical pages. 'is_cpu_write_access' should be true if called * 'is_cpu_write_access' should be true if called from a real cpu write
* from a real cpu write access: the virtual CPU will exit the current * access: the virtual CPU will exit the current TB if code is modified inside
* TB if code is modified inside this TB. * this TB.
*/ */
void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end, void tb_invalidate_phys_range(tb_page_addr_t start, tb_page_addr_t end,
int is_cpu_write_access) 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 * Invalidate all TBs which intersect with the target physical address range
the same physical page. 'is_cpu_write_access' should be true if called * [start;end[. NOTE: start and end must refer to the *same* physical page.
from a real cpu write access: the virtual CPU will exit the current * 'is_cpu_write_access' should be true if called from a real cpu write
TB if code is modified inside this TB. */ * 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, void tb_invalidate_phys_page_range(tb_page_addr_t start, tb_page_addr_t end,
int is_cpu_write_access) int is_cpu_write_access)
{ {

View File

@ -161,8 +161,11 @@ static void trace(TraceEventID event, uint64_t x1, uint64_t x2, uint64_t x3,
} }
timestamp = get_clock(); 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; idx = g_atomic_int_exchange_and_add((gint *)&trace_idx, 1) % TRACE_BUF_LEN;
#endif
trace_buf[idx] = (TraceRecord){ trace_buf[idx] = (TraceRecord){
.event = event, .event = event,
.timestamp_ns = timestamp, .timestamp_ns = timestamp,