ubuntu-qemu-omap:qemu.git
8 years agoInitial packaging 0.0_413abab-0ubuntu1_dooz1
Loïc Minier [Tue, 23 Mar 2010 17:04:41 +0000 (18:04 +0100)]
Initial packaging

8 years agoAdd cursor_allow_grab; fixes optional cursor grab
Loïc Minier [Tue, 23 Mar 2010 13:45:25 +0000 (14:45 +0100)]
Add cursor_allow_grab; fixes optional cursor grab

8 years agoRevert "add multi-sd support"
Loïc Minier [Tue, 23 Mar 2010 13:40:37 +0000 (14:40 +0100)]
Revert "add multi-sd support"

This reverts commit 367a31f6a542bbd9c33bdf02ba25db4a5f8a82ae.

8 years agoUse a proper format string in all cases
Loïc Minier [Tue, 23 Mar 2010 13:25:50 +0000 (14:25 +0100)]
Use a proper format string in all cases

8 years agoAdd OpenGL ES accelerator support
Riku Voipio [Thu, 18 Mar 2010 17:35:08 +0000 (19:35 +0200)]
Add OpenGL ES accelerator support

To make it possible to use UI's based OpenGL ES efficiently
in qemu emulator, we need to offload the rendering to the host.
This patch provides the QEMU side of the code for omap3 emulation.
A kernel module, gles wrapper library inside qemu target filesystem,
and a gles library outside qemu are still needed. These will be
provided outside qemu project

8 years agoAdd beagleboard and n900 machine definitions
Riku Voipio [Thu, 18 Mar 2010 17:30:45 +0000 (19:30 +0200)]
Add beagleboard and n900 machine definitions

8 years agoOverhaul omap support and base omap3 support
Juha Riihimäki [Thu, 18 Mar 2010 17:28:11 +0000 (19:28 +0200)]
Overhaul omap support and base omap3 support

Lots of changes and reorganizing..

8 years agosavevm and reset support for soc_dma
Riku Voipio [Thu, 18 Mar 2010 17:25:43 +0000 (19:25 +0200)]
savevm and reset support for soc_dma

8 years agoAdd triton2 (twl4030) driver
Juha Riihimäki [Thu, 18 Mar 2010 17:19:42 +0000 (19:19 +0200)]
Add triton2 (twl4030) driver

The swiss knife companion chip for omap3

8 years agoprepare smc driver support for omap
Riku Voipio [Thu, 18 Mar 2010 17:18:34 +0000 (19:18 +0200)]
prepare smc driver support for omap

8 years agotsc2005 overhaul
Juha Riihimäki [Thu, 18 Mar 2010 17:14:19 +0000 (19:14 +0200)]
tsc2005 overhaul

8 years agoSD overhaul
Juha Riihimäki [Thu, 18 Mar 2010 17:10:57 +0000 (19:10 +0200)]
SD overhaul

- reset support
- add high capacity mmc support
- sd: improve mmc emulation
- make sd emulation work as mmc emulation as well
- handle SD CMD5 without error messages
- remove couple of unnecessary error messages
- Fix block count for OMAP3 MMC emulation

8 years agoblizzard: fix for non-32bpp host displays
Riku Voipio [Thu, 18 Mar 2010 17:09:45 +0000 (19:09 +0200)]
blizzard: fix for non-32bpp host displays

8 years agoonenand overhaul
Juha Riihimäki [Thu, 18 Mar 2010 17:07:29 +0000 (19:07 +0200)]
onenand overhaul

- major onenand emulation changes
- add reset support
- onenand: ignore zero writes to boot command area

8 years agomulti-mmc support in init call
Juha Riihimäki [Thu, 18 Mar 2010 17:06:11 +0000 (19:06 +0200)]
multi-mmc support in init call

change sd_init convention to allow multiple entries

8 years agoLicense update
Riku Voipio [Thu, 18 Mar 2010 17:04:29 +0000 (19:04 +0200)]
License update

Legal requested us to be open to future.

8 years agoNAND emulation overhaul
Juha Riihimäki [Thu, 18 Mar 2010 16:57:17 +0000 (18:57 +0200)]
NAND emulation overhaul

- Enhanced existing NAND emulation to support other than 8-bit devices.
- Enhanced existing NAND emulation to support over 1Gb devices.
- Enhanced existing NAND emulation to support cache status bits and read cache commands.
- Fixed existing NAND emulation to correctly handle multiple IO reads after READ STATUS command.
- nand emulation fixes
- more NAND fixing & tidying

8 years agoadd reset support for musb
Juha Riihimäki [Thu, 18 Mar 2010 16:52:20 +0000 (18:52 +0200)]
add reset support for musb

8 years agousb-ohci: add omap init support
Riku Voipio [Thu, 18 Mar 2010 16:37:55 +0000 (18:37 +0200)]
usb-ohci: add omap init support

8 years agoadd multi-sd support
Riku Voipio [Fri, 19 Mar 2010 09:19:58 +0000 (11:19 +0200)]
add multi-sd support

N900 and other devices can have more than one sd/mmc card, and thus
the -sd command line option needs to be read multiple times.

8 years agomake cursor grab optional
Riku Voipio [Thu, 18 Mar 2010 16:21:12 +0000 (18:21 +0200)]
make cursor grab optional

8 years agosdl: multitouch and window close suppport
Juha Riihimäki [Thu, 18 Mar 2010 16:20:38 +0000 (18:20 +0200)]
sdl: multitouch and window close suppport

- show shutting down status in window caption
- add display close handler support
- add support for disabling input grabbing
- add ability to disable window grab:

currently if the qemu window is inactive and you click inside the
qemu window the input will be grabbed. with touchscreen devices
this might not be very feasible as there is no visible guest
cursor so this patch adds a global variable that can be used to
control the grabbing behavior. default behavior is not modified
but for n8x0, n900 and n00 devices the grabbing is disabled.
note that with sdl rendering you can still toggle grabbing by
pressing ctrl+alt when the qemu window is active.

8 years agofix function signature of qemu_chr_open_pty on !linux
Riku Voipio [Thu, 18 Mar 2010 16:18:52 +0000 (18:18 +0200)]
fix function signature of qemu_chr_open_pty on !linux

8 years agomultikeyboard support
Juha Riihimäki [Thu, 18 Mar 2010 16:14:37 +0000 (18:14 +0200)]
multikeyboard support

On some systems (such as n900), multiple physical devices can create
keyboard events (gpio, lis302dl, twl4030, ..). Add hooks to make it
possible to recieve keyboard input from multiple devices.

8 years agomultitouch and window close handler
Juha Riihimäki [Thu, 18 Mar 2010 16:14:04 +0000 (18:14 +0200)]
multitouch and window close handler

8 years agococoa frontend changes
Juha Riihimäki [Thu, 18 Mar 2010 16:12:23 +0000 (18:12 +0200)]
cocoa frontend changes

remove help menu, fix fullscreen mode mouse handling, add confirmation
dialog to quit menu command, add support for undocumented alt-grab and
ctrl-grab options, add qemu version printout in about panel.
- fix build on os x versions prior to 10.6
- cocoa window handling fixes
- show shutting down status in window caption
- add display close handler support
- add support for multitouch in cocoa frontend
- cocoa keymap changes

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
8 years agofix 0 sized write syscall
Riku Voipio [Thu, 18 Mar 2010 16:11:26 +0000 (18:11 +0200)]
fix 0 sized write syscall

fixes running ldconfig under qemu linux-user

8 years agoLots of arm TCG changes
Juha Riihimäki [Thu, 18 Mar 2010 16:10:32 +0000 (18:10 +0200)]
Lots of arm TCG changes

These will be sent via another patch series

8 years agoconsole change headers
Juha Riihimäki [Thu, 18 Mar 2010 16:07:08 +0000 (18:07 +0200)]
console change headers

multitouch, multi-keyboard and window close hook support

8 years agoCortex-A8 R2 support and trustzone
Juha Riihimäki [Thu, 18 Mar 2010 16:02:59 +0000 (18:02 +0200)]
Cortex-A8 R2 support and trustzone

8 years agoShrink tb_jmp_offset to two entries, the other two are never used.
Filip Navara [Thu, 18 Mar 2010 15:48:00 +0000 (17:48 +0200)]
Shrink tb_jmp_offset to two entries, the other two are never used.

8 years agoGet rid of AREG1 and AREG2.
Filip Navara [Thu, 18 Mar 2010 15:43:02 +0000 (17:43 +0200)]
Get rid of AREG1 and AREG2.

Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>
8 years agoaudion: fix coreaudio compilation
Juha Riihimäki [Thu, 18 Mar 2010 15:30:18 +0000 (17:30 +0200)]
audion: fix coreaudio compilation

audio: fix coreaudio compilation on OS X 10.6 and OS X 10.5

8 years agoaudio: fix integer overflow expression
Juha Riihimäki [Thu, 18 Mar 2010 15:28:47 +0000 (17:28 +0200)]
audio: fix integer overflow expression

8 years agoadd pselect6 and inotify_init1
Riku Voipio [Thu, 18 Mar 2010 15:27:03 +0000 (17:27 +0200)]
add pselect6 and inotify_init1

proper patches elsewhere

8 years agoscratchbox1 hacks
Riku Voipio [Thu, 18 Mar 2010 15:26:43 +0000 (17:26 +0200)]
scratchbox1 hacks

8 years agoarm-dis debug helper
Juha Riihimäki [Thu, 18 Mar 2010 15:22:10 +0000 (17:22 +0200)]
arm-dis debug helper

modified the arm disassembler to include the opcode binary representation along
with the symbolic disassembly.

8 years agoFix OpenBSD linker warning
Blue Swirl [Thu, 18 Mar 2010 20:48:19 +0000 (20:48 +0000)]
Fix OpenBSD linker warning

qemu-option.o(.text+0x20f8): In function `qemu_opts_from_qdict_1':
/src/qemu/qemu-option.c:813: warning: strcpy() is almost always misused, please use strlcpy()

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
8 years agoReplace assert(0) with abort() or cpu_abort()
Blue Swirl [Thu, 18 Mar 2010 18:41:57 +0000 (18:41 +0000)]
Replace assert(0) with abort() or cpu_abort()

When building with -DNDEBUG, assert(0) will not stop execution
so it must not be used for abnormal termination.

Use cpu_abort() when in CPU context, abort() otherwise.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
8 years agoFix manpage errors
Blue Swirl [Thu, 18 Mar 2010 18:41:49 +0000 (18:41 +0000)]
Fix manpage errors

Split long unbreakable lines to smaller sections.

Spotted by Debian Lintian tool:
http://lintian.debian.org/full/pkg-qemu-devel@lists.alioth.debian.org.html#qemu

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
8 years agohw/usb-msd: fix some usb requests
Arnaud Patard (Rtp) [Wed, 10 Mar 2010 09:45:12 +0000 (10:45 +0100)]
hw/usb-msd: fix some usb requests

The usb-msd device emulation needs some small tweaks in the requests
emulations. For instance, the reset/maxlun requests are class/interface
specific so requests for them with the type class and recipient interface
bits sets have to be handled.

Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoscsi-disk: fix buffer overflow
Gerd Hoffmann [Wed, 10 Mar 2010 16:47:17 +0000 (17:47 +0100)]
scsi-disk: fix buffer overflow

In case s->version is shorter than 4 bytes we overflow the memcpy src
buffer.  Fix it by clearing the target buffer, then copy only the
amount of bytes we actually have.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agovnc: add no-lock-key-sync option
Gerd Hoffmann [Wed, 10 Mar 2010 16:12:02 +0000 (17:12 +0100)]
vnc: add no-lock-key-sync option

Add an option to disable the heuristics which try to keep
capslock and numlock state for guest and host in sync.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agomigration: unix migration should obey autostart are the other ones
Juan Quintela [Tue, 9 Mar 2010 23:10:36 +0000 (00:10 +0100)]
migration: unix migration should obey autostart are the other ones

This was the only incoming migration without autostart check

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agomigration: Clear fd also in error cases
Juan Quintela [Tue, 9 Mar 2010 23:10:35 +0000 (00:10 +0100)]
migration: Clear fd also in error cases

Not clearing the fd and closing the file makes qemu spin using 100%CPU
after incoming migration error.

See for instance bug:
https://bugzilla.redhat.com/show_bug.cgi?id=518032

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoread-only: Another minor cleanup
Naphtali Sprei [Thu, 11 Mar 2010 14:44:34 +0000 (16:44 +0200)]
read-only: Another minor cleanup

Don't rely on CDROM hint for read_only attribute

Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoread-only: minor cleanup
Naphtali Sprei [Sun, 14 Mar 2010 13:19:57 +0000 (15:19 +0200)]
read-only: minor cleanup

Really use read-only flags for opening the file when asked for read-only

Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agosplit out qemu-timer.c
Paolo Bonzini [Wed, 10 Mar 2010 10:38:55 +0000 (11:38 +0100)]
split out qemu-timer.c

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agodisentangle tcg and deadline calculation
Paolo Bonzini [Wed, 10 Mar 2010 10:38:54 +0000 (11:38 +0100)]
disentangle tcg and deadline calculation

Just tell main_loop_wait whether to be blocking or nonblocking, so that
there is no need to call qemu_cpus_have_work from the timer subsystem.
Instead, tcg_cpu_exec can say "we want the main loop not to block because
we have stuff to do".

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoplace together more #ifdef CONFIG_IOTHREAD blocks
Paolo Bonzini [Wed, 10 Mar 2010 10:38:53 +0000 (11:38 +0100)]
place together more #ifdef CONFIG_IOTHREAD blocks

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agomove vmstate registration of vmstate_timers earlier
Paolo Bonzini [Wed, 10 Mar 2010 10:38:52 +0000 (11:38 +0100)]
move vmstate registration of vmstate_timers earlier

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agonew function qemu_icount_delta
Paolo Bonzini [Wed, 10 Mar 2010 10:38:51 +0000 (11:38 +0100)]
new function qemu_icount_delta

Tweaking the rounding in qemu_next_deadline ensures that there's
no change whatsoever.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoadd qemu_alarm_pending
Paolo Bonzini [Wed, 10 Mar 2010 10:38:50 +0000 (11:38 +0100)]
add qemu_alarm_pending

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoadd qemu_icount_round
Paolo Bonzini [Wed, 10 Mar 2010 10:38:49 +0000 (11:38 +0100)]
add qemu_icount_round

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agocentralize handling of -icount
Paolo Bonzini [Wed, 10 Mar 2010 10:38:48 +0000 (11:38 +0100)]
centralize handling of -icount

A simple patch to place together all handling of -icount.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agointroduce and use qemu_clock_enable
Paolo Bonzini [Wed, 10 Mar 2010 10:38:47 +0000 (11:38 +0100)]
introduce and use qemu_clock_enable

By adding the possibility to turn on/off a clock, yet another
incestuous relationship between timers and CPUs can be disentangled.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agochange qemu_run_timers interface
Paolo Bonzini [Wed, 10 Mar 2010 10:38:46 +0000 (11:38 +0100)]
change qemu_run_timers interface

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoextract timer handling out of main_loop_wait
Paolo Bonzini [Wed, 10 Mar 2010 10:38:45 +0000 (11:38 +0100)]
extract timer handling out of main_loop_wait

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoremove qemu_rearm_alarm_timer from main loop
Paolo Bonzini [Wed, 10 Mar 2010 10:38:44 +0000 (11:38 +0100)]
remove qemu_rearm_alarm_timer from main loop

Make the timer subsystem register its own callback instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agotweak qemu_notify_event
Paolo Bonzini [Wed, 10 Mar 2010 10:38:43 +0000 (11:38 +0100)]
tweak qemu_notify_event

Instead of testing specially next_cpu in host_alarm_handler, just do
that in qemu_notify_event.  The idea is, if we are not running (or
not yet running) target CPU code, prepare things so that the execution
loop is exited asap; just make that clear.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agodo not use qemu_event_increment outside qemu_notify_event
Paolo Bonzini [Wed, 10 Mar 2010 10:38:42 +0000 (11:38 +0100)]
do not use qemu_event_increment outside qemu_notify_event

qemu_notify_event in the non-iothread case is only stopping the current
CPU.  However, if the CPU is idle and the main loop is in the select
call then a call to qemu_event_increment is needed too (as done in
host_alarm_handler).  Since in general one doesn't know whether the CPU
is executing or not, it is a safe bet to always do qemu_event_increment.

Another way to see it: after this patch qemu_event_increment is the
"common part" of qemu_notify_event for both the CONFIG_IOTHREAD and
!CONFIG_IOTHREAD cases, which makes sense.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agomore alarm timer cleanup
Paolo Bonzini [Wed, 10 Mar 2010 10:38:41 +0000 (11:38 +0100)]
more alarm timer cleanup

The timer_alarm_pending variable is related to the alarm timer but not
placed in the struct.  Also, in qemu_mod_timer the wrong flag was being
tested: the timer is rearmed in the alarm timer "bottom half", so the
right flag to test there is the "pending" flag.

Finally, I hoisted the NULL checks from alarm_has_dynticks to
host_alarm_handler.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoonly one flag is needed for alarm_timer
Paolo Bonzini [Wed, 10 Mar 2010 10:38:40 +0000 (11:38 +0100)]
only one flag is needed for alarm_timer

The ALARM_FLAG_DYNTICKS can be testing simply by checking if there is
a rearm function.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agofix error in win32_rearm_timer
Paolo Bonzini [Wed, 10 Mar 2010 10:38:39 +0000 (11:38 +0100)]
fix error in win32_rearm_timer

The TIME_ONESHOT and TIME_PERIODIC flags are mutually exclusive.
The code after the patch matches the flags used in win32_start_timer.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoavoid dubiously clever code in win32_start_timer
Paolo Bonzini [Wed, 10 Mar 2010 10:38:38 +0000 (11:38 +0100)]
avoid dubiously clever code in win32_start_timer

The code is initializing an unsigned int to UINT_MAX using "-1", so that
the following always-true comparison seems to be always-false at a
first look.  Since alarm timer initializations are never nested, it is
simpler to unconditionally store the result of timeGetDevCaps into
data->period.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoballoon: Do not save VM state wrt asynchronous virtio operations
Adam Litke [Tue, 9 Mar 2010 18:54:09 +0000 (12:54 -0600)]
balloon: Do not save VM state wrt asynchronous virtio operations

When working with the VM state (for loadvm/savevm and migration), it is not
valid to load and store pointers since the validity of those pointers cannot be
assured in the new qemu address space.  Therefore, virtio_balloon_save() and
virtio_balloon_load() must not handle the stats-related fields in struct
VirtIOBalloon.

If a memory stats request is in-flight at the time of a migration or savevm,
the request will not complete and should be resubmitted once migration or
loadvm completes.  Note that this extremely small race window can only be
triggered using QMP so it is not possible to hang the user monitor.

Signed-off-by: Adam Litke <agl@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoblock: add logical_block_size property
Christoph Hellwig [Thu, 4 Mar 2010 13:20:17 +0000 (14:20 +0100)]
block: add logical_block_size property

Add a logical block size attribute as various guest side tools only
increase the filesystem sector size based on it, not the advisory
physical block size.

For scsi we already have support for a different logical block size
in place for CDROMs that we can built upon.  Only my recent block
device characteristics VPD page needs some fixups.  Note that we
leave the logial block size for CDROMs hardcoded as the 2k value
is expected for it in general.

For virtio-blk we already have a feature flag claiming to support
a variable logical block size that was added for the s390 kuli
hypervisor.  Interestingly it does not actually change the units
in which the protocol works, which is still fixed at 512 bytes,
but only communicates a different minimum I/O granularity.  So
all we need to do in virtio is to add a trap for unaligned I/O
and round down the device size to the next multiple of the logical
block size.

IDE does not support any other logical block size than 512 bytes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoAvoid crash on '-usbdevice <device>' without parameters
Jan Kiszka [Sun, 7 Mar 2010 11:17:08 +0000 (12:17 +0100)]
Avoid crash on '-usbdevice <device>' without parameters

Many usbdevice_init implementors assume params is non-NULL.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoFix SIGFPE for vnc display of width/height = 1
Chris Webb [Mon, 8 Mar 2010 14:34:49 +0000 (14:34 +0000)]
Fix SIGFPE for vnc display of width/height = 1

During boot, the screen gets resized to height 1 and a mouse click at this
point will cause a division by zero when calculating the absolute pointer
position from the pixel (x, y). Return a click in the middle of the screen
instead in this case.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agousb-linux: remove unreachable default in switch statement
Paul Bolle [Mon, 8 Mar 2010 12:58:35 +0000 (13:58 +0100)]
usb-linux: remove unreachable default in switch statement

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agosdl: improve error message on fatal error
Bjørn Mork [Mon, 8 Mar 2010 12:07:14 +0000 (13:07 +0100)]
sdl: improve error message on fatal error

The SDL_SetVideoMode() error condition is easily triggered by a user by
simply configure a guest with a host unsupported display resolution
and attempting to enable fullscreen.  Since the error is fatal, adding
a bit of debugging help can't harm.

Sample output with this change:

 (qemu) Could not open SDL display (1280x1024x32): No video mode large enough for 1280x1024

The width x height might seem redundant as SDL also provides it in
SDL_GetError(), but I believe there are situations where it is
useful.  I.e. if there is some other SDL error.  Anyway, redundant
information in fatal error messages has never harmed a single gerbil.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoWrong error message in block_passwd command
Shahar Havivi [Fri, 5 Mar 2010 22:26:13 +0000 (00:26 +0200)]
Wrong error message in block_passwd command

Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoQError: New QERR_DEVICE_NOT_ENCRYPTED
Shahar Havivi [Fri, 5 Mar 2010 22:25:35 +0000 (00:25 +0200)]
QError: New QERR_DEVICE_NOT_ENCRYPTED

Signed-off-by: Shahar Havivi <shaharh@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
8 years agoMerge remote branch 'markus/qerror' into staging
Anthony Liguori [Wed, 17 Mar 2010 14:44:37 +0000 (09:44 -0500)]
Merge remote branch 'markus/qerror' into staging

8 years agoMerge remote branch 'mst/pci' into staging
Anthony Liguori [Wed, 17 Mar 2010 14:42:58 +0000 (09:42 -0500)]
Merge remote branch 'mst/pci' into staging

8 years agoLarge page TLB flush
Paul Brook [Wed, 17 Mar 2010 02:14:28 +0000 (02:14 +0000)]
Large page TLB flush

QEMU uses a fixed page size for the CPU TLB.  If the guest uses large
pages then we effectively split these into multiple smaller pages, and
populate the corresponding TLB entries on demand.

When the guest invalidates the TLB by virtual address we must invalidate
all entries covered by the large page.  However the address used to
invalidate the entry may not be present in the QEMU TLB, so we do not
know which regions to clear.

Implementing a full vaiable size TLB is hard and slow, so just keep a
simple address/mask pair to record which addresses may have been mapped by
large pages.  If the guest invalidates this region then flush the
whole TLB.

Signed-off-by: Paul Brook <paul@codesourcery.com>
8 years agomonitor: convert do_device_add() to QObject
Markus Armbruster [Wed, 10 Feb 2010 19:52:01 +0000 (20:52 +0100)]
monitor: convert do_device_add() to QObject

8 years agomonitor: Use argument type 'O' for device_add
Markus Armbruster [Wed, 10 Feb 2010 19:47:28 +0000 (20:47 +0100)]
monitor: Use argument type 'O' for device_add

While there, improve the params help text.

8 years agomonitor: New argument type 'O'
Markus Armbruster [Wed, 10 Feb 2010 19:24:35 +0000 (20:24 +0100)]
monitor: New argument type 'O'

In the human monitor, it declares a single optional argument to be
parsed according to the QemuOptsList given by its name.

In QMP, it declares an optional argument for each member of the
QemuOptsList.

Restriction: only lists with empty desc are supported for now.  Good
enough for the job at hand.  We'll lift the restriction when we need
that.

8 years agoqemu-option: Rename find_list() to qemu_find_opts() & external linkage
Markus Armbruster [Wed, 10 Feb 2010 19:09:14 +0000 (20:09 +0100)]
qemu-option: Rename find_list() to qemu_find_opts() & external linkage

Next commit wants to use it.

8 years agoqemu-option: Move the implied first name into QemuOptsList
Markus Armbruster [Wed, 10 Feb 2010 18:52:18 +0000 (19:52 +0100)]
qemu-option: Move the implied first name into QemuOptsList

We sometimes permit omitting the first option name, for example
-device foo is short for -device driver=foo.  The name to use
("driver" in the example) is passed as argument to qemu_opts_parse().
For each QemuOptsList, we use at most one such name.

Move the name into QemuOptsList, and pass whether to permit the
abbreviation.  This ensures continued consistency, and simplifies the
commit after next in this series.

8 years agoqemu-option: Functions to convert to/from QDict
Markus Armbruster [Wed, 10 Feb 2010 19:15:29 +0000 (20:15 +0100)]
qemu-option: Functions to convert to/from QDict

The functions are somewhat restricted.  Good enough for the job at
hand.  We'll extend them when we need more.

8 years agoerror: Convert do_device_add() to QError
Markus Armbruster [Fri, 19 Feb 2010 13:17:34 +0000 (14:17 +0100)]
error: Convert do_device_add() to QError

Conversion to QObject is still missing.

8 years agoRevert "qdev: Use QError for 'device not found' error"
Markus Armbruster [Fri, 19 Feb 2010 09:03:13 +0000 (10:03 +0100)]
Revert "qdev: Use QError for 'device not found' error"

This reverts commit 3ced9f7a36189aed94d8bf86f3f5087a53012455.

The next commit will convert all of qdev_device_add() to QError, and
it'll be clearer with this partial conversion reverted.

8 years agoerror: New QERR_NO_BUS_FOR_DEVICE
Markus Armbruster [Fri, 19 Feb 2010 18:54:06 +0000 (19:54 +0100)]
error: New QERR_NO_BUS_FOR_DEVICE

8 years agoerror: New QERR_DEVICE_INIT_FAILED
Markus Armbruster [Fri, 19 Feb 2010 18:53:54 +0000 (19:53 +0100)]
error: New QERR_DEVICE_INIT_FAILED

8 years agoerror: New QERR_BUS_NO_HOTPLUG
Markus Armbruster [Fri, 19 Feb 2010 18:53:36 +0000 (19:53 +0100)]
error: New QERR_BUS_NO_HOTPLUG

8 years agoerror: New QERR_BAD_BUS_FOR_DEVICE
Markus Armbruster [Fri, 19 Feb 2010 18:52:45 +0000 (19:52 +0100)]
error: New QERR_BAD_BUS_FOR_DEVICE

8 years agoerror: New error_printf_unless_qmp()
Markus Armbruster [Fri, 19 Feb 2010 09:30:05 +0000 (10:30 +0100)]
error: New error_printf_unless_qmp()

8 years agoqdev: Convert qbus_find() to QError
Markus Armbruster [Fri, 19 Feb 2010 17:09:33 +0000 (18:09 +0100)]
qdev: Convert qbus_find() to QError

8 years agoerror: New QERR_DEVICE_NO_BUS
Markus Armbruster [Fri, 19 Feb 2010 17:06:18 +0000 (18:06 +0100)]
error: New QERR_DEVICE_NO_BUS

8 years agoerror: New QERR_DEVICE_MULTIPLE_BUSSES
Markus Armbruster [Fri, 19 Feb 2010 17:05:59 +0000 (18:05 +0100)]
error: New QERR_DEVICE_MULTIPLE_BUSSES

8 years agoerror: New QERR_BUS_NOT_FOUND
Markus Armbruster [Fri, 19 Feb 2010 17:05:39 +0000 (18:05 +0100)]
error: New QERR_BUS_NOT_FOUND

8 years agoqdev: Relax parsing of bus option
Markus Armbruster [Fri, 19 Feb 2010 15:09:25 +0000 (16:09 +0100)]
qdev: Relax parsing of bus option

Treat multiple successive slashes as a one slash.  Ignore trailing
slashes.  This is how POSIX pathnames work.

8 years agoqdev: convert setting device properties to QError
Markus Armbruster [Fri, 19 Feb 2010 12:20:23 +0000 (13:20 +0100)]
qdev: convert setting device properties to QError

8 years agoerror: New QERR_PROPERTY_VALUE_NOT_FOUND
Markus Armbruster [Tue, 16 Mar 2010 16:44:38 +0000 (17:44 +0100)]
error: New QERR_PROPERTY_VALUE_NOT_FOUND

8 years agoerror: New QERR_PROPERTY_VALUE_IN_USE
Markus Armbruster [Tue, 16 Mar 2010 16:40:48 +0000 (17:40 +0100)]
error: New QERR_PROPERTY_VALUE_IN_USE

8 years agoerror: New QERR_PROPERTY_VALUE_BAD
Markus Armbruster [Fri, 19 Feb 2010 12:17:58 +0000 (13:17 +0100)]
error: New QERR_PROPERTY_VALUE_BAD

8 years agoerror: New QERR_PROPERTY_NOT_FOUND
Markus Armbruster [Fri, 19 Feb 2010 12:11:41 +0000 (13:11 +0100)]
error: New QERR_PROPERTY_NOT_FOUND

8 years agoerror: Polish human-readable error descriptions
Markus Armbruster [Fri, 19 Feb 2010 16:42:46 +0000 (17:42 +0100)]
error: Polish human-readable error descriptions

Also put error definitions in alphabetical order