Michael Roth [Thu, 11 Aug 2011 20:38:12 +0000 (15:38 -0500)]
guest agent: remove uneeded dependencies
This patch tries to cull any uneeded library dependencies from the guest
agent to improve portability across various distros. We do so by being
as explicit as possible about in-tree dependencies rather than relying
on existing *-obj-y targets, and by manually setting LIBS for the
qemu-ga target to avoid pulling in LIBS_TOOLS libraries discovered by
configure.
Avi Kivity [Thu, 11 Aug 2011 07:40:26 +0000 (10:40 +0300)]
memory: crack wide ioport accesses into smaller ones when needed
The memory API supports cracking wide accesses into narrower ones
when needed; but this was no implemented for the pio address space,
causing lsi53c895a's IO BAR to malfunction.
Fix by correctly cracking wide accesses when needed.
Avi Kivity [Thu, 11 Aug 2011 07:40:25 +0000 (10:40 +0300)]
memory: abstract cracking of write access ops into a function
The memory API automatically cracks large reads and writes into smaller
ones when needed. Factor out this mechanism, which is now duplicated between
memory reads and memory writes, into a function.
tcg: Always define all of the TCGOpcode enum members.
By always defining these symbols, we can eliminate a lot of ifdefs.
To allow this to be checked reliably, the semantics of the
TCG_TARGET_HAS_* macros must be changed from def/undef to true/false.
This allows even more ifdefs to be removed, converting them into
C if statements.
Brad [Mon, 8 Aug 2011 00:02:11 +0000 (20:02 -0400)]
Check for presence of compiler -pthread flag.
OpenBSD / FreeBSD and some other OS's require the use of
cc -pthread to link threaded programs so have QEMU's
configure script check for the presence of the flag
and use it if so.
Austin Clements [Mon, 15 Aug 2011 03:22:28 +0000 (23:22 -0400)]
monitor: Show combined protection bits in "info mem"
Previously, "info mem" considered and displayed only the last-level
protection bits for a memory range, which doesn't accurrately
represent the protection of that range. Now it shows the combined
protection.
Austin Clements [Mon, 15 Aug 2011 03:19:21 +0000 (23:19 -0400)]
monitor: Prevent sign-extension of 32-bit addresses printed by info mem
Previously, on 32-bit i386, info mem used signed 32-bit int's to store
the page table indexes. As a result, address calculation was done in
32 bits and then incorrectly sign-extended to 64 bits, yielding output
like
Stefan Weil [Fri, 15 Jul 2011 19:38:14 +0000 (21:38 +0200)]
w32: Fix format string regression
Commit 953ffe0f935f40c0d6061d69e76e0339393b54f8
introduced FMT_pid which is wrong for w32 and w64 getpid():
those getpid() implementations always return an int value.
Stefan Weil [Fri, 15 Jul 2011 19:38:12 +0000 (21:38 +0200)]
Fix conversions from pointer to tcg_target_long
tcg_gen_exit_tb takes a parameter of type tcg_target_long,
so the type casts of pointer to long should be replaced by
type casts of pointer to tcg_target_long.
These changes are needed for build environments where
sizeof(long) != sizeof(void *), especially for w64.
Peter Maydell [Fri, 19 Aug 2011 23:27:04 +0000 (00:27 +0100)]
target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SP
The REG_PC constant used in opcode-cris.h can clash with a
similar define in system include files. In particular the
Ubuntu Lucid SPARC signal.h will define REG_PC, and since
qemu-common.h now includes signal.h this was causing compile
failures. Rename the constants to avoid this issue.
(NB that REG_SP is not actually used within QEMU.)
Engin AYDOGAN [Wed, 3 Aug 2011 21:15:23 +0000 (22:15 +0100)]
hw/stellaris: Add support for RCC2 register
Add support for the RCC2 register on Fury class devices.
Based on a patch by Vijay Kumar.
Signed-off-by: Engin AYDOGAN <[email protected]>
[Peter Maydell: fixed comment typos, minor cleanup of unreachable code] Signed-off-by: Peter Maydell <[email protected]>
Peter Maydell [Wed, 3 Aug 2011 22:13:45 +0000 (23:13 +0100)]
hw/pl061: Convert to VMState
Convert the PL061 to VMState. We choose to widen the struct members
to uint32_t rather than the other two options of breaking migration
compatibility or using vmstate hacks to read/write a 32 bit value
into an 8 bit struct field.
Peter Maydell [Fri, 22 Jul 2011 15:36:54 +0000 (15:36 +0000)]
vexpress, realview: Use pl111, not pl110
The Versatile Express, Realview EB, PBX A9 and PB A8 boards all
use a PL111 for their graphics, not a PL110. Now we model the
PL111, use it on these board models.
Peter Maydell [Fri, 22 Jul 2011 13:42:39 +0000 (13:42 +0000)]
versatilepb: Implement SYS_CLCD mux control register bits
On the Versatile PB, PL110 graphics adaptor only natively supports
5551 pixel format; an external mux swaps bits around to allow
RGB565 and BGR565, under the control of bits [1:0] in the SYS_CLCD
system register.
Implement these SYS_CLCD register bits, and use a gpio line to
feed them out of the system register model, across the versatilepb
board and into the pl110 so we can select the right format.
This is necessary as recent Linux versatile kernels default to
programming the CLCD and mux for 16 bit BGR rather than 16 bit RGB.
Peter Maydell [Fri, 22 Jul 2011 13:19:33 +0000 (13:19 +0000)]
hw/pl110: Model the PL111 CLCD controller
Model the PL111 CLCD controller. This is a minor variation
on the PL110; the major programmer visible differences are
support for hardware cursor (unimplemented) and two new
pixel formats.
Since syborg_fb.c borrows the pl11x pixel drawing routines,
we also update it to cope with the new slightly larger array
of function pointers.
Paolo Bonzini [Sun, 14 Aug 2011 21:05:49 +0000 (14:05 -0700)]
scsi: do not overwrite memory on REQUEST SENSE commands with a large buffer
Other scsi_target_reqops commands were careful about not using r->cmd.xfer
directly, and instead always cap it to a fixed length. This was not done
for REQUEST SENSE, and this patch fixes it.
Jan Kiszka [Sat, 6 Aug 2011 12:23:29 +0000 (14:23 +0200)]
slirp: Fix bit field types in IP header structs
-mms-bitfields prevents that the bitfields in current IP header structs
are packed into a single byte as it is required. Fix this by using
uint8_t as backing type.
Michael Roth [Wed, 10 Aug 2011 18:10:51 +0000 (13:10 -0500)]
qapi: fix build issue due to missing newline in generated header
Fixes a build issue on RHEL5, and potentially other distros, where gcc
will generate an error due to us not writing a trailing "\n" when
generating *qmp-commands.h
Jiri Denemark [Wed, 10 Aug 2011 10:04:34 +0000 (12:04 +0200)]
build: Move QEMU_INCLUDES before QEMU_CFLAGS
This patch fixes build when any of the include paths from QEMU_CFLAGS
contains a header file with similar name to a header file in qemu
sources. I hit it with error.h included by qapi/qapi-types-core.h. GCC
decided to use /usr/include/alsa/error.h instead of qemu's error.h.
Stefan Weil [Sat, 6 Aug 2011 20:47:22 +0000 (22:47 +0200)]
configure: Disable guest_agent for mingw32
guest_agent is not supported for mingw32, so the default value
should be 'no', not 'yes'.
This removes the dependencies to glib-2.0 and python which
makes native and cross builds for w32 much easier (no need
to get and install these extra packages).
It also avoids the problems caused by different bitfield alignment
which is required by glib-2.0.
It is still possible to set guest_agent=yes via configure option.
Paolo Bonzini [Wed, 3 Aug 2011 08:49:17 +0000 (10:49 +0200)]
scsi: add support for unit attention conditions
Unit attention conditions override any sense data the device already
has. Their signaling and clearing is handled entirely by the SCSIBus
code, and they are completely transparent to the SCSIDevices.
Paolo Bonzini [Wed, 3 Aug 2011 08:49:10 +0000 (10:49 +0200)]
scsi: pass cdb already to scsi_req_new
Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue.
Passing it to scsi_req_new will let scsi_req_new dispatch common requests
through different reqops.
Moving the memcpy to scsi_req_new is a hack that will go away as
soon as scsi_req_new will also take care of the parsing.
Paolo Bonzini [Wed, 3 Aug 2011 08:49:07 +0000 (10:49 +0200)]
scsi: move sense handling to generic code
With this patch, sense data is stored in the generic data structures
for SCSI devices and requests. The SCSI layer takes care of storing
sense data in the SCSIDevice for the subsequent REQUEST SENSE command.
At the same time, get_sense is removed and scsi_req_get_sense can use
an entirely generic implementation.
Paolo Bonzini [Wed, 3 Aug 2011 08:49:06 +0000 (10:49 +0200)]
scsi: pass status when completing
A small improvement in the SCSI request API. Pass the status
at the time the request is completed, so that we can assert that
no request is completed twice. This would have detected the
problem fixed in the previous patch.
Paolo Bonzini [Wed, 3 Aug 2011 08:49:05 +0000 (10:49 +0200)]
vscsi: always use get_sense
vscsi supports autosensing by providing sense data directly in the
response. When get_sense was added, the older state machine approach
that sent REQUEST SENSE commands separately was left in place. Remove
it, all existing SCSIDevices do support autosensing and the next patches
will make the support come for free from the SCSIBus.
Paolo Bonzini [Wed, 3 Aug 2011 08:49:04 +0000 (10:49 +0200)]
scsi-disk: no need to call scsi_req_data on a short read
In fact, if the HBA's transfer_data callback goes on with scsi_req_continue
the request will be completed successfully instead of showing a failure.
It can even cause a segmentation fault.
An easy way to trigger it is "eject -f cd" during installation (during media
test if the installer does something like that).
Anthony Liguori [Mon, 8 Aug 2011 19:31:37 +0000 (14:31 -0500)]
pc: make vgabios exit port more useful
We've always listened on port 501 for vgabios panic messages. In the entire
time I've worked on QEMU, I've never actually seen a vgabios panic message :-)
If we change the semantics of this port a little bit, it makes it possible to
use it for more interesting use-cases. I chose this approach instead of adding
a new I/O port because it avoids having a guest visible change.
This change allows single-byte access to port 501 and also uses the value
written to construct an exit code.
Peter Maydell [Wed, 3 Aug 2011 22:49:04 +0000 (23:49 +0100)]
hw/qdev: Don't crash if qdev_create(NULL, ...) fails
If an attempt to create a qdev device on the default sysbus (by passing
NULL as the bus to qdev_create) fails, print a useful error message
rather than crashing trying to dereference a NULL pointer.
user visible changes in seabios:
* ahci is enabled by default (and thus in this build).
* bootorder support for ahci.
* two-pass pci allocator (orders bars by size for better packing).
Yonit Halperin [Tue, 9 Aug 2011 13:12:40 +0000 (16:12 +0300)]
qxl: allowing the command rings to be not empty when spice worker is stopped RHBZ #728984
same as 8927cfbba232e28304734f7afd463c1b84134031, but for qxl_check_state, that was
triggered by qxl_pre_load (which calls qxl_hard_reset, which calls qxl_soft_reset),
and caused the migration target to crash.
Gerd Hoffmann [Tue, 9 Aug 2011 10:35:57 +0000 (12:35 +0200)]
usb/hid: add hid_pointer_activate, use it
HID reorganziation broke the usb tablet in windows xp. The reason is
that xp activates idle before it starts polling, which creates a
chicken-and-egg issue: We don't call hid_pointer_poll because there are
no pending events. We don't get any events because the activation code
in hid_pointer_poll is never executed and thus all pointer events are
routed to the PS/2 mouse by qemu.
Fix this by creating a hid_pointer_activate function and call it from
usb-hid when the guest sets the idle state.
The Bare ETRAX FS board was a fictive machine that I used when
developing the CRIS system emulation. Since we support the
real AXIS-dev88 developer boards, there is no reason to
keep the fictive one around.
This commit also removes the double registration of the axis-dev88
board.