Richard Henderson [Wed, 10 Mar 2010 22:38:59 +0000 (14:38 -0800)]
linux-user: Use h2g_valid in qemu_vmalloc.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 10 Mar 2010 22:36:58 +0000 (14:36 -0800)]
Use TARGET_VIRT_ADDR_SPACE_BITS in h2g_valid.
Previously, only 32-bit guests had a proper check for the
validity of the virtual address. Extend that check to 64-bit
guests with a restricted virtual address space.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Richard Henderson [Wed, 10 Mar 2010 22:33:23 +0000 (14:33 -0800)]
Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.
Removes a set of ifdefs from exec.c.
Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other
than Alpha. This will be used for page_find_alloc, which is
supposed to be using virtual addresses in the first place.
Signed-off-by: Richard Henderson <rth@twiddle.net>
Aurelien Jarno [Thu, 11 Mar 2010 20:29:42 +0000 (21:29 +0100)]
target-ppc: fix evsrwu and evsrws (second try)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Thu, 11 Mar 2010 20:22:35 +0000 (21:22 +0100)]
target-ppc: fix evsrwu and evsrws
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Thu, 11 Mar 2010 20:14:47 +0000 (21:14 +0100)]
target-ppc: fix evslw instruction
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
malc [Thu, 11 Mar 2010 15:28:38 +0000 (18:28 +0300)]
audio: fix comment
Signed-off-by: malc <av1474@comtv.ru>
Luiz Capitulino [Wed, 10 Mar 2010 15:06:34 +0000 (09:06 -0600)]
QMP: Really move the RESET event to qemu_system_reset()
Something bad has happened in the merge of commit
0ee44250, as
the log message says it's supposed to be in qemu_system_reset()
but it is do_vm_stop().
Possibly, it was a problem with the conflict resolution with
ea375f9a (which has been merged first).
This commit moves (again) the RESET event into qemu_system_reset().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Aurelien Jarno [Sat, 6 Mar 2010 17:02:31 +0000 (18:02 +0100)]
target-i386: fix SIB decoding with index = 4
A SIB byte with an index of 4 means "no scaled index", even if the scale
value is not 0. In 64-bit mode, if REX.X is used, an index of 4 selects
%r12. This is correctly handled by the computation of the index variable,
which includes the index bits, and also the REX.X prefix:
index = ((code >> 3) & 7) | REX_X(s);
Thanks to Avi Kivity, Jamie Lokier and Malc for the analysis of the
problem and the initial patch.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Juan Quintela [Thu, 4 Mar 2010 09:00:39 +0000 (10:00 +0100)]
documentation: qemu_write_full don't work with non-blocking fd's
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:38 +0000 (10:00 +0100)]
block: print errno on error
Now that we changed all create calls to return errno, just print it.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:37 +0000 (10:00 +0100)]
vmdk: share cleanup code
cleanup code is identical for error/success cases. Only difference
are goto labels.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:36 +0000 (10:00 +0100)]
vmdk: fix double free
fail_gd error case would also free rgd_buf that was already freed
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:35 +0000 (10:00 +0100)]
vmdk: make vmdk_snapshot_create return -errno
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:34 +0000 (10:00 +0100)]
vmdk: return errno instead of -1
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:33 +0000 (10:00 +0100)]
qcow: return errno instead of -1
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:32 +0000 (10:00 +0100)]
qcow2: return errno instead of -1
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:31 +0000 (10:00 +0100)]
slirp: check system() success
we shouldn't call W*() macros until we check that fork worked.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Thu, 4 Mar 2010 09:00:30 +0000 (10:00 +0100)]
cow: return errno instead of -1
Remove not needed ret = 0 assignment.
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Kevin Wolf [Tue, 2 Mar 2010 11:14:31 +0000 (12:14 +0100)]
qemu-img rebase: Add -f option
Allow the user to specify the format of the image to rebase.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Mon, 1 Mar 2010 21:20:29 +0000 (22:20 +0100)]
configure: Fix code which creates config.mak files
These files are created by configure and grow
unnecessarily at each new call of configure:
roms/seabios/config.mak
roms/vgabios/config.mak
libhw32/config.mak
libhw64/config.mak
libhw32/config.mak and libhw64/config.mak set
compiler options, and the wrong old code results
in very long command lines.
The new code always writes a new config.mak
instead of appending to an existing one.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Mon, 1 Mar 2010 21:10:46 +0000 (22:10 +0100)]
configure: Fix wrong stderr redirection
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:13:04 +0000 (12:13 -0300)]
QMP: Introduce WATCHDOG event
It's emitted whenever the watchdog device's timer expires. The action
taken is provided in the 'data' member.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Shahar Havivi [Fri, 26 Feb 2010 09:34:59 +0000 (11:34 +0200)]
Restore terminal attributes for tty based monitor
Patch http://permalink.gmane.org/gmane.comp.emulators.qemu/63472 handle
close when using tty devices (like /dev/ttyS0),
yet tty based monitor are not restoring terminal attributes (as done
with stdio based monitor), when closing qemu after that command:
$ qemu -monitor /dev/tty
the terminal is not responding until you write reset (blindly),
this patch fix it
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Fri, 26 Feb 2010 16:17:39 +0000 (17:17 +0100)]
kbd keds: vnc
Use led status notification support in vnc.
The qemu vnc server keeps track of the capslock and numlock states based
on the key presses it receives from the vnc client. But this fails in
case the guests idea of the capslock and numlock state changes for other
reasons. One case is guest reboot (+ keyboard reset). Another case are
more recent windows versions which reset capslock state before
presenting the login screen.
Usually guests use the keyboard leds to signal the capslock and numlock
state to the user, so we can use this to better keep track of capslock
and numlock state in the qemu vnc server.
Also toggle the numlock and capslock states on keydown events (instead
of keyup). Guests do the same.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Fri, 26 Feb 2010 16:17:38 +0000 (17:17 +0100)]
kbd leds: usb kbd
Add led status notification support to the usb kbd driver.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Fri, 26 Feb 2010 16:17:37 +0000 (17:17 +0100)]
kbd leds: ps/2 kbd
Add led status notification support to the ps/2 kbd driver.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Fri, 26 Feb 2010 16:17:36 +0000 (17:17 +0100)]
kbd leds: infrastructure
Adds infrastructure for keyboard led status tracking to qemu.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Thu, 25 Feb 2010 10:23:52 +0000 (11:23 +0100)]
scsi: Make device scsi-disk reject /dev/sg*
You're supposed to use scsi-generic for that. Which rejects anything
but /dev/sg*.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Fri, 26 Feb 2010 14:50:51 +0000 (15:50 +0100)]
qdev: Catch attempt to attach more than one device to a netdev
Guest device and host netdev are peers, i.e. it's a 1:1 relation.
However, we fail to enforce that:
$ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio
QEMU 0.12.50 monitor - type 'help' for more information
(qemu) info network
Devices not on any VLAN:
net0: net=10.0.2.0, restricted=n peer=virtio-net-pci.0
e1000.0: model=e1000,macaddr=52:54:00:12:34:56 peer=net0
virtio-net-pci.0: model=virtio-net-pci,macaddr=52:54:00:12:34:57 peer=net0
It's all downhill from there.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Fri, 26 Feb 2010 14:50:50 +0000 (15:50 +0100)]
qdev: Improve diagnostics for bad property values
Property "vlan" reports "failed to parse" even when the value parses
just fine, but the result doesn't name an existing VLAN.
Similarly, properties "drive", "chr" and "netdev" misleadingly report
"failed to parse" when the value doesn't name an existing host device.
Change PropertyInfo method parse to return an error code, so that
qdev_prop_parse() can report the error more accurately.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Thu, 25 Feb 2010 11:54:44 +0000 (17:24 +0530)]
virtio-pci: Use DEV_NVECTORS_UNSPECIFIED instead of -1 for virtio-serial
Use the named constant instead of -1.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Thu, 25 Feb 2010 11:54:43 +0000 (17:24 +0530)]
qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors
net.c used a constant to signify no MSI vectors were specified. Extend
that to all qdev devices.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Reported-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Chris Kilgour [Wed, 24 Feb 2010 06:32:14 +0000 (22:32 -0800)]
pcnet APROMWE bit location (retry)
According to AMD document 21485D pp.141, APROMWE is bit 8 of BCR2.
Signed-off-by: Christopher Kilgour <techie@whiterocker.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Gerd Hoffmann [Thu, 25 Feb 2010 08:41:36 +0000 (09:41 +0100)]
move x509 file name defines to qemu-x509.h
Want share them with vnc and spice.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Izik Eidus [Thu, 25 Feb 2010 08:41:25 +0000 (09:41 +0100)]
adding helper pci functions
Signed-off-by: Izik Eidus <ieidus@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:11:44 +0000 (12:11 -0300)]
QMP: Introduce RTC_CHANGE event
Emitted whenever the RTC time changes.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:07:02 +0000 (12:07 -0300)]
QMP: Revamp the qmp-events.txt file
Now we can say it's useful, the following changes have been made:
- Put events in alphabetical order
- Add examples to all events
- Document all 'data' members
- Small corrections and cleanups
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:07:01 +0000 (12:07 -0300)]
QMP: Drop DEBUG event
This event has been introduced in the first round of QMP commits,
turns out that it's based on the usage of the EXCP_DEBUG macro,
which has discussable semantics when exposed through QMP.
As libvirt doesn't use this, let's just drop it.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:07:00 +0000 (12:07 -0300)]
QMP: Move RESET event into qemu_system_reset()
Nothing will change as that function is currently only called by
the main loop code, but it's the right place for the RESET event,
as it's where the reset is actually performed.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:06:59 +0000 (12:06 -0300)]
QMP: Move STOP event into do_vm_stop()
I've introduced the STOP event in the main loop, this is wrong
as it will be only emitted if the io thread is enabled.
This fixes that by moving the STOP event to do_vm_stop().
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Thu, 25 Feb 2010 15:06:58 +0000 (12:06 -0300)]
block: Emit BLOCK_IO_ERROR before vm_stop() call
The next commit will move the STOP event into do_vm_stop(), to
have the expected event sequence we need to emit the I/O error
event before calling vm_stop().
The expected sequence is:
{ "event": "BLOCK_IO_ERROR" [...] }
{ "event": "STOP" }
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Adam Litke [Mon, 22 Feb 2010 16:51:20 +0000 (10:51 -0600)]
Fix hanging user monitor when using balloon command
This patch application failed. My patch adds a cb() call in
do_balloon(), but the change in git has added the cb() call to
do_info_balloon(). That is causing qemu segfaults. Applying the
following should correct the damage. Thanks.
Fix for commit:
5c366a8a3d7ac71beda8499caa815cb3ea95eb58
The cb() call is needed in do_balloon(), not do_info_balloon().
Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 1 Mar 2010 14:47:28 +0000 (08:47 -0600)]
sdl: improve grab exiting instructions
It might not be obvious what "grab" is.
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Aurelien Jarno [Mon, 8 Mar 2010 11:31:27 +0000 (12:31 +0100)]
ppc: don't define bamboo-0.13 as the default machine
It has been broken by commit
977b6b91cee1132f8c7b12d22f4b273091598e44.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Sun, 7 Mar 2010 15:48:43 +0000 (15:48 +0000)]
Blue Swirl [Sun, 7 Mar 2010 13:56:27 +0000 (13:56 +0000)]
i386-dis: remove dead assignments, spotted by clang
Value stored to 'mask' is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:49:58 +0000 (13:49 +0000)]
softfloat: remove dead assignments, spotted by clang
Value stored to 'bSign' is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:45:38 +0000 (13:45 +0000)]
slirp: remove dead nested assignment, spotted by clang
Although the value stored to 'r' is used in the enclosing expression,
the value is never actually read from 'r'.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:45:38 +0000 (13:45 +0000)]
slirp: remove dead initialization, spotted by clang
Value stored during initialization is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:45:37 +0000 (13:45 +0000)]
slirp: remove dead increments, spotted by clang
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 7 Mar 2010 13:13:05 +0000 (13:13 +0000)]
slirp: remove dead assignments, spotted by clang
Value stored is never read.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Adam Lackorzynski [Mon, 1 Mar 2010 16:19:54 +0000 (17:19 +0100)]
target-arm: Fix missing 'return' in SRS handling.
There's a return missing in the srs handling which leads to srs always being
treated an an invalid op.
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Samuel Thibault [Sun, 28 Feb 2010 20:03:00 +0000 (21:03 +0100)]
Fix curses interaction with keymaps
The combination of keymap support (-k option) and curses is currently
very broken. The patch below fixes it by first extending keymap support
to interpret the shift, ctrl, altgr and addupper keywords in keymaps,
and to fix curses into properly using keymaps.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Paolo Bonzini [Fri, 5 Mar 2010 08:08:04 +0000 (09:08 +0100)]
use absolute URLs for .gitmodules
The relative URLs do not work when cloning a fork of qemu or when
cloning from the Savannah URL.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Stefan Weil [Thu, 4 Mar 2010 21:21:02 +0000 (22:21 +0100)]
Documentation: Modify rule for html output (better looking output format)
To create html output from texi input, texi2html was used.
Output from makeinfo looks cleaner, so replace the old rule
and use makeinfo now.
For those who want to use their own variant of html output,
the macros MAKEINFO and MAKEINFOFLAGS allow customisation.
Option "-I ." is not needed (the current directory is
searched by default), so remove it.
Please note that the build requirements changed, too:
makeinfo is required for doc builds.
texi2html is no longer used.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Christoph Hellwig [Thu, 4 Mar 2010 13:45:44 +0000 (14:45 +0100)]
scsi: update comment on the standards revision
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Ryota Ozaki [Wed, 3 Mar 2010 15:18:43 +0000 (00:18 +0900)]
qemu-nbd: Fix wrong description in qemu-nbd.texi
-c option needs argument <dev> but it's missing now.
This patch fixes it.
Signed-off-by: Ryota Ozaki <ozaki.ryota@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Kevin Wolf [Wed, 3 Mar 2010 15:02:25 +0000 (16:02 +0100)]
Build usb-ohci for PCs
The OHCI emulation isn't obviously broken and there are people who want to use
it. Let's build it by default so that it can be enabled via -device.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Thu, 25 Feb 2010 13:56:12 +0000 (19:26 +0530)]
ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type
Disable the MULTIPORT feature and MSI vectors for the 0.12 machine
types; those features are added only for 0.13 onwards.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Thu, 25 Feb 2010 13:56:11 +0000 (19:26 +0530)]
ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat
Add a 0.12 machine type for compatibility with older versions. Mark the
default one as 0.13.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Amit Shah [Thu, 25 Feb 2010 13:45:18 +0000 (19:15 +0530)]
s390-virtio: Fix compile error for virtio-block init
Commit
428c149b0be790b440e1cbee185b152cdb22feec modified the argument
that virtio_blk_init takes. Update the s390 bus code that calls this
function.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
CC: Christoph Hellwig <hch@lst.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Kevin Wolf [Wed, 24 Feb 2010 15:17:58 +0000 (16:17 +0100)]
json-parser: Fix segfault on malformed input
If the parser fails to parse the key in parse_pair, it will access a NULL
pointer. A simple way to trigger this is sending {foo} via QMP. This patch
turns the segfault into a syntax error reply.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 6 Mar 2010 21:19:53 +0000 (22:19 +0100)]
hw/serial.c: fix THRE interrupt clearing
UART_IIR_THRI is not a mask, but a possible value for the IIR ID.
Use UART_IIR_ID to extract this value.
Broken by commit
71e605f80313a632cc6714cde7bd240042dbdd95.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 6 Mar 2010 19:23:09 +0000 (20:23 +0100)]
hw/serial.c: fix indentation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
takasi-y@ops.dti.ne.jp [Wed, 17 Feb 2010 15:46:45 +0000 (00:46 +0900)]
linux-user: Save/restore fpu registers to signal context on sh4
As "todo" comment in source code.
And modify restore_sigcontext() to have three args as kernel's does.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
takasi-y@ops.dti.ne.jp [Wed, 17 Feb 2010 15:35:03 +0000 (00:35 +0900)]
linux-user: Fix syscall pipe2() retval on sh4
On linux/sh4
pipe() return values by r0:r1 as SH C calling convention.
pipe2() return values on memory as traditional unix way.
Signed-off-by: Takashi YOSHII <takasi-y@ops.dti.ne.jp>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
malc [Thu, 4 Mar 2010 12:09:26 +0000 (15:09 +0300)]
target-i386: Fix long jumps/calls in long mode with REX.W set
Signed-off-by: malc <av1474@comtv.ru>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 6 Mar 2010 17:33:53 +0000 (18:33 +0100)]
target-i386: fix lddqu SSE instruction
This instruction load data from memory to register and not the reverse.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Anthony Liguori [Sat, 6 Mar 2010 03:42:50 +0000 (21:42 -0600)]
Update to latest SeaBIOS
- 8f469b9 Dynamically allocate ata_channel info; introduce custom atadrive_s struct.
- 575ffc8 Cleanup - build drive description in temp memory during init.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Stefan Weil [Thu, 4 Mar 2010 20:44:41 +0000 (14:44 -0600)]
Makefile: Fix names of GPXE ROM files
da51e79b7ff2126cc2448749d657a4f6e3b1270f added two new ROM files
and removed an old one for eepro100.c.
These changes were missing in Makefile (which resulted
in a broken "make install").
Reported by Lucas Meneghel Rodrigues, thanks.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Aurelien Jarno [Wed, 3 Mar 2010 11:22:11 +0000 (12:22 +0100)]
target-mips: use newer logical ops
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Anthony Liguori [Thu, 4 Mar 2010 15:14:24 +0000 (09:14 -0600)]
Merge remote branch 'qemu-kvm/uq/master' into pulls
Jan Kiszka [Mon, 1 Mar 2010 18:10:32 +0000 (19:10 +0100)]
x86: Extend validity of bsp_to_cpu
As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals
cpu_index, bsp_to_cpu can also be based on the latter directly. This
will help an early user of it: KVM while initializing mp_state.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Mon, 1 Mar 2010 18:10:31 +0000 (19:10 +0100)]
KVM: x86: Restrict writeback of VCPU state
Do not write nmi_pending, sipi_vector, and mpstate unless we at least go
through a reset. And TSC as well as KVM wallclocks should only be
written on full sync, otherwise we risk to drop some time on state
read-modify-write.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Mon, 1 Mar 2010 18:10:30 +0000 (19:10 +0100)]
KVM: Rework VCPU state writeback API
This grand cleanup drops all reset and vmsave/load related
synchronization points in favor of four(!) generic hooks:
- cpu_synchronize_all_states in qemu_savevm_state_complete
(initial sync from kernel before vmsave)
- cpu_synchronize_all_post_init in qemu_loadvm_state
(writeback after vmload)
- cpu_synchronize_all_post_init in main after machine init
- cpu_synchronize_all_post_reset in qemu_system_reset
(writeback after system reset)
These writeback points + the existing one of VCPU exec after
cpu_synchronize_state map on three levels of writeback:
- KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run)
- KVM_PUT_RESET_STATE (on synchronous system reset, all VCPUs stopped)
- KVM_PUT_FULL_STATE (on init or vmload, all VCPUs stopped as well)
This level is passed to the arch-specific VCPU state writing function
that will decide which concrete substates need to be written. That way,
no writer of load, save or reset functions that interact with in-kernel
KVM states will ever have to worry about synchronization again. That
also means that a lot of reasons for races, segfaults and deadlocks are
eliminated.
cpu_synchronize_state remains untouched, just as Anthony suggested. We
continue to need it before reading or writing of VCPU states that are
also tracked by in-kernel KVM subsystems.
Consequently, this patch removes many cpu_synchronize_state calls that
are now redundant, just like remaining explicit register syncs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Jan Kiszka [Mon, 1 Mar 2010 18:10:29 +0000 (19:10 +0100)]
KVM: Rework of guest debug state writing
So far we synchronized any dirty VCPU state back into the kernel before
updating the guest debug state. This was a tribute to a deficite in x86
kernels before 2.6.33. But as this is an arch-dependent issue, it is
better handle in the x86 part of KVM and remove the writeback point for
generic code. This also avoids overwriting the flushed state later on if
user space decides to change some more registers before resuming the
guest.
We furthermore need to reinject guest exceptions via the appropriate
mechanism. That is KVM_SET_GUEST_DEBUG for older kernels and
KVM_SET_VCPU_EVENTS for recent ones. Using both mechanisms at the same
time will cause state corruptions.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Marcelo Tosatti [Mon, 1 Mar 2010 23:25:08 +0000 (20:25 -0300)]
Add option to use file backed guest memory
Port qemu-kvm's -mem-path and -mem-prealloc options. These are useful
for backing guest memory with huge pages via hugetlbfs.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
CC: john cooper <john.cooper@redhat.com>
Avi Kivity [Wed, 24 Feb 2010 21:11:19 +0000 (18:11 -0300)]
Allocate memory below 4GB as one chunk
Instead of allocating a separate chunk for the first 640KB and another
for 1MB+, allocate one large chunk. This plays well in terms of alignment
and size with large pages.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:38:00 +0000 (22:38 +0100)]
eepro100: Keep includes sorted
I always try to keep standard includes sorted
and add a comment why they are there (so they
can be removed when they are no longer needed).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:59 +0000 (22:37 +0100)]
eepro100: Remove C++ comments
C++ comments are unwanted, so this is fixed here.
* Replace C++ comments by C comments.
* Put code which was deactivated by a C++ comment in #if 0...#endif.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:58 +0000 (22:37 +0100)]
eepro100: Add diagnose command
Real hardware would run an internal self-test.
The emulation just returns a passed status.
Original patch was from Reimar Döffinger, thanks.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:57 +0000 (22:37 +0100)]
eepro100: New function for reading command block
Move code which reads the command block to the
new function read_cb. The patch also fixes some
endianess issues related to the command block
and moves declarations of local variables to
the beginning of the block.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:56 +0000 (22:37 +0100)]
eepro100: Use tx.status
There is no need for a local variable "status".
Using tx.status makes it clearer which status
is addressed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:55 +0000 (22:37 +0100)]
eepro100: Prettify code (no functional changes)
* Fix indentation.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:54 +0000 (22:37 +0100)]
eepro100: Fix CU Start command
CU Start is allowed when the CU is in the idle or suspended state.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:53 +0000 (22:37 +0100)]
eepro100: Support RNR interrupt
The RNR interrupt is triggered under these conditions:
* the RU is not ready to receive a frame due to missing resources
* the RU is ready and a RU abort command was requested
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:52 +0000 (22:37 +0100)]
eepro100: Replace variable name to fix a compiler warning
When compiling with -Wshadow, gcc gives a warning
which is fixed by renaming stat -> status.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:51 +0000 (22:37 +0100)]
eepro100: Use symbolic names for bits in EEPROM id
V2 - Use UPPER_CASE for enum values
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:50 +0000 (22:37 +0100)]
eepro100: Remove old unused code
This code is no longer needed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:49 +0000 (22:37 +0100)]
eepro100: Use symbolic names and BIT macros in binary operations
Instead of magic numbers like 0x8000, symbolic names are used
for the SCB command and status bits.
There are too many configuration bits to use symbolic names
there, too. Using the BIT macro is a little help when comparing
code and documentation.
For the same reason, some other constants were replaced by
the BITS macro.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:48 +0000 (22:37 +0100)]
eepro100: Add device descriptions
Add descriptions for all devices.
These descriptions are shown when users call
qemu -device ?
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:47 +0000 (22:37 +0100)]
eepro100: Update copyright notice
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:46 +0000 (22:37 +0100)]
eepro100: Add TODO list
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:44 +0000 (22:37 +0100)]
eepro100: Support gpxe boot for all eepro100 devices
Only two boot ROM files are needed for all devices.
* Add these GPXE ROM files using new naming convention
(as discussed on qemu-devel). Both files were created
with http://rom-o-matic.net/, PCI vendor / device ids
as in ROM filenames and option BANNER_TIMEOUT = 0.
* Remove old PXE ROM file for i82559er.
It was replaced by gpxe-eepro100-
80861209.rom.
* Update pc-bios/README (and sort entries).
Full support still needs additional eepro100 fixes.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:43 +0000 (22:37 +0100)]
eepro100: Fix PXE boot
The phy handling was wrong for PXE, GPXE boot:
GPXE's eepro100 driver did not detect a valid link.
This is fixed here.
V2 - Use UPPER_CASE for enum values
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:42 +0000 (22:37 +0100)]
eepro100: Add missing SCB register names
Some system control block registers were addressed
using their offset value. Use symbolic names now
and clean the documentation.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Stefan Weil [Tue, 2 Mar 2010 21:37:41 +0000 (22:37 +0100)]
eepro100: Fix compiler errors from debug messages
When debug output was enabled (by defining DEBUG_EEPRO100),
some debug messages resulted in a compiler error.
This is fixed here.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Samuel Thibault [Sun, 28 Feb 2010 17:12:01 +0000 (18:12 +0100)]
(curses) Use more descriptive values
Hello,
curses_keys.h is using obscure constant values while the curses.h header
provides fine defines, let's use the latter.
To be applied on top of my previous patch.
Samuel
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Samuel Thibault [Sun, 28 Feb 2010 14:35:19 +0000 (15:35 +0100)]
Fix curses return key when using -k
Hello,
There is a small incoherency in curses_keys.h, which makes it fail to
emit \n when using e.g. -k fr: curses2keysym transforms \r and 0x157
into \n, but name2keysym binds \r with Return, not \n. The patch below
fixes that.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>