qxl: replace pipe signaling with bottom half

qxl creates a pipe, then writes something to it to wake up the iothread
from the spice server thread to raise an irq.  These days qemu bottom
halves can be scheduled from threads and signals, so there is no reason
to do this any more.  Time to clean it up.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
pc: disable acpi info for isapc and old pc machine

Disable acpi build for isapc and no_kvmclock machine
types (used by xen), since acpi build currently expects pci.

Reported-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
exec: limit system memory size

The page table logic in exec.c assumes
that memory addresses are at most TARGET_PHYS_ADDR_SPACE_BITS.

But pci addresses are full 64 bit so if we try to render them ignoring
the extra bits, we get strange effects with sections overlapping each
other.

To fix, simply limit the system memory size to
 1 << TARGET_PHYS_ADDR_SPACE_BITS,
pci addresses will be rendered within that.

Cc: qemu-stable@nongnu.org
Reported-by: Andreas Färber <afaerber@suse.de>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vl: allow "cont" from panicked state

After reporting the GUEST_PANICKED monitor event, QEMU stops the VM.
The reason for this is that events are edge-triggered, and can be lost if
management dies at the wrong time.  Stopping a panicked VM lets management
know of a panic even if it has crashed; management can learn about the
panic when it restarts and queries running QEMU processes.  The downside
is of course that the VM will be paused while management is not running,
but that is acceptable if it only happens with explicit "-device pvpanic".

Upon learning of a panic, management (if configured to do so) can pick a
variety of behaviors: leave the VM paused, reset it, destroy it.  In
addition to all of these behaviors, it is possible to dump the VM core
from the host.

However, right now, the panicked state is irreversible, and can only be
exited by resetting the machine.  This means that any policy decision
is entirely in the hands of the host.  In particular there is no way to
use the "reboot on panic" option together with pvpanic.

This patch makes the panicked state reversible (and removes various
workarounds that were there because of the state being irreversible).
With this change, management has a wider set of possible policies: it
can just log the crash and leave policy to the guest, it can leave the
VM paused.  In particular, the "log the crash and continue" is implemented
simply by sending a "cont" as soon as management learns about the panic.
Management could also implement the "irreversible paused state" itself.
And again, all such actions can be coupled with dumping the VM core.

Unfortunately we cannot change the behavior of 1.6.0.  Thus, even if
it uses "-device pvpanic", management should check for "cont" failures.
If "cont" fails, management can then log that the VM remained paused
and urge the administrator to update QEMU.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
KVM: x86: fix typo in KVM_GET_XCRS

Only the first item of the array was ever looked at.  No
practical effect, but still worth fixing.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Merge remote-tracking branch 'kraxel/e820.1' into staging

# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/e820.1:
  pc: register e820 entries for ram
  pc: add etc/e820 fw_cfg file

Message-id: 1383567431-13540-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci, pc, pvpanic bug fixes

This fixes strange pvpanic behaviour: you had to
pause to let VM continue (and potentially reboot on panic
if enabled).

This also fixes two bugs reported by Andreas.
One is a long-standing bug exposed by recent pci changes,
the other affects old piix machine types and was caused
by recent acpi changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Mon 04 Nov 2013 05:42:46 AM PST using RSA key ID D28D5469
# gpg: Can't check signature: public key not found

# By Michael S. Tsirkin (2) and Paolo Bonzini (1)
# Via Michael S. Tsirkin
* mst/tags/for_anthony:
  vl: allow "cont" from panicked state
  exec: limit system memory size
  pc: disable acpi info for isapc and old pc machine

Message-id: 1383572851-28326-1-git-send-email-mst@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Merge remote-tracking branch 'spice/spice.v76' into staging

# By Gerd Hoffmann
# Via Gerd Hoffmann
* spice/spice.v76:
  qxl: replace pipe signaling with bottom half

Message-id: 1383656322-24150-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
ossaudio: do not enable by default

Modern Linux's no longer support /dev/dsp so enabling it by
default causes audio failures on newer Linux distros.

Signed-off-by: Anthony Liguori <aliguori@amazon.com>
Tested-by: Andreas Färber <afaerber@suse.de>
Message-id: 1383497154-9271-1-git-send-email-aliguori@amazon.com
Merge tag 'for_anthony' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu

pci, pc, pvpanic bug fixes

This fixes strange pvpanic behaviour: you had to
pause to let VM continue (and potentially reboot on panic
if enabled).

This also fixes two bugs reported by Andreas.
One is a long-standing bug exposed by recent pci changes,
the other affects old piix machine types and was caused
by recent acpi changes.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
mips_mipssim: Silence BIOS loading warning for qtest

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Andreas Färber <afaerber@suse.de>
puv3: Turn puv3_load_kernel() into a no-op for qtest without -kernel

Replacing the assert() with more user-friendly error handling is left
for a follow-up.

Signed-off-by: Andreas Färber <afaerber@suse.de>
mainstone: Don't enforce use of -pflash for qtest

Simply skip flash setup for now.

Also drop useless debug output.

Signed-off-by: Andreas Färber <afaerber@suse.de>
gumstix: Don't enforce use of -pflash for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
z2: Don't enforce use of -pflash for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
palm: Don't enforce loading ROM or kernel for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
omap_sx1: Don't enforce use of kernel or flash for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
exynos4_boards: Silence lack of -smp 2 warning for qtest

Signed-off-by: Andreas Färber <afaerber@suse.de>
armv7m: Don't enforce use of kernel for qtest

Adopt error_report().

Signed-off-by: Andreas Färber <afaerber@suse.de>
axis_dev88: Don't enforce use of kernel for qtest

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>