]> Git Repo - qemu.git/log
qemu.git
13 years agovmdk: Fix possible segfaults
Kevin Wolf [Wed, 26 Oct 2011 10:25:52 +0000 (12:25 +0200)]
vmdk: Fix possible segfaults

Data we read from the disk isn't necessarily null terminated and may not
contain the string we're looking for. The code needs to be a bit more careful
here.

Signed-off-by: Kevin Wolf <[email protected]>
13 years agovmdk: Improve error handling
Kevin Wolf [Wed, 26 Oct 2011 10:25:25 +0000 (12:25 +0200)]
vmdk: Improve error handling

Return the right error values in some more places.

Signed-off-by: Kevin Wolf <[email protected]>
13 years agovmdk: Fix use of uninitialised value
Kevin Wolf [Wed, 26 Oct 2011 10:22:40 +0000 (12:22 +0200)]
vmdk: Fix use of uninitialised value

In error cases, cid is never set.

Signed-off-by: Kevin Wolf <[email protected]>
13 years agoide: Fix off-by-one error in array index check
Kevin Wolf [Wed, 26 Oct 2011 09:52:47 +0000 (11:52 +0200)]
ide: Fix off-by-one error in array index check

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
13 years agoqcow: Fix bdrv_write_compressed error handling
Kevin Wolf [Wed, 26 Oct 2011 09:21:50 +0000 (11:21 +0200)]
qcow: Fix bdrv_write_compressed error handling

Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
13 years agoblock: Fix bdrv_open use after free
Kevin Wolf [Wed, 26 Oct 2011 09:03:01 +0000 (11:03 +0200)]
block: Fix bdrv_open use after free

tmp_filename was used outside the block it was defined in, i.e. after it went
out of scope. Move its declaration to the top level.

Signed-off-by: Kevin Wolf <[email protected]>
13 years agoblock: Remove dead code
Kevin Wolf [Wed, 26 Oct 2011 09:02:11 +0000 (11:02 +0200)]
block: Remove dead code

Signed-off-by: Kevin Wolf <[email protected]>
13 years agoqcow2: fix some errors and typo in qcow2.txt
Zhi Yong Wu [Thu, 27 Oct 2011 06:58:57 +0000 (14:58 +0800)]
qcow2: fix some errors and typo in qcow2.txt

Signed-off-by: Zhi Yong Wu <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoTeach block/vdi about "discarded" (no longer allocated) blocks
Eric Sunshine [Wed, 26 Oct 2011 19:51:18 +0000 (15:51 -0400)]
Teach block/vdi about "discarded" (no longer allocated) blocks

An entry in the VDI block map will hold an offset to the actual block if
the block is allocated, or one of two specially-interpreted values if
not allocated. Using VirtualBox terminology, value VDI_IMAGE_BLOCK_FREE
(0xffffffff) represents a never-allocated block (semantically arbitrary
content).  VDI_IMAGE_BLOCK_ZERO (0xfffffffe) represents a "discarded"
block (semantically zero-filled).  block/vdi knows only about
VDI_IMAGE_BLOCK_FREE.  Teach it about VDI_IMAGE_BLOCK_ZERO.

Signed-off-by: Eric Sunshine <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoDocumentation: Add iSCSI section
Ronnie Sahlberg [Wed, 26 Oct 2011 12:51:37 +0000 (23:51 +1100)]
Documentation: Add iSCSI section

Add new section for device URL syntax for special files and describe the iSCSI
URL with examples

Signed-off-by: Ronnie Sahlberg <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoiSCSI block driver
Ronnie Sahlberg [Tue, 25 Oct 2011 08:24:24 +0000 (19:24 +1100)]
iSCSI block driver

This provides built-in support for iSCSI to QEMU.

This has the advantage that the iSCSI devices need not be made visible to the host, which is useful if you have very many virtual machines and very many iscsi devices.
It also has the benefit that non-root users of QEMU can access iSCSI devices across the network without requiring root privilege on the host.

This driver interfaces with the multiplatform posix library for iscsi initiator/client access to iscsi devices hosted at
    git://github.com/sahlberg/libiscsi.git

The patch adds the driver to interface with the iscsi library.
It also updated the configure script to
* by default, probe is libiscsi is available and if so, build
  qemu against libiscsi.
* --enable-libiscsi
  Force a build against libiscsi. If libiscsi is not available
  the build will fail.
* --disable-libiscsi
  Do not link against libiscsi, even if it is available.

When linked with libiscsi, qemu gains support to access iscsi resources such as disks and cdrom directly, without having to make the devices visible to the host.

You can specify devices using a iscsi url of the form :
iscsi://[<username>[:<password>@]]<host>[:<port]/<target-iqn-name>/<lun>
When using authentication, the password can optionally be set with
LIBISCSI_CHAP_PASSWORD="password" to avoid it showing up in the process list

Signed-off-by: Ronnie Sahlberg <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
13 years agoMerge branch 'rth/vis2' of git://repo.or.cz/qemu/rth
Blue Swirl [Thu, 27 Oct 2011 20:27:07 +0000 (20:27 +0000)]
Merge branch 'rth/vis2' of git://repo.or.cz/qemu/rth

* 'rth/vis2' of git://repo.or.cz/qemu/rth:
  target-sparc: Implement FALIGNDATA inline.
  target-sparc: Implement BMASK/BSHUFFLE.
  target-sparc: Implement ALIGNADDR* inline.
  target-sparc: Implement EDGE* instructions.
  target-sparc: Implement fpack{16,32,fix}.
  target-sparc: Implement PDIST.
  target-sparc: Do exceptions management fully inside the helpers.
  target-sparc: Change fpr representation to doubles.
  target-sparc: Undo cpu_fpr rename.
  target-sparc: Extract float128 move to a function.
  target-sparc: Extract common code for floating-point operations.
  target-sparc: Make FPU/VIS helpers const when possible.
  target-sparc: Pass float64 parameters instead of dt0/1 temporaries.
  target-sparc: Add accessors for double-precision fpr access.
  target-sparc: Mark fprs dirty in store accessor.
  target-sparc: Add accessors for single-precision fpr access.

13 years agoDrop qemu-objects.h from modules that don't require it
Luiz Capitulino [Fri, 21 Oct 2011 18:05:43 +0000 (16:05 -0200)]
Drop qemu-objects.h from modules that don't require it

Previous commits dropped most qobjects usage from qemu modules
(now they are a low level interface used by the QAPI). However,
some modules still include the qemu-objects.h header file.

This commit drops qemu-objects.h from some of those modules
and includes qjson.h instead, which is what they actually need.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoMonitor: do_info(): Drop QMP command handling code
Luiz Capitulino [Fri, 21 Oct 2011 18:24:28 +0000 (16:24 -0200)]
Monitor: do_info(): Drop QMP command handling code

Previous commits converted all existing QMP commands to the QAPI,
now each info command does its own QMP call.

Let's then drop all QMP command handling code from do_info().

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoQMP: Drop the query commands dispatch table
Luiz Capitulino [Fri, 21 Oct 2011 18:15:31 +0000 (16:15 -0200)]
QMP: Drop the query commands dispatch table

Because QMP development originated in the monitor, it has
inherited the monitor's distinction between query- and
non-query commands.

However, previous commits unified both commands and the
distinction is gone. This commit drops the query commands
dispatch table and does some simplifications along the way.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-pci
Luiz Capitulino [Fri, 21 Oct 2011 16:15:33 +0000 (14:15 -0200)]
qapi: Convert query-pci

This also fixes a bug with the old version: QMP would invert device id
and vendor id. This would look ok on HMP because it was printing
"device:vendor" instead of "vendor:device".

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-balloon
Luiz Capitulino [Fri, 21 Oct 2011 13:41:37 +0000 (11:41 -0200)]
qapi: Convert query-balloon

Please, note that some of the code supporting memory statistics is
still around (eg. virtio_balloon_receive_stats() and reset_stats()).

Also, the qmp_query_balloon() function is synchronous and thus doesn't
make any use of the (not fully working) monitor's asynchronous command
support (the old non-qapi implementation did).

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-spice
Luiz Capitulino [Thu, 20 Oct 2011 19:01:33 +0000 (17:01 -0200)]
qapi: Convert query-spice

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-vnc
Luiz Capitulino [Mon, 17 Oct 2011 18:41:22 +0000 (16:41 -0200)]
qapi: Convert query-vnc

There are three important remarks in relation to the non-qapi command:

 1. This commit also fixes the behavior of the 'query-vnc' and 'info vnc'
    commands to return an error when qemu is built without VNC support
    (ie. --disable-vnc). The non-qapi command would return the OK
    response in QMP and no response in HMP

 2. The qapi version explicitly marks the fields 'host', 'family',
    'service' and 'auth' as optional. Their are not documented as optional
    in the non-qapi command doc, but they would not be returned if
    vnc support is disabled. The qapi version maintains the same
    semantics, but documents those fields correctly

 3. The 'clients' field, which is a list, is marked as optional but is
    always returned. If there are no clients connected an empty list
    is returned. This is not the Right Way to this in the qapi but it's
    how the non-qapi command used to work

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqerror: Add a user string for QERR_FEATURE_DISABLED
Luiz Capitulino [Wed, 19 Oct 2011 17:15:57 +0000 (15:15 -0200)]
qerror: Add a user string for QERR_FEATURE_DISABLED

Missing from commit 821601ea5b.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-blockstats
Luiz Capitulino [Thu, 22 Sep 2011 18:56:36 +0000 (15:56 -0300)]
qapi: Convert query-blockstats

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-block
Luiz Capitulino [Wed, 21 Sep 2011 20:16:47 +0000 (17:16 -0300)]
qapi: Convert query-block

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoblock: Rename the BlockIOStatus enum values
Luiz Capitulino [Fri, 14 Oct 2011 20:22:24 +0000 (17:22 -0300)]
block: Rename the BlockIOStatus enum values

The biggest change is to rename its prefix from BDRV_IOS to
BLOCK_DEVICE_IO_STATUS.

Next commit will convert the query-block command to the QAPI
and that's how the enumeration is going to be generated.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoblock: iostatus: Drop BDRV_IOS_INVAL
Luiz Capitulino [Fri, 14 Oct 2011 20:11:23 +0000 (17:11 -0300)]
block: iostatus: Drop BDRV_IOS_INVAL

A future commit will convert bdrv_info() to the QAPI and it won't
provide IOS_INVAL.

Luckily all we have to do is to add a new 'iostatus_enabled'
member to BlockDriverState and use it instead.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-cpus
Luiz Capitulino [Wed, 21 Sep 2011 19:38:35 +0000 (16:38 -0300)]
qapi: Convert query-cpus

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert the cpu command
Luiz Capitulino [Thu, 6 Oct 2011 17:31:39 +0000 (14:31 -0300)]
qapi: Convert the cpu command

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoMonitor: Introduce monitor_get_cpu_index()
Luiz Capitulino [Mon, 24 Oct 2011 12:53:44 +0000 (10:53 -0200)]
Monitor: Introduce monitor_get_cpu_index()

Returns 'cur_mons's CPU index. A future commit will use it.

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoMonitor: Make mon_set_cpu() public
Luiz Capitulino [Thu, 6 Oct 2011 17:02:57 +0000 (14:02 -0300)]
Monitor: Make mon_set_cpu() public

Also rename it to monitor_set_cpu().

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-migrate
Luiz Capitulino [Tue, 13 Sep 2011 20:37:16 +0000 (17:37 -0300)]
qapi: Convert query-migrate

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi: Convert query-mice
Luiz Capitulino [Wed, 21 Sep 2011 18:29:55 +0000 (15:29 -0300)]
qapi: Convert query-mice

Signed-off-by: Anthony Liguori <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoqapi-commands.py: Don't call the output marshal on error
Luiz Capitulino [Wed, 19 Oct 2011 16:51:14 +0000 (14:51 -0200)]
qapi-commands.py: Don't call the output marshal on error

Today we generate something like this:

    int qmp_marshal_input_query_foo(...)

        ...

        retval = qmp_query_foo(errp);
        qmp_marshal_output_query_foo(retval, ret, errp);

        ...

However, if qmp_query_foo() fails 'retval' will probably be NULL,
which can cause a segfault as not all visitors check if 'retval'
is valid.

This commit fixes that by changing the code generator to only
call the output marshal if qmp_query_foo() succeeds, like this:

    retval = qmp_query_foo(errp);
    if (!error_is_set(errp)) {
        qmp_marshal_output_query_foo(retval, ret, errp);
    }

Signed-off-by: Luiz Capitulino <[email protected]>
13 years agoppc64-linux-user: Fix syscall return type.
Richard Henderson [Wed, 26 Oct 2011 16:59:18 +0000 (09:59 -0700)]
ppc64-linux-user: Fix syscall return type.

Use target_ulong instead of hard-coded uint32_t.
Remove the disabled printf's that are redundant with -strace.

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agoppc64-linux-user: Properly interpret the entry function descriptor.
Richard Henderson [Wed, 26 Oct 2011 16:59:17 +0000 (09:59 -0700)]
ppc64-linux-user: Properly interpret the entry function descriptor.

Don't confuse the load address with the load bias.  They're equal
for ET_DYN objects (i.e. ld.so) but different for ET_EXEC objects
(i.e. statically linked).

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agosparc-linux-user: Add some missing syscall numbers
Richard Henderson [Tue, 25 Oct 2011 17:34:08 +0000 (10:34 -0700)]
sparc-linux-user: Add some missing syscall numbers

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agosparc-linux-user: Fixup sending SIGSEGV
Richard Henderson [Tue, 25 Oct 2011 17:34:07 +0000 (10:34 -0700)]
sparc-linux-user: Fixup sending SIGSEGV

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agosparc-linux-user: Handle SIGILL.
Richard Henderson [Tue, 25 Oct 2011 17:34:06 +0000 (10:34 -0700)]
sparc-linux-user: Handle SIGILL.

Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agolinux-user: implement reboot syscall
Alexander Graf [Tue, 27 Sep 2011 12:39:42 +0000 (14:39 +0200)]
linux-user: implement reboot syscall

For OBS, we're running a full cross-guest inside of a VM. When a build
is done there, we reboot the guest as shutdown mechanism.

Unfortunately, reboot is not implemented in linux-user. So this mechanism
fails, spilling unpretty warnings. This patch implements sys_reboot()
emulation.

Signed-off-by: Alexander Graf <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agolinux-user: fix openat
Alexander Graf [Sun, 25 Sep 2011 04:25:35 +0000 (06:25 +0200)]
linux-user: fix openat

When running openat using qemu-arm, we stumbled over invalid permissions
on the created files. The reason for this is that the mode parameter gets
treates as an O_... flag, which it isn't - it's a permission bitmask.

This patch removes the needless translation of the mode parameter,
rendering permission passing of openat() to work with linux-user.

Reported-by: Dirk Mueller <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agolinux-user: fix abi_(u)long, target_ulong mismatch
Matthias Braun [Fri, 12 Aug 2011 17:57:41 +0000 (19:57 +0200)]
linux-user: fix abi_(u)long, target_ulong mismatch

abi_(u)long might be different from target_ulong, so don't use tswapl
but introduce a new tswapal

Signed-off-by: Matthias Braun <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agolinux-user: fix rlimit syscalls on sparc(64)
Matthias Braun [Fri, 9 Sep 2011 17:30:25 +0000 (19:30 +0200)]
linux-user: fix rlimit syscalls on sparc(64)

Signed-off-by: Matthias Braun <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agolinux-user: fix TARGET_RLIM_INFINITY declaration
Matthias Braun [Fri, 9 Sep 2011 17:31:17 +0000 (19:31 +0200)]
linux-user: fix TARGET_RLIM_INFINITY declaration

Signed-off-by: Matthias Braun <[email protected]>
Signed-off-by: Riku Voipio <[email protected]>
13 years agoMerge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
Andrzej Zaborowski [Wed, 26 Oct 2011 23:02:46 +0000 (01:02 +0200)]
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

13 years agotarget-sparc: Implement FALIGNDATA inline.
Richard Henderson [Tue, 18 Oct 2011 16:41:30 +0000 (09:41 -0700)]
target-sparc: Implement FALIGNDATA inline.

This is a relatively simple sequence of shifts.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Implement BMASK/BSHUFFLE.
Richard Henderson [Tue, 18 Oct 2011 16:24:43 +0000 (09:24 -0700)]
target-sparc: Implement BMASK/BSHUFFLE.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Implement ALIGNADDR* inline.
Richard Henderson [Tue, 18 Oct 2011 15:35:58 +0000 (08:35 -0700)]
target-sparc: Implement ALIGNADDR* inline.

While ALIGNADDR was implemented out-of-line, ALIGNADDRL was not
implemeneted at all.  However, this is a very simple operation
so we're better off doing this inline.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Implement EDGE* instructions.
Richard Henderson [Tue, 18 Oct 2011 02:57:23 +0000 (19:57 -0700)]
target-sparc: Implement EDGE* instructions.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Implement fpack{16,32,fix}.
Richard Henderson [Tue, 18 Oct 2011 01:03:47 +0000 (18:03 -0700)]
target-sparc: Implement fpack{16,32,fix}.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Implement PDIST.
Richard Henderson [Tue, 18 Oct 2011 00:32:26 +0000 (17:32 -0700)]
target-sparc: Implement PDIST.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Do exceptions management fully inside the helpers.
Richard Henderson [Mon, 17 Oct 2011 18:25:56 +0000 (11:25 -0700)]
target-sparc: Do exceptions management fully inside the helpers.

This reduces the size of the individual translation blocks, since
we only emit a single call for each FOP rather than three.  In
addition, clear_float_exceptions expands inline to a single byte store.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Change fpr representation to doubles.
Richard Henderson [Mon, 17 Oct 2011 17:42:49 +0000 (10:42 -0700)]
target-sparc: Change fpr representation to doubles.

This allows a more efficient representation for 64-bit hosts.
It should be about the same for 32-bit hosts, as we can still
access the individual pieces of the double.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Undo cpu_fpr rename.
Richard Henderson [Sat, 15 Oct 2011 19:12:02 +0000 (12:12 -0700)]
target-sparc: Undo cpu_fpr rename.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Extract float128 move to a function.
Richard Henderson [Sat, 15 Oct 2011 19:00:08 +0000 (12:00 -0700)]
target-sparc: Extract float128 move to a function.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Extract common code for floating-point operations.
Richard Henderson [Sat, 15 Oct 2011 18:52:00 +0000 (11:52 -0700)]
target-sparc: Extract common code for floating-point operations.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Make FPU/VIS helpers const when possible.
Richard Henderson [Wed, 19 Oct 2011 21:56:43 +0000 (14:56 -0700)]
target-sparc: Make FPU/VIS helpers const when possible.

This also removes the unused ENV parameter from these helpers.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Pass float64 parameters instead of dt0/1 temporaries.
Richard Henderson [Sat, 15 Oct 2011 17:20:20 +0000 (10:20 -0700)]
target-sparc: Pass float64 parameters instead of dt0/1 temporaries.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Add accessors for double-precision fpr access.
Richard Henderson [Fri, 14 Oct 2011 22:47:35 +0000 (15:47 -0700)]
target-sparc: Add accessors for double-precision fpr access.

Begin using i64 quantities to manipulate double-precision values.
On a 64-bit host this will, for the moment, generate less efficient
code; on a 32-bit host code quality should be largely unchanged.
Code quality for 64-bit will be adjusted with a subsequent patch.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Mark fprs dirty in store accessor.
Richard Henderson [Fri, 14 Oct 2011 22:03:25 +0000 (15:03 -0700)]
target-sparc: Mark fprs dirty in store accessor.

Signed-off-by: Richard Henderson <[email protected]>
13 years agotarget-sparc: Add accessors for single-precision fpr access.
Richard Henderson [Fri, 14 Oct 2011 21:58:32 +0000 (14:58 -0700)]
target-sparc: Add accessors for single-precision fpr access.

Load, store, and "create destination".  This version attempts to
change the behaviour of the translator as little as possible.  We
previously used cpu_tmp32 as the temporary destination, and we
continue to use that.  This will eventually allow a change in
representation of the fprs.

Change the name of the cpu_fpr array to make certain that all
instances are converted.

Signed-off-by: Richard Henderson <[email protected]>
13 years agoSparc: split load and store op helpers
Blue Swirl [Mon, 1 Aug 2011 10:15:51 +0000 (10:15 +0000)]
Sparc: split load and store op helpers

Move load and store op helpers top ldst_helper.c.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: convert win_helper to trace framework
Blue Swirl [Sun, 11 Sep 2011 15:53:35 +0000 (15:53 +0000)]
Sparc: convert win_helper to trace framework

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: convert interrupt helpers to trace framework
Blue Swirl [Sun, 11 Sep 2011 15:05:41 +0000 (15:05 +0000)]
Sparc: convert interrupt helpers to trace framework

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: convert mmu_helper to trace framework
Blue Swirl [Sun, 11 Sep 2011 14:51:24 +0000 (14:51 +0000)]
Sparc: convert mmu_helper to trace framework

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: split MMU helpers
Blue Swirl [Sun, 11 Sep 2011 11:30:01 +0000 (11:30 +0000)]
Sparc: split MMU helpers

Move MMU helpers to mmu_helper.c.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: fix coding style in helper.c
Blue Swirl [Sun, 11 Sep 2011 12:03:08 +0000 (12:03 +0000)]
Sparc: fix coding style in helper.c

Before the next patch, fix coding style of the areas affected.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: avoid AREG0 for division op helpers
Blue Swirl [Mon, 4 Jul 2011 18:15:42 +0000 (18:15 +0000)]
Sparc: avoid AREG0 for division op helpers

Make [su]div{,cc} helpers take a parameter for CPUState instead
of relying on global env. Move the functions to helper.c.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: avoid AREG0 for softint op helpers and Leon cache control
Blue Swirl [Mon, 1 Aug 2011 09:20:58 +0000 (09:20 +0000)]
Sparc: avoid AREG0 for softint op helpers and Leon cache control

Make softint op helpers and Leon cache irq manager take a parameter
for CPUState instead of relying on global env. Move the functions
to int{32,64}_helper.c.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoSparc: avoid AREG0 for CWP and PSTATE helpers
Blue Swirl [Sun, 3 Jul 2011 21:01:59 +0000 (21:01 +0000)]
Sparc: avoid AREG0 for CWP and PSTATE helpers

Make CWP and PSTATE helpers take a parameter for CPUState instead
of relying on global env. Remove wrapper functions.

Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agoMerge remote-tracking branch 'kwolf/for-anthony' into staging
Anthony Liguori [Wed, 26 Oct 2011 15:29:24 +0000 (10:29 -0500)]
Merge remote-tracking branch 'kwolf/for-anthony' into staging

13 years agoahci: fix DPRINTF format strings
Max Filippov [Wed, 26 Oct 2011 11:06:14 +0000 (15:06 +0400)]
ahci: fix DPRINTF format strings

Signed-off-by: Max Filippov <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoDocumentation: fix typo
Bernhard Reutner-Fischer [Tue, 25 Oct 2011 08:22:18 +0000 (10:22 +0200)]
Documentation: fix typo

Signed-off-by: Bernhard Reutner-Fischer <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoFix typo: buf -> bus
Hervé Poussineau [Mon, 24 Oct 2011 19:52:38 +0000 (21:52 +0200)]
Fix typo: buf -> bus

Signed-off-by: Hervé Poussineau <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agotools: reorganize Makefile variables
Paolo Bonzini [Mon, 24 Oct 2011 11:33:01 +0000 (13:33 +0200)]
tools: reorganize Makefile variables

- Add all dependencies of the block layer to block-obj-y, and all
  dependencies of QObject to qobject-obj-y

- Remove the block layer from tools-obj-y, add it to qemu-img, qemu-nbd,
  qemu-io

- Add qobject-obj-y and tools-obj-y wherever useful, remove duplicates

Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoexec.c: Remove useless comment
陳韋任 [Fri, 21 Oct 2011 09:57:09 +0000 (17:57 +0800)]
exec.c: Remove useless comment

  As phys_ram_size had been removed since QEMU 0.12. Remove the useless
comment.

Signed-off-by: Chen Wen-Ren <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoqed: remove unneeded variable assignment
Pavel Borzenkov [Tue, 18 Oct 2011 17:17:56 +0000 (21:17 +0400)]
qed: remove unneeded variable assignment

'ret' is unconditionally overwitten by qed_read_l1_table_sync()

Spotted by Clang Analyzer

Signed-off-by: Pavel Borzenkov <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agoqed: don't pass NULL to memcpy
Pavel Borzenkov [Tue, 18 Oct 2011 17:17:35 +0000 (21:17 +0400)]
qed: don't pass NULL to memcpy

Spotted by Clang Analyzer

[Note this memcpy call has always been safe because the length will be 0
when the pointer is NULL]

Signed-off-by: Pavel Borzenkov <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agovmdk: vmdk_read_cid returns garbage if p_name is NULL
Pavel Borzenkov [Tue, 18 Oct 2011 17:19:03 +0000 (21:19 +0400)]
vmdk: vmdk_read_cid returns garbage if p_name is NULL

Spotted by Clang Analyzer

Signed-off-by: Pavel Borzenkov <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agovmdk: remove unneeded variable assignment
Pavel Borzenkov [Tue, 18 Oct 2011 17:18:22 +0000 (21:18 +0400)]
vmdk: remove unneeded variable assignment

Spotted by Clang Analyzer

Signed-off-by: Pavel Borzenkov <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agodevice_tree: Fix potential memory leak
Stefan Weil [Mon, 17 Oct 2011 20:12:09 +0000 (22:12 +0200)]
device_tree: Fix potential memory leak

cppcheck error report:

device_tree.c:156: error: Memory leak: dupname

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
13 years agomain-loop: Add missing include file
Stefan Weil [Tue, 25 Oct 2011 20:23:17 +0000 (22:23 +0200)]
main-loop: Add missing include file

stdint.h defines the POSIX data types and is needed
for MinGW-w64 (and maybe other hosts).

v2: Instead of adding stdint.h directly, qemu-common.h is now
included and duplicate include statements were removed.

Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
13 years agotarget-sparc: Fix use of g_new0 / g_free
Stefan Weil [Tue, 25 Oct 2011 05:16:25 +0000 (07:16 +0200)]
target-sparc: Fix use of g_new0 / g_free

g_malloc0 needs g_free instead of free.
While fixing this, I also replaced g_malloc0 by g_new0
as was suggested by Stuart Brady.

Cc: Blue Swirl <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agotarget-sparc: Fix order of function parameters
Stefan Weil [Mon, 24 Oct 2011 20:29:48 +0000 (22:29 +0200)]
target-sparc: Fix order of function parameters

The MinGW-w64 gcc complains about wrong parameters for
gen_helper_fpadd16_s and three other functions.

gen_helper_fpadd16_s is declared like this (hidden in lots of macros):

static inline void
 gen_helper_fpadd16s(TCGv_i32 retval, TCGv_ptr arg1,
                     TCGv_i32 arg2, TCGv_i32 arg3);

So it looks like cpu_env should be the 2nd parameter.

Please review this patch as I have no environment to test it
(maybe the 1st parameter should be cpu_dst?).

Cc: Blue Swirl <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
13 years agohda: do not mix output and input stream states, RHBZ #740493
Marc-André Lureau [Tue, 25 Oct 2011 14:53:01 +0000 (16:53 +0200)]
hda: do not mix output and input stream states, RHBZ #740493

Windows 7 may use the same stream number for input and output.
Current code will confuse streams.

Changes since v1:
- keep running_compat[] for migration version 1
- add running_real[] for migration version 2

Signed-off-by: Marc-Andr? Lureau <[email protected]>
Signed-off-by: malc <[email protected]>
13 years agohda: do not mix output and input streams, RHBZ #740493
Marc-André Lureau [Tue, 25 Oct 2011 14:53:00 +0000 (16:53 +0200)]
hda: do not mix output and input streams, RHBZ #740493

Windows 7 may use the same stream number for input and output.
That will result in lot of garbage on playback.

The hardcoded value of 4 needs to be in sync with GCAP streams
description and IN/OUT registers.

Signed-off-by: Marc-Andr? Lureau <[email protected]>
Signed-off-by: malc <[email protected]>
13 years agolibcacard: Fix wrong assertion (reported by cppcheck)
Stefan Weil [Wed, 19 Oct 2011 19:03:22 +0000 (21:03 +0200)]
libcacard: Fix wrong assertion (reported by cppcheck)

assert("...") will never do anything. This assertion handles a case
which should never occur, so it must be assert(!"...").

Cc: Alon Levy <[email protected]>
Signed-off-by: Stefan Weil <[email protected]>
13 years agolibcacard/vscclient: fix error paths for socket creation
Alon Levy [Tue, 27 Sep 2011 14:19:25 +0000 (17:19 +0300)]
libcacard/vscclient: fix error paths for socket creation

Signed-off-by: Alon Levy <[email protected]>
13 years agolibcacard/cac: fix typo in cac_delete_pki_applet_private
Alon Levy [Tue, 27 Sep 2011 14:18:50 +0000 (17:18 +0300)]
libcacard/cac: fix typo in cac_delete_pki_applet_private

Signed-off-by: Alon Levy <[email protected]>
13 years agospice: fix file handle cleanup
Gerd Hoffmann [Fri, 21 Oct 2011 13:56:21 +0000 (15:56 +0200)]
spice: fix file handle cleanup

Setting both read and write handlers to NULL in qemu_set_fd_handler
is not enougth to make qemu purge the file handle from the list.
We must set opaque to NULL too.

Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agoqxl: reset update_surface
Alon Levy [Sun, 23 Oct 2011 15:03:52 +0000 (17:03 +0200)]
qxl: reset update_surface

update init_qxl_ram to reset update_surface to 0. This fixes one case
of breakage when installing an old driver in a vm that had a new driver
installed. The newer driver would know about surface creation and would
change update_surface to !=0, then a reset would happen, all surfaces
are destroyed, then the old driver is initialized and issues an
UPDATE_AREA, and spice server aborts on invalid surface.

RHBZ: 690427

Signed-off-by: Alon Levy <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agoqxl: fix guest cursor tracking
Yonit Halperin [Tue, 18 Oct 2011 16:58:54 +0000 (18:58 +0200)]
qxl: fix guest cursor tracking

(1) If the guest cursor command is empty, don't reload it after migration.
(2) Cleaning the guest cursor when it is released by
    the spice server. In addition, explicitly reset the
    cursor in spice upon destroying the primary surface
    (was done by spice-server implicitly). This will prevent
    access to pci memory that was released.

RHBZ: 744518

Signed-off-by: Yonit Halperin <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agoqxl: factor out properties
Gerd Hoffmann [Mon, 17 Oct 2011 12:11:16 +0000 (14:11 +0200)]
qxl: factor out properties

Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agoui/spice-core: fix segfault in monitor
Alon Levy [Tue, 4 Oct 2011 11:25:53 +0000 (13:25 +0200)]
ui/spice-core: fix segfault in monitor

Fix segfault if a qxl device is present but no spice command line
argument is given.

RHBZ 743251.

Signed-off-by: Alon Levy <[email protected]>
13 years agoqxl: Drop phread_yield on OOM
Jan Kiszka [Tue, 20 Sep 2011 15:21:07 +0000 (17:21 +0200)]
qxl: Drop phread_yield on OOM

This was only a best-effort attempt, by far not guaranteed to have an
effect. Drop it so that also no direct pthread usage remain in the
device model.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agoqxl: Convert to QEMU thread API
Jan Kiszka [Tue, 20 Sep 2011 15:14:40 +0000 (17:14 +0200)]
qxl: Convert to QEMU thread API

Use QEMU thread API instead of pthread directly. We still need to get
rid of pthread_yield, though, to drop pthread.h inclusion.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agospice: Convert core to QEMU thread API
Jan Kiszka [Tue, 20 Sep 2011 15:14:33 +0000 (17:14 +0200)]
spice: Convert core to QEMU thread API

No need to use pthread directly, we have proper abstractions for
identity checking.

Signed-off-by: Jan Kiszka <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agospice: support the new migration interface (spice 0.8.3)
Yonit Halperin [Mon, 17 Oct 2011 08:03:19 +0000 (10:03 +0200)]
spice: support the new migration interface (spice 0.8.3)

- call spice_server_migrate_(start|end|connect).
- register spice_migrate_connect completion callback

Signed-off-by: Yonit Halperin <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agospice: turn client_migrate_info to async
Yonit Halperin [Mon, 17 Oct 2011 08:03:18 +0000 (10:03 +0200)]
spice: turn client_migrate_info to async

RHBZ 737921
Spice client is required to connect to the migration target before/as migration
starts. Since after migration starts, the target qemu is blocked and cannot accept new spice client
we trigger the connection to the target upon client_migrate_info command.
client_migrate_info completion cb will be called after spice client has been
connected to the target (or a timeout). See following patches and spice patches.

Signed-off-by: Yonit Halperin <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agomigration: add status query functions
Gerd Hoffmann [Tue, 25 Oct 2011 11:50:11 +0000 (13:50 +0200)]
migration: add status query functions

Add migration_is_active and migration_has_failed functions
to query migration state.

Signed-off-by: Gerd Hoffmann <[email protected]>
13 years agoi386: wire up MSR_IA32_MISC_ENABLE
Avi Kivity [Tue, 4 Oct 2011 14:26:35 +0000 (16:26 +0200)]
i386: wire up MSR_IA32_MISC_ENABLE

It's needed for its default value - bit 0 specifies that "rep movs" is
good enough for memcpy, and Linux may use a slower memcpu if it is not set,
depending on cpu family/model.

Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
13 years agokvm: support TSC deadline MSR with subsection
Liu, Jinsong [Wed, 5 Oct 2011 19:52:32 +0000 (16:52 -0300)]
kvm: support TSC deadline MSR with subsection

KVM add emulation of lapic tsc deadline timer for guest.
This patch is co-operation work at qemu side.

Use subsections to save/restore the field (mtosatti).

Signed-off-by: Liu, Jinsong <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
13 years agoRevert "kvm: support TSC deadline MSR"
Marcelo Tosatti [Mon, 24 Oct 2011 23:27:16 +0000 (21:27 -0200)]
Revert "kvm: support TSC deadline MSR"

This reverts commit bfc2455ddbb41148494a084d15777e6bed7533c3.
New patch with subsections will follow.

Signed-off-by: Marcelo Tosatti <[email protected]>
This page took 0.073815 seconds and 4 git commands to generate.