sdk/emulator/qemu.git
13 years ago[Title] Changed input system to be able to handle multiple input devices
don.hong [Fri, 19 Aug 2011 09:31:38 +0000 (18:31 +0900)]
[Title] Changed input system  to be able to handle multiple input devices
[Type] Enhancement
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

13 years agofix max VBE Y resolution value for 720 x 1280 resolution support
yuyeon.oh [Mon, 8 Aug 2011 08:59:12 +0000 (17:59 +0900)]
fix max VBE Y resolution value for 720 x 1280 resolution support

Change-Id: I43721a55fafac4cb9b3b8bb812e31aa313b0a955

13 years agoEmulator Brightness control routine is added.
fredrick.kim [Thu, 4 Aug 2011 02:07:49 +0000 (11:07 +0900)]
Emulator Brightness control routine is added.

13 years agoopengl_server execute method is changed from process to thread.
fredrick.kim [Wed, 20 Jul 2011 10:48:31 +0000 (19:48 +0900)]
opengl_server execute method is changed from process to thread.

13 years agoMerge "Fixed malfunctioning of touch input device after quest os reboot" into x86_sim...
don.hong [Wed, 13 Jul 2011 10:47:23 +0000 (19:47 +0900)]
Merge "Fixed malfunctioning of touch input device after quest os reboot" into x86_simulator

13 years agoFixed malfunctioning of touch input device after quest os reboot
don.hong [Wed, 13 Jul 2011 10:45:46 +0000 (19:45 +0900)]
Fixed malfunctioning of touch input device after quest os reboot

13 years agoMerge "overlay: fix arm build error at vga" into x86_simulator
dk77.yun [Tue, 12 Jul 2011 04:15:50 +0000 (13:15 +0900)]
Merge "overlay: fix arm build error at vga" into x86_simulator

13 years agooverlay: fix arm build error at vga
yuyeon.oh [Tue, 12 Jul 2011 02:11:51 +0000 (11:11 +0900)]
overlay: fix arm build error at vga

Change-Id: Ie131f55b4b12ad617e0a598125be9295ba6ec991

13 years agoImplemented save/resotre logic of usb-wacom-tablet.
don.hong [Tue, 12 Jul 2011 01:35:23 +0000 (10:35 +0900)]
Implemented save/resotre logic of usb-wacom-tablet.
So, the touch function works well after snaptshot boot.

13 years agomodify name of the function from emulator (simulator -> emulator)
woojin2.jung [Wed, 6 Jul 2011 20:25:44 +0000 (05:25 +0900)]
modify name of the function from emulator (simulator -> emulator)

13 years agoChanges some logics to support SLP_VGA and revert vgabios-stdvga.bin...
syeon.hwang [Tue, 5 Jul 2011 05:53:17 +0000 (14:53 +0900)]
Changes some logics to support SLP_VGA and revert vgabios-stdvga.bin...

13 years agoNew vgabios-slpvga.bin is introduced for PC-0.14 compatibility...
syeon.hwang [Tue, 5 Jul 2011 05:52:41 +0000 (14:52 +0900)]
New vgabios-slpvga.bin is introduced for PC-0.14 compatibility...

13 years agoMerge "Change qemu linux audio driver to pulseaudio (from alsa). It is easier to...
dk77.yun [Mon, 4 Jul 2011 07:11:23 +0000 (16:11 +0900)]
Merge "Change qemu linux audio driver to pulseaudio (from alsa). It is easier to control..." into x86_simulator

13 years agoMerge "overlay: fix height calculation of overlay surface" into x86_simulator
dk77.yun [Mon, 4 Jul 2011 05:18:03 +0000 (14:18 +0900)]
Merge "overlay: fix height calculation of overlay surface" into x86_simulator

13 years agooverlay: fix height calculation of overlay surface
yuyeon.oh [Mon, 4 Jul 2011 04:46:39 +0000 (13:46 +0900)]
overlay: fix height calculation of overlay surface

Change-Id: I5f9a05abb9e745bc21f2eb4873f4a34708d5c89b

13 years agoChange qemu linux audio driver to pulseaudio (from alsa). It is easier to control...
syeon.hwang [Mon, 4 Jul 2011 04:27:53 +0000 (13:27 +0900)]
Change qemu linux audio driver to pulseaudio (from alsa). It is easier to control...

13 years agoChange qemu windows audio driver to winwave (from dsound). It is easier to control...
syeon.hwang [Mon, 4 Jul 2011 01:53:11 +0000 (10:53 +0900)]
Change qemu windows audio driver to winwave (from dsound). It is easier to control, to debugging and has more compatibility...

13 years agomodified host ip address to fixed ip address in order to connect opengl_server
fredrick.kim [Thu, 30 Jun 2011 05:23:18 +0000 (14:23 +0900)]
modified host ip address to fixed ip address in order to connect opengl_server

13 years agoMerge "overlay: fix fb width calculations" into x86_simulator
dk77.yun [Mon, 27 Jun 2011 05:13:14 +0000 (14:13 +0900)]
Merge "overlay: fix fb width calculations" into x86_simulator

13 years agooverlay: fix fb width calculations
yuyeon.oh [Mon, 27 Jun 2011 04:37:26 +0000 (13:37 +0900)]
overlay: fix fb width calculations

Change-Id: If19f31d58307c33cecceac4e6a6c15cf97b851b1

13 years agoMerge "overlay: fix overlay position calculation" into x86_simulator
dk77.yun [Fri, 24 Jun 2011 11:41:51 +0000 (20:41 +0900)]
Merge "overlay: fix overlay position calculation" into x86_simulator

13 years agoMerge "overlay: support 2 V4L2 overlay devices" into x86_simulator
dk77.yun [Fri, 24 Jun 2011 11:41:41 +0000 (20:41 +0900)]
Merge "overlay: support 2 V4L2 overlay devices" into x86_simulator

13 years agooverlay: fix overlay position calculation
yuyeon.oh [Fri, 24 Jun 2011 10:38:30 +0000 (19:38 +0900)]
overlay: fix overlay position calculation

Change-Id: I074540665caf12d09ea1b69639302a122ec462e9

13 years agooverlay: support 2 V4L2 overlay devices
yuyeon.oh [Fri, 24 Jun 2011 08:24:30 +0000 (17:24 +0900)]
overlay: support 2 V4L2 overlay devices

Change-Id: I865b70233fc08c573907b37bb5d8117e5b3ef392

13 years agoMerge "Change opengl_client connection method" into x86_simulator
dk77.yun [Fri, 24 Jun 2011 05:43:57 +0000 (14:43 +0900)]
Merge "Change opengl_client connection method" into x86_simulator

13 years agoChange opengl_client connection method
fredrick.kim [Fri, 24 Jun 2011 03:16:20 +0000 (12:16 +0900)]
Change opengl_client connection method

13 years agooverlay: add register for second overlay
yuyeon.oh [Thu, 23 Jun 2011 04:52:05 +0000 (13:52 +0900)]
overlay: add register for second overlay

Change-Id: Id18c60e24ff8cfdc3d6f954243fd0c849803c3d0

13 years agooverlay : no dirty check and overlay tested
yuyeon.oh [Thu, 16 Jun 2011 15:29:14 +0000 (00:29 +0900)]
overlay : no dirty check and overlay tested

Change-Id: If7a14bdbe744fafa824e80ce32dcce1cecc236e2

13 years agooverlay : faster pointer calculation
yuyeon.oh [Thu, 16 Jun 2011 14:49:37 +0000 (23:49 +0900)]
overlay : faster pointer calculation

Change-Id: Ic424616b84bdeafa32af6df8b81a13d70dfd4dbc

13 years agooverlay : remove a log
yuyeon.oh [Thu, 16 Jun 2011 14:18:29 +0000 (23:18 +0900)]
overlay : remove a log

Change-Id: I400d5534a7be698108b605aa4367dfd706473283

13 years agoadd initial alpha blend
yuyeon.oh [Mon, 13 Jun 2011 12:26:44 +0000 (21:26 +0900)]
add initial alpha blend

Change-Id: I0c2ed4215de47fedd40ed69a0e1a826b978b7224

13 years agoset pci memory regions correctly
yuyeon.oh [Mon, 13 Jun 2011 09:21:13 +0000 (18:21 +0900)]
set pci memory regions correctly

Change-Id: I2dc2a724335a1b4fd29dece00ede363199db9ce9

13 years agoadd global variable for overlay
yuyeon.oh [Mon, 13 Jun 2011 06:02:41 +0000 (15:02 +0900)]
add global variable for overlay

Change-Id: Ide1f372dfd713cd3b486333f57a89851a1a6db14

13 years agoadd dummy overlay pci device
yuyeon.oh [Fri, 10 Jun 2011 09:13:32 +0000 (18:13 +0900)]
add dummy overlay pci device

Change-Id: Ib87a93c6c7909664d4389b865c7b743dc3f40ef5

13 years agobug fix : change the location of setsockopt call
dk77.yun [Fri, 3 Jun 2011 06:47:57 +0000 (15:47 +0900)]
bug fix : change the location of setsockopt call

13 years agofix source code indentation
dk77.yun [Fri, 3 Jun 2011 06:44:45 +0000 (15:44 +0900)]
fix source code indentation

13 years agorevive opengl module
munkyu.im [Thu, 2 Jun 2011 14:20:56 +0000 (23:20 +0900)]
revive opengl module

13 years agoMerge "solved ping problem 1. Use raw socket to send icmp messages in Windows and...
dk77.yun [Wed, 1 Jun 2011 08:19:43 +0000 (17:19 +0900)]
Merge "solved ping problem 1. Use raw socket to send icmp messages in Windows and priviledged Linux(root) 2. Use system commands to ping in non-privileged Linux" into x86_simulator

13 years agosolved ping problem
don.hong [Wed, 1 Jun 2011 07:29:30 +0000 (16:29 +0900)]
solved ping problem
1. Use raw socket to send icmp messages in Windows and priviledged Linux(root)
2. Use system commands to ping in non-privileged Linux

13 years agoremove smb380 emulation
munkyu.im [Tue, 31 May 2011 12:35:03 +0000 (21:35 +0900)]
remove smb380 emulation

13 years agochange configure file to fix windows build
munkyu.im [Mon, 30 May 2011 05:45:18 +0000 (14:45 +0900)]
change configure file to fix windows build

13 years agoget rid of opengl module
munkyu.im [Thu, 26 May 2011 16:55:07 +0000 (01:55 +0900)]
get rid of opengl module

13 years agoadd jpeg option for mingw build
munkyu.im [Tue, 24 May 2011 07:14:24 +0000 (16:14 +0900)]
add jpeg option for mingw build

13 years agofix "simulator save state" by adding qemu_monitor logs
munkyu.im [Thu, 19 May 2011 13:27:04 +0000 (22:27 +0900)]
fix "simulator save state" by adding qemu_monitor logs

13 years agochange vgabios-stdvga.bin to vgabios.bin in 0.13
dk77.yun [Wed, 18 May 2011 18:21:26 +0000 (03:21 +0900)]
change vgabios-stdvga.bin to vgabios.bin in 0.13

13 years agoupdate for SDL screen problem
dk77.yun [Wed, 18 May 2011 17:35:33 +0000 (02:35 +0900)]
update for SDL screen problem

13 years agofix kvm_mce_broadcast_rest() undefined error
munkyu.im [Tue, 17 May 2011 11:50:59 +0000 (20:50 +0900)]
fix kvm_mce_broadcast_rest() undefined error

13 years agosd: Don't complain about SDIO commands CMD52/CMD53
munkyu.im [Tue, 17 May 2011 08:27:08 +0000 (17:27 +0900)]
sd: Don't complain about SDIO commands CMD52/CMD53
52, 53 commands are new command of SPIO spec.

13 years agofix TCG optimization
munkyu.im [Tue, 17 May 2011 08:23:08 +0000 (17:23 +0900)]
fix TCG optimization
- 32-bit operation for 64-bit host

13 years agochange kvm.c 0.13 version to 0.14.1 version(it was skipped by mistake)
munkyu.im [Tue, 17 May 2011 05:51:30 +0000 (14:51 +0900)]
change kvm.c 0.13 version to 0.14.1 version(it was skipped by mistake)
change kvm_arch_required_capabilities(struct) definition

13 years agoadd SDL libraries link in configure file(unless you'll see the error "undefined refer...
munkyu.im [Mon, 16 May 2011 06:32:41 +0000 (15:32 +0900)]
add SDL libraries link in configure file(unless you'll see the error "undefined reference to rotozoomSurface()")

13 years agoadd sdl_rotate ( enable rotation on simualtor)
munkyu.im [Mon, 16 May 2011 05:02:08 +0000 (14:02 +0900)]
add sdl_rotate ( enable rotation on simualtor)

13 years agofix main() duplicated defintion error between qemu and simulator
munkyu.im [Mon, 16 May 2011 04:59:42 +0000 (13:59 +0900)]
fix main() duplicated defintion error between qemu and simulator

13 years agoadd qemu_configure.sh (It enables to add option to the configure file)
munkyu.im [Mon, 16 May 2011 04:31:20 +0000 (13:31 +0900)]
add qemu_configure.sh (It enables to add option to the configure file)

13 years agoFix sdl display to fix link error(sdl.c,console.h) and redefined error(sdl_keysym.h).
munkyu.im [Mon, 16 May 2011 02:47:55 +0000 (11:47 +0900)]
Fix sdl display to fix link error(sdl.c,console.h) and redefined error(sdl_keysym.h).
Add sdl_rotate.o at Makefile.

13 years agoAdd opengl module to avoid call opengl_exec_set_parent_window() from simulator/qemu_g...
munkyu.im [Mon, 16 May 2011 02:32:49 +0000 (11:32 +0900)]
Add opengl module to avoid call opengl_exec_set_parent_window() from simulator/qemu_gtk_widget.c .
It's temporary. Opengl for x86 has problem now.

13 years agoadd svibe(Haptic vibrator) and smb380(Accelerometer) library
munkyu.im [Mon, 16 May 2011 02:24:36 +0000 (11:24 +0900)]
add svibe(Haptic vibrator) and smb380(Accelerometer) library

13 years agoinitialize to 0.14.1 qemu
munkyu.im [Mon, 16 May 2011 01:27:56 +0000 (10:27 +0900)]
initialize to 0.14.1 qemu

13 years agocleanup x86_simulator branch
dk77.yun [Wed, 11 May 2011 11:06:34 +0000 (20:06 +0900)]
cleanup x86_simulator branch

13 years agoMerge remote branch 'upstream/master'
Rafal Krypa [Wed, 24 Nov 2010 07:22:50 +0000 (16:22 +0900)]
Merge remote branch 'upstream/master'

13 years agomicroblaze: target-ify target_ucontext
Richard Henderson [Mon, 22 Nov 2010 22:57:52 +0000 (14:57 -0800)]
microblaze: target-ify target_ucontext

Rename the members of target_ucontext so that they don't conflict
with possible host macros for ucontext members.  This has already
been done for the other targets.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
13 years agovirtio-pci: Convert fprintf() to error_report()
Stefan Hajnoczi [Mon, 15 Nov 2010 20:44:38 +0000 (20:44 +0000)]
virtio-pci: Convert fprintf() to error_report()

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovirtio-net: Convert fprintf() to error_report()
Stefan Hajnoczi [Mon, 15 Nov 2010 20:44:37 +0000 (20:44 +0000)]
virtio-net: Convert fprintf() to error_report()

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovirtio: Convert fprintf() to error_report()
Stefan Hajnoczi [Mon, 15 Nov 2010 20:44:36 +0000 (20:44 +0000)]
virtio: Convert fprintf() to error_report()

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovirtio-blk: Convert fprintf() to error_report()
Stefan Hajnoczi [Mon, 15 Nov 2010 20:44:35 +0000 (20:44 +0000)]
virtio-blk: Convert fprintf() to error_report()

Errors should be logged using error_report() so they go to the
appropriate monitor.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovgabios update: handle compatibility with older qemu versions
Gerd Hoffmann [Wed, 17 Nov 2010 11:06:44 +0000 (12:06 +0100)]
vgabios update: handle compatibility with older qemu versions

As pointed out by avi the vgabios update is guest-visible and thus has
migration implications.

One change is that the vga has a valid pci rom bar now.  We already have
a pci bus property to enable/disable the rom bar and we'll load the bios
via fw_cfg as fallback for the no-rom-bar case.  So we just have to add
compat properties to handle this case.

A second change is that the magic bochs lfb @ 0xe0000000 is gone.  When
live-migrating a guest from a older qemu version it might be using the
lfb though, so we have to keep it for the old machine types.  The patch
enables the bochs lfb in case we don't have the pci rom bar enabled
(i.e. we are in 0.13+older compat mode).

This patch depends on these patches which add (and use) the pc-0.13
machine type:
  http://patchwork.ozlabs.org/patch/70797/
  http://patchwork.ozlabs.org/patch/70798/

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Cc: avi@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agopcnet: Do not receive external frames in loopback mode
Jan Kiszka [Tue, 19 Oct 2010 15:03:24 +0000 (17:03 +0200)]
pcnet: Do not receive external frames in loopback mode

While not explicitly stated in the spec, it was observed on real systems
that enabling loopback testing on the pcnet controller disables
reception of external frames. And some legacy software relies on it, so
provide this behavior.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agopiix4 acpi: convert io BAR to type-safe ioport callbacks
Avi Kivity [Wed, 17 Nov 2010 09:50:10 +0000 (11:50 +0200)]
piix4 acpi: convert io BAR to type-safe ioport callbacks

Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoType-safe ioport callbacks
Avi Kivity [Wed, 17 Nov 2010 09:50:09 +0000 (11:50 +0200)]
Type-safe ioport callbacks

The current ioport callbacks are not type-safe, in that they accept an "opaque"
pointer as an argument whose type must match the argument to the registration
function; this is not checked by the compiler.

This patch adds an alternative that is type-safe.  Instead of an opaque
argument, both registation and the callback use a new IOPort type.  The
callback then uses container_of() to access its main structures.

Currently the old and new methods exist side by side; once the old way is gone,
we can also save a bunch of memory since the new method requires one pointer
per ioport instead of 6.

Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agotrace: Trace vm_start()/vm_stop()
Stefan Hajnoczi [Tue, 16 Nov 2010 12:20:25 +0000 (12:20 +0000)]
trace: Trace vm_start()/vm_stop()

VM state change notifications are invoked from vm_start()/vm_stop().
Trace these state changes so we can reason about the state of the VM
from trace output.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agovirtfs: enable MSI-X
Gerd Hoffmann [Thu, 11 Nov 2010 11:59:26 +0000 (12:59 +0100)]
virtfs: enable MSI-X

This patch enables MSI-X for virtfs-9p-pci.  It also adds a
compat property to pc-0.13 which turns it of there to stay
compatible to 0.13-stable.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agopc: add 0.13 pc machine type
Gerd Hoffmann [Thu, 11 Nov 2010 11:59:25 +0000 (12:59 +0100)]
pc: add 0.13 pc machine type

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agotrace: Use fprintf_function (format checking)
Stefan Weil [Mon, 15 Nov 2010 20:17:06 +0000 (21:17 +0100)]
trace: Use fprintf_function (format checking)

fprintf_function adds format checking with GCC_FMT_ATTR.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoslirp: Remove unused code for bad sprintf
Stefan Weil [Mon, 15 Nov 2010 20:15:26 +0000 (21:15 +0100)]
slirp: Remove unused code for bad sprintf

Neither DECLARE_SPRINTF nor BAD_SPRINTF are needed for QEMU.

QEMU won't support systems with missing or bad declarations
for sprintf. The unused code was detected while looking for
functions with missing format checking. Instead of adding
GCC_FMT_ATTR, the unused code was removed.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agopc: disable the BOCHS BIOS panic port
Bernhard Kohl [Tue, 16 Nov 2010 12:28:37 +0000 (13:28 +0100)]
pc: disable the BOCHS BIOS panic port

We have an OS which writes to port 0x400 when probing for special hardware.
This causes an exit of the VM. With SeaBIOS this port isn't used anyway.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-By: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agooptionrom: fix bugs in signrom.sh
Avi Kivity [Tue, 16 Nov 2010 14:33:17 +0000 (16:33 +0200)]
optionrom: fix bugs in signrom.sh

signrom.sh has multiple bugs:

- the last byte is considered when calculating the existing checksum, but not
  when computing the correction
- apprently the 'expr' expression overflows and produces incorrect results with
  larger roms
- if the checksum happened to be zero, we calculated the correction byte to be
  256

Instead of rewriting this in half a line of python, this patch fixes the bugs.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoMakefile: Fix check dependency breakage
Luiz Capitulino [Fri, 12 Nov 2010 14:55:46 +0000 (12:55 -0200)]
Makefile: Fix check dependency breakage

Commit b152aa84d52882bb1846485a89baf13aa07c86bc broke the unit-tests
build, fix it.

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoblock migration: do not submit multiple AIOs for same sector
Marcelo Tosatti [Mon, 8 Nov 2010 19:02:56 +0000 (17:02 -0200)]
block migration: do not submit multiple AIOs for same sector

Block migration can submit multiple AIO reads for the same sector/chunk, but
completion of such reads can happen out of order:

migration               guest
- get_dirty(N)
- aio_read(N)
- clear_dirty(N)
                        write(N)
                        set_dirty(N)
- get_dirty(N)
- aio_read(N)

If the first aio_read completes after the second, stale data will be
migrated to the destination.

Fix by not allowing multiple AIOs inflight for the same sector.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoblock: set sector dirty on AIO write completion
Marcelo Tosatti [Mon, 8 Nov 2010 19:02:55 +0000 (17:02 -0200)]
block: set sector dirty on AIO write completion

Sectors are marked dirty in the bitmap on AIO submission. This is wrong
since data has not reached storage.

Set a given sector as dirty in the dirty bitmap on AIO completion, so that
reading a sector marked as dirty is guaranteed to return uptodate data.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoblock: fix shift in dirty bitmap calculation
Marcelo Tosatti [Mon, 8 Nov 2010 19:02:54 +0000 (17:02 -0200)]
block: fix shift in dirty bitmap calculation

Otherwise upper 32 bits of bitmap entries are not correctly calculated.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoAdd support for generating a systemtap tapset static probes
Daniel P. Berrange [Fri, 12 Nov 2010 13:20:25 +0000 (13:20 +0000)]
Add support for generating a systemtap tapset static probes

This introduces generation of a qemu.stp/qemu-system-XXX.stp
files which provides tapsets with friendly names for static
probes & their arguments. Instead of

    probe process("qemu").mark("qemu_malloc") {
        printf("Malloc %d %p\n", $arg1, $arg2);
    }

It is now possible todo

    probe qemu.system.i386.qemu_malloc {
        printf("Malloc %d %p\n", size, ptr);
    }

There is one tapset defined per target arch, for both
user and system emulators.

* Makefile.target: Generate stp files for each target
* tracetool: Support for generating systemtap tapsets
* configure: Check for whether systemtap is available
  with the DTrace backend

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoAdd a DTrace tracing backend targetted for SystemTAP compatability
Daniel P. Berrange [Fri, 12 Nov 2010 13:20:24 +0000 (13:20 +0000)]
Add a DTrace tracing backend targetted for SystemTAP compatability

This introduces a new tracing backend that targets the SystemTAP
implementation of DTrace userspace tracing. The core functionality
should be applicable and standard across any DTrace implementation
on Solaris, OS-X, *BSD, but the Makefile rules will likely need
some small additional changes to cope with OS specific build
requirements.

This backend builds a little differently from the other tracing
backends. Specifically there is no 'trace.c' file, because the
'dtrace' command line tool generates a '.o' file directly from
the dtrace probe definition file. The probe definition is usually
named with a '.d' extension but QEMU uses '.d' files for its
external makefile dependancy tracking, so this uses '.dtrace' as
the extension for the probe definition file.

The 'tracetool' program gains the ability to generate a trace.h
file for DTrace, and also to generate the trace.d file containing
the dtrace probe definition.

Example usage of a dtrace probe in systemtap looks like:

  probe process("qemu").mark("qemu_malloc") {
    printf("Malloc %d %p\n", $arg1, $arg2);
  }

* .gitignore: Ignore trace-dtrace.*
* Makefile: Extra rules for generating DTrace files
* Makefile.obj: Don't build trace.o for DTrace, use
  trace-dtrace.o generated by 'dtrace' instead
* tracetool: Support for generating DTrace data files

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoRevert "Add a DTrace tracing backend targetted for SystemTAP compatability"
Anthony Liguori [Thu, 18 Nov 2010 00:06:06 +0000 (18:06 -0600)]
Revert "Add a DTrace tracing backend targetted for SystemTAP compatability"

This reverts commit 4addb1127f6327c7ebcbd150a6b589e7677adc92.

13 years agoRevert "Add support for generating a systemtap tapset static probes"
Anthony Liguori [Thu, 18 Nov 2010 00:05:58 +0000 (18:05 -0600)]
Revert "Add support for generating a systemtap tapset static probes"

This reverts commit 2834c3e0140c3b0ed4422909dfa0607b7213d95d.

Conflicts:

Makefile.target

13 years agoaudio: Only use audio timer when necessary
malc [Thu, 18 Nov 2010 11:30:12 +0000 (14:30 +0300)]
audio: Only use audio timer when necessary

Originally proposed by Gerd Hoffmann.

Signed-off-by: malc <av1474@comtv.ru>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
13 years agopc: Fix e820 fw_cfg for big endian
Alex Williamson [Mon, 8 Nov 2010 03:57:00 +0000 (20:57 -0700)]
pc: Fix e820 fw_cfg for big endian

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agopc: e820 qemu_cfg tables need to be packed
Alex Williamson [Fri, 5 Nov 2010 21:40:38 +0000 (15:40 -0600)]
pc: e820 qemu_cfg tables need to be packed

We can't let the compiler define the alignment for qemu_cfg data.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoFix compilation failure with simple trace when srcdir==objdir
Peter Maydell [Tue, 16 Nov 2010 20:07:07 +0000 (20:07 +0000)]
Fix compilation failure with simple trace when srcdir==objdir

Fix a makefile error that meant that qemu would not compile if
the source and object directories were the same.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoDelete IOHandlers after potentially running them
Stefan Hajnoczi [Wed, 3 Nov 2010 14:29:44 +0000 (14:29 +0000)]
Delete IOHandlers after potentially running them

Since commit 4bed9837309e58d208183f81d8344996744292cf an .fd_read()
handler that deletes its IOHandler is exposed to .fd_write() being
called on the deleted IOHandler.

This patch fixes deletion so that .fd_read() and .fd_write() are never
called on an IOHandler that is marked for deletion.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agousb-linux: Get the active configuration from sysfs rather then asking the dev
Hans de Goede [Wed, 10 Nov 2010 09:06:25 +0000 (10:06 +0100)]
usb-linux: Get the active configuration from sysfs rather then asking the dev

Some devices seem to choke on receiving a USB_REQ_GET_CONFIGURATION ctrl msg
(witnessed with a digital picture frame usb id 1908:1320).
When usb_fs_type == USB_FS_SYS, the active configuration can be read directly
from sysfs, which allows using this device through qemu's usb redirection.
More in general it seems a good idea to not send needless control msg's to
devices, esp. as the code in question is called every time a set_interface
is done. Which happens multiple times during virtual machine startup, and
when device drivers are activating the usb device.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agousb-linux: introduce a usb_linux_get_configuration function
Hans de Goede [Wed, 10 Nov 2010 09:06:24 +0000 (10:06 +0100)]
usb-linux: introduce a usb_linux_get_configuration function

The next patch in this series introduces multiple ways to get the
configuration dependent upon usb_fs_type, it is cleaner to put this
into its own function.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agousb-linux: Store devpath into USBHostDevice when usb_fs_type == USB_FS_SYS
Hans de Goede [Wed, 10 Nov 2010 09:06:23 +0000 (10:06 +0100)]
usb-linux: Store devpath into USBHostDevice when usb_fs_type == USB_FS_SYS

This allows us to recreate the sysfspath used during scanning later
(which will be used in a later patch in this series).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoAdd missing braces
Jes Sorensen [Thu, 11 Nov 2010 15:10:04 +0000 (16:10 +0100)]
Add missing braces

This patch adds missing braces around if/else statements that call
macros which are likely to result in errors if the macro is
changed. It also makes the code comply better with CODING_STYLE.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoOut off array access in usb-net
Gleb Natapov [Tue, 9 Nov 2010 07:36:53 +0000 (09:36 +0200)]
Out off array access in usb-net

Properly check array bounds before accessing array element.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoMerge remote branch 'spice/bugfix.2' into staging
Anthony Liguori [Tue, 16 Nov 2010 20:11:05 +0000 (14:11 -0600)]
Merge remote branch 'spice/bugfix.2' into staging

13 years agoAdd support for generating a systemtap tapset static probes
Daniel P. Berrange [Mon, 8 Nov 2010 19:33:08 +0000 (19:33 +0000)]
Add support for generating a systemtap tapset static probes

This introduces generation of a qemu.stp/qemu-system-XXX.stp
files which provides tapsets with friendly names for static
probes & their arguments. Instead of

    probe process("qemu").mark("qemu_malloc") {
        printf("Malloc %d %p\n", $arg1, $arg2);
    }

It is now possible todo

    probe qemu.system.i386.qemu_malloc {
        printf("Malloc %d %p\n", size, ptr);
    }

There is one tapset defined per target arch.

* Makefile: Generate a qemu.stp file for systemtap
* tracetool: Support for generating systemtap tapsets

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoAdd a DTrace tracing backend targetted for SystemTAP compatability
Daniel P. Berrange [Mon, 8 Nov 2010 19:33:07 +0000 (19:33 +0000)]
Add a DTrace tracing backend targetted for SystemTAP compatability

This introduces a new tracing backend that targets the SystemTAP
implementation of DTrace userspace tracing. The core functionality
should be applicable and standard across any DTrace implementation
on Solaris, OS-X, *BSD, but the Makefile rules will likely need
some small additional changes to cope with OS specific build
requirements.

This backend builds a little differently from the other tracing
backends. Specifically there is no 'trace.c' file, because the
'dtrace' command line tool generates a '.o' file directly from
the dtrace probe definition file. The probe definition is usually
named with a '.d' extension but QEMU uses '.d' files for its
external makefile dependancy tracking, so this uses '.dtrace' as
the extension for the probe definition file.

The 'tracetool' program gains the ability to generate a trace.h
file for DTrace, and also to generate the trace.d file containing
the dtrace probe definition.

Example usage of a dtrace probe in systemtap looks like:

  probe process("qemu").mark("qemu_malloc") {
    printf("Malloc %d %p\n", $arg1, $arg2);
  }

* .gitignore: Ignore trace-dtrace.*
* Makefile: Extra rules for generating DTrace files
* Makefile.obj: Don't build trace.o for DTrace, use
  trace-dtrace.o generated by 'dtrace' instead
* tracetool: Support for generating DTrace data files

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agomultiboot: Prevent loading of x86_64 images
Adam Lackorzynski [Thu, 4 Nov 2010 22:22:15 +0000 (23:22 +0100)]
multiboot: Prevent loading of x86_64 images

A via -kernel supplied x86_64 ELF image is being started in 32bit mode.
Detect and exit if a 64bit image has been supplied.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agoapic: Don't iterate past last used apic
Alex Williamson [Fri, 5 Nov 2010 22:01:29 +0000 (16:01 -0600)]
apic: Don't iterate past last used apic

local_apics are allocated sequentially and never removed, so
we can stop any iterations that go to MAX_APICS as soon as we
hit the first NULL.  Looking at a small guest running a virtio-net
workload with oprofile, this drops apic_get_delivery_bitmask()
from #3 in the profile to down in the noise.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
13 years agopci: allow hotplug removal of cold-plugged devices
Michael S. Tsirkin [Fri, 12 Nov 2010 07:21:35 +0000 (16:21 +0900)]
pci: allow hotplug removal of cold-plugged devices

This patch fixes hot unplug of cold plugged devices
(those present at system start), which got broken by
5beb8ad503c88a76f2b8106c3b74b4ce485a60e1 .

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Cam Macdonell <cam@cs.ualberta.ca>
Tested-by: Cam Macdonell <cam@cs.ualberta.ca>
Reported-by: Cam Macdonell <cam@cs.ualberta.ca>.