hw: move char backends to backends/

Braille and msmouse support is in hw/, but it is not hardware.
Move it to the backends/ directory.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move fifo.[ch] to libqemuutil

fifo.c is generic code that can be easily unit tested.  So it
belongs in libqemuutil.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move qdev-monitor.o to toplevel directory

qdev-monitor.c is the only "core qdev" file that is not used in
user-mode emulation, and it does not define anything that is used
by hardware models.  Remove it from the hw/ directory and
remove hw/qdev-monitor.h from hw/qdev.h too; this requires
some files to have some new explicitly includes.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move device-hotplug.o to toplevel, compile it once

The situation with device-hotplug.c is similar to qdev-monitor.c.
Add a stub for pci_drive_hot_add, so that it can be compiled once,
and move it out of hw/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-9p: remove PCI dependencies from hw/9pfs/

Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistency
with the corresponding .c file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
vt82c686: vt82c686 is not a PCI host bridge

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ppc: do not use ../ in include files

This simplifies the scripted execution of the next patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: include hw header files with full paths

Done with this script:

cd hw
for i in `find . -name '*.h' | sed 's/^..//'`; do
  echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
done | sed -i -f - `find . -type f`

This is so that paths remain valid as files are moved.

Instead, files in hw/dataplane are referenced with the relative path.
We know they are not going to move to include/, and they are the only
include files that are in subdirectories _and_ move.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: always link device_tree.o into emulators if libfdt available

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ppc: express FDT dependency of pSeries and e500 boards via default-configs/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move boards and other isolated files to hw/ARCH

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arm: move files referencing CPU to hw/arm/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
i386: move files referencing CPU to hw/i386/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
m68k: move files referencing CPU to hw/m68k/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ppc: move files referencing CPU to hw/ppc/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
ppc: move more files to hw/ppc

These sPAPR files do not implement devices, move them over.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
sh: move files referencing CPU to hw/sh4/

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target-arm: Factor out handling of SRS instruction

Factor out the handling of the SRS instruction rather than
duplicating it between the Thumb and ARM decoders. This in
passing fixes two bugs in the Thumb decoder's SRS handling
which didn't exist in the ARM decoder:
 * (LP:1079080) storing CPSR rather than SPSR (fixed in the
   ARM decoder in commit c67b6b71 in 2009)
 * failing to free the 'addr' TCG temp in the writeback case

Reported-by: Cesson Vincent <vcesson@stmi.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm: Don't decode RFE or SRS on M profile cores

M profile cores do not have the RFE or SRS instructions, so
correctly UNDEF these insn patterns on those cores.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>