History log of /openbmc/qemu/accel/ (Results 1201 – 1225 of 1260)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
6eb062ab12-Jul-2017 Emilio G. Cota <cota@braap.org>

translate-all: define and use DEBUG_TB_CHECK_GATE

This prevents bit rot by ensuring the debug code is compiled when
building a user-mode target.

Unfortunately the helpers are user-mode-only so we c

translate-all: define and use DEBUG_TB_CHECK_GATE

This prevents bit rot by ensuring the debug code is compiled when
building a user-mode target.

Unfortunately the helpers are user-mode-only so we cannot fully
get rid of the ifdef checks. Add a comment to explain this.

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

dae9e03a12-Jul-2017 Emilio G. Cota <cota@braap.org>

translate-all: define and use DEBUG_TB_INVALIDATE_GATE

This gets rid of an ifdef check while ensuring that the debug code
is compiled, which prevents bit rot.

Suggested-by: Alex Bennée <alex.bennee

translate-all: define and use DEBUG_TB_INVALIDATE_GATE

This gets rid of an ifdef check while ensuring that the debug code
is compiled, which prevents bit rot.

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

67a5b5d213-Jul-2017 Emilio G. Cota <cota@braap.org>

exec-all: introduce TB_PAGE_ADDR_FMT

And fix the following warning when DEBUG_TB_INVALIDATE is enabled
in translate-all.c:

CC mipsn32-linux-user/accel/tcg/translate-all.o
/data/src/qemu/acce

exec-all: introduce TB_PAGE_ADDR_FMT

And fix the following warning when DEBUG_TB_INVALIDATE is enabled
in translate-all.c:

CC mipsn32-linux-user/accel/tcg/translate-all.o
/data/src/qemu/accel/tcg/translate-all.c: In function ‘tb_alloc_page’:
/data/src/qemu/accel/tcg/translate-all.c:1201:16: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘tb_page_addr_t {aka unsigned int}’ [-Werror=format=]
printf("protecting code page: 0x" TARGET_FMT_lx "\n",
^
cc1: all warnings being treated as errors
/data/src/qemu/rules.mak:66: recipe for target 'accel/tcg/translate-all.o' failed
make[1]: *** [accel/tcg/translate-all.o] Error 1
Makefile:328: recipe for target 'subdir-mipsn32-linux-user' failed
make: *** [subdir-mipsn32-linux-user] Error 2
cota@flamenco:/data/src/qemu/build ((18f3fe1...) *$)$

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

424079c112-Jul-2017 Emilio G. Cota <cota@braap.org>

translate-all: define and use DEBUG_TB_FLUSH_GATE

This gets rid of some ifdef checks while ensuring that the debug code
is compiled, which prevents bit rot.

Suggested-by: Alex Bennée <alex.bennee@l

translate-all: define and use DEBUG_TB_FLUSH_GATE

This gets rid of some ifdef checks while ensuring that the debug code
is compiled, which prevents bit rot.

Suggested-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

84f1c14810-Jul-2017 Emilio G. Cota <cota@braap.org>

exec-all: bring tb->invalid into tb->cflags

This gets rid of a hole in struct TranslationBlock.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signe

exec-all: bring tb->invalid into tb->cflags

This gets rid of a hole in struct TranslationBlock.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

f6bb84d511-Jul-2017 Emilio G. Cota <cota@braap.org>

tcg: consolidate TB lookups in tb_lookup__cpu_state

This avoids duplicating code. cpu_exec_step will also use the
new common function once we integrate parallel_cpus into tb->cflags.

Note that in t

tcg: consolidate TB lookups in tb_lookup__cpu_state

This avoids duplicating code. cpu_exec_step will also use the
new common function once we integrate parallel_cpus into tb->cflags.

Note that in this commit we also fix a race, described by Richard Henderson
during review. Think of this scenario with threads A and B:

(A) Lookup succeeds for TB in hash without tb_lock
(B) Sets the TB's tb->invalid flag
(B) Removes the TB from tb_htable
(B) Clears all CPU's tb_jmp_cache
(A) Store TB into local tb_jmp_cache

Given that order of events, (A) will keep executing that invalid TB until
another flush of its tb_jmp_cache happens, which in theory might never happen.
We can fix this by checking the tb->invalid flag every time we look up a TB
from tb_jmp_cache, so that in the above scenario, next time we try to find
that TB in tb_jmp_cache, we won't, and will therefore be forced to look it
up in tb_htable.

Performance-wise, I measured a small improvement when booting debian-arm.
Note that inlining pays off:

Performance counter stats for 'taskset -c 0 qemu-system-arm \
-machine type=virt -nographic -smp 1 -m 4096 \
-netdev user,id=unet,hostfwd=tcp::2222-:22 \
-device virtio-net-device,netdev=unet \
-drive file=jessie.qcow2,id=myblock,index=0,if=none \
-device virtio-blk-device,drive=myblock \
-kernel kernel.img -append console=ttyAMA0 root=/dev/vda1 \
-name arm,debug-threads=on -smp 1' (10 runs):

Before:
18714.917392 task-clock # 0.952 CPUs utilized ( +- 0.95% )
23,142 context-switches # 0.001 M/sec ( +- 0.50% )
1 CPU-migrations # 0.000 M/sec
10,558 page-faults # 0.001 M/sec ( +- 0.95% )
53,957,727,252 cycles # 2.883 GHz ( +- 0.91% ) [83.33%]
24,440,599,852 stalled-cycles-frontend # 45.30% frontend cycles idle ( +- 1.20% ) [83.33%]
16,495,714,424 stalled-cycles-backend # 30.57% backend cycles idle ( +- 0.95% ) [66.66%]
76,267,572,582 instructions # 1.41 insns per cycle
# 0.32 stalled cycles per insn ( +- 0.87% ) [83.34%]
12,692,186,323 branches # 678.186 M/sec ( +- 0.92% ) [83.35%]
263,486,879 branch-misses # 2.08% of all branches ( +- 0.73% ) [83.34%]

19.648474449 seconds time elapsed ( +- 0.82% )

After, w/ inline (this patch):
18471.376627 task-clock # 0.955 CPUs utilized ( +- 0.96% )
23,048 context-switches # 0.001 M/sec ( +- 0.48% )
1 CPU-migrations # 0.000 M/sec
10,708 page-faults # 0.001 M/sec ( +- 0.81% )
53,208,990,796 cycles # 2.881 GHz ( +- 0.98% ) [83.34%]
23,941,071,673 stalled-cycles-frontend # 44.99% frontend cycles idle ( +- 0.95% ) [83.34%]
16,161,773,848 stalled-cycles-backend # 30.37% backend cycles idle ( +- 0.76% ) [66.67%]
75,786,269,766 instructions # 1.42 insns per cycle
# 0.32 stalled cycles per insn ( +- 1.24% ) [83.34%]
12,573,617,143 branches # 680.708 M/sec ( +- 1.34% ) [83.33%]
260,235,550 branch-misses # 2.07% of all branches ( +- 0.66% ) [83.33%]

19.340502161 seconds time elapsed ( +- 0.56% )

After, w/o inline:
18791.253967 task-clock # 0.954 CPUs utilized ( +- 0.78% )
23,230 context-switches # 0.001 M/sec ( +- 0.42% )
1 CPU-migrations # 0.000 M/sec
10,563 page-faults # 0.001 M/sec ( +- 1.27% )
54,168,674,622 cycles # 2.883 GHz ( +- 0.80% ) [83.34%]
24,244,712,629 stalled-cycles-frontend # 44.76% frontend cycles idle ( +- 1.37% ) [83.33%]
16,288,648,572 stalled-cycles-backend # 30.07% backend cycles idle ( +- 0.95% ) [66.66%]
77,659,755,503 instructions # 1.43 insns per cycle
# 0.31 stalled cycles per insn ( +- 0.97% ) [83.34%]
12,922,780,045 branches # 687.702 M/sec ( +- 1.06% ) [83.34%]
261,962,386 branch-misses # 2.03% of all branches ( +- 0.71% ) [83.35%]

19.700174670 seconds time elapsed ( +- 0.56% )

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

7f11636d11-Jul-2017 Emilio G. Cota <cota@braap.org>

tcg: remove addr argument from lookup_tb_ptr

It is unlikely that we will ever want to call this helper passing
an argument other than the current PC. So just remove the argument,
and use the pc we a

tcg: remove addr argument from lookup_tb_ptr

It is unlikely that we will ever want to call this helper passing
an argument other than the current PC. So just remove the argument,
and use the pc we already get from cpu_get_tb_cpu_state.

This change paves the way to having a common "tb_lookup" function.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

841710c712-Jul-2017 Emilio G. Cota <cota@braap.org>

cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find

Reusing the have_tb_lock name, which is also defined in translate-all.c,
makes code reviewing unnecessarily harder.

Avoid potential conf

cpu-exec: rename have_tb_lock to acquired_tb_lock in tb_find

Reusing the have_tb_lock name, which is also defined in translate-all.c,
makes code reviewing unnecessarily harder.

Avoid potential confusion by renaming the local have_tb_lock variable
to something else.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

13e1094706-Jul-2017 Emilio G. Cota <cota@braap.org>

translate-all: make have_tb_lock static

It is only used by this object, and it's not exported to any other.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@li

translate-all: make have_tb_lock static

It is only used by this object, and it's not exported to any other.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

0aecede607-Jul-2017 Emilio G. Cota <cota@braap.org>

tcg: fix corruption of code_time profiling counter upon tb_flush

Whenever there is an overflow in code_gen_buffer (e.g. we run out
of space in it and have to flush it), the code_time profiling count

tcg: fix corruption of code_time profiling counter upon tb_flush

Whenever there is an overflow in code_gen_buffer (e.g. we run out
of space in it and have to flush it), the code_time profiling counter
ends up with an invalid value (that is, code_time -= profile_getclock(),
without later on getting += profile_getclock() due to the goto).

Fix it by using the ti variable, so that we only update code_time
when there is no overflow. Note that in case there is an overflow
we fail to account for the elapsed coding time, but this is quite rare
so we can probably live with it.

"info jit" before/after, roughly at the same time during debian-arm bootup:

- before:
Statistics:
TB flush count 1
TB invalidate count 4665
TLB flush count 998
JIT cycles -615191529184601 (-256329.804 s at 2.4 GHz)
translated TBs 302310 (aborted=0 0.0%)
avg ops/TB 48.4 max=438
deleted ops/TB 8.54
avg temps/TB 32.31 max=38
avg host code/TB 361.5
avg search data/TB 24.5
cycles/op -42014693.0
cycles/in byte -121444900.2
cycles/out byte -5629031.1
cycles/search byte -83114481.0
gen_interm time -0.0%
gen_code time 100.0%
optim./code time -0.0%
liveness/code time -0.0%
cpu_restore count 6236
avg cycles 110.4

- after:
Statistics:
TB flush count 1
TB invalidate count 4665
TLB flush count 1010
JIT cycles 1996899624 (0.832 s at 2.4 GHz)
translated TBs 297961 (aborted=0 0.0%)
avg ops/TB 48.5 max=438
deleted ops/TB 8.56
avg temps/TB 32.31 max=38
avg host code/TB 361.8
avg search data/TB 24.5
cycles/op 138.2
cycles/in byte 398.4
cycles/out byte 18.5
cycles/search byte 273.1
gen_interm time 14.0%
gen_code time 86.0%
optim./code time 19.4%
liveness/code time 10.3%
cpu_restore count 6372
avg cycles 111.0

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

83974cf406-Jul-2017 Emilio G. Cota <cota@braap.org>

cputlb: bring back tlb_flush_count under !TLB_DEBUG

Commit f0aff0f124 ("cputlb: add assert_cpu_is_self checks") buried
the increment of tlb_flush_count under TLB_DEBUG. This results in
"info jit" al

cputlb: bring back tlb_flush_count under !TLB_DEBUG

Commit f0aff0f124 ("cputlb: add assert_cpu_is_self checks") buried
the increment of tlb_flush_count under TLB_DEBUG. This results in
"info jit" always (mis)reporting 0 TLB flushes when !TLB_DEBUG.

Besides, under MTTCG tlb_flush_count is updated by several threads,
so in order not to lose counts we'd either have to use atomic ops
or distribute the counter, which is more scalable.

This patch does the latter by embedding tlb_flush_count in CPUArchState.
The global count is then easily obtained by iterating over the CPU list.

Note that this change also requires updating the accessors to
tlb_flush_count to use atomic_read/set whenever there may be conflicting
accesses (as defined in C11) to it.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...


/openbmc/qemu/MAINTAINERS
tcg/cputlb.c
tcg/translate-all.c
/openbmc/qemu/block.c
/openbmc/qemu/block/backup.c
/openbmc/qemu/block/blkdebug.c
/openbmc/qemu/block/commit.c
/openbmc/qemu/block/crypto.c
/openbmc/qemu/block/dirty-bitmap.c
/openbmc/qemu/block/io.c
/openbmc/qemu/block/mirror.c
/openbmc/qemu/block/qcow.c
/openbmc/qemu/block/qcow2-bitmap.c
/openbmc/qemu/block/qcow2-cluster.c
/openbmc/qemu/block/qcow2-refcount.c
/openbmc/qemu/block/qcow2.c
/openbmc/qemu/block/qcow2.h
/openbmc/qemu/crypto/block-luks.c
/openbmc/qemu/crypto/block-qcow.c
/openbmc/qemu/crypto/block.c
/openbmc/qemu/crypto/blockpriv.h
/openbmc/qemu/hmp-commands-info.hx
/openbmc/qemu/hmp.c
/openbmc/qemu/hw/arm/xlnx-zynqmp.c
/openbmc/qemu/hw/block/onenand.c
/openbmc/qemu/hw/char/terminal3270.c
/openbmc/qemu/hw/core/machine.c
/openbmc/qemu/hw/i386/kvm/clock.c
/openbmc/qemu/hw/input/virtio-input-hid.c
/openbmc/qemu/hw/intc/armv7m_nvic.c
/openbmc/qemu/hw/s390x/3270-ccw.c
/openbmc/qemu/hw/s390x/css.c
/openbmc/qemu/hw/s390x/s390-pci-bus.c
/openbmc/qemu/hw/s390x/s390-virtio-ccw.c
/openbmc/qemu/hw/s390x/sclp.c
/openbmc/qemu/hw/s390x/sclpcpu.c
/openbmc/qemu/hw/s390x/sclpquiesce.c
/openbmc/qemu/hw/s390x/virtio-ccw.c
/openbmc/qemu/hw/sd/sd.c
/openbmc/qemu/hw/usb/Makefile.objs
/openbmc/qemu/hw/usb/bus.c
/openbmc/qemu/hw/usb/ccid-card-passthru.c
/openbmc/qemu/hw/vfio/ccw.c
/openbmc/qemu/hw/vfio/pci-quirks.c
/openbmc/qemu/hw/vfio/pci.c
/openbmc/qemu/hw/vfio/pci.h
/openbmc/qemu/hw/watchdog/watchdog.c
/openbmc/qemu/hw/watchdog/wdt_diag288.c
/openbmc/qemu/include/block/block.h
/openbmc/qemu/include/block/block_int.h
/openbmc/qemu/include/block/dirty-bitmap.h
/openbmc/qemu/include/crypto/block.h
/openbmc/qemu/include/exec/cpu-defs.h
/openbmc/qemu/include/exec/cputlb.h
/openbmc/qemu/include/hw/boards.h
/openbmc/qemu/include/hw/compat.h
/openbmc/qemu/include/hw/s390x/3270-ccw.h
/openbmc/qemu/include/hw/s390x/css.h
/openbmc/qemu/include/hw/virtio/virtio-input.h
/openbmc/qemu/include/io/channel-websock.h
/openbmc/qemu/include/qemu/hbitmap.h
/openbmc/qemu/include/qom/object.h
/openbmc/qemu/include/sysemu/iothread.h
/openbmc/qemu/include/sysemu/sysemu.h
/openbmc/qemu/include/sysemu/watchdog.h
/openbmc/qemu/include/ui/console.h
/openbmc/qemu/include/ui/egl-helpers.h
/openbmc/qemu/io/channel-websock.c
/openbmc/qemu/io/trace-events
/openbmc/qemu/iothread.c
/openbmc/qemu/migration/block.c
/openbmc/qemu/monitor.c
/openbmc/qemu/qapi-schema.json
/openbmc/qemu/qapi/block-core.json
/openbmc/qemu/qapi/run-state.json
/openbmc/qemu/qemu-doc.texi
/openbmc/qemu/qemu-io.c
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/qom/cpu.c
/openbmc/qemu/qom/object.c
/openbmc/qemu/scripts/checkpatch.pl
/openbmc/qemu/target/alpha/cpu.c
/openbmc/qemu/target/arm/cpu.c
/openbmc/qemu/target/arm/cpu.h
/openbmc/qemu/target/arm/helper.c
/openbmc/qemu/target/arm/internals.h
/openbmc/qemu/target/arm/machine.c
/openbmc/qemu/target/arm/op_helper.c
/openbmc/qemu/target/cris/cpu.c
/openbmc/qemu/target/i386/translate.c
/openbmc/qemu/target/lm32/cpu.c
/openbmc/qemu/target/m68k/cpu.c
/openbmc/qemu/target/mips/cpu.c
/openbmc/qemu/target/moxie/cpu.c
/openbmc/qemu/target/openrisc/cpu.c
/openbmc/qemu/target/s390x/Makefile.objs
/openbmc/qemu/target/s390x/cpu-qom.h
/openbmc/qemu/target/s390x/cpu.c
/openbmc/qemu/target/s390x/cpu.h
/openbmc/qemu/target/s390x/cpu_features.c
/openbmc/qemu/target/s390x/cpu_models.c
/openbmc/qemu/target/s390x/crypto_helper.c
/openbmc/qemu/target/s390x/excp_helper.c
/openbmc/qemu/target/s390x/helper.h
/openbmc/qemu/target/s390x/insn-data.def
/openbmc/qemu/target/s390x/internal.h
/openbmc/qemu/target/s390x/kvm-stub.c
/openbmc/qemu/target/s390x/kvm.c
/openbmc/qemu/target/s390x/kvm_s390x.h
/openbmc/qemu/target/s390x/mem_helper.c
/openbmc/qemu/target/s390x/misc_helper.c
/openbmc/qemu/target/s390x/mmu_helper.c
/openbmc/qemu/target/s390x/translate.c
/openbmc/qemu/target/sh4/cpu.c
/openbmc/qemu/target/sparc/cpu.c
/openbmc/qemu/target/tricore/cpu.c
/openbmc/qemu/target/unicore32/cpu.c
/openbmc/qemu/target/unicore32/helper.c
/openbmc/qemu/target/xtensa/cpu.c
/openbmc/qemu/tests/docker/Makefile.include
/openbmc/qemu/tests/docker/common.rc
/openbmc/qemu/tests/docker/dockerfiles/centos6.docker
/openbmc/qemu/tests/docker/dockerfiles/centos7.docker
/openbmc/qemu/tests/docker/dockerfiles/debian-ports.docker
/openbmc/qemu/tests/docker/dockerfiles/debian8.docker
/openbmc/qemu/tests/docker/dockerfiles/debian9.docker
/openbmc/qemu/tests/docker/dockerfiles/fedora.docker
/openbmc/qemu/tests/docker/dockerfiles/min-glib.docker
/openbmc/qemu/tests/docker/dockerfiles/ubuntu.docker
/openbmc/qemu/tests/docker/run
/openbmc/qemu/tests/docker/test-block
/openbmc/qemu/tests/docker/test-build
/openbmc/qemu/tests/docker/test-clang
/openbmc/qemu/tests/docker/test-full
/openbmc/qemu/tests/docker/test-mingw
/openbmc/qemu/tests/docker/test-quick
/openbmc/qemu/tests/qemu-iotests/030
/openbmc/qemu/tests/qemu-iotests/039.out
/openbmc/qemu/tests/qemu-iotests/061.out
/openbmc/qemu/tests/qemu-iotests/137.out
/openbmc/qemu/tests/qemu-iotests/165
/openbmc/qemu/tests/qemu-iotests/191
/openbmc/qemu/tests/qemu-iotests/191.out
/openbmc/qemu/tests/qemu-iotests/195
/openbmc/qemu/tests/qemu-iotests/197
/openbmc/qemu/tests/qemu-iotests/197.out
/openbmc/qemu/tests/qemu-iotests/check
/openbmc/qemu/tests/qemu-iotests/common.config
/openbmc/qemu/tests/qemu-iotests/common.filter
/openbmc/qemu/tests/qemu-iotests/common.qemu
/openbmc/qemu/tests/qemu-iotests/common.rc
/openbmc/qemu/tests/qemu-iotests/group
/openbmc/qemu/tests/test-hbitmap.c
/openbmc/qemu/ui/curses.c
/openbmc/qemu/ui/egl-headless.c
/openbmc/qemu/ui/egl-helpers.c
/openbmc/qemu/ui/gtk-egl.c
/openbmc/qemu/ui/gtk-gl-area.c
/openbmc/qemu/ui/sdl2-gl.c
/openbmc/qemu/ui/trace-events
/openbmc/qemu/ui/vnc-auth-sasl.c
/openbmc/qemu/ui/vnc-auth-vencrypt.c
/openbmc/qemu/ui/vnc-ws.c
/openbmc/qemu/ui/vnc.c
/openbmc/qemu/util/aio-posix.c
/openbmc/qemu/util/hbitmap.c
/openbmc/qemu/util/qemu-config.c
/openbmc/qemu/vl.c
11748ba721-Sep-2017 Greg Kurz <groug@kaod.org>

kvm: check KVM_CAP_NR_VCPUS with kvm_vm_check_extension()

On a modern server-class ppc host with the following CPU topology:

Architecture: ppc64le
Byte Order: Little Endian
CPU(

kvm: check KVM_CAP_NR_VCPUS with kvm_vm_check_extension()

On a modern server-class ppc host with the following CPU topology:

Architecture: ppc64le
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0,8,16,24
Off-line CPU(s) list: 1-7,9-15,17-23,25-31
Thread(s) per core: 1

If both KVM PR and KVM HV loaded and we pass:

-machine pseries,accel=kvm,kvm-type=PR -smp 8

We expect QEMU to warn that this exceeds the number of online CPUs:

Warning: Number of SMP cpus requested (8) exceeds the recommended
cpus supported by KVM (4)
Warning: Number of hotpluggable cpus requested (8) exceeds the
recommended cpus supported by KVM (4)

but nothing is printed...

This happens because on ppc the KVM_CAP_NR_VCPUS capability is VM
specific ndreally depends on the KVM type, but we currently use it
as a global capability. And KVM returns a fallback value based on
KVM HV being present. Maybe KVM on POWER shouldn't presume anything
as long as it doesn't have a VM, but in all cases, we should call
KVM_CREATE_VM first and use KVM_CAP_NR_VCPUS as a VM capability.

This patch hence changes kvm_recommended_vcpus() accordingly and
moves the sanity checking of smp_cpus after the VM creation.

It is okay for the other archs that also implement KVM_CAP_NR_VCPUS,
ie, mips, s390, x86 and arm, because they don't depend on the VM
being created or not.

Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <150600966286.30533.10909862523552370889.stgit@bahia.lan>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

62dd4eda21-Sep-2017 Greg Kurz <groug@kaod.org>

kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension()

On a server-class ppc host, this capability depends on the KVM type,
ie, HV or PR. If both KVM are present in the kernel, we will always
get

kvm: check KVM_CAP_SYNC_MMU with kvm_vm_check_extension()

On a server-class ppc host, this capability depends on the KVM type,
ie, HV or PR. If both KVM are present in the kernel, we will always
get the HV specific value, even if we explicitely requested PR on
the command line.

This can have an impact if we're using hugepages or a balloon device.

Since we've already created the VM at the time any user calls
kvm_has_sync_mmu(), switching to kvm_vm_check_extension() is
enough to fix any potential issue.

It is okay for the other archs that also implement KVM_CAP_SYNC_MMU,
ie, mips, s390, x86 and arm, because they don't depend on the VM being
created or not.

While here, let's cache the state of this extension in a bool variable,
since it has several users in the code, as suggested by Thomas Huth.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <150600965332.30533.14702405809647835716.stgit@bahia.lan>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/openbmc/qemu/.gitignore
/openbmc/qemu/MAINTAINERS
/openbmc/qemu/Makefile
kvm/kvm-all.c
stubs/kvm-stub.c
/openbmc/qemu/block.c
/openbmc/qemu/block/commit.c
/openbmc/qemu/block/file-posix.c
/openbmc/qemu/block/mirror.c
/openbmc/qemu/block/nbd-client.c
/openbmc/qemu/block/qcow2-bitmap.c
/openbmc/qemu/block/qcow2-cache.c
/openbmc/qemu/block/qcow2-cluster.c
/openbmc/qemu/block/qcow2-refcount.c
/openbmc/qemu/block/qcow2.c
/openbmc/qemu/block/qcow2.h
/openbmc/qemu/block/replication.c
/openbmc/qemu/block/throttle-groups.c
/openbmc/qemu/block/vvfat.c
/openbmc/qemu/chardev/baum.c
/openbmc/qemu/configure
/openbmc/qemu/docs/devel/migration.txt
/openbmc/qemu/docs/memory-hotplug.txt
/openbmc/qemu/docs/qemu-block-drivers.texi
/openbmc/qemu/hw/arm/pxa2xx.c
/openbmc/qemu/hw/arm/strongarm.c
/openbmc/qemu/hw/audio/wm8750.c
/openbmc/qemu/hw/block/fdc.c
/openbmc/qemu/hw/block/m25p80.c
/openbmc/qemu/hw/block/nand.c
/openbmc/qemu/hw/block/onenand.c
/openbmc/qemu/hw/char/serial.c
/openbmc/qemu/hw/display/qxl.c
/openbmc/qemu/hw/display/trace-events
/openbmc/qemu/hw/display/virtio-gpu.c
/openbmc/qemu/hw/display/xenfb.c
/openbmc/qemu/hw/i2c/core.c
/openbmc/qemu/hw/i386/kvm/clock.c
/openbmc/qemu/hw/ide/core.c
/openbmc/qemu/hw/ide/macio.c
/openbmc/qemu/hw/ide/pci.c
/openbmc/qemu/hw/input/ps2.c
/openbmc/qemu/hw/input/tsc210x.c
/openbmc/qemu/hw/intc/apic_common.c
/openbmc/qemu/hw/intc/arm_gic_common.c
/openbmc/qemu/hw/intc/arm_gicv3_common.c
/openbmc/qemu/hw/intc/arm_gicv3_its_common.c
/openbmc/qemu/hw/intc/i8259_common.c
/openbmc/qemu/hw/intc/ioapic_common.c
/openbmc/qemu/hw/intc/openpic.c
/openbmc/qemu/hw/intc/s390_flic_kvm.c
/openbmc/qemu/hw/intc/xics.c
/openbmc/qemu/hw/isa/pc87312.c
/openbmc/qemu/hw/misc/auxbus.c
/openbmc/qemu/hw/misc/macio/mac_dbdma.c
/openbmc/qemu/hw/misc/macio/macio.c
/openbmc/qemu/hw/net/e1000.c
/openbmc/qemu/hw/net/e1000e.c
/openbmc/qemu/hw/net/rtl8139.c
/openbmc/qemu/hw/net/virtio-net.c
/openbmc/qemu/hw/net/vmxnet3.c
/openbmc/qemu/hw/pci-host/piix.c
/openbmc/qemu/hw/ppc/mac.h
/openbmc/qemu/hw/ppc/mac_newworld.c
/openbmc/qemu/hw/ppc/mac_oldworld.c
/openbmc/qemu/hw/ppc/pnv.c
/openbmc/qemu/hw/ppc/ppc.c
/openbmc/qemu/hw/ppc/ppc405_uc.c
/openbmc/qemu/hw/ppc/spapr.c
/openbmc/qemu/hw/ppc/spapr_cpu_core.c
/openbmc/qemu/hw/ppc/spapr_hcall.c
/openbmc/qemu/hw/ppc/spapr_iommu.c
/openbmc/qemu/hw/ppc/spapr_pci.c
/openbmc/qemu/hw/s390x/css.c
/openbmc/qemu/hw/s390x/virtio-ccw.c
/openbmc/qemu/hw/scsi/lsi53c895a.c
/openbmc/qemu/hw/scsi/vmw_pvscsi.c
/openbmc/qemu/hw/timer/cadence_ttc.c
/openbmc/qemu/hw/timer/hpet.c
/openbmc/qemu/hw/timer/i8254_common.c
/openbmc/qemu/hw/timer/mc146818rtc.c
/openbmc/qemu/hw/timer/pl031.c
/openbmc/qemu/hw/timer/twl92230.c
/openbmc/qemu/hw/usb/dev-smartcard-reader.c
/openbmc/qemu/hw/usb/hcd-ehci-sysbus.c
/openbmc/qemu/hw/usb/hcd-ehci.c
/openbmc/qemu/hw/usb/hcd-ehci.h
/openbmc/qemu/hw/usb/hcd-ohci.c
/openbmc/qemu/hw/usb/redirect.c
/openbmc/qemu/hw/virtio/vhost-vsock.c
/openbmc/qemu/hw/virtio/virtio.c
/openbmc/qemu/include/block/block.h
/openbmc/qemu/include/block/block_int.h
/openbmc/qemu/include/hw/ppc/mac_dbdma.h
/openbmc/qemu/include/hw/ppc/openpic.h
/openbmc/qemu/include/hw/ppc/pnv_xscom.h
/openbmc/qemu/include/hw/virtio/virtio.h
/openbmc/qemu/include/migration/vmstate.h
/openbmc/qemu/include/qemu/osdep.h
/openbmc/qemu/include/qemu/thread-posix.h
/openbmc/qemu/include/standard-headers/asm-x86/hyperv.h
/openbmc/qemu/include/standard-headers/linux/pci_regs.h
/openbmc/qemu/include/standard-headers/linux/virtio_ring.h
/openbmc/qemu/include/sysemu/kvm.h
/openbmc/qemu/iothread.c
/openbmc/qemu/linux-headers/asm-s390/kvm.h
/openbmc/qemu/linux-headers/linux/kvm.h
/openbmc/qemu/linux-headers/linux/userfaultfd.h
/openbmc/qemu/migration/block.c
/openbmc/qemu/migration/block.h
/openbmc/qemu/migration/colo-comm.c
/openbmc/qemu/migration/global_state.c
/openbmc/qemu/migration/ram.c
/openbmc/qemu/migration/savevm.c
/openbmc/qemu/migration/trace-events
/openbmc/qemu/migration/vmstate-types.c
/openbmc/qemu/migration/vmstate.c
/openbmc/qemu/net/slirp.c
/openbmc/qemu/qapi/block-core.json
/openbmc/qemu/qemu-doc.texi
/openbmc/qemu/qemu-img-cmds.hx
/openbmc/qemu/qemu-img.c
/openbmc/qemu/qemu-img.texi
/openbmc/qemu/qemu-io-cmds.c
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/replay/replay-snapshot.c
/openbmc/qemu/scripts/create_config
/openbmc/qemu/slirp/if.c
/openbmc/qemu/slirp/slirp.c
/openbmc/qemu/slirp/slirp.h
/openbmc/qemu/target/arm/machine.c
/openbmc/qemu/target/i386/machine.c
/openbmc/qemu/target/ppc/cpu-models.c
/openbmc/qemu/target/ppc/cpu-models.h
/openbmc/qemu/target/ppc/cpu.h
/openbmc/qemu/target/ppc/kvm.c
/openbmc/qemu/target/ppc/kvm_ppc.h
/openbmc/qemu/target/ppc/machine.c
/openbmc/qemu/target/ppc/translate_init.c
/openbmc/qemu/target/s390x/gen-features.c
/openbmc/qemu/target/s390x/machine.c
/openbmc/qemu/target/sparc/machine.c
/openbmc/qemu/target/xtensa/op_helper.c
/openbmc/qemu/tests/boot-sector.c
/openbmc/qemu/tests/qemu-iotests/040
/openbmc/qemu/tests/qemu-iotests/051
/openbmc/qemu/tests/qemu-iotests/051.out
/openbmc/qemu/tests/qemu-iotests/051.pc.out
/openbmc/qemu/tests/qemu-iotests/067
/openbmc/qemu/tests/qemu-iotests/067.out
/openbmc/qemu/tests/qemu-iotests/102
/openbmc/qemu/tests/qemu-iotests/106
/openbmc/qemu/tests/qemu-iotests/139
/openbmc/qemu/tests/qemu-iotests/163
/openbmc/qemu/tests/qemu-iotests/163.out
/openbmc/qemu/tests/qemu-iotests/172
/openbmc/qemu/tests/qemu-iotests/181
/openbmc/qemu/tests/qemu-iotests/181.out
/openbmc/qemu/tests/qemu-iotests/182
/openbmc/qemu/tests/qemu-iotests/186
/openbmc/qemu/tests/qemu-iotests/187.out
/openbmc/qemu/tests/qemu-iotests/195
/openbmc/qemu/tests/qemu-iotests/195.out
/openbmc/qemu/tests/qemu-iotests/check
/openbmc/qemu/tests/qemu-iotests/group
/openbmc/qemu/tests/test-vmstate.c
/openbmc/qemu/util/qemu-thread-posix.c
/openbmc/qemu/util/throttle.c
/openbmc/qemu/vl.c
8b81253321-Sep-2017 Alex Bennée <alex.bennee@linaro.org>

accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

The mmio path (see exec.c:prepare_mmio_access) already protects itself
against recursive locking and it makes sense to do the same for
io_readx

accel/tcg/cputlb: avoid recursive BQL (fixes #1706296)

The mmio path (see exec.c:prepare_mmio_access) already protects itself
against recursive locking and it makes sense to do the same for
io_readx/writex. Otherwise any helper running in the BQL context will
assert when it attempts to write to device memory as in the case of
the bug report.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
CC: Richard Jones <rjones@redhat.com>
CC: Paolo Bonzini <bonzini@gnu.org>
CC: qemu-stable@nongnu.org
Message-Id: <20170921110625.9500-1-alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...


/openbmc/qemu/.gitignore
/openbmc/qemu/MAINTAINERS
/openbmc/qemu/Makefile
/openbmc/qemu/Makefile.objs
tcg/cputlb.c
/openbmc/qemu/audio/Makefile.objs
/openbmc/qemu/block/file-posix.c
/openbmc/qemu/chardev/Makefile.objs
/openbmc/qemu/chardev/char-fd.c
/openbmc/qemu/chardev/char-fe.c
/openbmc/qemu/chardev/char-pty.c
/openbmc/qemu/chardev/char-socket.c
/openbmc/qemu/chardev/char-udp.c
/openbmc/qemu/chardev/char.c
/openbmc/qemu/configure
/openbmc/qemu/cpus.c
/openbmc/qemu/default-configs/arm-softmmu.mak
/openbmc/qemu/default-configs/sparc64-softmmu.mak
/openbmc/qemu/docs/devel/atomics.txt
/openbmc/qemu/docs/interop/pr-helper.rst
/openbmc/qemu/docs/pr-manager.rst
/openbmc/qemu/exec.c
/openbmc/qemu/hmp-commands-info.hx
/openbmc/qemu/hmp.c
/openbmc/qemu/hw/arm/Makefile.objs
/openbmc/qemu/hw/arm/armv7m.c
/openbmc/qemu/hw/arm/msf2-soc.c
/openbmc/qemu/hw/arm/msf2-som.c
/openbmc/qemu/hw/arm/omap2.c
/openbmc/qemu/hw/arm/palm.c
/openbmc/qemu/hw/block/xen_disk.c
/openbmc/qemu/hw/gpio/omap_gpio.c
/openbmc/qemu/hw/i2c/omap_i2c.c
/openbmc/qemu/hw/ide/ahci.c
/openbmc/qemu/hw/ide/core.c
/openbmc/qemu/hw/intc/armv7m_nvic.c
/openbmc/qemu/hw/intc/openpic_kvm.c
/openbmc/qemu/hw/intc/trace-events
/openbmc/qemu/hw/mips/Makefile.objs
/openbmc/qemu/hw/mips/cps.c
/openbmc/qemu/hw/mips/mips_fulong2e.c
/openbmc/qemu/hw/mips/mips_jazz.c
/openbmc/qemu/hw/mips/mips_malta.c
/openbmc/qemu/hw/mips/mips_mipssim.c
/openbmc/qemu/hw/mips/mips_r4k.c
/openbmc/qemu/hw/misc/Makefile.objs
/openbmc/qemu/hw/misc/msf2-sysreg.c
/openbmc/qemu/hw/misc/trace-events
/openbmc/qemu/hw/net/Makefile.objs
/openbmc/qemu/hw/net/sunhme.c
/openbmc/qemu/hw/net/trace-events
/openbmc/qemu/hw/sparc64/sun4u.c
/openbmc/qemu/hw/ssi/Makefile.objs
/openbmc/qemu/hw/ssi/mss-spi.c
/openbmc/qemu/hw/timer/Makefile.objs
/openbmc/qemu/hw/timer/mss-timer.c
/openbmc/qemu/hw/timer/omap_gptimer.c
/openbmc/qemu/hw/timer/omap_synctimer.c
/openbmc/qemu/hw/usb/Makefile.objs
/openbmc/qemu/hw/xen/xen_pt.h
/openbmc/qemu/hw/xen/xen_pt_config_init.c
/openbmc/qemu/hw/xen/xen_pt_msi.c
/openbmc/qemu/include/chardev/char.h
/openbmc/qemu/include/exec/memory-internal.h
/openbmc/qemu/include/exec/memory.h
/openbmc/qemu/include/glib-compat.h
/openbmc/qemu/include/hw/arm/armv7m.h
/openbmc/qemu/include/hw/arm/msf2-soc.h
/openbmc/qemu/include/hw/ide/internal.h
/openbmc/qemu/include/hw/intc/armv7m_nvic.h
/openbmc/qemu/include/hw/misc/msf2-sysreg.h
/openbmc/qemu/include/hw/net/mii.h
/openbmc/qemu/include/hw/pci/pci_ids.h
/openbmc/qemu/include/hw/ssi/mss-spi.h
/openbmc/qemu/include/hw/timer/mss-timer.h
/openbmc/qemu/include/migration/register.h
/openbmc/qemu/include/qemu/atomic.h
/openbmc/qemu/include/qemu/bitmap.h
/openbmc/qemu/include/qemu/typedefs.h
/openbmc/qemu/include/scsi/pr-manager.h
/openbmc/qemu/include/scsi/utils.h
/openbmc/qemu/include/sysemu/seccomp.h
/openbmc/qemu/memory.c
/openbmc/qemu/migration/Makefile.objs
/openbmc/qemu/migration/channel.c
/openbmc/qemu/migration/exec.c
/openbmc/qemu/migration/fd.c
/openbmc/qemu/migration/migration.c
/openbmc/qemu/migration/migration.h
/openbmc/qemu/migration/postcopy-ram.c
/openbmc/qemu/migration/postcopy-ram.h
/openbmc/qemu/migration/ram.c
/openbmc/qemu/migration/ram.h
/openbmc/qemu/migration/savevm.c
/openbmc/qemu/migration/socket.c
/openbmc/qemu/monitor.c
/openbmc/qemu/net/Makefile.objs
/openbmc/qemu/qapi/block-core.json
/openbmc/qemu/qapi/migration.json
/openbmc/qemu/scripts/archive-source.sh
/openbmc/qemu/scripts/qemu.py
/openbmc/qemu/scsi/Makefile.objs
/openbmc/qemu/scsi/pr-helper.h
/openbmc/qemu/scsi/pr-manager-helper.c
/openbmc/qemu/scsi/pr-manager.c
/openbmc/qemu/scsi/qemu-pr-helper.c
/openbmc/qemu/scsi/trace-events
/openbmc/qemu/scsi/utils.c
/openbmc/qemu/target/arm/cpu.c
/openbmc/qemu/target/arm/cpu.h
/openbmc/qemu/target/arm/helper.c
/openbmc/qemu/target/arm/translate-a64.c
/openbmc/qemu/target/i386/cpu.c
/openbmc/qemu/target/mips/Makefile.objs
/openbmc/qemu/target/mips/cp0_timer.c
/openbmc/qemu/target/mips/cpu-qom.h
/openbmc/qemu/target/mips/cpu.c
/openbmc/qemu/target/mips/cpu.h
/openbmc/qemu/target/mips/dsp_helper.c
/openbmc/qemu/target/mips/gdbstub.c
/openbmc/qemu/target/mips/helper.c
/openbmc/qemu/target/mips/internal.h
/openbmc/qemu/target/mips/kvm.c
/openbmc/qemu/target/mips/machine.c
/openbmc/qemu/target/mips/msa_helper.c
/openbmc/qemu/target/mips/op_helper.c
/openbmc/qemu/target/mips/translate.c
/openbmc/qemu/target/mips/translate_init.c
/openbmc/qemu/target/s390x/kvm.c
/openbmc/qemu/tests/.gitignore
/openbmc/qemu/tests/docker/Makefile.include
/openbmc/qemu/tests/docker/common.rc
/openbmc/qemu/tests/docker/docker.py
/openbmc/qemu/tests/docker/dockerfiles/fedora.docker
/openbmc/qemu/tests/docker/dockerfiles/travis.docker
/openbmc/qemu/tests/docker/dockerfiles/ubuntu.docker
/openbmc/qemu/tests/docker/run
/openbmc/qemu/tests/docker/test-block
/openbmc/qemu/tests/docker/test-full
/openbmc/qemu/tests/keys/README
/openbmc/qemu/tests/keys/id_rsa
/openbmc/qemu/tests/keys/id_rsa.pub
/openbmc/qemu/tests/vm/Makefile.include
/openbmc/qemu/tests/vm/README
/openbmc/qemu/tests/vm/basevm.py
/openbmc/qemu/tests/vm/freebsd
/openbmc/qemu/tests/vm/netbsd
/openbmc/qemu/tests/vm/openbsd
/openbmc/qemu/tests/vm/ubuntu.i386
/openbmc/qemu/trace-events
/openbmc/qemu/ui/Makefile.objs
/openbmc/qemu/util/bitmap.c
/openbmc/qemu/util/bitops.c
/openbmc/qemu/vl.c
3110cdbd20-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: drop wrong assertion creating problems with pflash

pflash toggles mr->romd_mode. So this assert does not always hold.

1) a device was added with !mr->romd_mode, therefore effectively not
cr

kvm: drop wrong assertion creating problems with pflash

pflash toggles mr->romd_mode. So this assert does not always hold.

1) a device was added with !mr->romd_mode, therefore effectively not
creating a kvm slot as we want to trap every access (add = false).
2) mr->romd_mode was toggled on before remove it. There is now
actually no slot to remove and the assert is wrong.

So let's just drop the assert.

Reported-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170920145025.19403-1-david@redhat.com>
Tested-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/openbmc/qemu/MAINTAINERS
kvm/kvm-all.c
/openbmc/qemu/backends/hostmem-file.c
/openbmc/qemu/bsd-user/main.c
/openbmc/qemu/configure
/openbmc/qemu/default-configs/pci.mak
/openbmc/qemu/default-configs/ppc-softmmu.mak
/openbmc/qemu/default-configs/ppc64-softmmu.mak
/openbmc/qemu/default-configs/s390x-softmmu.mak
/openbmc/qemu/dump.c
/openbmc/qemu/exec.c
/openbmc/qemu/hw/9pfs/9p.c
/openbmc/qemu/hw/alpha/dp264.c
/openbmc/qemu/hw/arm/armv7m.c
/openbmc/qemu/hw/arm/aspeed_soc.c
/openbmc/qemu/hw/arm/collie.c
/openbmc/qemu/hw/arm/exynos4210.c
/openbmc/qemu/hw/arm/gumstix.c
/openbmc/qemu/hw/arm/highbank.c
/openbmc/qemu/hw/arm/integratorcp.c
/openbmc/qemu/hw/arm/mainstone.c
/openbmc/qemu/hw/arm/mps2.c
/openbmc/qemu/hw/arm/musicpal.c
/openbmc/qemu/hw/arm/netduino2.c
/openbmc/qemu/hw/arm/nseries.c
/openbmc/qemu/hw/arm/omap1.c
/openbmc/qemu/hw/arm/omap2.c
/openbmc/qemu/hw/arm/omap_sx1.c
/openbmc/qemu/hw/arm/palm.c
/openbmc/qemu/hw/arm/pxa2xx.c
/openbmc/qemu/hw/arm/realview.c
/openbmc/qemu/hw/arm/spitz.c
/openbmc/qemu/hw/arm/stellaris.c
/openbmc/qemu/hw/arm/stm32f205_soc.c
/openbmc/qemu/hw/arm/strongarm.c
/openbmc/qemu/hw/arm/tosa.c
/openbmc/qemu/hw/arm/versatilepb.c
/openbmc/qemu/hw/arm/vexpress.c
/openbmc/qemu/hw/arm/virt.c
/openbmc/qemu/hw/arm/xilinx_zynq.c
/openbmc/qemu/hw/arm/z2.c
/openbmc/qemu/hw/char/virtio-console.c
/openbmc/qemu/hw/char/virtio-serial-bus.c
/openbmc/qemu/hw/core/machine.c
/openbmc/qemu/hw/display/virtio-gpu.c
/openbmc/qemu/hw/i386/acpi-build.c
/openbmc/qemu/hw/i386/pc.c
/openbmc/qemu/hw/i386/pc_piix.c
/openbmc/qemu/hw/lm32/lm32_boards.c
/openbmc/qemu/hw/lm32/milkymist.c
/openbmc/qemu/hw/m68k/an5206.c
/openbmc/qemu/hw/m68k/mcf5208.c
/openbmc/qemu/hw/mips/cps.c
/openbmc/qemu/hw/mips/mips_fulong2e.c
/openbmc/qemu/hw/mips/mips_jazz.c
/openbmc/qemu/hw/mips/mips_malta.c
/openbmc/qemu/hw/mips/mips_mipssim.c
/openbmc/qemu/hw/mips/mips_r4k.c
/openbmc/qemu/hw/misc/ivshmem.c
/openbmc/qemu/hw/moxie/moxiesim.c
/openbmc/qemu/hw/openrisc/openrisc_sim.c
/openbmc/qemu/hw/ppc/e500.c
/openbmc/qemu/hw/ppc/mac_newworld.c
/openbmc/qemu/hw/ppc/mac_oldworld.c
/openbmc/qemu/hw/ppc/ppc440_bamboo.c
/openbmc/qemu/hw/ppc/ppc4xx_devs.c
/openbmc/qemu/hw/ppc/prep.c
/openbmc/qemu/hw/ppc/spapr.c
/openbmc/qemu/hw/ppc/virtex_ml507.c
/openbmc/qemu/hw/s390x/Makefile.objs
/openbmc/qemu/hw/s390x/css.c
/openbmc/qemu/hw/s390x/s390-pci-bus.c
/openbmc/qemu/hw/s390x/s390-pci-bus.h
/openbmc/qemu/hw/s390x/s390-pci-inst.c
/openbmc/qemu/hw/s390x/s390-pci-stub.c
/openbmc/qemu/hw/s390x/s390-virtio-ccw.c
/openbmc/qemu/hw/s390x/s390-virtio-hcall.c
/openbmc/qemu/hw/s390x/s390-virtio-hcall.h
/openbmc/qemu/hw/s390x/sclp.c
/openbmc/qemu/hw/s390x/virtio-ccw.c
/openbmc/qemu/hw/s390x/virtio-ccw.h
/openbmc/qemu/hw/scsi/mptsas.c
/openbmc/qemu/hw/sh4/r2d.c
/openbmc/qemu/hw/sh4/shix.c
/openbmc/qemu/hw/sparc/leon3.c
/openbmc/qemu/hw/sparc/sun4m.c
/openbmc/qemu/hw/sparc64/sparc64.c
/openbmc/qemu/hw/tricore/tricore_testboard.c
/openbmc/qemu/hw/unicore32/puv3.c
/openbmc/qemu/hw/virtio/virtio.c
/openbmc/qemu/hw/xtensa/sim.c
/openbmc/qemu/hw/xtensa/xtfpga.c
/openbmc/qemu/include/hw/arm/armv7m.h
/openbmc/qemu/include/hw/arm/aspeed_soc.h
/openbmc/qemu/include/hw/arm/stm32f205_soc.h
/openbmc/qemu/include/hw/boards.h
/openbmc/qemu/include/hw/s390x/s390-virtio-ccw.h
/openbmc/qemu/include/hw/s390x/sclp.h
/openbmc/qemu/include/hw/virtio/virtio-serial.h
/openbmc/qemu/include/qemu/osdep.h
/openbmc/qemu/include/qom/cpu.h
/openbmc/qemu/include/qom/object_interfaces.h
/openbmc/qemu/linux-user/main.c
/openbmc/qemu/numa.c
/openbmc/qemu/pc-bios/s390-ccw/netboot.mak
/openbmc/qemu/qapi-schema.json
/openbmc/qemu/qemu-options.hx
/openbmc/qemu/qom/cpu.c
/openbmc/qemu/qom/object_interfaces.c
/openbmc/qemu/scripts/checkpatch.pl
/openbmc/qemu/target/arm/cpu.c
/openbmc/qemu/target/arm/cpu.h
/openbmc/qemu/target/i386/arch_dump.c
/openbmc/qemu/target/i386/arch_memory_mapping.c
/openbmc/qemu/target/i386/cpu.c
/openbmc/qemu/target/i386/cpu.h
/openbmc/qemu/target/i386/svm_helper.c
/openbmc/qemu/target/ppc/arch_dump.c
/openbmc/qemu/target/s390x/arch_dump.c
/openbmc/qemu/target/s390x/cpu-qom.h
/openbmc/qemu/target/s390x/cpu.c
/openbmc/qemu/target/s390x/cpu.h
/openbmc/qemu/target/s390x/cpu_models.c
/openbmc/qemu/target/s390x/cpu_models.h
/openbmc/qemu/target/s390x/diag.c
/openbmc/qemu/target/s390x/excp_helper.c
/openbmc/qemu/target/s390x/helper.c
/openbmc/qemu/target/s390x/internal.h
/openbmc/qemu/target/s390x/kvm.c
/openbmc/qemu/target/s390x/misc_helper.c
/openbmc/qemu/target/s390x/translate.c
/openbmc/qemu/tests/Makefile.include
/openbmc/qemu/tests/docker/Makefile.include
/openbmc/qemu/tests/drive_del-test.c
/openbmc/qemu/tests/libqos/virtio.c
/openbmc/qemu/tests/libqos/virtio.h
/openbmc/qemu/vl.c
4c44a00713-Sep-2017 Philippe Mathieu-Daudé <f4bug@amsat.org>

accel/hax: move hax-stub.c to accel/stubs/

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170913221149.30382-1-f4bug@amsat.

accel/hax: move hax-stub.c to accel/stubs/

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170913221149.30382-1-f4bug@amsat.org>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

show more ...

8297be8011-Sep-2017 Alistair Francis <alistair.francis@xilinx.com>

Convert multi-line fprintf() to warn_report()

Convert all the multi-line uses of fprintf(stderr, "warning:"..."\n"...
to use warn_report() instead. This helps standardise on a single
method of print

Convert multi-line fprintf() to warn_report()

Convert all the multi-line uses of fprintf(stderr, "warning:"..."\n"...
to use warn_report() instead. This helps standardise on a single
method of printing warnings to the user.

All of the warnings were changed using these commands:
find ./* -type f -exec sed -i \
'N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +
find ./* -type f -exec sed -i \
'N;N;N;N;N;N;N; {s|fprintf(.*".*warning[,:] \(.*\)\\n"\(.*\));|warn_report("\1"\2);|Ig}' \
{} +

Indentation fixed up manually afterwards.

Some of the lines were manually edited to reduce the line length to below
80 charecters. Some of the lines with newlines in the middle of the
string were also manually edit to avoid checkpatch errrors.

The #include lines were manually updated to allow the code to compile.

Several of the warning messages can be improved after this patch, to
keep this patch mechanical this has been moved into a later patch.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Max Reitz <mreitz@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Yongbok Kim <yongbok.kim@imgtec.com>
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Alexander Graf <agraf@suse.de>
Cc: Jason Wang <jasowang@redhat.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <5def63849ca8f551630c6f2b45bcb1c482f765a6.1505158760.git.alistair.francis@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

67548f0911-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: kvm_log_sync() is only called with known memory sections

Flatview will make sure that we can only end up in this function with
memory sections that correspond to exactly one slot. So we don't
h

kvm: kvm_log_sync() is only called with known memory sections

Flatview will make sure that we can only end up in this function with
memory sections that correspond to exactly one slot. So we don't
have to iterate multiple times. There won't be overlapping slots but
only matching slots.

Properly align the section and look up the corresponding slot. This
heavily simplifies this function.

We can now get rid of kvm_lookup_overlapping_slot().

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-7-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

343562e811-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: kvm_log_start/stop are only called with known sections

Let's properly align the sections first and bail out if we would ever
get called with a memory section we don't know yet.

Signed-off-by:

kvm: kvm_log_start/stop are only called with known sections

Let's properly align the sections first and bail out if we would ever
get called with a memory section we don't know yet.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-6-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

f357f56411-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: we never have overlapping slots in kvm_set_phys_mem()

The way flatview handles memory sections, we will never have overlapping
memory sections in kvm.

address_space_update_topology_pass() will

kvm: we never have overlapping slots in kvm_set_phys_mem()

The way flatview handles memory sections, we will never have overlapping
memory sections in kvm.

address_space_update_topology_pass() will make sure that we will only
get called for

a) an existing memory section for which we only update parameters
(log_start, log_stop).
b) an existing memory section we want to delete (region_del)
c) a brand new memory section we want to add (region_add)

We cannot have overlapping memory sections in kvm as we will first remove
the overlapping sections and then add the ones without conflicts.

Therefore we can remove the complexity for handling prefix and suffix
slots.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-5-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

2747e71611-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: use start + size for memory ranges

Convert kvm_lookup_matching_slot().

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-4-david@redhat.com>
Signed-off-by:

kvm: use start + size for memory ranges

Convert kvm_lookup_matching_slot().

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-4-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

5ea69c2e11-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: factor out alignment of memory section

Factor it out, so we can reuse it later.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-3-david@redhat.com>
Signed

kvm: factor out alignment of memory section

Factor it out, so we can reuse it later.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-3-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...

89de4b9111-Sep-2017 David Hildenbrand <david@redhat.com>

kvm: require JOIN_MEMORY_REGIONS_WORKS

We already require DESTROY_MEMORY_REGION_WORKS, JOIN_MEMORY_REGIONS_WORKS
was added just half a year later.

In addition, with flatview overlapping memory regi

kvm: require JOIN_MEMORY_REGIONS_WORKS

We already require DESTROY_MEMORY_REGION_WORKS, JOIN_MEMORY_REGIONS_WORKS
was added just half a year later.

In addition, with flatview overlapping memory regions are first
removed before adding the changed one. So we can't really detect joining
memory regions this way.

Let's just get rid of this special handling.

Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170911174933.20789-2-david@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


/openbmc/qemu/MAINTAINERS
/openbmc/qemu/Makefile.objs
kvm/kvm-all.c
/openbmc/qemu/block/iscsi.c
/openbmc/qemu/hw/audio/intel-hda.c
/openbmc/qemu/hw/audio/wm8750.c
/openbmc/qemu/hw/block/fdc.c
/openbmc/qemu/hw/block/virtio-blk.c
/openbmc/qemu/hw/i386/multiboot.c
/openbmc/qemu/hw/ide/ahci.c
/openbmc/qemu/hw/ide/ahci_internal.h
/openbmc/qemu/hw/ide/atapi.c
/openbmc/qemu/hw/ide/cmd646.c
/openbmc/qemu/hw/ide/core.c
/openbmc/qemu/hw/ide/microdrive.c
/openbmc/qemu/hw/ide/pci.c
/openbmc/qemu/hw/ide/piix.c
/openbmc/qemu/hw/ide/qdev.c
/openbmc/qemu/hw/ide/trace-events
/openbmc/qemu/hw/ide/via.c
/openbmc/qemu/hw/scsi/esp.c
/openbmc/qemu/hw/scsi/megasas.c
/openbmc/qemu/hw/scsi/mptendian.c
/openbmc/qemu/hw/scsi/mptsas.c
/openbmc/qemu/hw/scsi/scsi-bus.c
/openbmc/qemu/hw/scsi/scsi-disk.c
/openbmc/qemu/hw/scsi/scsi-generic.c
/openbmc/qemu/hw/scsi/spapr_vscsi.c
/openbmc/qemu/hw/scsi/virtio-scsi-dataplane.c
/openbmc/qemu/hw/scsi/virtio-scsi.c
/openbmc/qemu/hw/scsi/vmw_pvscsi.c
/openbmc/qemu/hw/usb/dev-uas.c
/openbmc/qemu/include/hw/ide/internal.h
/openbmc/qemu/include/hw/scsi/scsi.h
/openbmc/qemu/include/hw/virtio/virtio-scsi.h
/openbmc/qemu/include/scsi/constants.h
/openbmc/qemu/include/scsi/utils.h
/openbmc/qemu/memory.c
/openbmc/qemu/scripts/qemu.py
/openbmc/qemu/scsi/Makefile.objs
/openbmc/qemu/scsi/utils.c
/openbmc/qemu/target/i386/kvm.c
/openbmc/qemu/target/i386/ops_sse.h
/openbmc/qemu/target/i386/translate.c
/openbmc/qemu/tcg/aarch64/tcg-target.inc.c
/openbmc/qemu/tcg/arm/tcg-target.inc.c
/openbmc/qemu/tcg/i386/tcg-target.inc.c
/openbmc/qemu/tcg/mips/tcg-target.inc.c
/openbmc/qemu/tcg/ppc/tcg-target.inc.c
/openbmc/qemu/tcg/s390/tcg-target.inc.c
/openbmc/qemu/tcg/sparc/tcg-target.inc.c
/openbmc/qemu/tcg/tcg.c
/openbmc/qemu/tcg/tcg.h
/openbmc/qemu/tcg/tci/tcg-target.inc.c
/openbmc/qemu/tests/qemu-iotests/051.pc.out
/openbmc/qemu/tests/qemu-iotests/172.out
/openbmc/qemu/tests/virtio-scsi-test.c
a411d29612-Sep-2017 Philippe Mathieu-Daudé <f4bug@amsat.org>

accel/tcg: move USER code to user-exec.c

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170912211934.20919-1-f4bug@amsat.org

accel/tcg: move USER code to user-exec.c

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170912211934.20919-1-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

10f7d4d511-Sep-2017 Philippe Mathieu-Daudé <f4bug@amsat.org>

accel/tcg: move atomic_template.h to accel/tcg/

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20170911213328.9701-5-f4bug@amsat.org>

accel/tcg: move atomic_template.h to accel/tcg/

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20170911213328.9701-5-f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

show more ...

1...<<4142434445464748495051