Browse Source
* dtc configure fixes * MemoryRegionCache second try * Deprecated option removal * add support for Hyper-V reenlightenment MSRs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAABAgAGBQJa9Y2qAAoJEL/70l94x66Df8EIAI4pi+zf1mTlH0Koi+oqOg+d geBC6N9IA+n1p90XERnPbuiT19NjON2R1Z907SbzDkijxdNRoYUoQf7Z+ZBTENjn dYsVvgLYzajGLWWtJetPPaNFAqeF2z8B3lbVQnGVLzH5pQQ2NS1NJsvXQA2LslLs 2ll1CJ2EEBhayoBSbHK+0cY85f+DUgK/T1imIV2T/rwcef9Rw218nvPfGhPBSoL6 tI2xIOxz8bBOvZNg2wdxpaoPuDipBFu6koVVbaGSgXORg8k5CEcKNxInztufdELW KZK5ORa3T0uqu5T/GGPAfm/NbYVQ4aTB5mddshsXtKbBhnbSfRYvpVsR4kQB/Hc= =oC1r -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging * Don't silently truncate extremely long words in the command line * dtc configure fixes * MemoryRegionCache second try * Deprecated option removal * add support for Hyper-V reenlightenment MSRs # gpg: Signature made Fri 11 May 2018 13:33:46 BST # gpg: using RSA key BFFBD25F78C7AE83 # 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: (29 commits) rename included C files to foo.inc.c, remove osdep.h pc-dimm: fix error messages if no slots were defined build: Silence dtc directory creation shippable: Remove Debian 8 libfdt kludge configure: Display if libfdt is from system or git configure: Really use local libfdt if the system one is too old i386/kvm: add support for Hyper-V reenlightenment MSRs qemu-doc: provide details of supported build platforms qemu-options: Remove deprecated -no-kvm-irqchip qemu-options: Remove deprecated -no-kvm-pit-reinjection qemu-options: Bail out on unsupported options instead of silently ignoring them qemu-options: Remove remainders of the -tdf option qemu-options: Mark -virtioconsole as deprecated target/i386: sev: fix memory leaks opts: don't silently truncate long option values opts: don't silently truncate long parameter keys accel: use g_strsplit for parsing accelerator names update-linux-headers: drop hyperv.h qemu-thread: always keep the posix wrapper layer exec: reintroduce MemoryRegion caching ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>pull/68/head
51 changed files with 1029 additions and 621 deletions
@ -0,0 +1,71 @@ |
|||
/*
|
|||
* Physical memory access templates |
|||
* |
|||
* Copyright (c) 2003 Fabrice Bellard |
|||
* Copyright (c) 2015 Linaro, Inc. |
|||
* Copyright (c) 2016 Red Hat, Inc. |
|||
* |
|||
* This library is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU Lesser General Public |
|||
* License as published by the Free Software Foundation; either |
|||
* version 2 of the License, or (at your option) any later version. |
|||
* |
|||
* This library is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public |
|||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#ifdef TARGET_ENDIANNESS |
|||
extern uint32_t glue(address_space_lduw, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint32_t glue(address_space_ldl, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint64_t glue(address_space_ldq, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stl_notdirty, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stw, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stl, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stq, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
#else |
|||
extern uint32_t glue(address_space_ldub, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint32_t glue(address_space_lduw_le, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint32_t glue(address_space_lduw_be, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint32_t glue(address_space_ldl_le, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint32_t glue(address_space_ldl_be, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint64_t glue(address_space_ldq_le, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern uint64_t glue(address_space_ldq_be, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stb, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stw_le, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stw_be, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stl_le, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stl_be, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stq_le, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
extern void glue(address_space_stq_be, SUFFIX)(ARG1_DECL, |
|||
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result); |
|||
#endif |
|||
|
|||
#undef ARG1_DECL |
|||
#undef ARG1 |
|||
#undef SUFFIX |
|||
#undef TARGET_ENDIANNESS |
|||
@ -0,0 +1,108 @@ |
|||
/*
|
|||
* Memory access templates for MemoryRegionCache |
|||
* |
|||
* Copyright (c) 2018 Red Hat, Inc. |
|||
* |
|||
* This library is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU Lesser General Public |
|||
* License as published by the Free Software Foundation; either |
|||
* version 2 of the License, or (at your option) any later version. |
|||
* |
|||
* This library is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public |
|||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#define ADDRESS_SPACE_LD_CACHED(size) \ |
|||
glue(glue(address_space_ld, size), glue(ENDIANNESS, _cached)) |
|||
#define ADDRESS_SPACE_LD_CACHED_SLOW(size) \ |
|||
glue(glue(address_space_ld, size), glue(ENDIANNESS, _cached_slow)) |
|||
#define LD_P(size) \ |
|||
glue(glue(ld, size), glue(ENDIANNESS, _p)) |
|||
|
|||
static inline uint32_t ADDRESS_SPACE_LD_CACHED(l)(MemoryRegionCache *cache, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result) |
|||
{ |
|||
assert(addr < cache->len && 4 <= cache->len - addr); |
|||
if (likely(cache->ptr)) { |
|||
return LD_P(l)(cache->ptr + addr); |
|||
} else { |
|||
return ADDRESS_SPACE_LD_CACHED_SLOW(l)(cache, addr, attrs, result); |
|||
} |
|||
} |
|||
|
|||
static inline uint64_t ADDRESS_SPACE_LD_CACHED(q)(MemoryRegionCache *cache, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result) |
|||
{ |
|||
assert(addr < cache->len && 8 <= cache->len - addr); |
|||
if (likely(cache->ptr)) { |
|||
return LD_P(q)(cache->ptr + addr); |
|||
} else { |
|||
return ADDRESS_SPACE_LD_CACHED_SLOW(q)(cache, addr, attrs, result); |
|||
} |
|||
} |
|||
|
|||
static inline uint32_t ADDRESS_SPACE_LD_CACHED(uw)(MemoryRegionCache *cache, |
|||
hwaddr addr, MemTxAttrs attrs, MemTxResult *result) |
|||
{ |
|||
assert(addr < cache->len && 2 <= cache->len - addr); |
|||
if (likely(cache->ptr)) { |
|||
return LD_P(uw)(cache->ptr + addr); |
|||
} else { |
|||
return ADDRESS_SPACE_LD_CACHED_SLOW(uw)(cache, addr, attrs, result); |
|||
} |
|||
} |
|||
|
|||
#undef ADDRESS_SPACE_LD_CACHED |
|||
#undef ADDRESS_SPACE_LD_CACHED_SLOW |
|||
#undef LD_P |
|||
|
|||
#define ADDRESS_SPACE_ST_CACHED(size) \ |
|||
glue(glue(address_space_st, size), glue(ENDIANNESS, _cached)) |
|||
#define ADDRESS_SPACE_ST_CACHED_SLOW(size) \ |
|||
glue(glue(address_space_st, size), glue(ENDIANNESS, _cached_slow)) |
|||
#define ST_P(size) \ |
|||
glue(glue(st, size), glue(ENDIANNESS, _p)) |
|||
|
|||
static inline void ADDRESS_SPACE_ST_CACHED(l)(MemoryRegionCache *cache, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result) |
|||
{ |
|||
assert(addr < cache->len && 4 <= cache->len - addr); |
|||
if (likely(cache->ptr)) { |
|||
ST_P(l)(cache->ptr + addr, val); |
|||
} else { |
|||
ADDRESS_SPACE_ST_CACHED_SLOW(l)(cache, addr, val, attrs, result); |
|||
} |
|||
} |
|||
|
|||
static inline void ADDRESS_SPACE_ST_CACHED(w)(MemoryRegionCache *cache, |
|||
hwaddr addr, uint32_t val, MemTxAttrs attrs, MemTxResult *result) |
|||
{ |
|||
assert(addr < cache->len && 2 <= cache->len - addr); |
|||
if (likely(cache->ptr)) { |
|||
ST_P(w)(cache->ptr + addr, val); |
|||
} else { |
|||
ADDRESS_SPACE_ST_CACHED_SLOW(w)(cache, addr, val, attrs, result); |
|||
} |
|||
} |
|||
|
|||
static inline void ADDRESS_SPACE_ST_CACHED(q)(MemoryRegionCache *cache, |
|||
hwaddr addr, uint64_t val, MemTxAttrs attrs, MemTxResult *result) |
|||
{ |
|||
assert(addr < cache->len && 8 <= cache->len - addr); |
|||
if (likely(cache->ptr)) { |
|||
ST_P(q)(cache->ptr + addr, val); |
|||
} else { |
|||
ADDRESS_SPACE_ST_CACHED_SLOW(q)(cache, addr, val, attrs, result); |
|||
} |
|||
} |
|||
|
|||
#undef ADDRESS_SPACE_ST_CACHED |
|||
#undef ADDRESS_SPACE_ST_CACHED_SLOW |
|||
#undef ST_P |
|||
|
|||
#undef ENDIANNESS |
|||
@ -0,0 +1,147 @@ |
|||
/*
|
|||
* Physical memory access templates |
|||
* |
|||
* Copyright (c) 2003 Fabrice Bellard |
|||
* Copyright (c) 2015 Linaro, Inc. |
|||
* Copyright (c) 2016 Red Hat, Inc. |
|||
* |
|||
* This library is free software; you can redistribute it and/or |
|||
* modify it under the terms of the GNU Lesser General Public |
|||
* License as published by the Free Software Foundation; either |
|||
* version 2 of the License, or (at your option) any later version. |
|||
* |
|||
* This library is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|||
* Lesser General Public License for more details. |
|||
* |
|||
* You should have received a copy of the GNU Lesser General Public |
|||
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
#ifdef TARGET_ENDIANNESS |
|||
static inline uint32_t glue(ldl_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldl, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint64_t glue(ldq_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldq, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint32_t glue(lduw_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_lduw, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stl_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stl, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stw_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stw, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stq_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val) |
|||
{ |
|||
glue(address_space_stq, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
#else |
|||
static inline uint32_t glue(ldl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldl_le, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint32_t glue(ldl_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldl_be, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint64_t glue(ldq_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldq_le, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint64_t glue(ldq_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldq_be, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint32_t glue(ldub_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_ldub, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint32_t glue(lduw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_lduw_le, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline uint32_t glue(lduw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr) |
|||
{ |
|||
return glue(address_space_lduw_be, SUFFIX)(ARG1, addr, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stl_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stl_le, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stl_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stl_be, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stb_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stb, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stw_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stw_le, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stw_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint32_t val) |
|||
{ |
|||
glue(address_space_stw_be, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stq_le_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val) |
|||
{ |
|||
glue(address_space_stq_le, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
|
|||
static inline void glue(stq_be_phys, SUFFIX)(ARG1_DECL, hwaddr addr, uint64_t val) |
|||
{ |
|||
glue(address_space_stq_be, SUFFIX)(ARG1, addr, val, |
|||
MEMTXATTRS_UNSPECIFIED, NULL); |
|||
} |
|||
#endif |
|||
|
|||
#undef ARG1_DECL |
|||
#undef ARG1 |
|||
#undef SUFFIX |
|||
#undef TARGET_ENDIANNESS |
|||
Loading…
Reference in new issue