sdk/emulator/qemu.git
14 years agokvm-all.c: define smp_wmb and use it for coalesced mmio
Marcelo Tosatti [Mon, 22 Feb 2010 16:57:54 +0000 (13:57 -0300)]
kvm-all.c: define smp_wmb and use it for coalesced mmio

Acked-by: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agokvm: remove pre-entry exit_request check with iothread enabled
Marcelo Tosatti [Wed, 17 Feb 2010 22:14:43 +0000 (20:14 -0200)]
kvm: remove pre-entry exit_request check with iothread enabled

With SIG_IPI blocked vcpu loop exit notification happens via -EAGAIN
from KVM_RUN.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agokvm: consume internal signal with sigtimedwait
Marcelo Tosatti [Wed, 17 Feb 2010 22:14:42 +0000 (20:14 -0200)]
kvm: consume internal signal with sigtimedwait

Change the way the internal qemu signal, used for communication between
iothread and vcpus, is handled.

Block and consume it with sigtimedwait on the outer vcpu loop, which
allows more precise timing control.

Change from standard signal (SIGUSR1) to real-time one, so multiple
signals are not collapsed.

Set the signal number on KVM's in-kernel allowed sigmask.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agokvm specific wait_io_event
Marcelo Tosatti [Wed, 17 Feb 2010 22:14:41 +0000 (20:14 -0200)]
kvm specific wait_io_event

In KVM mode the global mutex is released when vcpus are executing,
which means acquiring the fairness mutex is not required.

Also for KVM there is one thread per vcpu, so tcg_has_work is meaningless.

Add a new qemu_wait_io_event_common function to hold common code
between TCG/KVM.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agoblock SIGCHLD in vcpu thread(s)
Marcelo Tosatti [Wed, 17 Feb 2010 22:14:40 +0000 (20:14 -0200)]
block SIGCHLD in vcpu thread(s)

Otherwise a vcpu thread can run the sigchild handler causing
waitpid() from iothread to fail.

Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agokvm: Kill CR3_CACHE feature references
Jes Sorensen [Fri, 19 Feb 2010 06:43:24 +0000 (07:43 +0100)]
kvm: Kill CR3_CACHE feature references

Remove all references to KVM_CR3_CACHE as it was never implemented.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agokvm: Fix eflags corruption in kvm mode
Jan Kiszka [Fri, 19 Feb 2010 17:21:20 +0000 (18:21 +0100)]
kvm: Fix eflags corruption in kvm mode

This should explain a lot of the weird breakages of upstream KVM we've
seen recently (actually we should have seen it much earlier):

Stop translating eflags into TCG format when in kvm mode as we never
translate it back and rather sync this broken state into the kernel.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agouse eventfd for iothread
Paolo Bonzini [Wed, 10 Feb 2010 23:23:46 +0000 (00:23 +0100)]
use eventfd for iothread

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
14 years agocrisv10: Prettify.
Edgar E. Iglesias [Mon, 15 Feb 2010 22:39:48 +0000 (23:39 +0100)]
crisv10: Prettify.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agosparc32 fix spurious dma interrupts v2
Artyom Tarasenko [Mon, 15 Feb 2010 17:39:50 +0000 (18:39 +0100)]
sparc32 fix spurious dma interrupts v2

Don't raise irq when not enabled.
Raise irq on enabling if DMA_INTR is set
Don't clear irq unless it was raised by DMA, as there are other irq sources
Don't set DMA_INTR bit spuriously.

v1->v2:
 - Don't clear irq unless it was raised by DMA
 - Raise irq on enabling if DMA_INTR is set
 - Assume revertion of 787cfbc432bf1d353a77cbdb613754f3963371a3

Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoRevert "Sparc32: improve DMA controller IRQ debugging"
Blue Swirl [Mon, 15 Feb 2010 17:49:06 +0000 (17:49 +0000)]
Revert "Sparc32: improve DMA controller IRQ debugging"

This reverts commit 787cfbc432bf1d353a77cbdb613754f3963371a3.

14 years agocris: Add support for CRISv10 translation.
Edgar E. Iglesias [Mon, 15 Feb 2010 11:18:57 +0000 (12:18 +0100)]
cris: Add support for CRISv10 translation.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agocris: Use tcg_gen_movi_tl.
Edgar E. Iglesias [Mon, 15 Feb 2010 11:15:07 +0000 (12:15 +0100)]
cris: Use tcg_gen_movi_tl.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agocris: Add v10 style interrupts.
Edgar E. Iglesias [Mon, 15 Feb 2010 10:47:34 +0000 (11:47 +0100)]
cris: Add v10 style interrupts.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agocrisv10: Always clear the V and C flags on btst.
Edgar E. Iglesias [Mon, 15 Feb 2010 10:20:30 +0000 (11:20 +0100)]
crisv10: Always clear the V and C flags on btst.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agocris: Prepare for CRISv10.
Edgar E. Iglesias [Mon, 15 Feb 2010 10:17:33 +0000 (11:17 +0100)]
cris: Prepare for CRISv10.

* Add prefix flag and special reg.
* Add interrupt lockout.
* Add CC_OP_MSTEP.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
14 years agodec: use PCI accessors
Blue Swirl [Sun, 14 Feb 2010 09:01:14 +0000 (09:01 +0000)]
dec: use PCI accessors

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosparc64: use PCI accessors for APB/PBM
Blue Swirl [Sun, 14 Feb 2010 08:27:19 +0000 (08:27 +0000)]
sparc64: use PCI accessors for APB/PBM

Remove useless set to zero lines. Latency programming should be
done by BIOS, reset value is zero.

Add revision to APB, don't enable PCI_COMMAND_MASTER and set status
according to APB specification.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoRemove conditional rom loading support
Blue Swirl [Sun, 14 Feb 2010 07:24:03 +0000 (07:24 +0000)]
Remove conditional rom loading support

Commit c2039bd0ffce8807e0eaac55254fde790825fa92 made rom loading
automatic for non-PC architectures. Remove now mostly unused
conditional rom loading support.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix incorrect exception_index use
Blue Swirl [Sun, 14 Feb 2010 07:23:50 +0000 (07:23 +0000)]
Fix incorrect exception_index use

env->exception_index should be cleared with -1, not 0.

See also 821b19fe923ac49a24cdb4af902584fdd019cee6.

Spotted by Igor Kovalenko.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agopci: fix info pci with host bridge.
Isaku Yamahata [Mon, 8 Feb 2010 06:40:38 +0000 (15:40 +0900)]
pci: fix info pci with host bridge.

This patch fixes 525e05147d5a3bdc08caa422d108c1ef71b584b5.
pci host bridge doesn't have header type of bridge.
The check should be by header type, instead of pci class device.

Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoMerge branch 'for_anthony' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu
Blue Swirl [Sat, 13 Feb 2010 07:00:05 +0000 (09:00 +0200)]
Merge branch 'for_anthony' of git://git./linux/kernel/git/mst/qemu

* 'for_anthony' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu:
  pci: fix pci_find_bus()

14 years agoide: add topology support
Christoph Hellwig [Wed, 10 Feb 2010 22:37:51 +0000 (23:37 +0100)]
ide: add topology support

Export the physical block size in the ATA IDENTIFY command.  The
other topology values are not supported in ATA so skip them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoscsi: add topology support
Christoph Hellwig [Wed, 10 Feb 2010 22:37:37 +0000 (23:37 +0100)]
scsi: add topology support

Export the physical block size in the READ CAPACITY (16) command,
and add the new block limits VPD page to export the minimum and
optiomal I/O sizes.

Note that we also need to bump the scsi revision level to SPC-2
as that is the minimum requirement by at least the Linux kernel
to try READ CAPACITY (16) first and look at the block limits VPD
page.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio-blk: add topology support
Christoph Hellwig [Wed, 10 Feb 2010 22:37:25 +0000 (23:37 +0100)]
virtio-blk: add topology support

Export all topology information in the block config structure,
guarded by a new VIRTIO_BLK_F_TOPOLOGY feature flag.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock: add topology qdev properties
Christoph Hellwig [Wed, 10 Feb 2010 22:37:09 +0000 (23:37 +0100)]
block: add topology qdev properties

Add three new qdev properties to export block topology information to
the guest.  This is needed to get optimal I/O alignment for RAID arrays
or SSDs.

The options are:

 - physical_block_size to specify the physical block size of the device,
   this is going to increase from 512 bytes to 4096 kilobytes for many
   modern storage devices
 - min_io_size to specify the minimal I/O size without performance impact,
   this is typically set to the RAID chunk size for arrays.
 - opt_io_size to specify the optimal sustained I/O size, this is
   typically the RAID stripe width for arrays.

I decided to not auto-probe these values from blkid which might easily
be possible as I don't know how to deal with these issues on migration.

Note that we specificly only set the physical_block_size, and not the
logial one which is the unit all I/O is described in.  The reason for
that is that IDE does not support increasing the logical block size and
at last for now I want to stick to one meachnisms in queue and allow
for easy switching of transports for a given backing image which would
not be possible if scsi and virtio use real 4k sectors, while ide only
uses the physical block exponent.

To make this more common for the different block drivers introduce a
new BlockConf structure holding all common block properties and a
DEFINE_BLOCK_PROPERTIES macro to add them all together, mirroring
what is done for network drivers.  Also switch over all block drivers
to use it, except for the floppy driver which has weird driveA/driveB
properties and probably won't require any advanced block options ever.

Example usage for a virtio device with 4k physical block size and
8k optimal I/O size:

  -drive file=scratch.img,media=disk,cache=none,id=scratch \
  -device virtio-blk-pci,drive=scratch,physical_block_size=4096,opt_io_size=8192

aliguori: updated patch to take into account BLOCK events

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio-blk: revert serial number support
hch@lst.de [Wed, 10 Feb 2010 22:36:49 +0000 (23:36 +0100)]
virtio-blk: revert serial number support

The addition of the whole ATA IDENTIY page caused the config space to
go above the allowed size in the PCI spec, and thus the feature was
already reverted in the Linux guest driver and disabled by default in
qemu.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoIncrease VNC_MAX_WIDTH
Brian Jackson [Mon, 8 Feb 2010 20:22:29 +0000 (14:22 -0600)]
Increase VNC_MAX_WIDTH

Increase VNC_MAX_WIDTH to match "commonly available" consumer level monitors
available these days.

This also closes KVM bug 2907597

Signed-off-by: Brian Jackson <iggy@theiggy.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-img: use the heap instead of the huge stack array for win32
TeLeMan [Mon, 8 Feb 2010 08:20:00 +0000 (16:20 +0800)]
qemu-img: use the heap instead of the huge stack array for win32

The default stack size of PE is 1MB on win32 and IO_BUF_SIZE in
img_convert() & img_rebase() is 2MB, so qemu-img will crash when doing
"convert" & "rebase" on win32.
Although we can improve the stack size of PE to resolve it, I think we
should avoid using the huge stack variables.

Signed-off-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agodon't dereference NULL after failed strdup
Jim Meyering [Mon, 8 Feb 2010 18:28:38 +0000 (19:28 +0100)]
don't dereference NULL after failed strdup

Most of these are obvious NULL-deref bug fixes, for example,
the ones in these files:

  block/curl.c
  net.c
  slirp/misc.c

and the first one in block/vvfat.c.
The others in block/vvfat.c may not lead to an immediate segfault, but I
traced the two schedule_rename(..., strdup(path)) uses, and a failed
strdup would appear to trigger this assertion in handle_renames_and_mkdirs:

    assert(commit->path);

The conversion to use qemu_strdup in envlist_to_environ is not technically
needed, but does avoid a theoretical leak in the caller when strdup fails
for one value, but later succeeds in allocating another buffer(plausible,
if one string length is much larger than the others).  The caller does
not know the length of the returned list, and as such can only free
pointers until it hits the first NULL.  If there are non-NULL pointers
beyond the first, their buffers would be leaked.  This one is admittedly
far-fetched.

The two in linux-user/main.c are worth fixing to ensure that an
OOM error is diagnosed up front, rather than letting it provoke some
harder-to-diagnose secondary error, in case of exec failure, or worse, in
case the exec succeeds but with an invalid list of command line options.
However, considering how unlikely it is to encounter a failed strdup early
in main, this isn't a big deal.  Note that adding the required uses of
qemu_strdup here and in envlist.c induce link failures because qemu_strdup
is not currently in any library they're linked with.  So for now, I've
omitted those changes, as well as the fixes in target-i386/helper.c
and target-sparc/helper.c.

If you'd like to see the above discussion (or anything else)
in the commit log, just let me know and I'll be happy to adjust.

>From 9af42864fd1ea666bd25e2cecfdfae74c20aa8c7 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Mon, 8 Feb 2010 18:29:29 +0100
Subject: [PATCH] don't dereference NULL after failed strdup

Handle failing strdup by replacing each use with qemu_strdup,
so as not to dereference NULL or trigger a failing assertion.
* block/curl.c (curl_open): s/\bstrdup\b/qemu_strdup/
* block/vvfat.c (init_directories): Likewise.
(get_cluster_count_for_direntry, check_directory_consistency): Likewise.
* net.c (parse_host_src_port): Likewise.
* slirp/misc.c (fork_exec): Likewise.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: Don't leak on connection close
Luiz Capitulino [Mon, 8 Feb 2010 19:01:30 +0000 (17:01 -0200)]
QMP: Don't leak on connection close

QMP's chardev event callback doesn't call
json_message_parser_destroy() on CHR_EVENT_CLOSED. As the call
to json_message_parser_init() on CHR_EVENT_OPENED allocates memory,
we'are leaking on close.

Fix that by just calling json_message_parser_destroy() on
CHR_EVENT_CLOSED.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQError: Don't abort on multiple faults
Luiz Capitulino [Mon, 8 Feb 2010 19:01:29 +0000 (17:01 -0200)]
QError: Don't abort on multiple faults

Ideally, Monitor code should report an error only once and
return the error information up the call chain.

To assure that this happens as expected and that no error is
lost, we have an assert() in qemu_error_internal().

However, we still have not fully converted handlers using
monitor_printf() to report errors. As there can be multiple
monitor_printf() calls on an error, the assertion is easily
triggered when debugging is enabled; and we will get a memory
leak if it's not.

The solution to this problem is to allow multiple faults by only
reporting the first one, and to release the additional error objects.

A better mechanism to report multiple errors to programmers is
underway.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMonitor: remove unneeded checks
Luiz Capitulino [Mon, 8 Feb 2010 19:01:28 +0000 (17:01 -0200)]
Monitor: remove unneeded checks

It's not needed to check the return of qobject_from_jsonf()
anymore, as an assert() has been added there.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqjson: Improve debugging
Luiz Capitulino [Mon, 8 Feb 2010 19:01:27 +0000 (17:01 -0200)]
qjson: Improve debugging

Add an assert() to qobject_from_jsonf() to assure that the returned
QObject is not NULL. Currently this is duplicated in the callers.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio-net: fix network stall under load
Tom Lendacky [Mon, 8 Feb 2010 16:10:01 +0000 (10:10 -0600)]
virtio-net: fix network stall under load

Fix a race condition where qemu finds that there are not enough virtio
ring buffers available and the guest make more buffers available before
qemu can enable notifications.

Signed-off-by: Tom Lendacky <toml@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agojson: fix PRId64 on Win32
Roy Tam [Thu, 4 Feb 2010 02:30:30 +0000 (10:30 +0800)]
json: fix PRId64 on Win32

OK we are fooled by the json lexer and parser. As we use %I64d to
print 'long long' variables in Win32, but lexer and parser only deal
with %lld but not %I64d, this patch add support for %I64d and solve
'info pci', 'powser_reset' and 'power_powerdown' assert failure in
Win32.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix inet_parse typo
Marcelo Tosatti [Tue, 9 Feb 2010 17:31:46 +0000 (15:31 -0200)]
fix inet_parse typo

qemu_opt_set wants on/off, not yes/no.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoiothread: fix vcpu stop with smp tcg
Marcelo Tosatti [Tue, 9 Feb 2010 14:49:04 +0000 (12:49 -0200)]
iothread: fix vcpu stop with smp tcg

Round robin vcpus in tcg_cpu_next even if the vm stopped. This
allows all cpus to enter stopped state.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: spec: Capability negotiation updates
Luiz Capitulino [Thu, 4 Feb 2010 20:10:07 +0000 (18:10 -0200)]
QMP: spec: Capability negotiation updates

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: Enforce capability negotiation rules
Luiz Capitulino [Thu, 4 Feb 2010 20:10:06 +0000 (18:10 -0200)]
QMP: Enforce capability negotiation rules

With this commit QMP will be started in Capabilities Negotiation
mode, where the only command allowed to run is 'qmp_capabilities'.

All other commands will return CommandNotFound error. Asynchronous
messages are not delivered either.

When 'qmp_capabilities' is successfully executed QMP enters in
Command mode, where all commands (except 'qmp_capabilities') are
allowed to run and asynchronous messages are delivered.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: Introduce the qmp_capabilities command
Luiz Capitulino [Thu, 4 Feb 2010 20:10:05 +0000 (18:10 -0200)]
QMP: Introduce the qmp_capabilities command

This command will be used to enable QMP capabilities advertised
by the capabilities array.

Note that it will be mandatory to issue this command in order
to make QMP functional (although this behavior is not being
enforced by this commit).

Also, as we don't have any capabilities yet, the new command
doesn't accept any arguments. I will postpone the decision for
a format for this until we get our first capability.

Finally, this command is visible from the user Monitor too, in
the meaning that you can execute it but it won't do anything.
Making it only visible in QMP is beyond this series' goal, as
it requires changes in unrelated places.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: Add QEMU's version to the greeting message
Luiz Capitulino [Thu, 4 Feb 2010 20:10:04 +0000 (18:10 -0200)]
QMP: Add QEMU's version to the greeting message

With capability negotiation support clients will only have a chance
to check QEMU's version (ie. issue 'query-version') after the
negotiation procedure is done.

It might be useful to clients to check QEMU's version before
negotiating features, though.

To allow that, this commit adds the QEMU's version object to the
greeting message.

Not really sure this is needed, but doesn't hurt anyway.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosegfault due to buffer overrun in usb-serial
David S. Ahern [Wed, 3 Feb 2010 16:00:54 +0000 (09:00 -0700)]
segfault due to buffer overrun in usb-serial

This fixes a segfault due to buffer overrun in the usb-serial device.
The memcpy was incrementing the start location by recv_used yet, the
computation of first_size (how much to write at the end of the buffer
before wrapping to the front) was not accounting for it. This causes the
next element after the receive buffer (recv_ptr) to get overwritten with
random data.

Signed-off-by: David Ahern <daahern@cisco.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoaudio streaming from usb devices
David S. Ahern [Wed, 3 Feb 2010 15:49:39 +0000 (08:49 -0700)]
audio streaming from usb devices

I have streaming audio devices working within qemu-kvm. This is a port
of the changes to qemu.

Streaming audio generates a series of isochronous requests that are
repetitive and time sensitive. The URBs need to be submitted in
consecutive USB frames and responses need to be handled in a timely manner.

Summary of the changes for isochronous requests:

1. The initial 'valid' value is increased to 32. It needs to be higher
than its current value of 10 since the host adds a 10 frame delay to the
scheduling of the first request; if valid is set to 10 the first
isochronous request times out and qemu cancels it. 32 was chosen as a
nice round number, and it is used in the path where a TD-async pairing
already exists.

2. The token field in the TD is *not* unique for isochronous requests,
so it is not a good choice for finding a matching async request. The
buffer (where to write the guest data) is unique, so use that value instead.

3. TD's for isochronous request need to be completed in the async
completion handler so that data is pushed to the guest as soon as it is
available. The uhci code currently attempts to process complete
isochronous TDs the next time the UHCI frame with the request is
processed. The results in lost data since the async requests will have
long since timed out based on the valid parameter. Increasing the valid
value is not acceptable as it introduces a 1+ second delay in the data
getting pushed to the guest.

4. The frame timer needs to be run on 1 msec intervals. Currently, the
expire time for the processing the next frame is computed after the
processing of each frame. This regularly causes the scheduling of frames
to shift in time. When this happens the periodic scheduling of the
requests is broken and the subsequent request is seen as a new request
by the host resulting in a 10 msec delay (first isochronous request is
scheduled for 10 frames from when the URB is submitted).

[ For what's worth a small change is needed to the guest driver to have
more outstanding URBs (at least 4 URBs with 5 packets per URB).]

Signed-off-by: David Ahern <daahern@cisco.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovnc: Migrate to using QTAILQ instead of custom implementation
Amit Shah [Fri, 5 Feb 2010 11:04:05 +0000 (16:34 +0530)]
vnc: Migrate to using QTAILQ instead of custom implementation

Just a 1-1 conversion for now.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: reduce code duplication in config_iothread
Amit Shah [Thu, 4 Feb 2010 14:46:22 +0000 (20:16 +0530)]
kvm: reduce code duplication in config_iothread

We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else
cases. Fix that.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Add command line options to function index
Stefan Weil [Fri, 5 Feb 2010 22:52:05 +0000 (23:52 +0100)]
Documentation: Add command line options to function index

* Add line options to function index.

* Add description for -set (TODO).

* Add description for -global (TODO).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Add monitor commands to function index
Stefan Weil [Fri, 5 Feb 2010 22:52:04 +0000 (23:52 +0100)]
Documentation: Add monitor commands to function index

* Add monitor commands to function index.

* Fix description for acl_remove.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Enhance documentation (index, keywords)
Stefan Weil [Fri, 5 Feb 2010 22:52:03 +0000 (23:52 +0100)]
Documentation: Enhance documentation (index, keywords)

* Add some keywords for the concept index.

* Add some keywords for the keystroke index.

* Mark invalid or unclear documentation with TODO.
  Is there a better proposal how to do this?

* Fix copy+paste error in ColdFire section
  (options were copied from ARM).

* Fix documentation for Wine.

* Add placeholders for missing system emulations.

* Add placeholders for missing user emulation commands.

* Add an appendix with license (to be discussed).

* Add an appendix for every type of index which is
  supported by texinfo. Currently, not all are used,
  but this might change in the future.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Fix item list
Stefan Weil [Fri, 5 Feb 2010 22:52:02 +0000 (23:52 +0100)]
Documentation: Fix item list

@itemize @minus does not work as expected
(the items start with "* -").

A simple @itemize gives a better result.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Add some basic documentation on make targets
Stefan Weil [Fri, 5 Feb 2010 22:52:01 +0000 (23:52 +0100)]
Documentation: Add some basic documentation on make targets

This should help new users to get started.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Use UTF-8 encoding and fix one wrong encoding
Stefan Weil [Fri, 5 Feb 2010 22:52:00 +0000 (23:52 +0100)]
Documentation: Use UTF-8 encoding and fix one wrong encoding

At least for Linux distributions UTF-8 is now standard,
so the QEMU documentation should use this encoding, too.

Even if there was currently only a single special character
using ISO-8859-1, this might change in the future.

So the texinfo keywords @documentlanguage and
@documentencoding now document the language and the
encoding. The special character was changed to UTF-8
(it could also have been changed to an x, but the
original cross looks really nice if it is displayed
correctly).

These changes fix the html presentation at
http://www.qemu.org/qemu-doc.html#SEC65
(ARM System emulator).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Add direntry for info format
Stefan Weil [Fri, 5 Feb 2010 22:51:59 +0000 (23:51 +0100)]
Documentation: Add direntry for info format

update-info-dir maintains an index of all available
documentation in info format (the file /usr/share/info/dir).

It reads special @direntry tags in info files.

This patch (extracted from a larger patch provided by
Dirk Ullrich) adds these tags for qemu-doc.info and
qemu-tech.info.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock: saner flags filtering in bdrv_open2
Christoph Hellwig [Thu, 28 Jan 2010 14:19:12 +0000 (15:19 +0100)]
block: saner flags filtering in bdrv_open2

Clean up the current mess about figuring out which flags to pass to the
driver.  BDRV_O_FILE, BDRV_O_SNAPSHOT and BDRV_O_NO_BACKING are flags
only used by the block layer internally so filter them out directly.
Previously BDRV_O_NO_BACKING could accidentally be passed to the drivers,
but wasn't ever used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovirtio-blk: Generate BLOCK_IO_ERROR QMP event
Luiz Capitulino [Wed, 3 Feb 2010 14:41:04 +0000 (12:41 -0200)]
virtio-blk: Generate BLOCK_IO_ERROR QMP event

Just call bdrv_mon_event() in the right place.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoscsi: Generate BLOCK_IO_ERROR QMP event
Luiz Capitulino [Wed, 3 Feb 2010 14:41:03 +0000 (12:41 -0200)]
scsi: Generate BLOCK_IO_ERROR QMP event

Just call bdrv_mon_event() in the right place.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoide: Generate BLOCK_IO_ERROR QMP event
Luiz Capitulino [Wed, 3 Feb 2010 14:41:02 +0000 (12:41 -0200)]
ide: Generate BLOCK_IO_ERROR QMP event

Just call bdrv_mon_event() in the right place.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock: BLOCK_IO_ERROR QMP event
Luiz Capitulino [Wed, 3 Feb 2010 14:41:01 +0000 (12:41 -0200)]
block: BLOCK_IO_ERROR QMP event

This commit introduces the bdrv_mon_event() function, which
should be called by block subsystems (eg. IDE) when a I/O
error occurs, so that an QMP event is emitted.

The following information is currently provided in the event:

- device name
- operation (ie. "read" or "write")
- action taken (eg. "stop")

Event example:

{ "event": "BLOCK_IO_ERROR",
    "data": { "device": "ide0-hd1",
              "operation": "write",
              "action": "stop" },
    "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: BLOCK_IO_ERROR event handling
Luiz Capitulino [Wed, 3 Feb 2010 14:41:00 +0000 (12:41 -0200)]
QMP: BLOCK_IO_ERROR event handling

This commit adds the basic definitions for the BLOCK_IO_ERROR
event, but actual event emission will be introduced by the
next commits.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqcow2: Fix signedness bugs
Kevin Wolf [Tue, 2 Feb 2010 14:20:57 +0000 (15:20 +0100)]
qcow2: Fix signedness bugs

Checking for return codes < 0 isn't really going to work with unsigned
types. Use signed types instead.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-img: Fix qemu-img can't create qcow image based on read-only image
Sheng Yang [Fri, 29 Jan 2010 02:15:06 +0000 (10:15 +0800)]
qemu-img: Fix qemu-img can't create qcow image based on read-only image

Commit 03cbdac7 "Disable fall-back to read-only when cannot open drive's
file for read-write" result in read-only image can't be used as backed
image in qemu-img.

Cc: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agodoc: Update mingw cross compile instructions
Scott Tsai [Fri, 29 Jan 2010 19:28:58 +0000 (03:28 +0800)]
doc: Update mingw cross compile instructions

The "Cross compilation for Windows with Linux" section of qemu-doc.texi
still instructs the user to use 'configure --enable-mingw32'
even after the option was removed in Aug 2008:
http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=cd01b4a312248dd4e12c3d389d1a349cea4015d8

This documentation only change updates the instructions to:
* Remove use of '--enable-mingw32' in the configure example
* Correct the 'sdl-config' script name
* Remove references to i386-mingw32msvc.tar.gz which no longer exists in
  recent SDL releases
* Document the zlib dependency

Signed-off-by: Scott Tsai <scottt.tw@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDo not ignore error, if open file failed (-serial /dev/tty)
Evgeniy Dushistov [Thu, 28 Jan 2010 18:44:46 +0000 (21:44 +0300)]
Do not ignore error, if open file failed (-serial /dev/tty)

In case, when qemu is executed with option like
-serial /dev/ttyS0, report if there are problems with
opening of devices. At now errors are silently ignoring.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDocumentation: Add build support for documentation in pdf format
Stefan Weil [Fri, 29 Jan 2010 22:16:50 +0000 (23:16 +0100)]
Documentation: Add build support for documentation in pdf format

Makefile already supported dvi, html and info formats,
but pdf was missing.

pdf is especially convenient for printing and for
documentation reviews. I hope it will help to
improve qemu's documentation.

Make now supports the new target 'pdf' which will
create qemu-doc.pdf and qemu-tech.pdf. It is also
possible to build both files individually.

texi2pdf and texi2dvi are rather noisy, so normally
some less important warnings are suppressed.
When make is called with V=1 (verbose mode),
warnings are not suppressed.

The patch also sorts the documentation targets
alphabetically and wraps a line which was too long.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix placement of config-host.h inclusion
Paolo Bonzini [Tue, 2 Feb 2010 19:33:11 +0000 (20:33 +0100)]
fix placement of config-host.h inclusion

The #ifdef CONFIG_SOLARIS below was useless without this patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoloop write in qemu_event_increment upon EINTR
Paolo Bonzini [Tue, 2 Feb 2010 19:33:10 +0000 (20:33 +0100)]
loop write in qemu_event_increment upon EINTR

Same as what qemu-kvm does.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agodo not loop on an incomplete io_thread_fd read
Paolo Bonzini [Tue, 2 Feb 2010 19:33:09 +0000 (20:33 +0100)]
do not loop on an incomplete io_thread_fd read

No need to loop if less than a full buffer is read, the next
read would return EAGAIN.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoTry not to exceed max downtime on stage3
Liran Schour [Tue, 26 Jan 2010 08:31:49 +0000 (10:31 +0200)]
Try not to exceed max downtime on stage3

Move to stage3 only when remaining work can be done below max downtime.
Use qemu_get_clock_ns for measuring read performance.

Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoCount dirty blocks and expose an API to get dirty count
Liran Schour [Tue, 26 Jan 2010 08:31:48 +0000 (10:31 +0200)]
Count dirty blocks and expose an API to get dirty count

This will manage dirty counter for each device and will allow to get the
dirty counter from above.

Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoTranfer dirty blocks during iterative phase
Liran Schour [Tue, 26 Jan 2010 12:04:11 +0000 (14:04 +0200)]
Tranfer dirty blocks during iterative phase

Start transfer dirty blocks during the iterative stage. That will
reduce the time that the guest will be suspended

Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoadd qemu_get_clock_ns
Paolo Bonzini [Tue, 26 Jan 2010 08:31:46 +0000 (10:31 +0200)]
add qemu_get_clock_ns

Some places use get_clock directly because they want to access the
rt_clock with nanosecond precision.  Add a function to do exactly that
instead of using internal interfaces.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove unused code
Liran Schour [Tue, 26 Jan 2010 08:31:45 +0000 (10:31 +0200)]
Remove unused code

blk_mig_save_bulked_block is never called with sync flag. Remove the sync
flag. Calculate bulk completion during blk_mig_save_bulked_block.
Remove unused constants.

Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: move kvm to use memory notifiers
Michael S. Tsirkin [Wed, 27 Jan 2010 20:07:21 +0000 (22:07 +0200)]
kvm: move kvm to use memory notifiers

remove direct kvm calls from exec.c, make
kvm use memory notifiers framework instead.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agokvm: move kvm_set_phys_mem around
Michael S. Tsirkin [Wed, 27 Jan 2010 20:07:08 +0000 (22:07 +0200)]
kvm: move kvm_set_phys_mem around

move kvm_set_phys_mem so that it will
be later available earlier in the file.
needed for next patch using memory notifiers.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu: memory notifiers
Michael S. Tsirkin [Wed, 27 Jan 2010 20:06:57 +0000 (22:06 +0200)]
qemu: memory notifiers

This adds notifiers for phys memory changes: a set of callbacks that
vhost can register and update kernel accordingly.  Down the road, kvm
code can be switched to use these as well, instead of calling kvm code
directly from exec.c as is done now.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotcg/mips: fix crash in tcg_out_qemu_ld()
Aurelien Jarno [Tue, 9 Feb 2010 21:54:22 +0000 (22:54 +0100)]
tcg/mips: fix crash in tcg_out_qemu_ld()

The address register is overriden when it corresponds to v0 and the fast
path is taken, which leads to a crash. Fix that by using the a0 register
instead.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: separate execute and read/write permissions
Aurelien Jarno [Tue, 2 Feb 2010 21:32:14 +0000 (22:32 +0100)]
target-sh4: MMU: separate execute and read/write permissions

On SH4, the ITLB and UTLB configurations are memory mapped, so loading
ITLB entries from UTLB has to be simulated correctly. For that the QEMU
TLB has to be handle the execute (ITLB) and read/write permissions
(UTLB) seperately.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: fix store queue addresses
Aurelien Jarno [Wed, 3 Feb 2010 17:02:55 +0000 (18:02 +0100)]
target-sh4: MMU: fix store queue addresses

The store queues are located from 0xe0000000 to 0xe3ffffff.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: remove dead code
Aurelien Jarno [Wed, 3 Feb 2010 01:33:00 +0000 (02:33 +0100)]
target-sh4: MMU: remove dead code

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: reduce the size of a TLB entry
Aurelien Jarno [Wed, 3 Feb 2010 01:32:49 +0000 (02:32 +0100)]
target-sh4: MMU: reduce the size of a TLB entry

Reduce the size of the TLB entry from 32 to 16 bytes, reorganising
members and using a bit field.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: optimize UTLB accesses
Aurelien Jarno [Tue, 2 Feb 2010 18:50:51 +0000 (19:50 +0100)]
target-sh4: MMU: optimize UTLB accesses

With the current code, the QEMU TLB is setup to match the read/write
mode of the MMU fault. This means when read access is done, the page
is setup in read-only mode. When the page is later accessed in write
mode, an MMU fault happened, and the page is switch in write-only
mode. This flip-flop causes a lot of calls to the MMU code and slow
down the emulation.

This patch changes the MMU emulation, so that the QEMU TLB is setup
to match the UTLB protection key. This impressively increase the
speed of the emulation.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: fix ITLB priviledge check
Aurelien Jarno [Mon, 1 Feb 2010 19:07:06 +0000 (20:07 +0100)]
target-sh4: MMU: fix ITLB priviledge check

There is an ITLB access violation if SR_MD=0 (user mode) while
the high bit of the protection key is 0 (priviledge mode).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: simplify call to tlb_set_page()
Aurelien Jarno [Mon, 1 Feb 2010 19:02:23 +0000 (20:02 +0100)]
target-sh4: MMU: simplify call to tlb_set_page()

tlb_set_page() doesn't need addresses with offset, but simply the
page aligned addresses.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: MMU: fix mem_idx computation
Aurelien Jarno [Mon, 1 Feb 2010 18:58:46 +0000 (19:58 +0100)]
target-sh4: MMU: fix mem_idx computation

The mem_idx is wrongly computed. As written in target-sh4/cpu.h, mode 0
corresponds to kernel mode (SR_MD = 1), while mode 1 corresponds to user
mode (SR_MD = 0).

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agosh7750: handle MMUCR TI bit
Aurelien Jarno [Tue, 2 Feb 2010 18:39:11 +0000 (19:39 +0100)]
sh7750: handle MMUCR TI bit

When the MMUCR TI bit is set, all the UTLB and ITLB entries should be
flushed.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg/mips: implement setcond2
Aurelien Jarno [Mon, 8 Feb 2010 18:05:00 +0000 (19:05 +0100)]
tcg/mips: implement setcond2

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoMerge remote branch 'linux-user/linux-user-for-upstream' into staging-tmp
Anthony Liguori [Mon, 8 Feb 2010 16:09:52 +0000 (10:09 -0600)]
Merge remote branch 'linux-user/linux-user-for-upstream' into staging-tmp

14 years agoMerge remote branch 'qemu-kvm/uq/master' into staging-tmp
Anthony Liguori [Mon, 8 Feb 2010 16:06:54 +0000 (10:06 -0600)]
Merge remote branch 'qemu-kvm/uq/master' into staging-tmp

14 years agotcg/mips: implement setcond
Aurelien Jarno [Mon, 8 Feb 2010 15:37:37 +0000 (16:37 +0100)]
tcg/mips: implement setcond

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoconfigure: fix the static compilation for sdl
TeLeMan [Mon, 8 Feb 2010 05:56:44 +0000 (13:56 +0800)]
configure: fix the static compilation for sdl

The static compilation for sdl is broken after
79427693174a553d62f3da44aacd3f19ba8df3a7.

Signed-off-by: TeLeMan <geleman@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoconfigure: Add --enable-docs and --disable-docs to --help
Dirk Ullrich [Sat, 6 Feb 2010 08:48:23 +0000 (09:48 +0100)]
configure: Add --enable-docs and --disable-docs to --help

This patch adds the documentation-related options "--enable-docs" and
"--disable-docs" to the help message of "configure".

Signed-off-by: Dirk Ullrich <dirk.ullrich@googlemail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-sh4: minor optimisations
Aurelien Jarno [Sun, 31 Jan 2010 00:07:25 +0000 (01:07 +0100)]
target-sh4: minor optimisations

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoSH4/R2D: fix poweroff
Aurelien Jarno [Sat, 30 Jan 2010 19:41:33 +0000 (20:41 +0100)]
SH4/R2D: fix poweroff

The write the the PA_POWOFF register is currently ignored. Fix that by
calling qemu_system_shutdown_request() when a poweroff is requested.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: move setcond* ops to non-optional section
Aurelien Jarno [Mon, 8 Feb 2010 11:10:15 +0000 (12:10 +0100)]
tcg: move setcond* ops to non-optional section

setcond is not an optional op, move it to the non-optional section.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg: add setcondi pseudo-op
Aurelien Jarno [Mon, 8 Feb 2010 11:06:05 +0000 (12:06 +0100)]
tcg: add setcondi pseudo-op

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agopci: fix pci_find_bus()
Isaku Yamahata [Mon, 8 Feb 2010 06:38:36 +0000 (15:38 +0900)]
pci: fix pci_find_bus()

typo in c021f8e65f5009a5ab5711d9d5326fcab553ef1c.
comparison fix.

Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoblock/curl: %Z is not a valid conversion specifier
malc [Mon, 8 Feb 2010 09:44:55 +0000 (12:44 +0300)]
block/curl: %Z is not a valid conversion specifier

Signed-off-by: malc <av1474@comtv.ru>
14 years agovl.c: avoid preprocessor directives in a printf call
Paolo Bonzini [Thu, 4 Feb 2010 15:49:59 +0000 (16:49 +0100)]
vl.c: avoid preprocessor directives in a printf call

Similar to the qemu-img.c patch, but I also have to unescape remaining
% signs in qemu-options.hx.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
14 years agodo not interpolate % from vl.c to qemu-options.h
Paolo Bonzini [Thu, 4 Feb 2010 15:49:58 +0000 (16:49 +0100)]
do not interpolate % from vl.c to qemu-options.h

Since qemu-options.h is only used in vl.c, we can avoid using
brittle interpolation from a generated file.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>
14 years agocope with printf macro definition in readline.c
Paolo Bonzini [Thu, 4 Feb 2010 15:49:57 +0000 (16:49 +0100)]
cope with printf macro definition in readline.c

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: malc <av1474@comtv.ru>