configure: also symlink *.aml files

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
acpi: autoload dsdt

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
apci: assign memory regions to piix4 acpi device

Get rid of get_system_io() usage.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
apci: assign memory regions to ich9 lpc device

Get rid of get_system_io() usage.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
switch debugcon to memory api

Also some QOM glue while being at it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
add isa-debug-exit device.

When present it makes qemu exit on any write.
Mapped to port 0x501 by default.

Without this patch Anthony doesn't allow me to
remove the bochs bios debug ports because his
test suite uses this.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw: Add test device for unittests execution

Add a test device which supports the kvmctl ioports,
so one can run the KVM unittest suite.

Intended Usage:

qemu-system-x86_64 -nographic \
    -device pc-testdev \
    -device isa-debug-exit,iobase=0xf4,iosize=0x04 \
    -kernel /path/to/kvm/unittests/msr.flat

Where msr.flat is one of the KVM unittests, present on a
separate repo,

git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git

[ kraxel: more memory api + qom fixes ]

CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pc: remove bochs bios debug ports

Prehistoric leftover, zap it.  We poweroff via acpi these days.

And having a port (0x501,0x502) where any random guest write will make
qemu exit -- with no way to turn it off -- is a bad joke anyway.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pc_sysfw: Check for qemu_find_file() failure

pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily
creates a drive without a medium.

When pc_system_flash_init() asks for its size, bdrv_getlength() fails
with -ENOMEDIUM, which isn't checked either.  It fails relatively
cleanly only because -ENOMEDIUM isn't a multiple of 4096:

    $ qemu-system-x86_64 -S -vnc :0 -bios nonexistant
    qemu: PC system firmware (pflash) must be a multiple of 0x1000
    [Exit 1 ]

Fix by handling the qemu_find_file() failure.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
pseries: Remove unneeded include statement (fixes MinGW builds)

sys/mman.h is not needed (tested on Linux) and unavailable for MinGW,
so remove it.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Remove --sparc_cpu option from the configure list

  commit 9b9c37c36439ee0452632253dac7a31897f27f70 always assume sparcv9,
the others are no longer supported. Remove --sparc_cpu option from the
configure list.

Signed-off-by: Chen Wei-Ren <chenwj@iis.sinica.edu.tw>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/mcf5206: Reduce size of lookup table

This typically reduces the size from 512 bytes to 128 bytes.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
linux-user/syscall.c: remove forward declarations

instead use the correct headers that define these functions.

Requested-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: John Spencer <maillist-qemu@barfooze.de>
Reviewed-by: Amos Kong <kongjianjun@gmail.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
spice: drop incorrect vm_change_state_handler() opaque

The spice_server pointer is a global variable and
vm_change_state_handler() therefore does not use its opaque parameter.

The vm change state handler is added with a pointer to the spice_server
pointer.  This is useless and we probably would not want 2 levels of
pointers.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Uri Lublin <uril@redhat.com>
Merge remote-tracking branch 'kraxel/acpi.2' into staging

* kraxel/acpi.2:
  apci: assign memory regions to ich9 lpc device
  apci: assign memory regions to piix4 acpi device
  acpi: autoload dsdt
  configure: also symlink *.aml files

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'kraxel/testdev.1' into staging

* kraxel/testdev.1:
  pc: remove bochs bios debug ports
  hw: Add test device for unittests execution
  add isa-debug-exit device.
  switch debugcon to memory api

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'stefanha/trivial-patches' into staging

* stefanha/trivial-patches:
  spice: drop incorrect vm_change_state_handler() opaque
  linux-user/syscall.c: remove forward declarations
  hw/mcf5206: Reduce size of lookup table
  Remove --sparc_cpu option from the configure list
  pseries: Remove unneeded include statement (fixes MinGW builds)
  pc_sysfw: Check for qemu_find_file() failure

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
softfloat: Fix uint64_to_float64

The interface to normalizeRoundAndPackFloat64 requires that the
high bit be clear.  Perform one shift-right-and-jam if needed.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
softfloat: Implement uint64_to_float128

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/i386: Fix broken build for non POSIX hosts

pc-testdev.c cannot be compiled with MinGW (and other non POSIX hosts):

  CC    i386-softmmu/hw/i386/../pc-testdev.o
qemu/hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not found
qemu/hw/i386/../pc-testdev.c: In function ‘test_flush_page’:
qemu/hw/i386/../pc-testdev.c:103: warning: implicit declaration of function ‘mprotect’
...

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>