* minor patches here and there
* MTTCG: lock-free TB lookup * SCSI: bugfixes for MPTSAS, MegaSAS, LSI53c, vmw_pvscsi * buffer_is_zero rewrite (except for one patch) * chardev: qemu_chr_fe_write checks * checkpatch improvement for markdown preformatted text * default-configs cleanups * atomics cleanups -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJX2DP2AAoJEL/70l94x66DIBYH/2pW+/HYexCobNn9eVD0Wm08 im0mRHIU0vjfTaeZSasJPXvA2FyYQLl9KnSFvUFcRiLILpp+hE3QdZ8o0QGlfAmE +5MWsPJDXMbOaCOfMKZpZvPfJ6q/lSTg6eiJTPiRgyU7fQgjMDAot1s44ETYGVRu myeheEvjSwm/aT9sRIUK6KC7LWXGHFYRYzYJDnvoN6svHZ10DcEDhve8bdmixFk0 0zUY4RmPk8n46SntDG65tgAlKlzfSuPOesvbpcQIYe1H+r+uJt9BST7MjKdbdDQv b/LDzMx8CTbd2tDPL6JWgjBGBZ6SZ4Q6x0a45kzJRtkS+BPtNeGGzBVwULVN4RY= =eAJS -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging * minor patches here and there * MTTCG: lock-free TB lookup * SCSI: bugfixes for MPTSAS, MegaSAS, LSI53c, vmw_pvscsi * buffer_is_zero rewrite (except for one patch) * chardev: qemu_chr_fe_write checks * checkpatch improvement for markdown preformatted text * default-configs cleanups * atomics cleanups # gpg: Signature made Tue 13 Sep 2016 18:14:30 BST # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: (58 commits) cutils: Add generic prefetch cutils: Add SSE4 version cutils: Add test for buffer_is_zero cutils: Remove ppc buffer zero checking cutils: Remove aarch64 buffer zero checking cutils: Rearrange buffer_is_zero acceleration cutils: Export only buffer_is_zero cutils: Remove SPLAT macro cutils: Move buffer_is_zero and subroutines to a new file ppc: do not redefine CPUPPCState x86/lapic: Load LAPIC state at post_load optionrom: do not rely on compiler's bswap optimization checkpatch: Fix whitespace checks for documentation code blocks atomics: Use __atomic_*_n() variant primitives atomics: Remove redundant barrier()'s kvm-all: drop kvm_setup_guest_memory i8257: Make device "i8257" unavailable with -device Revert "megasas: remove useless check for cmd->frame" char: convert qemu_chr_fe_write to qemu_chr_fe_write_all hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Conflicts: cpus.c tests/Makefile.include
This commit is contained in:
commit
8212ff86f4
77 changed files with 885 additions and 643 deletions
|
|
@ -225,6 +225,8 @@ struct TranslationBlock {
|
|||
#define CF_USE_ICOUNT 0x20000
|
||||
#define CF_IGNORE_ICOUNT 0x40000 /* Do not generate icount code */
|
||||
|
||||
uint16_t invalid;
|
||||
|
||||
void *tc_ptr; /* pointer to the translated code */
|
||||
uint8_t *tc_search; /* pointer to search data */
|
||||
/* original tb when cflags has CF_NOCACHE */
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@
|
|||
#define PPC_FDT_H
|
||||
|
||||
#include "qemu/error-report.h"
|
||||
|
||||
typedef struct CPUPPCState CPUPPCState;
|
||||
#include "target-ppc/cpu-qom.h"
|
||||
|
||||
#define _FDT(exp) \
|
||||
do { \
|
||||
|
|
|
|||
|
|
@ -72,16 +72,16 @@
|
|||
* Add one here, and similarly in smp_rmb() and smp_read_barrier_depends().
|
||||
*/
|
||||
|
||||
#define smp_mb() ({ barrier(); __atomic_thread_fence(__ATOMIC_SEQ_CST); barrier(); })
|
||||
#define smp_wmb() ({ barrier(); __atomic_thread_fence(__ATOMIC_RELEASE); barrier(); })
|
||||
#define smp_rmb() ({ barrier(); __atomic_thread_fence(__ATOMIC_ACQUIRE); barrier(); })
|
||||
#define smp_mb() ({ barrier(); __atomic_thread_fence(__ATOMIC_SEQ_CST); })
|
||||
#define smp_wmb() ({ barrier(); __atomic_thread_fence(__ATOMIC_RELEASE); })
|
||||
#define smp_rmb() ({ barrier(); __atomic_thread_fence(__ATOMIC_ACQUIRE); })
|
||||
|
||||
/* Most compilers currently treat consume and acquire the same, but really
|
||||
* no processors except Alpha need a barrier here. Leave it in if
|
||||
* using Thread Sanitizer to avoid warnings, otherwise optimize it away.
|
||||
*/
|
||||
#if defined(__SANITIZE_THREAD__)
|
||||
#define smp_read_barrier_depends() ({ barrier(); __atomic_thread_fence(__ATOMIC_CONSUME); barrier(); })
|
||||
#define smp_read_barrier_depends() ({ barrier(); __atomic_thread_fence(__ATOMIC_CONSUME); })
|
||||
#elsif defined(__alpha__)
|
||||
#define smp_read_barrier_depends() asm volatile("mb":::"memory")
|
||||
#else
|
||||
|
|
@ -96,15 +96,12 @@
|
|||
#define atomic_read(ptr) \
|
||||
({ \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof_strip_qual(*ptr) _val; \
|
||||
__atomic_load(ptr, &_val, __ATOMIC_RELAXED); \
|
||||
_val; \
|
||||
__atomic_load_n(ptr, __ATOMIC_RELAXED); \
|
||||
})
|
||||
|
||||
#define atomic_set(ptr, i) do { \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof(*ptr) _val = (i); \
|
||||
__atomic_store(ptr, &_val, __ATOMIC_RELAXED); \
|
||||
__atomic_store_n(ptr, i, __ATOMIC_RELAXED); \
|
||||
} while(0)
|
||||
|
||||
/* See above: most compilers currently treat consume and acquire the
|
||||
|
|
@ -129,8 +126,7 @@
|
|||
|
||||
#define atomic_rcu_set(ptr, i) do { \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof(*ptr) _val = (i); \
|
||||
__atomic_store(ptr, &_val, __ATOMIC_RELEASE); \
|
||||
__atomic_store_n(ptr, i, __ATOMIC_RELEASE); \
|
||||
} while(0)
|
||||
|
||||
/* atomic_mb_read/set semantics map Java volatile variables. They are
|
||||
|
|
@ -153,9 +149,8 @@
|
|||
|
||||
#define atomic_mb_set(ptr, i) do { \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof(*ptr) _val = (i); \
|
||||
smp_wmb(); \
|
||||
__atomic_store(ptr, &_val, __ATOMIC_RELAXED); \
|
||||
__atomic_store_n(ptr, i, __ATOMIC_RELAXED); \
|
||||
smp_mb(); \
|
||||
} while(0)
|
||||
#else
|
||||
|
|
@ -169,8 +164,7 @@
|
|||
|
||||
#define atomic_mb_set(ptr, i) do { \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof(*ptr) _val = (i); \
|
||||
__atomic_store(ptr, &_val, __ATOMIC_SEQ_CST); \
|
||||
__atomic_store_n(ptr, i, __ATOMIC_SEQ_CST); \
|
||||
} while(0)
|
||||
#endif
|
||||
|
||||
|
|
@ -179,17 +173,15 @@
|
|||
|
||||
#define atomic_xchg(ptr, i) ({ \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof_strip_qual(*ptr) _new = (i), _old; \
|
||||
__atomic_exchange(ptr, &_new, &_old, __ATOMIC_SEQ_CST); \
|
||||
_old; \
|
||||
__atomic_exchange_n(ptr, i, __ATOMIC_SEQ_CST); \
|
||||
})
|
||||
|
||||
/* Returns the eventual value, failed or not */
|
||||
#define atomic_cmpxchg(ptr, old, new) \
|
||||
({ \
|
||||
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
|
||||
typeof_strip_qual(*ptr) _old = (old), _new = (new); \
|
||||
__atomic_compare_exchange(ptr, &_old, &_new, false, \
|
||||
typeof_strip_qual(*ptr) _old = (old); \
|
||||
__atomic_compare_exchange_n(ptr, &_old, new, false, \
|
||||
__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); \
|
||||
_old; \
|
||||
})
|
||||
|
|
|
|||
|
|
@ -168,9 +168,8 @@ int64_t qemu_strtosz_suffix_unit(const char *nptr, char **end,
|
|||
/* used to print char* safely */
|
||||
#define STR_OR_NULL(str) ((str) ? (str) : "null")
|
||||
|
||||
bool can_use_buffer_find_nonzero_offset(const void *buf, size_t len);
|
||||
size_t buffer_find_nonzero_offset(const void *buf, size_t len);
|
||||
bool buffer_is_zero(const void *buf, size_t len);
|
||||
bool test_buffer_is_zero_next_accel(void);
|
||||
|
||||
/*
|
||||
* Implementation of ULEB128 (http://en.wikipedia.org/wiki/LEB128)
|
||||
|
|
|
|||
|
|
@ -407,6 +407,7 @@ struct { \
|
|||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
(elm)->field.tqe_prev = NULL; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define QTAILQ_FOREACH(var, head, field) \
|
||||
|
|
@ -430,6 +431,7 @@ struct { \
|
|||
#define QTAILQ_EMPTY(head) ((head)->tqh_first == NULL)
|
||||
#define QTAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define QTAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
#define QTAILQ_IN_USE(elm, field) ((elm)->field.tqe_prev != NULL)
|
||||
|
||||
#define QTAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
|
|
|
|||
|
|
@ -22,23 +22,20 @@
|
|||
* @QEMU_CLOCK_REALTIME: Real time clock
|
||||
*
|
||||
* The real time clock should be used only for stuff which does not
|
||||
* change the virtual machine state, as it is run even if the virtual
|
||||
* machine is stopped. The real time clock has a frequency of 1000
|
||||
* Hz.
|
||||
* change the virtual machine state, as it runs even if the virtual
|
||||
* machine is stopped.
|
||||
*
|
||||
* @QEMU_CLOCK_VIRTUAL: virtual clock
|
||||
*
|
||||
* The virtual clock is only run during the emulation. It is stopped
|
||||
* when the virtual machine is stopped. Virtual timers use a high
|
||||
* precision clock, usually cpu cycles (use ticks_per_sec).
|
||||
* The virtual clock only runs during the emulation. It stops
|
||||
* when the virtual machine is stopped.
|
||||
*
|
||||
* @QEMU_CLOCK_HOST: host clock
|
||||
*
|
||||
* The host clock should be use for device models that emulate accurate
|
||||
* The host clock should be used for device models that emulate accurate
|
||||
* real time sources. It will continue to run when the virtual machine
|
||||
* is suspended, and it will reflect system time changes the host may
|
||||
* undergo (e.g. due to NTP). The host clock has the same precision as
|
||||
* the virtual clock.
|
||||
* undergo (e.g. due to NTP).
|
||||
*
|
||||
* @QEMU_CLOCK_VIRTUAL_RT: realtime clock used for icount warp
|
||||
*
|
||||
|
|
@ -76,10 +73,6 @@ struct QEMUTimer {
|
|||
|
||||
extern QEMUTimerListGroup main_loop_tlg;
|
||||
|
||||
/*
|
||||
* QEMUClockType
|
||||
*/
|
||||
|
||||
/*
|
||||
* qemu_clock_get_ns;
|
||||
* @type: the clock type
|
||||
|
|
|
|||
|
|
@ -221,7 +221,6 @@ int kvm_destroy_vcpu(CPUState *cpu);
|
|||
#ifdef NEED_CPU_H
|
||||
#include "cpu.h"
|
||||
|
||||
void kvm_setup_guest_memory(void *start, size_t size);
|
||||
void kvm_flush_coalesced_mmio_buffer(void);
|
||||
|
||||
int kvm_insert_breakpoint(CPUState *cpu, target_ulong addr,
|
||||
|
|
@ -372,7 +371,6 @@ int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg);
|
|||
|
||||
void kvm_irqchip_add_irq_route(KVMState *s, int gsi, int irqchip, int pin);
|
||||
|
||||
void kvm_put_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
|
||||
void kvm_get_apic_state(DeviceState *d, struct kvm_lapic_state *kapic);
|
||||
|
||||
struct kvm_guest_debug;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue