Christoph Hellwig [Thu, 19 May 2011 08:57:59 +0000 (10:57 +0200)]
make dma_bdrv_io available to drivers
Make dma_bdrv_io available for drivers, and pass an explicit I/O function
instead of hardcoding bdrv_aio_readv/bdrv_aio_writev. This is required
to implement non-READ/WRITE dma commands in the ide driver, e.g. the
upcoming TRIM support.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Thu, 9 Jun 2011 12:15:18 +0000 (14:15 +0200)]
ide: Add forgotten VMSTATE_END_OF_LIST in subsection
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Thu, 9 Jun 2011 12:12:57 +0000 (14:12 +0200)]
ide: Fix ide_drive_pio_state_needed()
When a failed PIO request caused the VM to stop, we still need to transfer the
PIO state even though DRQ=0 at this point.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Thu, 26 May 2011 13:00:34 +0000 (15:00 +0200)]
ide: Split error status from status register
When adding the werror=stop mode, some flags were added to s->status
which are used to determine what kind of operation should be restarted
when the VM is continued.
Unfortunately, it turns out that s->status is in fact a device register
and as such is visible to the guest (some of the abused bits are even
writable for the guest).
For migration we keep on using the old VMState field (renamed to
migration_compat_status) if the status register doesn't use any of the
previously abused bits. If it does, we use a subsection with a clean copy of
the status register.
The error status is always sent in a subsection if there is any error. It can't
use the old field because errors happen even without PCI.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Tue, 24 May 2011 14:40:02 +0000 (16:40 +0200)]
qcow2: Fix in-flight list after qcow2_cache_put failure
If qcow2_cache_put returns an error during cluster allocation and the
allocation fails, it must be removed from the list of in-flight allocations.
Otherwise we'd get a loop in the list when the ACB is used for the next
allocation.
Luckily, this qcow2_cache_put shouldn't fail anyway because the L2 table is
only read, so that qcow2_cache_put doesn't even involve I/O.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Devin Nakamura [Thu, 9 Jun 2011 05:06:43 +0000 (01:06 -0400)]
Replaced tabs with spaces in block.h and block_int.h
Signed-off-by: Devin Nakamura <devin122@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Tue, 7 Jun 2011 14:12:58 +0000 (16:12 +0200)]
vdi: Avoid direct AIO callback
bdrv_aio_* must not call the callback before returning to its caller. In vdi,
this could happen in some error cases. This starts the real requests processing
in a BH to avoid this situation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Tue, 7 Jun 2011 13:20:44 +0000 (15:20 +0200)]
qcow: Avoid direct AIO callback
bdrv_aio_* must not call the callback before returning to its caller. In qcow,
this could happen in some error cases. This starts the real requests processing
in a BH to avoid this situation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Tue, 7 Jun 2011 13:04:32 +0000 (15:04 +0200)]
qcow2: Avoid direct AIO callback
bdrv_aio_* must not call the callback before returning to its caller. In qcow2,
this could happen in some error cases. This starts the real requests processing
in a BH to avoid this situation.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Stefan Weil [Fri, 10 Jun 2011 20:05:30 +0000 (22:05 +0200)]
block/rbd: Remove unused local variable
Variable 'snap' is assigned a value that is never used.
Remove snap and the related code.
Cc: Christian Brunner <chb@muc.de>
Cc: Josh Durgin <josh.durgin@dreamhost.com>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Peter Maydell [Thu, 9 Jun 2011 21:54:29 +0000 (22:54 +0100)]
configure: Detect and don't try to use older libcurl
Older versions of libcurl don't have some of the features we try to
use, in particular curl_multi_setopt(). Check for this in the 'is
libcurl available?' configure test so we disable curl support if the
library is too old.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Peter Maydell [Thu, 9 Jun 2011 10:43:12 +0000 (11:43 +0100)]
Changelog: Add explanatory note that this file is no longer updated
Add an explanatory note to the top of Changelog pointing at the
wiki and git history for changelogs for more recent releases.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Brad Hards [Wed, 8 Jun 2011 21:50:43 +0000 (07:50 +1000)]
doc: Minor typo fix.
Thanks to agraf_, stefanha and Snader_LB for their IRC assistance.
Thanks to Markus Armbruster and Alexander Graf (again) for their
assistance with the second version of this patch. No patch is too
simple to test...
Signed-off-by: Brad Hards <bradh@frogmouth.net>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Alexander Graf [Wed, 8 Jun 2011 22:55:37 +0000 (00:55 +0200)]
sigfd: use pthread_sigmask
Qemu uses signalfd to figure out, if a signal occured without the need
to actually receive the signal. Instead, it can read from the fd to receive
its news.
Now, we obviously don't always have signalfd around. Especially not on
non-Linux systems. So what we do there is that we create a new thread,
block that thread on all signals and simply call sigwait to wait for a
signal we're interested in to occur.
This all sounds great, but what we're really doing is:
sigset_t all;
sigfillset(&all);
sigprocmask(SIG_BLOCK, &all, NULL);
which - on Darwin - blocks all signals on the current _process_, not only
on the current thread. To block signals on the thread, we can use
pthread_sigmask().
This patch does that, assuming that my above analysis is correct, and thus
renders Qemu useable on Darwin again.
Reported-by: Andreas Färber <andreas.faerber@web.de>
Acked-by: Paolo Bonizni <pbonzini@redhat.com>
CC: Jan Kiszka <jan.kiszka@siemens.com>
CC: Anthony Liguori <anthony@codemonkey.ws>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Edgar E. Iglesias [Fri, 10 Jun 2011 20:21:14 +0000 (22:21 +0200)]
Merge remote branch 'rth/axp-next' into alpha-merge
* rth/axp-next: (26 commits)
target-alpha: Implement TLB flush primitives.
target-alpha: Use a fixed frequency for the RPCC in system mode.
target-alpha: Trap for unassigned and unaligned addresses.
target-alpha: Remap PIO space for 43-bit KSEG for EV6.
target-alpha: Implement cpu_alpha_handle_mmu_fault for system mode.
target-alpha: Implement more CALL_PAL values inline.
target-alpha: Disable interrupts properly.
target-alpha: All ISA checks to use TB->FLAGS.
target-alpha: Swap shadow registers moving to/from PALmode.
target-alpha: Implement do_interrupt for system mode.
target-alpha: Add IPRs to be used by the emulation PALcode.
target-alpha: Use kernel mmu_idx for pal_mode.
target-alpha: Add various symbolic constants.
target-alpha: Use do_restore_state for arithmetic exceptions.
target-alpha: Tidy up arithmetic exceptions.
target-alpha: Tidy exception constants.
target-alpha: Enable the alpha-softmmu target.
target-alpha: Rationalize internal processor registers.
target-alpha: Merge HW_REI and HW_RET implementations.
target-alpha: Cleanup MMU modes.
...
Edgar E. Iglesias [Fri, 10 Jun 2011 13:29:11 +0000 (15:29 +0200)]
fsdev: Fix archs that dont use fsdev
Fix provided by: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Anthony Liguori [Wed, 8 Jun 2011 17:16:24 +0000 (12:16 -0500)]
Merge remote-tracking branch 'qmp/for-anthony' into staging
Anthony Liguori [Wed, 8 Jun 2011 17:15:43 +0000 (12:15 -0500)]
Merge remote-tracking branch 'jvrao/for-anthony' into staging
Anthony Liguori [Wed, 8 Jun 2011 17:15:11 +0000 (12:15 -0500)]
Merge remote-tracking branch 'spice/spice.v37' into staging
Conflicts:
vl.c
Anthony Liguori [Wed, 8 Jun 2011 17:13:58 +0000 (12:13 -0500)]
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Kevin Wolf [Tue, 31 May 2011 13:01:46 +0000 (15:01 +0200)]
qemu-img create: Fix displayed default cluster size
When not specifying a cluster size on the command line, qemu-img printed
a cluster size of 0:
Formatting '/tmp/test.qcow2', fmt=qcow2 size=
67108864
encryption=off cluster_size=0
This patch adds the default cluster size to the QEMUOptionParameter list, so
that it displays the default value that is used.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Wed, 1 Jun 2011 12:03:31 +0000 (14:03 +0200)]
bdrv_img_create: Fix segfault
Block drivers that don't support creating images don't have a size option. Fail
gracefully instead of segfaulting when trying to access the option's value.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Wed, 1 Jun 2011 08:50:00 +0000 (10:50 +0200)]
qcow2: Fix memory leaks in error cases
This fixes memory leaks that may be caused by I/O errors during L1 table growth
(can happen during save_vm) and in qemu-img check.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Josh Durgin [Thu, 26 May 2011 23:07:34 +0000 (16:07 -0700)]
rbd: Add bdrv_truncate implementation
Reviewed-by: Christian Brunner <chb@muc.de>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Josh Durgin [Thu, 26 May 2011 23:07:33 +0000 (16:07 -0700)]
rbd: check return values when scheduling aio
If scheduling fails, the number of outstanding I/Os must be correct,
or there will be a hang when waiting for everything to be flushed.
Reviewed-by: Christian Brunner <chb@muc.de>
Reported-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Josh Durgin [Thu, 26 May 2011 23:07:32 +0000 (16:07 -0700)]
rbd: allow configuration of rados from the rbd filename
The new format is rbd:pool/image[@snapshot][:option1=value1[:option2=value2...]]
Each option is used to configure rados, and may be any Ceph option, or "conf".
The "conf" option specifies a Ceph configuration file to read.
This allows rbd volumes from more than one Ceph cluster to be used by
specifying different monitor addresses, as well as having different
logging levels or locations for different volumes.
Reviewed-by: Christian Brunner <chb@muc.de>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Josh Durgin [Thu, 26 May 2011 23:07:31 +0000 (16:07 -0700)]
rbd: use the higher level librbd instead of just librados
librbd stacks on top of librados to provide access
to rbd images.
Using librbd simplifies the qemu code, and allows
qemu to use new versions of the rbd format
with few (if any) changes.
Reviewed-by: Christian Brunner <chb@muc.de>
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Christoph Egger [Mon, 23 May 2011 12:31:17 +0000 (14:31 +0200)]
block/raw-posix: get right partition size
use the correct way to get the size of a disk device or partition
From: Adam Hamsik <haad@netbsd.org>
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Christoph Egger [Tue, 24 May 2011 09:30:29 +0000 (11:30 +0200)]
block/raw-posix: use a character device if a block device is given
On NetBSD a userland process is better with the character device
interface. In addition, a block device can't be opened twice; if a Xen
backend opens it, qemu can't and vice-versa.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Alexander Graf [Tue, 24 May 2011 22:46:55 +0000 (00:46 +0200)]
vmdk: fix endianness bugs
The vmdk code is sloppy when handling the header descriptor during
creation of an image. Fix all header accesses in the create path to
either store native endianness or convert it when appropriate.
Reported-by: Yury Tsarev <ytsarev@novell.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Christoph Hellwig [Tue, 17 May 2011 16:04:06 +0000 (18:04 +0200)]
block: clarify the meaning of BDRV_O_NOCACHE
Change BDRV_O_NOCACHE to only imply bypassing the host OS file cache,
but no writeback semantics. All existing callers are changed to also
specify BDRV_O_CACHE_WB to give them writeback semantics.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf [Thu, 19 May 2011 14:42:24 +0000 (16:42 +0200)]
ide/core: Remove explicit setting of BM_STATUS_INT
BM_STATUS_INT is automatically set during ide_set_irq(), there's no reason to
set it manually in addition.
There is even one case where the interrupt status bit was set, but no IRQ was
raised. This is when the PRD table was reached but there is more data to
transfer. The correct behaviour for this case is not to set BM_STATUS_INT.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Jan Kiszka [Tue, 26 Apr 2011 01:32:08 +0000 (01:32 +0000)]
virtio: Move virtio-pci to hw library
This module has no target dependencies (except for target_phys_addr_t
size) and can thus be built as part of libhw.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Martin Simmons [Mon, 6 Jun 2011 14:49:17 +0000 (15:49 +0100)]
target-i386: Make x86 mfence and lfence illegal without SSE2
While trying to use qemu -cpu pentium3 to test for incorrect uses of certain
SSE2 instructions, I found that QEMU allowed the mfence and lfence
instructions to be executed even though Pentium 3 doesn't support them.
According to the processor specs (and experience on a real Pentium 3), these
instructions are only available with SSE2, but QEMU is checking for SSE. The
check for the related sfence instruction is correct (it works with SSE).
This trival patch fixes the test.
Signed-off-by: Martin Simmons <martin@lispworks.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Laurent Vivier [Fri, 25 Mar 2011 09:36:36 +0000 (09:36 +0000)]
m68k: Replace gen_im32() by tcg_const_i32()
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Alexander Graf [Sat, 4 Jun 2011 05:25:59 +0000 (07:25 +0200)]
slirp: fix guestfwd id
When using -net user,guestfwd=... Qemu immediately complains about the id
being in invalid format. This is because we pass in an id that contains a
colon, while the id restrictions don't allow colons.
This patch changes the colon into a dot, making guestfwd work again.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Alexandre Raymond [Fri, 3 Jun 2011 03:26:49 +0000 (23:26 -0400)]
Fix compilation warning due to missing header for sigaction (followup)
This patch removes all references to signal.h when qemu-common.h is included
as they become redundant.
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Alexandre Raymond [Thu, 2 Jun 2011 02:21:30 +0000 (22:21 -0400)]
Fix compilation warning due to missing header for sigaction
Fix the following warning by including signal.h directly in qemu-common.h
----8<----
iohandler.c: In function ‘qemu_init_child_watch’:
iohandler.c:172: warning: implicit declaration of function ‘sigaction’
iohandler.c:172: warning: nested extern declaration of ‘sigaction’
----8<----
Signed-off-by: Alexandre Raymond <cerbere@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Glauber Costa [Mon, 16 May 2011 18:45:08 +0000 (15:45 -0300)]
Add an isa device for SGA
This patch adds a dummy legacy ISA device whose responsibility is to
deploy sgabios, an option rom for a serial graphics adapter.
The proposal is that this device is always-on when -nographics,
but can otherwise be enable in any setup when -device sga is used.
[v2: suggestions on qdev by Markus ]
[v3: cleanups and documentation, per list suggestions ]
Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Roth [Wed, 1 Jun 2011 17:15:00 +0000 (12:15 -0500)]
json-parser: add handling for NULL token list
Currently a NULL token list will crash the parser, instead we have it
pass back a NULL QObject.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Roth [Wed, 1 Jun 2011 17:14:59 +0000 (12:14 -0500)]
json-streamer: add handling for JSON_ERROR token/state
This allows a JSON_ERROR state to be passed to the streamer to force a
flush of the current tokens and pass a NULL token list to the parser
rather that have it churn on bad data. (Alternatively we could just not
pass it to the parser at all, but it may be useful to push there errors
up the stack. NULL token lists are not currently handled by the parser,
the next patch will address that)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Roth [Wed, 1 Jun 2011 17:14:58 +0000 (12:14 -0500)]
json-lexer: make lexer error-recovery more deterministic
Currently when we reach an error state we effectively flush everything
fed to the lexer, which can put us in a state where we keep feeding
tokens into the parser at arbitrary offsets in the stream. This makes it
difficult for the lexer/tokenizer/parser to get back in sync when bad
input is made by the client.
With these changes we emit an error state/token up to the tokenizer as
soon as we reach an error state, and continue processing any data passed
in rather than bailing out. The reset token will be used to reset the
tokenizer and parser, such that they'll recover state as soon as the
lexer begins generating valid token sequences again.
We also map chr(192,193,245-255) to an error state here, since they are
invalid UTF-8 characters. QMP guest proxy/agent will use chr(255) to
force a flush/reset of previous input for reliable delivery of certain
events, so also we document that thoroughly here.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Michael Roth [Wed, 1 Jun 2011 17:14:57 +0000 (12:14 -0500)]
json-lexer: fix flushing logic to not always go to error state
Currently we flush the lexer by passing in a NULL character. This
generally forces the lexer to go to the corresponding TERMINAL() state
for whatever token type it is currently parsing, emits the token to the
parser, then puts the lexer back into IN_START state. However, since a
NULL character causes char_consumed to be 0, we always do a second pass
after this, which puts us in the IN_ERROR state. Fix this behavior by
adding a "flush" flag that tells the lexer not to do a more than 1
iteration.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:56 +0000 (12:14 -0500)]
json-lexer: reset the lexer state on an invalid token
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:55 +0000 (12:14 -0500)]
json-parser: detect premature EOI
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:54 +0000 (12:14 -0500)]
json-streamer: make sure to reset token_size after emitting a token list
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:53 +0000 (12:14 -0500)]
json-streamer: limit the maximum recursion depth and maximum token count
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:52 +0000 (12:14 -0500)]
json-lexer: limit the maximum size of a given token
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:51 +0000 (12:14 -0500)]
json-streamer: allow recovery after bad input
Once we detect a malformed message, make sure to reset our state.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 1 Jun 2011 17:14:50 +0000 (12:14 -0500)]
json-parser: propagate error from parser
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Wed, 1 Jun 2011 17:14:49 +0000 (12:14 -0500)]
Introduce the new error framework
New error-handling framework that allows for exception-like error
propagation.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Wed, 1 Jun 2011 17:14:48 +0000 (12:14 -0500)]
QError: Introduce qerror_format()
Will be used by new error propagation framework to convert Error objects
into human-readable form.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Wed, 1 Jun 2011 17:14:47 +0000 (12:14 -0500)]
QError: Introduce qerror_format_desc()
Refactor non-QError-specific bits out of qerror_human() into general
function that can be used by the error_get_pretty() analogue in the
new error-propagation framework.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Tue, 7 Jun 2011 08:34:31 +0000 (10:34 +0200)]
docs: qdev-device-use.txt has become stale, update it
Document more bus addresses.
Update for bugs fixed.
Describe where exactly the -drive options go.
Update for recent split of qdev ide-drive into ide-{cd,hd},
scsi-disk into scsi-{cd,hd}.
Document scsi-hd's removable property only for usb-storage, because
that's where it's used.
Fix description of -global isa.fdc.
Document usb-storage lossage.
Clean up misleading description of network device's split into guest
and host part.
Document -vga's machine dependence.
New qdevs: virtconsole, qxl-vga, isa-vga, intel-hda, usb-ccid
Update for changed pci-assign property iommu.
New section "Default Devices".
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Markus Armbruster [Tue, 7 Jun 2011 08:34:30 +0000 (10:34 +0200)]
isa-vga: Make available with -device, like the other VGA qdevs
Switch no_user off and make it suppress the default VGA.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Mon, 6 Jun 2011 13:25:06 +0000 (08:25 -0500)]
Fix regression introduced by -machine accel=
Commit
85097db6 changed the timing when kvm_allowed is set until after
kvm is initialized. During initialization, the ioeventfd initialization code
checks kvm_enabled() and after this change, ioeventfd is effectively disabled.
This causes a significant regression in performance.
Fix this by setting kvm_allowed before calling init.
Reported-by: Khoa Huynh <khoa@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Tue, 31 May 2011 15:51:11 +0000 (10:51 -0500)]
timer: drop HPET and RTC
dynticks will provide equally good timer granularity on all modern Linux
systems. This is more or less dead code these days.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alon Levy [Wed, 18 May 2011 14:34:36 +0000 (17:34 +0300)]
qxl: fix cmdlog for vga
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 17 May 2011 08:48:14 +0000 (10:48 +0200)]
spice: require spice 0.6.0 or newer.
This patch raises the minimum required spice version to 0.6.0 and drops
a few ifdefs.
0.6.0 is the first stable release with the current libspice-server API,
there shouldn't be any 0.5.x development versions deployed any more.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Tue, 17 May 2011 08:40:43 +0000 (10:40 +0200)]
qemu-config: comment spell fix
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Marc-André Lureau [Tue, 17 May 2011 08:40:33 +0000 (10:40 +0200)]
spice: add SASL support
Turn on SASL support by appending "sasl" to the spice arguments, which
requires that the client use SASL to authenticate with the spice. The
exact choice of authentication method used is controlled from the
system / user's SASL configuration file for the 'qemu' service. This
is typically found in /etc/sasl2/qemu.conf. If running QEMU as an
unprivileged user, an environment variable SASL_CONF_PATH can be used
to make it search alternate locations for the service config. While
some SASL auth methods can also provide data encryption (eg GSSAPI),
it is recommended that SASL always be combined with the 'tls' and
'x509' settings to enable use of SSL and server certificates. This
ensures a data encryption preventing compromise of authentication
credentials.
It requires support from spice 0.8.1.
[ kraxel: moved spell fix to separate commit ]
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Gerd Hoffmann [Mon, 16 May 2011 07:28:58 +0000 (09:28 +0200)]
qxl: add to the list of devices which disable the default vga
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Hans de Goede [Sun, 27 Mar 2011 14:43:54 +0000 (16:43 +0200)]
spice: add option for disabling copy paste support
Some people want to be able disable spice's guest <-> client copy paste support
because of security considerations.
[ kraxel: drop old-version error message ]
Hans de Goede [Tue, 22 Mar 2011 15:28:41 +0000 (16:28 +0100)]
spice-qemu-char: Fix flow control in client -> guest direction
In the old spice-vmc device we used to have:
last_out = virtio_serial_write(&svc->port, p, MIN(len, VMC_MAX_HOST_WRITE));
if (last_out > 0)
...
Now in the chardev backend we have:
last_out = MIN(len, VMC_MAX_HOST_WRITE);
qemu_chr_read(scd->chr, p, last_out);
if (last_out > 0) {
...
Which causes us to no longer detect if the virtio port is not ready
to receive data from us. chardev actually has a mechanism to detect this,
but it requires a separate call to qemu_chr_can_read, before calling
qemu_chr_read (which return void).
This patch uses qemu_chr_can_read to fix the flow control from client to
guest.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Paolo Bonzini [Fri, 3 Jun 2011 12:57:06 +0000 (14:57 +0200)]
scsi: fix tracing of scsi requests with simple backend
The simple backend only supports a maximum of 6 arguments. Split the
scsi_req_parsed event in two parts to cope with the limit.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Mike Frysinger [Tue, 17 May 2011 21:08:43 +0000 (17:08 -0400)]
configure: check for -Wendif-labels support
Older gcc compilers do not support -Wendif-labels, so move it from the
hardcoded list to the dynamically detected list.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Stefan Weil [Sat, 7 May 2011 20:23:49 +0000 (22:23 +0200)]
virtio-9p: Remove statement without effect (fix warning from cppcheck)
cppcheck report:
virtio-9p.c:197: warning: Redundant assignment of "flags" to itself
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Reviewed-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Alex Williamson [Tue, 3 May 2011 18:48:09 +0000 (12:48 -0600)]
exec: Implement qemu_ram_free_from_ptr()
Required for regions mapped via qemu_ram_alloc_from_ptr(). VFIO
and ivshmem will make use of this to remove mappings when devices
are hot unplugged.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Arun Thomas [Thu, 28 Apr 2011 14:11:11 +0000 (16:11 +0200)]
multiboot: set boot_device to first partition
The multiboot info struct's 'boot_device' field has 'part1' set to 0x01, which
maps to the second primary partition. To specify the first primary partition,
'part1' should be set to 0x00, since partition numbers start from zero
according to the multiboot spec.
Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Alex Zuepke [Fri, 3 Jun 2011 16:42:17 +0000 (18:42 +0200)]
target-arm: BKPT instructions should raise prefetch aborts with IFSR type 00010
Signed-off-by: Alex Zuepke <azuepke@sysgo.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Christophe Fergeau [Tue, 31 May 2011 07:53:48 +0000 (09:53 +0200)]
tcg: Fix unused-but-set-variable warning
Based on a patch from Hans de Goede <hdegoede@redhat.com>
This warning is new in gcc 4.6.
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Peter Maydell [Fri, 27 May 2011 12:12:13 +0000 (13:12 +0100)]
tcg: If DEBUG_TCGV, distinguish TCGv_ptr from TCGv_i32/TCGv_i64
When compiling with DEBUG_TCGV enabled, make the TCGv_ptr type distinct
from TCGv_i32/TCGv_i64. This means that using an i32 or i64 TCG op to
manipulate a TCGv_ptr will always be detected at compile time, rather
than only if compiling on a host system with the other word size.
NB: the tcg_add_ptr and tcg_sub_ptr macros have been removed as they
were not used anywhere.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Peter Maydell [Fri, 27 May 2011 12:12:12 +0000 (13:12 +0100)]
tcg/tcg-op.h: Fix prototypes for ld/st functions on 64 bit hosts
The prototypes for the ld/st functions on a 64 bit host declared
the address parameter as a TCGv_i64 rather than a TCGv_ptr. This
worked OK (since the two are aliases), but needs to be fixed to
allow extension of TCG type debugging to i64/i32/ptr mismatches.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Brad [Thu, 26 May 2011 03:06:00 +0000 (23:06 -0400)]
Use the correct header in the TCG MIPS code to find cacheflush() on OpenBSD.
Use the correct header in the TCG MIPS code to find cacheflush() on OpenBSD
to fix compilation of the MIPS host support for OpenBSD/mips64 based architecures.
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Peter Maydell [Thu, 26 May 2011 11:03:36 +0000 (12:03 +0100)]
target-arm: Fix compilation failure for 64 bit hosts
Use the correct _ptr aliases for manipulating the pointer to
the fp_status; this fixes a compilation failure on 64 bit hosts.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Fri, 3 Jun 2011 15:47:04 +0000 (17:47 +0200)]
Merge branch 's390-next' of git://repo.or.cz/qemu/agraf
* 's390-next' of git://repo.or.cz/qemu/agraf:
s390x: implement lrvgr
s390x: fix cksm instruction
s390x: free tmp explicitly in every opcode for disas_a5()
target-s390x: Add missing tcg_temp_free_i32()
target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x90
target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x8e
target-s390x: Add missing tcg_temp_free_i64() in disas_b2()
target-s390x: Add missing tcg_temp_free_i64() in do_mh()
target-s390x: Add missing tcg_temp_free_i64() in gen_jcc()
target-s390x: Fix duplicate call of tcg_temp_new_i64
target-s390x: Fix wrong argument in call of tcg_gen_shl_i64()
target-s390x: Fix build for non-linux hosts
s390x: update zipl rom
Aurelien Jarno [Fri, 3 Jun 2011 15:45:19 +0000 (17:45 +0200)]
Merge branch 'ppc-next' of git://repo.or.cz/qemu/agraf
* 'ppc-next' of git://repo.or.cz/qemu/agraf:
PPC: fix mpc8544ds pci default devices
Fix segfault on screendump with -nographic
PPC: install mpc8544ds.dtb
PPC: fix sregs usage on booke
ppc: Fix compilation for ppc64-softmmu
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
softfloat: add float*_is_zero_or_denormal()
float*_is_zero_or_denormal() is available for float32, but not for
float64, floatx80 and float128. Fix that.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
target-i386: use floatx80 constants in helper_fld*_ST0()
Instead of using a table which doesn't correspond to anything from
physical in the CPU, use directly the constants in helper_fld*_ST0().
Cc: Andreas Färber <andreas.faerber@web.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
softfloat: always enable floatx80 and float128 support
Now that softfloat-native is gone, there is no real point on not always
enabling floatx80 and float128 support.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
softfloat-native: remove
Remove softfloat-native support, all targets are now using softfloat
instead.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
target-i386: remove old code handling float64
Now that target-i386 uses softfloat, floatx80 is always available and
there is no need anymore to have code handling both float64 and floax80.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
target-mips/gdbstub: remove old CONFIG_SOFTFLOAT #ifndef
target-mips has been switched to softfloat only long ago, but
a #ifndef CONFIG_SOFTFLOAT has been forgotten. Remove it.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 15 May 2011 12:09:18 +0000 (14:09 +0200)]
target-ppc: remove old CONFIG_SOFTFLOAT #ifdef
target-ppc has been switched to softfloat only long ago, but a
few #ifdef CONFIG_SOFTFLOAT have been forgotten. Remove them.
Cc: Alexander Graf <agraf@suse.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Alexander Graf [Mon, 30 May 2011 10:09:12 +0000 (12:09 +0200)]
s390x: implement lrvgr
The LRVGR instruction was missing. Implement it, so everyone's happy.
Reported-by: Balazs Kutil <bkutil@novell.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Mon, 30 May 2011 08:49:45 +0000 (10:49 +0200)]
s390x: fix cksm instruction
The cksm instruction was implemented incorrectly, rendering UDP and TCP
checksum calculation wrong, making an emulated s390x Linux guest break
in most networking operations.
This patch fixes odd end checksum calculation, takes the input register
as input for the checksum and optimizes the overflow pieces by a bit.
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Sat, 28 May 2011 00:12:33 +0000 (02:12 +0200)]
s390x: free tmp explicitly in every opcode for disas_a5()
The disas_a5() function provided a TCG tmp variable which was populated
by the respective opcode implementations, but freed at the end of the
function in generic code.
That makes it really hard for code review, so let's move the freeing
to the same scope as the actual allocation.
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:36 +0000 (19:03 +0200)]
target-s390x: Add missing tcg_temp_free_i32()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:31 +0000 (19:03 +0200)]
target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x90
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:30 +0000 (19:03 +0200)]
target-s390x: Add missing tcg_temp_free_i64() in disas_s390_insn(), opc == 0x8e
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:29 +0000 (19:03 +0200)]
target-s390x: Add missing tcg_temp_free_i64() in disas_b2()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:28 +0000 (19:03 +0200)]
target-s390x: Add missing tcg_temp_free_i64() in do_mh()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:27 +0000 (19:03 +0200)]
target-s390x: Add missing tcg_temp_free_i64() in gen_jcc()
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:26 +0000 (19:03 +0200)]
target-s390x: Fix duplicate call of tcg_temp_new_i64
tmp2 = tcg_temp_new_i64() is already executed unconditionally,
so there is no need to call it a second time for 64 bit hosts.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Fri, 27 May 2011 17:03:25 +0000 (19:03 +0200)]
target-s390x: Fix wrong argument in call of tcg_gen_shl_i64()
tcg_gen_shl_i64 needs a 3rd argument of type TCGv_i64.
Set tmp4 so it can be used here.
v2:
Don't call tcg_const_i64() inside of the loop
because it creates additional code.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Stefan Weil [Tue, 24 May 2011 17:42:51 +0000 (19:42 +0200)]
target-s390x: Fix build for non-linux hosts
linux/kvm.h is not always available for compilation.
Neither linux/kvm.h nor kvm.h are needed, so remove both
which also fixes the build problem for non-linux hosts.
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Tue, 24 May 2011 17:52:28 +0000 (19:52 +0200)]
s390x: update zipl rom
The zipl bootloader rom we have has seen some dramatic speedups upstream,
so let's update it to improve the experience when booting a guest image.
This binary is based on commit id
9a0842dd9823d529f721b418d554f17c72e009e3.
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Fri, 27 May 2011 01:23:26 +0000 (03:23 +0200)]
PPC: fix mpc8544ds pci default devices
After the Qdev'ification of the MPC8544DS board and PCI bus, the internal
PCI bus name changed from "pci" to "pci.0". Reflect this change in the
search for that bus.
This patch enables networking on e500 guests again.
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Thu, 26 May 2011 21:50:33 +0000 (23:50 +0200)]
Fix segfault on screendump with -nographic
When running -nographic and calling "screendump" on the monitor, qemu
segfaults. Fix the invalid pointer dereference by checking for NULL.
Signed-off-by: Alexander Graf <agraf@suse.de>
Alexander Graf [Wed, 25 May 2011 21:49:41 +0000 (23:49 +0200)]
PPC: install mpc8544ds.dtb
We don't install mpc8544ds.dtb, which means that -M mpc8544ds doesn't
work when installed. Fix it by installing the file.
Signed-off-by: Alexander Graf <agraf@suse.de>