]> git.proxmox.com Git - qemu.git/log
qemu.git
14 years agoUpdate version and changelog for 0.11.0-rc2 release v0.11.0-rc2
Anthony Liguori [Fri, 28 Aug 2009 17:23:01 +0000 (12:23 -0500)]
Update version and changelog for 0.11.0-rc2 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd missing linefeed in error message
Stefan Weil [Sat, 8 Aug 2009 21:33:26 +0000 (23:33 +0200)]
Add missing linefeed in error message

The error message for an unknown network device given to
monitor command set_link looks better with a terminating
linefeed.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoClean up VGA type selection; far too many variables being used to track one state...
Zachary Amsden [Thu, 30 Jul 2009 10:15:02 +0000 (00:15 -1000)]
Clean up VGA type selection; far too many variables being used to track one state leads to confusion if new variables are added.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoWhen using stdio monitor and VNC display, one can set or clear a VNC password; this...
Zachary Amsden [Thu, 30 Jul 2009 10:15:01 +0000 (00:15 -1000)]
When using stdio monitor and VNC display, one can set or clear a VNC password; this should set or turn off VNC authentication as well.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDon't segfault when changing VNC password on an SDL display.
Zachary Amsden [Thu, 30 Jul 2009 10:15:00 +0000 (00:15 -1000)]
Don't segfault when changing VNC password on an SDL display.

Signed-off-by: Zachary Amsden <zamsden@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix detached migration with exec.
Chris Lalancette [Wed, 5 Aug 2009 15:07:35 +0000 (17:07 +0200)]
Fix detached migration with exec.

When trying to do detached migration with exec, I found that
the monitor wouldn't always return in a timely manner.  I
tracked this down to exec_start_outgoing_migration.  It
appeared we were setting the fd to NONBLOCK'ing, but in
point of fact we weren't.

This bugfix should also go onto the stable 0.10 branch

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoDo not disable autostart for live migration
Avi Kivity [Sun, 9 Aug 2009 11:39:20 +0000 (14:39 +0300)]
Do not disable autostart for live migration

If the user does not want autostart, they can specify -S.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomake vga screen_dump use DisplayState properly
Stefano Stabellini [Tue, 11 Aug 2009 15:18:07 +0000 (16:18 +0100)]
make vga screen_dump use DisplayState properly

Hi all,
currently the vga screen_dump code doesn't use the DisplayState
interface properly and tries to replace it temporarily while taking the
screenshot.
A better approach is to register a DisplayChangeListener, call
vga_hw_update, and finally write the ppm in the next call from dpy_update.

Testing is appreciated.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix device name completion for 'eject'
Blue Swirl [Sun, 23 Aug 2009 20:10:28 +0000 (20:10 +0000)]
Fix device name completion for 'eject'

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosdl.c: support 32 bpp cursors
Reimar Döffinger [Sun, 23 Aug 2009 16:03:34 +0000 (18:03 +0200)]
sdl.c: support 32 bpp cursors

Hello,
currently when a 32 bpp cursor gets defined the result is all-black in
the areas that are not transparent (you'll get a 32 bpp cursor if you
use my previous patch to allow vmware_vga to use a 32 bpp framebuffer).
This is because the switch in sdl.c lacks a 32 bpp case.
The thing I am unsure about though is which byte is the unused one and
should be skipped, the first or the last - for the black-and-white
cursors I tested it doesn't make a difference...

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoUse corect depth from DisplaySurface in vmware_vga.c
Reimar Döffinger [Sun, 23 Aug 2009 16:00:33 +0000 (18:00 +0200)]
Use corect depth from DisplaySurface in vmware_vga.c

Hello,
for what I can tell, there is no way for vmware_vga to work correctly
right now. It assumes that the framebuffer bits-per-pixel and the one
from the DisplaySurface are identical (it uses directly the VRAM from
vga.c), but it always assumes 3 bytes per pixel, which is never possible
with the current version of DisplaySurface.
Attached patch fixes that by using ds_get_bits_per_pixel.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix migration for ide devices
Anthony Liguori [Thu, 13 Aug 2009 18:58:21 +0000 (13:58 -0500)]
Fix migration for ide devices

commit 93c8cfd9e67a62711b86f4c93747566885eb7928
Author: Gleb Natapov <gleb@redhat.com>
Date:   Sun Aug 2 11:36:47 2009 +0300

    make windows notice media change

Broke save/restore by loading a new field but not saving it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agocheck for PR_SET_NAME being defined
Nathan Froyd [Mon, 3 Aug 2009 14:32:12 +0000 (07:32 -0700)]
check for PR_SET_NAME being defined

Depending on what glibc/kernel headers you are compiling against,
PR_SET_NAME may or may not be defined.  Do the right thing if
PR_SET_NAME isn't defined and skip setting the process name.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agomake windows notice media change
Gleb Natapov [Sun, 2 Aug 2009 08:36:47 +0000 (11:36 +0300)]
make windows notice media change

Windows seems to be very stupid about cdrom media change. It polls
cdrom status and if status goes ready->media not present->ready
it assumes that media was changed. If "media not present" step doesn't
happen even if "medium may have changed" was seen it assumes media
haven't changed. Fake "media not present" step.

Filip Navara did a great job debugging this issue in Windows and this is
what he found out:

BINGO! ... The media present notifications were broken ever since
Windows 2000 it seems. The media change is detected properly and it's
passed to ClassSetMediaChangeState function which in turn calls
ClasspInternalSetMediaChangeState. This function is responsible for
changing some internal state of the device object and sending the PnP
events which later result in application notifications. It has this
tiny bit of code (not copied byte for byte):

if (oldMediaState == NewState) {
  // Media is in the same state it was before.
  return;
}

so the end result is that for the case of UNIT NEEDS ATTENTION /
MEDIUM MAY HAVE CHANGED without NOT READY in-between is really broken.
It results in the internal media change counter incremented, so the
media contents are re-read when necessary, instead of relying on the
cache, but the notifications to applications are never sent.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoFix do_commit() behavior
Luiz Capitulino [Fri, 31 Jul 2009 18:15:41 +0000 (15:15 -0300)]
Fix do_commit() behavior

Commit 751c6a17042b5d011013d6963c0505d671cf708e changed the monitor's
'commit' command to this behavior:

1. Any string you type as argument will cause do_commit() to
call bdrv_commit() to all devices

2. If you enter a device name, it will be the only one ignored
by do_commit() :)

The fix is to call bdrv_commit() to the specified device only and
ignore the others (when 'all' is not specified).

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agonet: Fix do_set_link() return type
Luiz Capitulino [Mon, 3 Aug 2009 16:56:59 +0000 (13:56 -0300)]
net: Fix do_set_link() return type

do_set_link() returns int, but Monitor handler functions should
always return void.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoAdd/Fix command-line checks for smbios options v2
Beth Kon [Fri, 31 Jul 2009 17:49:14 +0000 (13:49 -0400)]
Add/Fix command-line checks for smbios options v2

- One type 4 table is required per cpu. Add a check for this.
- Fix check for smbios file.

Changes from v1:
- static designation of smbios_validate_table, and remove whitespace

Signed-off-by: Beth Kon <eak@us.ibm.com>
--
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agovga: do not resize the screen on hw_invalidate
Stefano Stabellini [Mon, 3 Aug 2009 15:14:39 +0000 (16:14 +0100)]
vga: do not resize the screen on hw_invalidate

Hi all,
currently vga always resizes the screen when vga_hw_invalidate is called
while this is not required and all the other graphic emulators don't.
This patch fixes it, making vga invalidate behaviour consistent with the
other emulated devices.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agofix sdl window resize
Stefano Stabellini [Mon, 3 Aug 2009 15:10:43 +0000 (16:10 +0100)]
fix sdl window resize

Hi all,
this patch fixes the sdl window resize event handler so that it doesn't
require the emulated graphic card (or console.c) to call
qemu_console_resize.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoFix checksum writing in signboot.sh
Alexander Graf [Sat, 1 Aug 2009 09:48:31 +0000 (11:48 +0200)]
Fix checksum writing in signboot.sh

The printf command takes an octal value after \, so we have to convert
our decimal representation to octal first and then write it.

This unbreaks extboot signing. Multiboot wasn't affected yet because
the checksum was < 8.

Spotted and first patch by Glauber Costa <glommer@redhat.com>.
Printf idea by Paolo Bonzini <bonzini@gnu.org>.

Signed-off-by: Alexander Graf <agraf@suse.de>
CC: Glauber Costa <glommer@redhat.com>
CC: Paolo Bonzini <bonzini@gnu.org>
CC: Jan Ondrej <ondrejj@salstar.sk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoWin32: Fix default prefix
Stefan Weil [Fri, 31 Jul 2009 19:30:45 +0000 (21:30 +0200)]
Win32: Fix default prefix

The old code resulted in wrong escape sequences:

#define CONFIG_QEMU_SHAREDIR "c:\Program Files\Qemu"

gcc warnings:

vl.c:5708:20: warning: unknown escape sequence '\P'
vl.c:5708:20: warning: unknown escape sequence '\Q'

Windows can handle slash (/) path separators,
and QEMU already adds directories using slash,
so there is no need to fight with the correct number
of backslashes.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoFix symfind.
Laurent Desnogues [Thu, 30 Jul 2009 17:23:49 +0000 (19:23 +0200)]
Fix symfind.

this patch fixes an issue in symfind.

Assume you have the following symbols:

Address  Size
0045bca0 00000080 T s0
0045bd20 00000112 T s1

You'll notice that s1 is s0 + size.

So the current symfind will find that address 0045bd20 belongs to s0
instead of s1.

Laurent

Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

14 years agoFix Sparse warning about missing prototype
Blue Swirl [Sat, 1 Aug 2009 10:29:42 +0000 (10:29 +0000)]
Fix Sparse warning about missing prototype

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix Sparse warning about "expression using sizeof on a function"
Blue Swirl [Sat, 1 Aug 2009 10:13:44 +0000 (10:13 +0000)]
Fix Sparse warning about "expression using sizeof on a function"

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd missing "static"
Blue Swirl [Sat, 1 Aug 2009 10:13:43 +0000 (10:13 +0000)]
Add missing "static"

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMore NULL pointer fixes
Blue Swirl [Sat, 1 Aug 2009 10:13:20 +0000 (10:13 +0000)]
More NULL pointer fixes

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix Sparse warnings: "Using plain integer as NULL pointer"
Blue Swirl [Fri, 31 Jul 2009 21:16:51 +0000 (21:16 +0000)]
Fix Sparse warnings: "Using plain integer as NULL pointer"

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoOption rom makefile fixes
Paul Brook [Fri, 31 Jul 2009 12:18:32 +0000 (13:18 +0100)]
Option rom makefile fixes

Fix toplevel option rom makefile rules.

Signed-off-by: Paul Brook <paul@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoesp: fix interrupt register read
Blue Swirl [Fri, 31 Jul 2009 07:26:44 +0000 (07:26 +0000)]
esp: fix interrupt register read

Read of interrupt register should clear it and also sequence step and status.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosparc64 flush pending conditional evaluations before exposing cpu state
Igor Kovalenko [Tue, 28 Jul 2009 21:32:23 +0000 (01:32 +0400)]
sparc64 flush pending conditional evaluations before exposing cpu state

If translation block is interrupted by e.g. mmu exception
we need to compute conditional flags for inclusion into
saved cpu state. Otherwise after return from trap
conditional instructions would use stale psr/xcc data.

Signed-off-by: igor.v.kovalenko@gmail.com
--
Kind regards,
Igor V. Kovalenko
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix SDL zooming with pl110 (cf. d3ffcafe25b5966b351ea6100160c2156688f22f)
Blue Swirl [Fri, 31 Jul 2009 06:10:02 +0000 (09:10 +0300)]
Fix SDL zooming with pl110 (cf. d3ffcafe25b5966b351ea6100160c2156688f22f)

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoe1000.c doesn't properly emulate EERD and ICS registers
Bill Paul [Wed, 29 Jul 2009 17:22:55 +0000 (10:22 -0700)]
e1000.c doesn't properly emulate EERD and ICS registers

Once again, the emulation of the EERD and ICS registers in e1000.c is
incorrect. Nobody has noticed this before because none of the Intel-written
e1000 drivers use these registers, and all of the independently written open
source drivers copy Intel's example, so they don't use them either.
Regardless, these registers are documented in the programmer's manuals, and
their emulated behavior doesn't match the verified behavior of real hardware,
so any software that does use them doesn't function correctly.

-Bill

Signed-off-by: Bill Paul <wpaul@windriver.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix VM state change handlers running out of order
Markus Armbruster [Tue, 28 Jul 2009 18:33:41 +0000 (14:33 -0400)]
Fix VM state change handlers running out of order

When a VM state change handler changes VM state, other VM state change
handlers can see the state transitions out of order.

bmdma_map(), scsi_disk_init() and virtio_blk_init() install VM state
change handlers to restart DMA.  These handlers can vm_stop() by
running into a write error on a drive with werror=stop.  This throws
the VM state change handler callback into disarray.  Here's an example
case I observed:

0. The virtual IDE drive goes south.  All future writes return errors.

1. Something encounters a write error, and duly stops the VM with
   vm_stop().

2. vm_stop() calls vm_state_notify(0).

3. vm_state_notify() runs the callbacks in list vm_change_state_head.
   It contains ide_dma_restart_cb() installed by bmdma_map().  It also
   contains audio_vm_change_state_handler() installed by audio_init().

4. audio_vm_change_state_handler() stops audio stuff.

5. User continues VM with monitor command "c".  This runs vm_start().

6. vm_start() calls vm_state_notify(1).

7. vm_state_notify() runs the callbacks in vm_change_state_head.

8. ide_dma_restart_cb() happens to come first.  It does its work, runs
   into a write error, and duly stops the VM with vm_stop().

9. vm_stop() runs vm_state_notify(0).

10. vm_state_notify() runs the callbacks in vm_change_state_head.

11. audio_vm_change_state_handler() stops audio stuff.  Which isn't
   running.

12. vm_stop() finishes, ide_dma_restart_cb() finishes, step 7's
   vm_state_notify() resumes running handlers.

13. audio_vm_change_state_handler() starts audio stuff.  Oopsie.

Fix this by moving the actual write from each VM state change handler
into a new bottom half (suggested by Gleb Natapov).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovnc: fix copyrect screen corruption
Gerd Hoffmann [Mon, 27 Jul 2009 15:10:48 +0000 (17:10 +0200)]
vnc: fix copyrect screen corruption

When sending a copyrect command to the vnc client, we must also update
the local server surface.  Otherwise the server's and the client's idea
of the screen content run out of sync and screen updates don't work
correctly.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove the virtio-{blk, console}-pci-0-10 device types
Mark McLoughlin [Thu, 30 Jul 2009 10:29:13 +0000 (11:29 +0100)]
Remove the virtio-{blk, console}-pci-0-10 device types

These are now unused.

However, perhaps the idea is that when we add -device, they will be
useful? In that case, we should add virtio-net-pci-0-10 too.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove the pc-0-10 machine type
Mark McLoughlin [Thu, 30 Jul 2009 10:29:12 +0000 (11:29 +0100)]
Remove the pc-0-10 machine type

We have the pc-0.10 machine type now which does exactly the same
thing.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix migration to obey -S
Paolo Bonzini [Mon, 27 Jul 2009 21:17:51 +0000 (23:17 +0200)]
fix migration to obey -S

Since migration returns right away, starting the VM right
after calling qemu_start_incoming_migration is wrong even
if -S is not passed.  We have to do this after migration
has completed.

Cc: Glauber Costa <glommer@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotarget-mips: fix conditional moves off fp condition codes
Nathan Froyd [Tue, 25 Aug 2009 15:20:00 +0000 (08:20 -0700)]
target-mips: fix conditional moves off fp condition codes

Conditional moves off fp condition codes were using the result of
get_fp_bit to isolate and test the relevant condition code.  However,
get_fp_bit returns the bit number of the condition code, not a
bitmask.  (Compare the use of get_fp_bit in gen_compute_branch1, for
instance.)

Fixed by shifting a bitmask into place using the result of get_fp_bit in
the relevant functions (gen_mov{ci,cf_s,cf_d,cf_ps}).

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoUpdate Changelog and VERSION for 0.11.0-rc1 release v0.11.0-rc1
Anthony Liguori [Wed, 29 Jul 2009 16:47:31 +0000 (11:47 -0500)]
Update Changelog and VERSION for 0.11.0-rc1 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMove CLOCKLIBS and PTHREADLIBS out of CONFIG_LINUX_USER_ONLY
Anthony Liguori [Fri, 17 Jul 2009 03:02:43 +0000 (22:02 -0500)]
Move CLOCKLIBS and PTHREADLIBS out of CONFIG_LINUX_USER_ONLY

Otherwise, -lrt doesn't get added to the softmmu build.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd a pc-0.11 machine type and make the pc type an alias
Mark McLoughlin [Wed, 22 Jul 2009 09:02:51 +0000 (10:02 +0100)]
Add a pc-0.11 machine type and make the pc type an alias

The pc-0.11 type allows users of qemu-0.11 to use a machine type which
they know will remain compatible when the upgrade to qemu-0.12.

Management tools may choose to canonicalize the 'pc' machine type to
'pc-0.11' so that if the 'pc' alias changes target in future versions
of qemu, the machine type used will remain compatible.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd machine type aliases
Mark McLoughlin [Wed, 22 Jul 2009 09:02:50 +0000 (10:02 +0100)]
Add machine type aliases

Add an 'alias' field to QEMUMachine and display it in the output of
'qemu -M ?' with an '(aliased to foo)' suffix.

Aliases can change targets in newer versions of qemu, so management tools
may choose canonicalize machine types to ensure that if a user chooses an
alias, that the actual machine type used will remain compatible in
future.

This is intended to mimic a symlink to a machine description file.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd support for fd=name to tap and socket networking
Mark McLoughlin [Wed, 22 Jul 2009 08:11:42 +0000 (09:11 +0100)]
Add support for fd=name to tap and socket networking

This allows a program to initialize a host networking device using a
file descriptor passed over a unix monitor socket.

The program must first pass the file descriptor using SCM_RIGHTS
ancillary data with the getfd monitor command. It then may do
"host_net_add tap fd=name" to use the named file descriptor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd monitor_get_fd() command for fetching named fds
Mark McLoughlin [Wed, 22 Jul 2009 08:11:41 +0000 (09:11 +0100)]
Add monitor_get_fd() command for fetching named fds

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd getfd and closefd monitor commands
Mark McLoughlin [Wed, 22 Jul 2009 08:11:40 +0000 (09:11 +0100)]
Add getfd and closefd monitor commands

Add monitor commands to support passing file descriptors via
SCM_RIGHTS.

getfd assigns the passed file descriptor a name for use with other
monitor commands.

closefd allows passed file descriptors to be closed. If a monitor
command actually uses a named file descriptor, closefd will not be
required.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd SCM_RIGHTS support to unix socket character devices
Mark McLoughlin [Wed, 22 Jul 2009 08:11:39 +0000 (09:11 +0100)]
Add SCM_RIGHTS support to unix socket character devices

If a file descriptor is passed via a message with SCM_RIGHTS ancillary
data on a unix socket, store the file descriptor for use in the
chr_read() handler. Close the file descriptor if it was not used.

The qemu_chr_get_msgfd() API provides access to the passed descriptor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMake tcp_chr_read() use recvmsg()
Mark McLoughlin [Wed, 22 Jul 2009 08:11:38 +0000 (09:11 +0100)]
Make tcp_chr_read() use recvmsg()

Split out tcp_chr_recv() out of tcp_chr_read() and implement it on
non-win32 using recvmsg(). This is needed for a subsequent patch
which implements SCM_RIGHTS support.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotap-win32: Use correct headers.
Filip Navara [Mon, 27 Jul 2009 15:02:01 +0000 (10:02 -0500)]
tap-win32: Use correct headers.

Replace the usage of DDK headers with the SDK counterpart "winioctl.h".

Signed-off-by: Filip Navara <filip.navara@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix broken migration
Glauber Costa [Fri, 24 Jul 2009 20:20:23 +0000 (16:20 -0400)]
fix broken migration

While fixing migration with -S, commit
89befdd1a6b18215153b8976682d57b7d03d5782 broke the rest of us. Poor
glommer, with a poor family, spare him his life from this monstruosity.

Since the unconditional vm_start, not autostart was the villain, I'm putting
back autostart. Let me know if you prefer other solutions, it doesn't really matter,
doesn't really matter to me.

Any way the wind blows...

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoslirp: Use monotonic clock if available (v2)
Ed Swierk [Thu, 23 Jul 2009 21:13:34 +0000 (14:13 -0700)]
slirp: Use monotonic clock if available (v2)

Calling gettimeofday() to compute a time interval can cause problems if
the system clock jumps forwards or backwards; replace updtime() with
qemu_get_clock(rt_clock), which calls clock_gettime(CLOCK_MONOTONIC) if
it is available.

Also remove some useless macros.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu: msix nit: clear msix_entries_nr on error
Michael S. Tsirkin [Wed, 22 Jul 2009 15:51:14 +0000 (18:51 +0300)]
qemu: msix nit: clear msix_entries_nr on error

I don't think it's critical to do this, but it's
best to keep uninit and error recovery consistent.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHPET fixes for reg writes
Beth Kon [Fri, 24 Jul 2009 16:26:59 +0000 (12:26 -0400)]
HPET fixes for reg writes

This patch addresses the problems found by Andriy Gapon:

- The code was incorrectly overwriting the high order 32
  bits of the timer and hpet config registers. This didn't show up
  in testing because linux and windows use hpet in legacy mode,
  where the high order 32 bits (advertising available interrupts)
  of the timer config register are ignored, and the high order 32
  bits of the hpet config register are reserved and unused.

- The mask for level-triggered interrupts was off by a bit. (hpet
  doesn't currently support level-triggered interrupts).

In addition, I removed some unused #defines, and corrected the ioapic
interrupt values advertised. I'd set this up early in hpet development
and never went back to correct it, and no bugs resulted since linux and
windows use hpet in legacy mode where available interrupts are ignored.

Signed-off-by: Beth Kon <eak@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoslirp: Fix guestfwd for incoming data
Jan Kiszka [Wed, 22 Jul 2009 15:03:52 +0000 (17:03 +0200)]
slirp: Fix guestfwd for incoming data

Unless a virtual server address was explicitly defined (which is
impossible with the legacy -net channel format), guestfwd did not
properly forwarded host->guest packets. This patch fixes it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-thread: use pthread_equal
Sebastian Herbszt [Sun, 19 Jul 2009 13:16:09 +0000 (15:16 +0200)]
qemu-thread: use pthread_equal

Fixes

qemu-thread.c: In function `qemu_thread_equal':
qemu-thread.c:161: error: invalid operands to binary ==

Use of pthread_equal suggested by Filip Navara.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosignrom.sh: portability fix
Christoph Egger [Fri, 17 Jul 2009 13:23:51 +0000 (15:23 +0200)]
signrom.sh: portability fix

Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqmu-img: fix qemu-img convert to generate a valid image when the source referenced...
Akkarit Sangpetch [Fri, 17 Jul 2009 08:02:15 +0000 (10:02 +0200)]
qmu-img: fix qemu-img convert to generate a valid image when the source referenced a backing file

Make 'qemu-img convert' copies unallocated parts of the source image
when -B option was not specified.

Signed-off-by: Akkarit Sangpetch <asangpet@andrew.cmu.edu>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovmdk: Fix backing file handling
Kevin Wolf [Fri, 17 Jul 2009 06:20:41 +0000 (08:20 +0200)]
vmdk: Fix backing file handling

Instead of storing the backing file in its own BlockDriverState, VMDK uses the
BlockDriverState of the raw image file it opened. This is wrong and breaks
functions that access the backing file or protocols. This fix replaces all
occurrences of s->hd->backing_* with bs->backing_*.

This fixes qemu-iotests failure in 020 (Commit changes to backing file).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd save/restore support to the LSI logic SCSI device model.
Nolan [Mon, 20 Jul 2009 21:11:35 +0000 (14:11 -0700)]
Add save/restore support to the LSI logic SCSI device model.

This patch requires "Handle BH's queued by AIO completions in
qemu_aio_flush()" to work reliably.  The combination of those two
patches survived 300+ migrations with heavy IO load running in the
guest.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHandle BH's queued by AIO completions in qemu_aio_flush()
Nolan [Mon, 20 Jul 2009 21:01:25 +0000 (14:01 -0700)]
Handle BH's queued by AIO completions in qemu_aio_flush()

Without this, the call to qemu_aio_flush during migration doesn't
actually flush all in-flight SCSI IOs.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix most warnings (errors with -Werror) when debugging is enabled
Blue Swirl [Mon, 20 Jul 2009 17:19:25 +0000 (17:19 +0000)]
Fix most warnings (errors with -Werror) when debugging is enabled

I used the following command to enable debugging:
perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * */* */*/*

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix build with DEBUG_PCI in pci_host.h enabled
Blue Swirl [Mon, 20 Jul 2009 10:37:51 +0000 (10:37 +0000)]
Fix build with DEBUG_PCI in pci_host.h enabled

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoisxdigit -> qemu_isxdigit
Christoph Egger [Fri, 17 Jul 2009 17:48:02 +0000 (17:48 +0000)]
isxdigit -> qemu_isxdigit

Hi!

Attached patch uses qemu_isxdigit() instead of isxdigit().
Fixes build warning on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

14 years agofix build warnings
Christoph Egger [Fri, 17 Jul 2009 17:48:01 +0000 (17:48 +0000)]
fix build warnings

Hi!

Attached patch fixes build warnings due to use of different pointer
signedness.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

14 years agoSuppress a Sparse warning
Blue Swirl [Fri, 17 Jul 2009 11:18:53 +0000 (11:18 +0000)]
Suppress a Sparse warning

Move the export to a file used by both qdev.c and sysbus.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: use hex for version numbers
Blue Swirl [Fri, 17 Jul 2009 11:01:50 +0000 (11:01 +0000)]
Sparc32: use hex for version numbers

0x10000000 looks better than 268435456.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: fix escc devices broken by ee6847d19be16c789b8bd4e553b7cd6701ba1245
Blue Swirl [Fri, 17 Jul 2009 11:01:49 +0000 (11:01 +0000)]
Sparc32: fix escc devices broken by ee6847d19be16c789b8bd4e553b7cd6701ba1245

The logic of Zilog makes channel B the first device and channel A the
second one.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: fix fdc io_base
Blue Swirl [Fri, 17 Jul 2009 11:01:48 +0000 (11:01 +0000)]
Sparc32: fix fdc io_base

On some Sparc32 machines, fdc is located above 4G limit, so uint32_t is not
appropriate type for io_base.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245
Blue Swirl [Fri, 17 Jul 2009 11:01:47 +0000 (11:01 +0000)]
Fix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245

Move the qdev_init(dev); call after the setting of d->size.
Thanks to Filip Navara.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix OpenBSD build
Blue Swirl [Fri, 17 Jul 2009 11:01:45 +0000 (11:01 +0000)]
Fix OpenBSD build

The header sys-queue.h must be #included early, otherwise at some point OS
queue macros will be used. On OpenBSD, those don't define TAILQ_FOREACH_SAFE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoARM host fixes
Paul Brook [Fri, 17 Jul 2009 10:21:12 +0000 (11:21 +0100)]
ARM host fixes

Minor TCG cleanups and warning fixes for ARM hosts.

Signed-off-by: Paul Brook <paul@codesourcery.com>
14 years agoOnly allow -cpu host when KVM is enabled
Anthony Liguori [Fri, 17 Jul 2009 03:20:22 +0000 (22:20 -0500)]
Only allow -cpu host when KVM is enabled

-cpu host is not at all useful when using tcg.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoInitialize cpuid variables
Anthony Liguori [Fri, 17 Jul 2009 02:33:48 +0000 (21:33 -0500)]
Initialize cpuid variables

This causes a build break when !KVM.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoIgnore -Waddress for alsaaudio.c
malc [Fri, 17 Jul 2009 01:57:04 +0000 (05:57 +0400)]
Ignore -Waddress for alsaaudio.c

/usr/include/alsa/pcm.h contains:

#define snd_pcm_sw_params_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_sw_params_t *) alloca(snd_pcm_sw_params_sizeof()); memset(*ptr, 0, snd_pcm_sw_params_sizeof()); } while (0)

The assert generates: "error: the address of 'sw_params' will always
evaluate as 'true'" which combined with -Werror prevents alsaaudio.o
from being built with certain versions of GCC.

14 years agotcg: Fix tcg_gen_rotr_i64
Aurelien Jarno [Sat, 18 Jul 2009 09:15:40 +0000 (11:15 +0200)]
tcg: Fix tcg_gen_rotr_i64

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoUpdate version for 0.11.0-rc0 v0.11.0-rc0
Anthony Liguori [Thu, 16 Jul 2009 23:10:53 +0000 (18:10 -0500)]
Update version for 0.11.0-rc0

14 years agoGenerate $target_dir/config.h from $target_dir/config.mak
Juan Quintela [Thu, 16 Jul 2009 16:34:20 +0000 (18:34 +0200)]
Generate $target_dir/config.h from $target_dir/config.mak

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor config_softfloat selection in another list
Juan Quintela [Thu, 16 Jul 2009 16:34:19 +0000 (18:34 +0200)]
Refactor config_softfloat selection in another list

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agorename s/config_mak/config_host_mak/ and s/config_h/config_host_h/
Juan Quintela [Thu, 16 Jul 2009 16:34:18 +0000 (18:34 +0200)]
rename s/config_mak/config_host_mak/ and s/config_h/config_host_h/

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosimplify TARGET_ABI_DIR generation
Juan Quintela [Thu, 16 Jul 2009 16:34:17 +0000 (18:34 +0200)]
simplify TARGET_ABI_DIR generation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosimplify TARGET_ARCH2 generation
Juan Quintela [Thu, 16 Jul 2009 16:34:16 +0000 (18:34 +0200)]
simplify TARGET_ARCH2 generation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosimplify TARGET_BASE_ARCH generation
Juan Quintela [Thu, 16 Jul 2009 16:34:15 +0000 (18:34 +0200)]
simplify TARGET_BASE_ARCH generation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agogenerate TARGET_<arch name> for config.h
Juan Quintela [Thu, 16 Jul 2009 16:34:14 +0000 (18:34 +0200)]
generate TARGET_<arch name> for config.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agogenerate TARGET_ARCH for config.h
Juan Quintela [Thu, 16 Jul 2009 16:34:13 +0000 (18:34 +0200)]
generate TARGET_ARCH for config.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoOnly setup TARGET_ARCH when it is different of
Juan Quintela [Thu, 16 Jul 2009 16:34:12 +0000 (18:34 +0200)]
Only setup TARGET_ARCH when it is different of

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoprint only once TARGET_ARCH
Juan Quintela [Thu, 16 Jul 2009 16:34:11 +0000 (18:34 +0200)]
print only once TARGET_ARCH

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor targe_bigendian selection in another list
Juan Quintela [Thu, 16 Jul 2009 16:34:10 +0000 (18:34 +0200)]
Refactor targe_bigendian selection in another list

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor common code using a list
Juan Quintela [Thu, 16 Jul 2009 16:34:09 +0000 (18:34 +0200)]
Refactor common code using a list

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agogenerate ARCH name instead of coding it
Juan Quintela [Thu, 16 Jul 2009 16:34:08 +0000 (18:34 +0200)]
generate ARCH name instead of coding it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoWe can wrap ARCH_CFLAGS/ARCH_LDFLAGS in CFLAGS/LDFLAGS at configure time
Juan Quintela [Thu, 16 Jul 2009 16:34:07 +0000 (18:34 +0200)]
We can wrap ARCH_CFLAGS/ARCH_LDFLAGS in CFLAGS/LDFLAGS at configure time

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoWe can wrap OS_CFLAGS/OS_LDFLAGS in CFLAGS/LDFLAGS at configure time
Juan Quintela [Thu, 16 Jul 2009 16:34:06 +0000 (18:34 +0200)]
We can wrap OS_CFLAGS/OS_LDFLAGS in CFLAGS/LDFLAGS at configure time

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu binary don't exist anymore. I guess not much people is compiling on alpha
Juan Quintela [Thu, 16 Jul 2009 16:34:05 +0000 (18:34 +0200)]
qemu binary don't exist anymore. I guess not much people is compiling on alpha

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor a single rule to generate all qemu-* executables
Juan Quintela [Thu, 16 Jul 2009 16:34:04 +0000 (18:34 +0200)]
Refactor a single rule to generate all qemu-* executables

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoTARGET_ARCH == TARGET_BASE_ARCH in m68k and arm
Juan Quintela [Thu, 16 Jul 2009 16:34:03 +0000 (18:34 +0200)]
TARGET_ARCH == TARGET_BASE_ARCH in m68k and arm

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoBASE_LDFLAGS is not used anywhere else
Juan Quintela [Thu, 16 Jul 2009 16:34:02 +0000 (18:34 +0200)]
BASE_LDFLAGS is not used anywhere else

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure kqemu in a single place
Juan Quintela [Thu, 16 Jul 2009 16:34:01 +0000 (18:34 +0200)]
configure kqemu in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure kvm in a single place
Juan Quintela [Thu, 16 Jul 2009 16:34:00 +0000 (18:34 +0200)]
configure kvm in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure xen in a single place
Juan Quintela [Thu, 16 Jul 2009 16:33:59 +0000 (18:33 +0200)]
configure xen in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agochange ifdefs by obj-$(TARGET_BASE_ARCH)
Juan Quintela [Thu, 16 Jul 2009 16:33:58 +0000 (18:33 +0200)]
change ifdefs by obj-$(TARGET_BASE_ARCH)

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoTARGET_ARCH2 is already known at configure time.
Juan Quintela [Thu, 16 Jul 2009 15:57:08 +0000 (17:57 +0200)]
TARGET_ARCH2 is already known at configure time.

Remove re-construction in Makefile.target

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure already knows what TARGET_BASE_ARCH we need, no need to put the logic in...
Juan Quintela [Thu, 16 Jul 2009 15:57:07 +0000 (17:57 +0200)]
configure already knows what TARGET_BASE_ARCH we need, no need to put the logic in Makefile.target

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>