sdk/emulator/qemu.git
8 years agocpu: move exec-all.h inclusion out of cpu.h
Paolo Bonzini [Tue, 15 Mar 2016 12:18:37 +0000 (13:18 +0100)]
cpu: move exec-all.h inclusion out of cpu.h

exec-all.h contains TCG-specific definitions.  It is not needed outside
TCG-specific files such as translate.c, exec.c or *helper.c.

One generic function had snuck into include/exec/exec-all.h; move it to
include/qom/cpu.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoexec: extract exec/tb-context.h
Paolo Bonzini [Tue, 15 Mar 2016 12:16:36 +0000 (13:16 +0100)]
exec: extract exec/tb-context.h

TCG backends do not need most of exec-all.h; extract what they actually
need to a separate file or move it directly to tcg.h.  The next patch
will stop including exec-all.h from everywhere.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agohw: explicitly include qemu/log.h
Paolo Bonzini [Tue, 15 Dec 2015 12:16:16 +0000 (13:16 +0100)]
hw: explicitly include qemu/log.h

Move the inclusion out of hw/hw.h, most files do not need it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agomips: move CP0 functions out of cpu.h
Paolo Bonzini [Tue, 15 Dec 2015 12:49:17 +0000 (13:49 +0100)]
mips: move CP0 functions out of cpu.h

These are here for historical reasons: they are needed from both gdbstub.c
and op_helper.c, and the latter was compiled with fixed AREG0.  It is
not needed anymore, so uninline them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoarm: move arm_log_exception into .c file
Paolo Bonzini [Fri, 4 Dec 2015 11:28:03 +0000 (12:28 +0100)]
arm: move arm_log_exception into .c file

Avoid need for qemu/log.h inclusion, and make the function static too.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoqemu-common: push cpu.h inclusion out of qemu-common.h
Paolo Bonzini [Tue, 15 Mar 2016 15:58:45 +0000 (16:58 +0100)]
qemu-common: push cpu.h inclusion out of qemu-common.h

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoacpi: do not use TARGET_PAGE_SIZE
Paolo Bonzini [Thu, 31 Mar 2016 08:56:54 +0000 (10:56 +0200)]
acpi: do not use TARGET_PAGE_SIZE

This is a #define used by the CPU.  NVDIMM can just use 4K
unconditionally.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agos390x: reorganize CSS bits between cpu.h and other headers
Paolo Bonzini [Fri, 4 Dec 2015 11:06:26 +0000 (12:06 +0100)]
s390x: reorganize CSS bits between cpu.h and other headers

Move cpu_inject_* to the only C file where they are used.

Move ioinst.h declarations that need S390CPU to cpu.h, to make
ioinst.h independent of cpu.h.

Move channel declarations that only need SubchDev from cpu.h
to css.h, to make more channel users independent of cpu.h.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agodma: do not depend on kvm_enabled()
Paolo Bonzini [Wed, 17 Sep 2014 10:21:29 +0000 (12:21 +0200)]
dma: do not depend on kvm_enabled()

Memory barriers are needed also by Xen and, when the ioeventfd
bugs are fixed, by TCG as well.

sysemu/kvm.h is not anymore needed in sysemu/dma.h, move it to
the actual users.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agogdbstub: remove unnecessary includes from gdbstub-xml.c
Paolo Bonzini [Mon, 25 Aug 2014 14:27:30 +0000 (16:27 +0200)]
gdbstub: remove unnecessary includes from gdbstub-xml.c

gdbstub-xml.c defines a bunch of arrays of strings; there is no
need to include anything.  Keep osdep.h for consistency, but remove
the rest.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoqemu-common: stop including qemu/host-utils.h from qemu-common.h
Paolo Bonzini [Tue, 15 Mar 2016 14:36:13 +0000 (15:36 +0100)]
qemu-common: stop including qemu/host-utils.h from qemu-common.h

Move it to the actual users.  There are some inclusions of
qemu/host-utils.h in headers, but they are all necessary.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoqemu-common: stop including qemu/bswap.h from qemu-common.h
Paolo Bonzini [Tue, 15 Mar 2016 16:22:36 +0000 (17:22 +0100)]
qemu-common: stop including qemu/bswap.h from qemu-common.h

Move it to the actual users.  There are still a few includes of
qemu/bswap.h in headers; removing them is left for future work.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agocpu: move endian-dependent load/store functions to cpu-all.h
Paolo Bonzini [Fri, 27 Jun 2014 06:33:38 +0000 (08:33 +0200)]
cpu: move endian-dependent load/store functions to cpu-all.h

Disentangle cpu-common.h and memory.h from NEED_CPU_H.  Prototypes are
not defined for !NEED_CPU_H, so remove them from poison.h too.  Only
macros need poisoning.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agohw: cannot include hw/hw.h from user emulation
Paolo Bonzini [Fri, 27 Jun 2014 06:40:04 +0000 (08:40 +0200)]
hw: cannot include hw/hw.h from user emulation

All qdev definitions are available from other headers, user-mode
emulation does not need hw/hw.h.

By considering system emulation only, it is simpler to disentangle
hw/hw.h from NEED_CPU_H.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agohw: move CPU state serialization to migration/cpu.h
Paolo Bonzini [Tue, 15 Mar 2016 11:51:18 +0000 (12:51 +0100)]
hw: move CPU state serialization to migration/cpu.h

Remove usage of NEED_CPU_H from hw/hw.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agohw: do not use VMSTATE_*TL
Paolo Bonzini [Fri, 27 Jun 2014 05:58:27 +0000 (07:58 +0200)]
hw: do not use VMSTATE_*TL

Reserve this to CPU state serialization.

Luckily, they were only used by sPAPR devices and these are ppc64
only.  So there is no change to migration format.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoinclude: poison symbols in osdep.h
Paolo Bonzini [Tue, 15 Mar 2016 11:46:10 +0000 (12:46 +0100)]
include: poison symbols in osdep.h

Ensure that all target-independent files ignore poisoned symbols,
and fix the fallout.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoapic: move target-dependent definitions to cpu.h
Paolo Bonzini [Fri, 4 Dec 2015 10:04:13 +0000 (11:04 +0100)]
apic: move target-dependent definitions to cpu.h

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoexplicitly include linux/kvm.h
Paolo Bonzini [Fri, 4 Dec 2015 10:03:51 +0000 (11:03 +0100)]
explicitly include linux/kvm.h

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoexplicitly include hw/qdev-core.h
Paolo Bonzini [Fri, 4 Dec 2015 10:10:27 +0000 (11:10 +0100)]
explicitly include hw/qdev-core.h

exec/cpu-all.h includes qom/cpu.h, which includes hw/qdev-core.h.
Explicit inclusion will keep things working when cpu.h will not be
included indirectly almost everywhere (either directly or through
qemu-common.h).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoexplicitly include qom/cpu.h
Paolo Bonzini [Fri, 4 Dec 2015 10:10:07 +0000 (11:10 +0100)]
explicitly include qom/cpu.h

exec/cpu-all.h includes qom/cpu.h.  Explicit inclusion
will keep things working when cpu.h will not be included
indirectly almost everywhere (either directly or through
qemu-common.h).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoarm: remove useless cpu.h inclusion
Paolo Bonzini [Mon, 25 Aug 2014 16:06:56 +0000 (18:06 +0200)]
arm: remove useless cpu.h inclusion

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoppc: use PowerPCCPU instead of CPUPPCState
Paolo Bonzini [Tue, 15 Mar 2016 13:32:19 +0000 (14:32 +0100)]
ppc: use PowerPCCPU instead of CPUPPCState

This changes a cpu.h dependency for hw/ppc/ppc.h into a cpu-qom.h
dependency.  For it to compile we also need to clean up a few unused
definitions.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agomips: use MIPSCPU instead of CPUMIPSState
Paolo Bonzini [Tue, 15 Mar 2016 13:32:19 +0000 (14:32 +0100)]
mips: use MIPSCPU instead of CPUMIPSState

This changes a cpu.h dependency into a cpu-qom.h dependency.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoalpha: include cpu-qom.h in files that require AlphaCPU
Paolo Bonzini [Tue, 15 Mar 2016 13:32:19 +0000 (14:32 +0100)]
alpha: include cpu-qom.h in files that require AlphaCPU

This will keep things working when cpu.h will not be included
indirectly almost everywhere (either directly or through
qemu-common.h).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agosh4: include cpu-qom.h in files that require SuperHCPU
Paolo Bonzini [Tue, 15 Mar 2016 13:32:19 +0000 (14:32 +0100)]
sh4: include cpu-qom.h in files that require SuperHCPU

This will keep things working when cpu.h will not be included
indirectly almost everywhere (either directly or through
qemu-common.h).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agom68k: include cpu-qom.h in files that require M68KCPU
Paolo Bonzini [Tue, 15 Mar 2016 13:32:19 +0000 (14:32 +0100)]
m68k: include cpu-qom.h in files that require M68KCPU

This will keep things working when cpu.h will not be included
indirectly almost everywhere (either directly or through
qemu-common.h).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoarm: include cpu-qom.h in files that require ARMCPU
Paolo Bonzini [Tue, 15 Mar 2016 13:32:02 +0000 (14:32 +0100)]
arm: include cpu-qom.h in files that require ARMCPU

This will keep things working when cpu.h will not be included
indirectly almost everywhere (either directly or through
qemu-common.h).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-xtensa: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-xtensa: make cpu-qom.h not target specific

Make XtensaCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  Conversely, move all definitions needed to
define a class to cpu-qom.h.  This helps making files independent of
NEED_CPU_H if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-unicore32: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-unicore32: make cpu-qom.h not target specific

Make UniCore32CPU an opaque type within cpu-qom.h, and move all
definitions of private methods, as well as all type definitions that
require knowledge of the layout to cpu.h.  This helps making files
independent of NEED_CPU_H if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-tricore: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-tricore: make cpu-qom.h not target specific

Make TriCoreCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-sparc: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-sparc: make cpu-qom.h not target specific

Make SPARCCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-sh4: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-sh4: make cpu-qom.h not target specific

Make SuperHCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-s390x: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-s390x: make cpu-qom.h not target specific

Make S390XCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-ppc: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-ppc: make cpu-qom.h not target specific

Make PowerPCCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  Conversely, move all definitions needed to define
a class to cpu-qom.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-ppc: do not make PowerPCCPUClass depend on target-specific symbols
Paolo Bonzini [Wed, 18 May 2016 11:24:27 +0000 (13:24 +0200)]
target-ppc: do not make PowerPCCPUClass depend on target-specific symbols

Just leave some members in even if they are unused on e.g.
32-bit PPC or user-mode emulation.  This avoids complications
when using PowerPCCPUClass in code that is compiled just
once (because it applies to both 32-bit and 64-bit PPC
for example) but still needs to peek at PPC-specific members.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-ppc: do not use target_ulong in cpu-qom.h
Paolo Bonzini [Tue, 15 Mar 2016 14:12:16 +0000 (15:12 +0100)]
target-ppc: do not use target_ulong in cpu-qom.h

Bring the PowerPCCPUClass handle_mmu_fault method type into line with
the one in CPUClass.

Using vaddr also makes the cpu-qom.h file target independent.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-mips: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-mips: make cpu-qom.h not target specific

Make MIPSCPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-microblaze: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-microblaze: make cpu-qom.h not target specific

Make MicroBlazeCPU an opaque type within cpu-qom.h, and move all
definitions of private methods, as well as all type definitions that
require knowledge of the layout to cpu.h.  This helps making files
independent of NEED_CPU_H if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-m68k: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-m68k: make cpu-qom.h not target specific

Make M68KCPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-lm32: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-lm32: make cpu-qom.h not target specific

Make LM32CPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-i386: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-i386: make cpu-qom.h not target specific

Make X86CPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-cris: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-cris: make cpu-qom.h not target specific

Make CRISCPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-arm: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-arm: make cpu-qom.h not target specific

Make ARMCPU an opaque type within cpu-qom.h, and move all definitions of
private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agotarget-alpha: make cpu-qom.h not target specific
Paolo Bonzini [Tue, 15 Mar 2016 12:49:25 +0000 (13:49 +0100)]
target-alpha: make cpu-qom.h not target specific

Make AlphaCPU an opaque type within cpu-qom.h, and move all definitions
of private methods, as well as all type definitions that require knowledge
of the layout to cpu.h.  This helps making files independent of NEED_CPU_H
if they only need to pass around CPU pointers.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agocpu: make cpu-qom.h only include-able from cpu.h
Paolo Bonzini [Tue, 15 Sep 2015 14:00:56 +0000 (16:00 +0200)]
cpu: make cpu-qom.h only include-able from cpu.h

Make cpu-qom.h so that it is only included from cpu.h.  Then there
is no need for it to include cpu.h again.

Later we will make cpu-qom.h target independent and we will _want_
to include it from elsewhere, but for now reduce the number of cases
to handle.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agolog: do not use CONFIG_USER_ONLY
Paolo Bonzini [Fri, 4 Dec 2015 12:12:57 +0000 (13:12 +0100)]
log: do not use CONFIG_USER_ONLY

This decouples logging further from config-target.h

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoinclude: move CPU-related definitions out of qemu-common.h
Paolo Bonzini [Tue, 15 Mar 2016 15:47:38 +0000 (16:47 +0100)]
include: move CPU-related definitions out of qemu-common.h

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agos390x: move .needed functions for subsections to machine.c
Paolo Bonzini [Wed, 18 May 2016 11:08:02 +0000 (13:08 +0200)]
s390x: move .needed functions for subsections to machine.c

These functions are only used when defining subsections, so move
them there.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoscripts: add script to build QEMU and analyze inclusions
Paolo Bonzini [Thu, 31 Mar 2016 10:36:43 +0000 (12:36 +0200)]
scripts: add script to build QEMU and analyze inclusions

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoMerge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-05-18' into...
Peter Maydell [Thu, 19 May 2016 08:27:28 +0000 (09:27 +0100)]
Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2016-05-18' into staging

trivial patches for 2016-05-18

# gpg: Signature made Wed 18 May 2016 13:04:43 BST using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"

* remotes/mjt/tags/pull-trivial-patches-2016-05-18:
  Fix some typos found by codespell
  9p: drop unused declaration from coth.h
  smbios: fix typo
  accel: make configure_accelerator return void
  configure: Use uniform description for devel packages
  ipack: Update e-mail address
  util: fix comment typos
  qdict: fix unbounded stack warning for qdict_array_entries
  Fix typo in variable name (found and fixed by codespell)
  vl: fix comment about when parsing cpu definitions
  loader: fix potential memory leak
  remove comment for nonexistent structure member
  s390: remove misleading comment

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoFix some typos found by codespell
Stefan Weil [Wed, 23 Mar 2016 14:59:57 +0000 (15:59 +0100)]
Fix some typos found by codespell

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years ago9p: drop unused declaration from coth.h
Greg Kurz [Tue, 3 May 2016 08:22:00 +0000 (10:22 +0200)]
9p: drop unused declaration from coth.h

Commit "ebac1202c95a virtio-9p: use QEMU thread pool" dropped function
v9fs_init_worker_threads.

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agosmbios: fix typo
Cao jin [Tue, 29 Mar 2016 09:48:44 +0000 (17:48 +0800)]
smbios: fix typo

The spec says: "on paragraph (16-byte) boundaries"

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoaccel: make configure_accelerator return void
Wei Jiangang [Thu, 14 Apr 2016 03:58:02 +0000 (11:58 +0800)]
accel: make configure_accelerator return void

Return the negated value of accel_initialised is meaningless,
and the caller vl doesn't check it.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoconfigure: Use uniform description for devel packages
Stefan Weil [Fri, 8 Apr 2016 16:11:13 +0000 (18:11 +0200)]
configure: Use uniform description for devel packages

As all other devel packages are written in the form "name devel",
use this form for libcap devel and libattr devel, too.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoipack: Update e-mail address
Alberto Garcia [Tue, 23 Feb 2016 08:44:25 +0000 (10:44 +0200)]
ipack: Update e-mail address

I'm not really using the old one anymore.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoutil: fix comment typos
Wei Jiangang [Mon, 14 Mar 2016 09:58:29 +0000 (17:58 +0800)]
util: fix comment typos

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoqdict: fix unbounded stack warning for qdict_array_entries
Peter Xu [Tue, 22 Mar 2016 02:37:26 +0000 (10:37 +0800)]
qdict: fix unbounded stack warning for qdict_array_entries

Here we use one g_strdup_printf() to replace the two stack allocated
array, considering it's more convenient, safe, and as long as it's
called rarely only when quorum device opens. This will remove the
unbound stack warning when compiling with "-Wstack-usage=1000000".

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoFix typo in variable name (found and fixed by codespell)
Stefan Weil [Mon, 21 Mar 2016 18:21:26 +0000 (19:21 +0100)]
Fix typo in variable name (found and fixed by codespell)

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agovl: fix comment about when parsing cpu definitions
Wei Jiangang [Wed, 16 Mar 2016 09:40:40 +0000 (17:40 +0800)]
vl: fix comment about when parsing cpu definitions

machine->init() was replaced with machine_class->init()
in 958db90cd54823c33345000c995453a8c9b7a005.

Signed-off-by: Wei Jiangang <weijg.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoloader: fix potential memory leak
Cao jin [Wed, 24 Feb 2016 09:12:47 +0000 (17:12 +0800)]
loader: fix potential memory leak

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoremove comment for nonexistent structure member
Cao jin [Thu, 18 Feb 2016 08:18:56 +0000 (16:18 +0800)]
remove comment for nonexistent structure member

Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agos390: remove misleading comment
Michael Tokarev [Tue, 16 Feb 2016 06:29:07 +0000 (09:29 +0300)]
s390: remove misleading comment

The comment talks about a non-ELF object while the
example gives ELF object.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
8 years agoMerge remote-tracking branch 'remotes/cohuck/tags/s390x-20160517' into staging
Peter Maydell [Tue, 17 May 2016 15:49:11 +0000 (16:49 +0100)]
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20160517' into staging

First batch of s390x patches for 2.7:
- The new machine for 2.7
- Make use of the runtime instrumentation support introduced in
  the kernel
- Enhance our ipl (boot) process: We can now start from devices
  in subchannel sets > 0 as well. As a bonus, the conversion to
  diag308 in the bios allows us to get rid of the gr7 hack.
- Xiaoqiang Zhao's SCLP qomification patches
- Several fixes in the s390x pci implementation

# gpg: Signature made Tue 17 May 2016 15:35:32 BST using RSA key ID C6F02FAF
# gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"

* remotes/cohuck/tags/s390x-20160517:
  s390x/pci: remove whitespace
  s390x/pci: add length checking for pci sclp handlers
  s390x/pci: enhance mpcifc_service_call
  s390x/pci: fix s390_pci_sclp_deconfigure
  s390x/pci: introduce S390PCIBusDevice.iommu_enabled
  s390x/pci: export pci_dereg_ioat and pci_dereg_irqs
  s390x/pci: separate s390_pcihost_iommu_configure function
  s390x/pci: separate s390_sclp_configure function
  s390x/pci: fix reg_irqs()
  hw/char: QOM'ify sclpconsole.c
  hw/char: QOM'ify sclpconsole-lm.c
  s390x/ipl: Remove redundant usage of gr7
  s390-ccw.img: rebuild image
  pc-bios/s390-ccw: Get device address via diag 308/6
  s390x/ipl: Add ssid field to IplParameterBlock
  s390x/ipl: Provide ipl parameter block
  s390x/ipl: Add type and length checks for IplParameterBlock values
  s390x/ipl: Extend the IplParameterBlock struct
  s390x: enable runtime instrumentation
  s390x: add compat machine for 2.7

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agos390x/pci: remove whitespace
Yi Min Zhao [Mon, 9 May 2016 10:26:44 +0000 (18:26 +0800)]
s390x/pci: remove whitespace

Fix indentation of PciCfgSccb struct.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: add length checking for pci sclp handlers
Yi Min Zhao [Wed, 4 May 2016 07:56:53 +0000 (15:56 +0800)]
s390x/pci: add length checking for pci sclp handlers

The configure/deconfigure sclp commands need a SCCB with a length of
at least 16. Indicate in the response code if this is not fulfilled.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: enhance mpcifc_service_call
Yi Min Zhao [Thu, 28 Apr 2016 05:24:07 +0000 (13:24 +0800)]
s390x/pci: enhance mpcifc_service_call

Enhance error handling for mpcifc_service_call() to propagate errors
to guest by setting status codes or triggering program interrupts.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: fix s390_pci_sclp_deconfigure
Yi Min Zhao [Thu, 28 Apr 2016 05:22:51 +0000 (13:22 +0800)]
s390x/pci: fix s390_pci_sclp_deconfigure

When deconfiguring a s390 pci device, we should deconfigure the
corresponding IOMMU memory region and the IRQs for the device.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: introduce S390PCIBusDevice.iommu_enabled
Yi Min Zhao [Wed, 4 May 2016 07:07:11 +0000 (15:07 +0800)]
s390x/pci: introduce S390PCIBusDevice.iommu_enabled

We introduce iommu_enabled field for S390PCIBusDevice struct to
track whether the iommu has been enabled for the device. This allows
us to stop temporarily changing ->configured while en/disabling the
iommu and to do conditional cleanup later.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: export pci_dereg_ioat and pci_dereg_irqs
Yi Min Zhao [Tue, 26 Apr 2016 06:50:16 +0000 (14:50 +0800)]
s390x/pci: export pci_dereg_ioat and pci_dereg_irqs

dereg_irqs and dereg_ioat are needed by external functions. Let's
rename and export both of them in s390-pci-inst.h.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: separate s390_pcihost_iommu_configure function
Yi Min Zhao [Wed, 4 May 2016 07:06:44 +0000 (15:06 +0800)]
s390x/pci: separate s390_pcihost_iommu_configure function

Split s390_pcihost_iommu_configure() into separate functions for
configuring and deconfiguring in order to make the code more readable.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: separate s390_sclp_configure function
Yi Min Zhao [Thu, 28 Apr 2016 04:33:53 +0000 (12:33 +0800)]
s390x/pci: separate s390_sclp_configure function

Split s390_sclp_configure() into separate functions for sclp
configuring and deconfiguring in order to make the code more readable.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/pci: fix reg_irqs()
Yi Min Zhao [Tue, 26 Apr 2016 11:26:32 +0000 (19:26 +0800)]
s390x/pci: fix reg_irqs()

In reg_irqs(), present code assumes that map_indicator() always issues
successfully. Let's check it and return the error to caller in order to
inform guest.

Signed-off-by: Yi Min Zhao <zyimin@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agohw/char: QOM'ify sclpconsole.c
xiaoqiang zhao [Tue, 29 Mar 2016 07:47:25 +0000 (15:47 +0800)]
hw/char: QOM'ify sclpconsole.c

Drop the DO_UPCAST macro

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Message-Id: <1459237645-17227-7-git-send-email-zxq_yx_007@163.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agohw/char: QOM'ify sclpconsole-lm.c
xiaoqiang zhao [Tue, 29 Mar 2016 07:47:24 +0000 (15:47 +0800)]
hw/char: QOM'ify sclpconsole-lm.c

Drop the DO_UPCAST macro

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Message-Id: <1459237645-17227-6-git-send-email-zxq_yx_007@163.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/ipl: Remove redundant usage of gr7
Alexander Yarygin [Tue, 22 Sep 2015 09:58:09 +0000 (12:58 +0300)]
s390x/ipl: Remove redundant usage of gr7

We don't need to pass device address for pc-bios using gr7 anymore as
the pcbios completely relies on diag308 now, so we can remove it from
qemu. devno, ssid and cssid are migrated but the value was never reused,
so we can safely ignore these fields and migrate 0.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390-ccw.img: rebuild image
Cornelia Huck [Mon, 25 Apr 2016 09:07:13 +0000 (11:07 +0200)]
s390-ccw.img: rebuild image

Contains the following change:

pc-bios/s390-ccw: Get device address via diag 308/6

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agopc-bios/s390-ccw: Get device address via diag 308/6
Alexander Yarygin [Fri, 31 Jul 2015 14:04:51 +0000 (17:04 +0300)]
pc-bios/s390-ccw: Get device address via diag 308/6

To IPL from a device, pc-bios receives from qemu a device address via
general register 7. The better way to do it is to use diag308/6
instruction which returns so called
"IplParameterBlock". IplParameterBlock contains the device address for
IPL and additional parameters that can be used by pc-bios.

This patch allows pc-bios to get device address via diag308/6 and
doesn't use gr7 passed boot information anymore.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/ipl: Add ssid field to IplParameterBlock
Alexander Yarygin [Thu, 1 Oct 2015 17:21:33 +0000 (20:21 +0300)]
s390x/ipl: Add ssid field to IplParameterBlock

Add the ssid field to the ipl parameter block struct and fill it when
necessary so the guest can use it.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/ipl: Provide ipl parameter block
Alexander Yarygin [Tue, 21 Jul 2015 11:10:39 +0000 (14:10 +0300)]
s390x/ipl: Provide ipl parameter block

Right now we return the ipl parameter block only if the guest
specified one. Let's fill in the parameter block when bootindex
parameter is available and not booting from an external kernel.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/ipl: Add type and length checks for IplParameterBlock values
Alexander Yarygin [Mon, 10 Aug 2015 10:57:03 +0000 (13:57 +0300)]
s390x/ipl: Add type and length checks for IplParameterBlock values

We can check for valid type and lengths of the IplParameterBlock fields
when receiving the struct from the guest.

Length of the IplParameterBlock can be less than 4K. To play safe we can
read and write only required amount of data.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenband <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x/ipl: Extend the IplParameterBlock struct
Alexander Yarygin [Mon, 13 Jul 2015 12:04:36 +0000 (15:04 +0300)]
s390x/ipl: Extend the IplParameterBlock struct

The IplParameterBlock struct currently has only 200 bytes filled, but it
can be up to 4K.

This patch converts the struct to union with a fully populated struct
inside it and second struct with old values.

For compatibility reasons we disable migration of the extended iplb
field for pre-2.7 machines. Also a guest still can read/write only the
first 200 bytes of IPLB for now.

Signed-off-by: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x: enable runtime instrumentation
Fan Zhang [Wed, 9 Mar 2016 12:11:17 +0000 (13:11 +0100)]
s390x: enable runtime instrumentation

Introduce run-time-instrumentation support when running under kvm for
virtio-ccw 2.7 machine and make sure older machines can not enable it.

The new ri_allowed field in the s390MachineClass serves as an indicator
whether the feature can be used by the machine and should therefore be
activated if available.

riccb_needed() is used to check whether riccb is needed or not in live
migration.

Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agos390x: add compat machine for 2.7
Cornelia Huck [Mon, 25 Apr 2016 08:37:23 +0000 (10:37 +0200)]
s390x: add compat machine for 2.7

Also add some of the option cascading we were missing.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
8 years agoMerge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging
Peter Maydell [Tue, 17 May 2016 13:07:25 +0000 (14:07 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging

# gpg: Signature made Tue 17 May 2016 14:06:54 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/tracing-pull-request:
  hw/intc/arm_gic: add tracepoints

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Peter Maydell [Tue, 17 May 2016 09:35:50 +0000 (10:35 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

# gpg: Signature made Tue 17 May 2016 01:19:39 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/block-pull-request:
  rfifolock: no need to get thread identifier when nesting

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging
Peter Maydell [Tue, 17 May 2016 08:16:00 +0000 (09:16 +0100)]
Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into staging

slirp updates

# gpg: Signature made Mon 16 May 2016 20:22:36 BST using RSA key ID FB6B2F1D
# gpg: Good signature from "Samuel Thibault <samuel.thibault@gnu.org>"
# gpg:                 aka "Samuel Thibault <sthibault@debian.org>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@inria.fr>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@labri.fr>"
# gpg:                 aka "Samuel Thibault <samuel.thibault@ens-lyon.org>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: F632 74CD C630 0873 CB3D  29D9 E3E5 1CE8 FB6B 2F1D

* remotes/thibault/tags/samuel-thibault:
  slirp: Clean up osdep.h related header inclusions
  slirp: Remove some unused code from slirp.h
  slirp: Remove obsolete backward-compatibility cruft
  slirp: Clean up slirp_config.h

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agohw/intc/arm_gic: add tracepoints
Hollis Blanchard [Thu, 21 Apr 2016 15:24:41 +0000 (08:24 -0700)]
hw/intc/arm_gic: add tracepoints

These are obviously critical to understanding interrupt delivery:
gic_enable_irq
gic_disable_irq
gic_set_irq (inbound irq from device models)
gic_update_set_irq (outbound irq to CPU)
gic_acknowledge_irq

The only one that I think might raise eyebrows is gic_update_bestirq, but I've
(sadly) debugged problems that ended up being caused by unexpected priorities.
Knowing that the GIC has an irq ready, but doesn't deliver to the CPU due to
priority, has also proven important.

Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
Message-id: 1461252281-22399-1-git-send-email-hollis_blanchard@mentor.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agorfifolock: no need to get thread identifier when nesting
Changlong Xie [Tue, 10 May 2016 09:59:08 +0000 (17:59 +0800)]
rfifolock: no need to get thread identifier when nesting

Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
Reviewed-by: Denis V. Lunev <den@openvz.org>
Message-id: 1462874348-32396-1-git-send-email-xiecl.fnst@cn.fujitsu.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8 years agoslirp: Clean up osdep.h related header inclusions
Thomas Huth [Fri, 13 May 2016 07:04:32 +0000 (09:04 +0200)]
slirp: Clean up osdep.h related header inclusions

qemu/osdep.h is included in some headers twice - one time
should be sufficient.
Also remove the inclusion of time.h since that is already
done by osdep.h, too (this makes scripts/clean-includes
happy again).

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
8 years agoslirp: Remove some unused code from slirp.h
Thomas Huth [Fri, 13 May 2016 07:04:31 +0000 (09:04 +0200)]
slirp: Remove some unused code from slirp.h

These hunks are apparently not used anymore, so let's delete them.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
8 years agoslirp: Remove obsolete backward-compatibility cruft
Thomas Huth [Fri, 13 May 2016 07:04:30 +0000 (09:04 +0200)]
slirp: Remove obsolete backward-compatibility cruft

The slirp code does not use index() and gethostid() anymore,
so these parts can be removed without problems.
memmove() and strerror() should be available on each of the
supported platforms nowadays, too, so these wrappers are also
not needed anymore.
And we certainly also do not support Ultrix anymore, so no
need to keep the code for this platform anymore.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
8 years agoslirp: Clean up slirp_config.h
Thomas Huth [Fri, 13 May 2016 07:04:29 +0000 (09:04 +0200)]
slirp: Clean up slirp_config.h

There are a lot of unused #defines / #undefs in slirp_config.h,
which are apparently left-overs from the very early slirp code.
Since there is no more code that uses them, let's simply remove
them from our version of slirp.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
8 years agoMerge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160513-1' into staging
Peter Maydell [Fri, 13 May 2016 12:39:38 +0000 (13:39 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160513-1' into staging

gtk/sdl build tweaks
fix gtk 3.20 warnings
gtk clipboard support
spice-gl monitor config support
fix coverity warnings

# gpg: Signature made Fri 13 May 2016 13:30:39 BST using RSA key ID D3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"

* remotes/kraxel/tags/pull-ui-20160513-1:
  gtk: don't leak the GtkBorder with VTE 0.36
  gtk: update grab code for gtk 3.20
  spice: fix coverity complains
  egl-helpers: fix possible resource leak
  Changed malloc to g_malloc, free to g_free in ui/shader.c
  spice/gl: add & use qemu_spice_gl_monitor_config
  ui/gtk: copy to clipboard support
  ui: gtk: Fix some deprecation warnings
  ui: gtk: Fix a runtime warning on vte >= 0.37
  configure: support vte-2.91
  configure: report SDL version
  configure: report GTK version
  configure: add echo_version helper
  configure: error on unknown --with-sdlabi value
  configure: build SDL if only SDL2 available
  ui: sdl2: Release grab before opening console window
  ui: gtk: fix crash when terminal inner-border is NULL

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agoMerge remote-tracking branch 'remotes/lalrae/tags/mips-20160513' into staging
Peter Maydell [Fri, 13 May 2016 10:50:42 +0000 (11:50 +0100)]
Merge remote-tracking branch 'remotes/lalrae/tags/mips-20160513' into staging

MIPS patches 2016-05-13

Changes:
* fix zeroing CP0.WatchLo registers in soft reset
* QOMify Jazz led

# gpg: Signature made Fri 13 May 2016 11:04:04 BST using RSA key ID 0B29DA6B
# gpg: Good signature from "Leon Alrae <leon.alrae@imgtec.com>"

* remotes/lalrae/tags/mips-20160513:
  hw/display: QOM'ify jazz_led.c
  target-mips: fix call to memset in soft reset code

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agogtk: don't leak the GtkBorder with VTE 0.36
Alberto Garcia [Fri, 13 May 2016 08:20:54 +0000 (11:20 +0300)]
gtk: don't leak the GtkBorder with VTE 0.36

When gtk_widget_style_get() is used to get the "inner-border" style
property, it returns a copy of the GtkBorder which must be freed by
the caller.

This patch also fixes a warning about the unused 'padding' structure
with VTE 0.36.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: 1463127654-5171-1-git-send-email-berto@igalia.com
Cc: Cole Robinson <crobinso@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
[ kraxel: adapted to changes in ui patch queue ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 years agoMerge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160512' into staging
Peter Maydell [Fri, 13 May 2016 09:42:40 +0000 (10:42 +0100)]
Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20160512' into staging

queued 2.7 patches

# gpg: Signature made Fri 13 May 2016 01:08:20 BST using RSA key ID 4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"

* remotes/rth/tags/pull-tcg-20160512: (39 commits)
  cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()
  cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec()
  cpu-exec: Move TB execution stuff out of cpu_exec()
  cpu-exec: Move interrupt handling out of cpu_exec()
  cpu-exec: Move exception handling out of cpu_exec()
  cpu-exec: Move halt handling out of cpu_exec()
  cpu-exec: Remove relic orphaned comment
  tcg: Remove needless CPUState::current_tb
  cpu-exec: Move TB chaining into tb_find_fast()
  tcg: Rework tb_invalidated_flag
  tcg: Clean up from 'next_tb'
  cpu-exec: elide more icount code if CONFIG_USER_ONLY
  tcg: reorganize tb_find_physical loop
  tcg: code_bitmap and code_write_count are not used by user-mode emulation
  tcg: Allow goto_tb to any target PC in user mode
  tcg: Clean up direct block chaining safety checks
  tcg: Clean up tb_jmp_unlink()
  tcg: Extract removing of jumps to TB from tb_phys_invalidate()
  tcg: Rename tb_jmp_remove() to tb_remove_from_jmp_list()
  tcg: Clarify thread safety check in tb_add_jump()
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
8 years agohw/display: QOM'ify jazz_led.c
xiaoqiang.zhao [Thu, 5 May 2016 03:04:46 +0000 (11:04 +0800)]
hw/display: QOM'ify jazz_led.c

* Drop the old SysBus init function and use instance_init
* Move graphic_console_init into realize stage

Signed-off-by: xiaoqiang zhao <zxq_yx_007@163.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
8 years agocpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()
Sergey Fedorov [Thu, 12 May 2016 16:52:17 +0000 (19:52 +0300)]
cpu-exec: Clean up 'interrupt_request' reloading in cpu_handle_interrupt()

Suggested-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: Sergey Fedorov <sergey.fedorov@linaro.org>
Message-Id: <1463071937-26607-1-git-send-email-sergey.fedorov@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Richard Henderson <rth@twiddle.net>