xilinx_timer: Removed include of qemu-timer

The Xilinx timer does not interact with the qemu_timer API, so dont include it.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
xilinx_timer: Fixed deadlock issue

The timer was deadlocking when the interval was set too low. It would cause a
flood of timer events and the CPU would halt indefinately. This is a known issue
and theres a generic workaround in place in ptimer on ptimer_set_limit(),
however the Xilinx timer uses ptimer_set_count() instead of set_limit. Changed
the call to set_count() to an equivalent call of set_limit() instead, which
brings the workaround into play.

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
qemu-log: move logging to qemu-log.c

Move logging functions from exec.c to qemu-log.c,
compile it only once.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-log: cleanup

Don't use global variables directly but via accessor functions. Rename globals.

Convert macros to functions, add GCC format attributes.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-log: add log category for unimplemented functionality

Add new log category (LOG_UNIMP) for unimplemented functionality.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-log: use LOG_UNIMP for some target CPU cases

Use LOG_UNIMP for some target CPU cases.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Acked-by: Alexander Graf <agraf@suse.de>
fdc: use LOG_UNIMP logging

Convert uses of FLOPPY_ERROR to either FLOPPY_DPRINTF
(for implemented cases) or to use LOG_UNIMP (unimplemented).

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qtest: add a fuzz test to fdc-test

Add a simple register fuzzing test to floppy controller tests.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
libcacard: build fixes

Link trace objects to fix these errors:
  LINK  vscclient
oslib-posix.o: In function `trace_qemu_vfree':
/src/qemu/obj-amd64/./trace.h:39: undefined reference to `trace1'
oslib-posix.o: In function `trace_qemu_memalign':
/src/qemu/obj-amd64/./trace.h:31: undefined reference to `trace3'
oslib-posix.o: In function `trace_qemu_vmalloc':
/src/qemu/obj-amd64/./trace.h:35: undefined reference to `trace2'

Add LDFLAGS to vscclient link command.

Clean up also in subdirectories of libcacard.

Use quiet-command for sed invocation.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Acked-by: Alon Levy <alevy@redhat.com>
Install 'bepo' keymap already included in Qemu source

The 'bepo' layout (a french dvorak-like keyboard layout) was added
about one year ago, (see commit 2a3c633c1eb8692716220195b6d3fe78b7e411d0),
but I missed to declare to install it.

Signed-off-by: Frédéric Boiteux <fboiteux@free.fr>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Makefile: Remove BUILD_DIR from qapi-dir

qapi-dir does not need an absolute path. All other build directories
are relative. When BUILD_DIR is removed, the build output looks better
(no long lines with absolute paths when everything else uses short
lines):

  GEN   qapi-generated/qga-qapi-types.c
  CC    qapi-generated/qga-qapi-types.o
  GEN   qapi-generated/qga-qapi-visit.c
  CC    qapi-generated/qga-qapi-visit.o
  GEN   qapi-generated/qga-qmp-marshal.c
  CC    qapi-generated/qga-qmp-marshal.o

Using a relative path also avoids potential problems when BUILD_DIR
includes blanks.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Makefile: Remove macro qapi-dir

As qapi-dir was now a constant, it can be replaced by its value.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Makefile.user: Define CONFIG_USER_ONLY for libuser/

In *-*-user/ build dirs CONFIG_USER_ONLY is defined via config-target.h.
In libuser/ it is not defined.

Add it via QEMU_CFLAGS.

Signed-off-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
libqtest: Fix socket_accept() to pass address_len

accept() expects address_len to point to the length of the sockaddr on
input. Initialize it accordingly.

Resolves an assertion due to EFAULT on illumos.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-config: Use QEMU instead of Qemu

This new 'Qemu' was recently added.
Replace it by the official all upper case 'QEMU'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
checkpatch: Add QEMU specific rule

The new rule detects two wrong variants of QEMU.
It was tested with commit b5a8fe5e.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
arm_gic: Send dbg msgs to stderr not stdout

Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
configure: Fix typo

The typo did not cause an error because open_by_handle_at
was only compared to "yes".

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Makefile.hw: avoid overly large 'make clean' rm command

Avoid 'make clean' producing an 'rm' command which has a lot
of duplicate 'hw//*.o' arguments, by using $(sort $(dir ..))
rather than $(dir $(sort ..)) so Make's sort function will
remove the duplicates for us. We can also remove the double
'//' safely because $(dir ..) is guaranteed to return a string
ending in '/'.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
target-i386: Use QEMU instead of Qemu

This new 'QEmu' was recently added.
Replace it by the official all upper case 'QEMU'.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>