sdk/emulator/qemu.git
16 years agofixing keymap for Windows keys (Stefano Stabellini)
aliguori [Mon, 22 Sep 2008 19:45:36 +0000 (19:45 +0000)]
fixing keymap for Windows keys (Stefano Stabellini)

Fixing Windows keys mapping (CS 15446 form xen-unstable).

Signed-off-by: Takanori Kasai <kasai.takanori@jp.fujitsu.com>
Signed-off-by: Junko Ichino <ichino.junko@jp.fujitsu.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5298 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRefactor AIO to allow multiple AIO implementations
aliguori [Mon, 22 Sep 2008 19:17:18 +0000 (19:17 +0000)]
Refactor AIO to allow multiple AIO implementations

This patch refactors the AIO layer to allow multiple AIO implementations.  It's
only possible because of the recent signalfd() patch.

Right now, the AIO infrastructure is pretty specific to the block raw backend.
For other block devices to implement AIO, the qemu_aio_wait function must
support registration.  This patch introduces a new function,
qemu_aio_set_fd_handler, which can be used to register a file descriptor to be
called back.  qemu_aio_wait() now polls a set of file descriptors registered
with this function until one becomes readable or writable.

This patch should allow the implementation of alternative AIO backends (via a
thread pool or linux-aio) and AIO backends in non-traditional block devices
(like NBD).

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5297 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix arguments used in cas/casx, thanks to Igor Kovalenko for spotting
blueswir1 [Mon, 22 Sep 2008 16:52:28 +0000 (16:52 +0000)]
Fix arguments used in cas/casx, thanks to Igor Kovalenko for spotting

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5296 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd comment to windows SCSI hack.
pbrook [Mon, 22 Sep 2008 16:30:29 +0000 (16:30 +0000)]
Add comment to windows SCSI hack.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5295 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRemove unnecessary call to qemu_aio_init (called from bdrv_init)
blueswir1 [Mon, 22 Sep 2008 16:29:18 +0000 (16:29 +0000)]
Remove unnecessary call to qemu_aio_init (called from bdrv_init)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5294 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoLSI SCSI: raise UDC on infinite loop (Marcelo Tosatti)
aliguori [Mon, 22 Sep 2008 16:04:16 +0000 (16:04 +0000)]
LSI SCSI: raise UDC on infinite loop (Marcelo Tosatti)

Raise UDC (Unexpected Disconnect) when a large enough number of
instructions has been executed by the SCRIPTS processor. This "solution"
is much simpler than temporarily interrupting execution.

This remedies the situation with Windows which downloads SCRIPTS code
that busy loops on guest main memory. Their drivers _do_ handle UDC
appropriately (at least XP and 2003).

It would be nicer to actually detect infinite loops, but until then,
this bandaid seems acceptable.

Since the situation seems to be rare enough, raise the number
of instructions to 10000 (previously 1000).

Three people other than myself had success with this patch.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5293 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoscsi-generic: correct 6-bytes commands transfer length (Laurent Vivier)
aliguori [Mon, 22 Sep 2008 15:30:26 +0000 (15:30 +0000)]
scsi-generic: correct 6-bytes commands transfer length (Laurent Vivier)

According to SCSI documentation, for 6 bytes commands (READ(6),
WRITE(6)), if transfer length is 0 it specifies 256 blocks.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5292 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoscsi-generic: correct usage of memset() (Laurent Vivier)
aliguori [Mon, 22 Sep 2008 15:27:54 +0000 (15:27 +0000)]
scsi-generic: correct usage of memset() (Laurent Vivier)

      void *memset(void *s, int c, size_t n);

DESCRIPTION
       The  memset()  function  fills  the  first  n  bytes of the
memory area
       pointed to by s with the constant byte c."

Reported by Dietmar Maurer.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5291 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDon't use sprintf() or strcpy()
aliguori [Mon, 22 Sep 2008 15:04:31 +0000 (15:04 +0000)]
Don't use sprintf() or strcpy()

They are unsafe.  The current code is correct, but to be safer, we should pass
an explicit size.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5290 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDo not allow AIO to be inited multiple times
aliguori [Mon, 22 Sep 2008 14:49:01 +0000 (14:49 +0000)]
Do not allow AIO to be inited multiple times

This prevents two signalfd() threads from being spawned.  This problem was
originally spotted by Blue Swirl.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5289 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSupport out-of-the-tree building of tests
malc [Mon, 22 Sep 2008 01:39:29 +0000 (01:39 +0000)]
Support out-of-the-tree building of tests

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5288 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAvoid clobbering input register in qemu_ld64+bswap+useronly case
malc [Mon, 22 Sep 2008 01:08:08 +0000 (01:08 +0000)]
Avoid clobbering input register in qemu_ld64+bswap+useronly case

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5287 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix ARM NEON vdup and vtbl bugs.
pbrook [Mon, 22 Sep 2008 00:52:42 +0000 (00:52 +0000)]
Fix ARM NEON vdup and vtbl bugs.

Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5286 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix neon encoding comment.
pbrook [Sun, 21 Sep 2008 23:15:38 +0000 (23:15 +0000)]
Fix neon encoding comment.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5285 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix Xcontext fill, by Here Poussineau.
ths [Sun, 21 Sep 2008 21:21:26 +0000 (21:21 +0000)]
Fix Xcontext fill, by Here Poussineau.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5284 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse the new concat_tl_i64 op for std and stda
blueswir1 [Sun, 21 Sep 2008 18:43:17 +0000 (18:43 +0000)]
Use the new concat_tl_i64 op for std and stda

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5283 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd concat32_i64 and concat_tl_i64 ops
blueswir1 [Sun, 21 Sep 2008 18:32:28 +0000 (18:32 +0000)]
Add concat32_i64 and concat_tl_i64 ops

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5282 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse the new concat_i32_i64 op for std and stda
blueswir1 [Sun, 21 Sep 2008 14:49:09 +0000 (14:49 +0000)]
Use the new concat_i32_i64 op for std and stda

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5281 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd concat_i32_i64 op.
pbrook [Sun, 21 Sep 2008 13:48:32 +0000 (13:48 +0000)]
Add concat_i32_i64 op.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5280 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoBand-aid vfork() emulation (Kirill Shutemov).
balrog [Sun, 21 Sep 2008 02:39:45 +0000 (02:39 +0000)]
Band-aid vfork() emulation (Kirill Shutemov).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5279 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix TEST_BSX operands in test-i386.c (Zeev Tarantov).
balrog [Sun, 21 Sep 2008 02:34:50 +0000 (02:34 +0000)]
Fix TEST_BSX operands in test-i386.c (Zeev Tarantov).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5278 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoEnable same-arch consistency check on x86-64, print syscall name on error.
balrog [Sun, 21 Sep 2008 02:31:19 +0000 (02:31 +0000)]
Enable same-arch consistency check on x86-64, print syscall name on error.

Also disable testing instructions unsupported by 64-bit binutils in
test-i386.c

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5277 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMove signal handler prototype back to cpu.h
blueswir1 [Sat, 20 Sep 2008 09:05:49 +0000 (09:05 +0000)]
Move signal handler prototype back to cpu.h

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5276 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSuppress gcc 4.x -Wpointer-sign (included in -Wall) warnings
blueswir1 [Sat, 20 Sep 2008 08:07:15 +0000 (08:07 +0000)]
Suppress gcc 4.x -Wpointer-sign (included in -Wall) warnings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5275 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd signed versions of save/load functions
blueswir1 [Sat, 20 Sep 2008 08:04:11 +0000 (08:04 +0000)]
Add signed versions of save/load functions

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5274 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix QADD / QSUB decoding on ARM (Torbjörn Andersson).
balrog [Sat, 20 Sep 2008 03:18:07 +0000 (03:18 +0000)]
Fix QADD / QSUB decoding on ARM (Torbjörn Andersson).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5273 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov).
balrog [Sat, 20 Sep 2008 03:14:14 +0000 (03:14 +0000)]
Fix pread() and pwrite() syscall on ARM EABI (Kirill Shutemov).

pread() and pwrite() have differences in arguments between ARM EABI and
OABI.

See arch/arm/kernel/entry-common.S in Linux kernel source for
additional information.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5272 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov).
balrog [Sat, 20 Sep 2008 03:03:09 +0000 (03:03 +0000)]
Add MTIOCTOP, MTIOCGET and MTIOCPOS ioctls (Kirill Shutemov).

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5271 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix building with 2.6.27 kernel headers (Kirill Shutemov).
balrog [Sat, 20 Sep 2008 02:29:38 +0000 (02:29 +0000)]
Fix building with 2.6.27 kernel headers (Kirill Shutemov).

<linux/dirent.h> unexported since 2.6.27

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5270 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoImplement the futimesat() syscall (by Kirill Shutemov).
balrog [Sat, 20 Sep 2008 02:25:39 +0000 (02:25 +0000)]
Implement the futimesat() syscall (by Kirill Shutemov).

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5269 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoImplement fstatat64() syscall (by Kirill Shutemov).
balrog [Sat, 20 Sep 2008 02:23:36 +0000 (02:23 +0000)]
Implement fstatat64() syscall (by Kirill Shutemov).

Move the transformation of struct stat64 into a separate function and
implement fstatat64() using it.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5268 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSwap only altered elements of the grouplist in getgroups() (Kirill Shutemov).
balrog [Sat, 20 Sep 2008 02:12:08 +0000 (02:12 +0000)]
Swap only altered elements of the grouplist in getgroups() (Kirill Shutemov).

getgroups() returns the number of supplementary group IDs, so it's
unnessary to swap the entire array.  It can dramatically speed up
the syscall: on recent Linux kernels NGROUPS_MAX=65536.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5267 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix getgroups() with zero size parameter (Kirill Shutemov).
balrog [Sat, 20 Sep 2008 02:08:13 +0000 (02:08 +0000)]
Fix getgroups() with zero size parameter (Kirill Shutemov).

According to man page getgroups(2):

If size is zero, list is not modified, but the total number of
supplementary group IDs for the process is returned.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5266 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse a QEMUBH when an OMAP timer must expire immediately.
balrog [Sat, 20 Sep 2008 01:32:07 +0000 (01:32 +0000)]
Use a QEMUBH when an OMAP timer must expire immediately.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5265 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd a comment about masking of CTI interrupt in 16550A UART.
balrog [Sat, 20 Sep 2008 01:15:04 +0000 (01:15 +0000)]
Add a comment about masking of CTI interrupt in 16550A UART.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5264 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAllow attaching devices to OMAP UARTs.
balrog [Sat, 20 Sep 2008 01:10:32 +0000 (01:10 +0000)]
Allow attaching devices to OMAP UARTs.

Also avoid two signedness warnings in hw/omap2.c.
The API to attach new devices to serials is fine, bu the implementation
is a hack.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5263 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUpdate OpenBIOS images to SVN r237.
blueswir1 [Thu, 18 Sep 2008 19:41:28 +0000 (19:41 +0000)]
Update OpenBIOS images to SVN r237.

Changes:
r219: Fix #size-cells for HelenOS, add /openprom/version node
r220: Fix typo
r221: More realistic mmu_translate
r222: Fix device names to allow Net/OpenBSD to boot
r223: add set-callback for Aurora 2.0
r224: Switch keyboard controller to translated mode so it works as expected
r225: Add mmu release (claim added in r219)
r226: Set variable defaults before nvram_init also for Sparc64 (cf. r136)
r227: Use nvram boot-args and boot-device variables also for Sparc64 (cf. r137)
r228: Fix compilation on OpenBSD: avoid accidental system include file use
r229: Rename /packages/client-iface to /openprom/client-services
r230

From Igor V. Kovalenko:

This openbios-grubfs-ext2fs-block.patch fixes a problem where inode
pointer is truncated to 32bit integer and then sign-extended to 64bit
integer while passing second pointer argument to ext2_rdfsb.

r231: Fix pad alignment
r232: Remove package finding code that finds unrelated packages
r233: Fix virtual to physical address translation (Igor Kovalenko)
r234: Implement itlb/dtlb directed writes (Igor Kovalenko)
r235: Fix warnings that would be caused by ld flag --warn-common
r236: Enable ld flag --warn-common
r237: Use the firmware device introduced in Qemu SVN r5256

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5262 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd Sparc32 display depth to firmware configuration
blueswir1 [Thu, 18 Sep 2008 18:34:28 +0000 (18:34 +0000)]
Add Sparc32 display depth to firmware configuration

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5261 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd common keys to firmware configuration
blueswir1 [Thu, 18 Sep 2008 18:33:18 +0000 (18:33 +0000)]
Add common keys to firmware configuration

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5260 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd UUID to firmware configuration info (Gleb Natapov)
blueswir1 [Thu, 18 Sep 2008 18:31:52 +0000 (18:31 +0000)]
Add UUID to firmware configuration info (Gleb Natapov)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5259 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd "info uuid" command to monitor (Gleb Natapov)
blueswir1 [Thu, 18 Sep 2008 18:30:20 +0000 (18:30 +0000)]
Add "info uuid" command to monitor (Gleb Natapov)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5258 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoAdd -uuid command line option (Gleb Natapov)
blueswir1 [Thu, 18 Sep 2008 18:29:08 +0000 (18:29 +0000)]
Add -uuid command line option (Gleb Natapov)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5257 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoKey/value based qemu<->guest firmware communication mechanism (Gleb Natapov)
blueswir1 [Thu, 18 Sep 2008 18:27:29 +0000 (18:27 +0000)]
Key/value based qemu<->guest firmware communication mechanism (Gleb Natapov)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5256 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: switch most load/store ops to TCG
aurel32 [Thu, 18 Sep 2008 15:31:27 +0000 (15:31 +0000)]
target-alpha: switch most load/store ops to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5255 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: convert remaining arith3 functions to TCG
aurel32 [Thu, 18 Sep 2008 13:45:14 +0000 (13:45 +0000)]
target-alpha: convert remaining arith3 functions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5254 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse TCG registers for most CPU register accesses.
ths [Thu, 18 Sep 2008 11:59:03 +0000 (11:59 +0000)]
Use TCG registers for most CPU register accesses.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5253 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMove the active FPU registers into env again, and use more TCG registers
ths [Thu, 18 Sep 2008 11:57:27 +0000 (11:57 +0000)]
Move the active FPU registers into env again, and use more TCG registers
to access them.

Signed-off-by: Thiemo Seufer <ths@networkno.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5252 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: fix one more literal sign issue
aurel32 [Thu, 18 Sep 2008 10:13:19 +0000 (10:13 +0000)]
target-alpha: fix one more literal sign issue

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5251 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: instruction decoding simplification
aurel32 [Thu, 18 Sep 2008 10:11:26 +0000 (10:11 +0000)]
target-alpha: instruction decoding simplification

Use a litteral value of 0 when rb31 is used. This reduces the tests
in the instruction decoding. Also remove almost unused corner cases.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5250 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: convert cmp* instructions to TCG
aurel32 [Thu, 18 Sep 2008 09:24:25 +0000 (09:24 +0000)]
target-alpha: convert cmp* instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5249 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoalpha: fix a missing literal sign issue
aurel32 [Thu, 18 Sep 2008 09:17:13 +0000 (09:17 +0000)]
alpha: fix a missing literal sign issue

Reported by Tristan Gingold

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5248 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: switch a few helpers to TCG
aurel32 [Thu, 18 Sep 2008 00:02:17 +0000 (00:02 +0000)]
target-alpha: switch a few helpers to TCG

Switch a few helpers to TCG and implement RC and RS instructions

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5247 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: convert byte manipulation instructions to TCG
aurel32 [Wed, 17 Sep 2008 22:04:52 +0000 (22:04 +0000)]
target-alpha: convert byte manipulation instructions to TCG

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5246 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoalpha: convert cmov and bcond to TCG
aurel32 [Wed, 17 Sep 2008 22:04:44 +0000 (22:04 +0000)]
alpha: convert cmov and bcond to TCG

Patch mostly by Tristan Gingold

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5245 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoalpha: improve testsuite
aurel32 [Wed, 17 Sep 2008 22:04:37 +0000 (22:04 +0000)]
alpha: improve testsuite

misc tiny patches:
* add a 'check' target to the Makefile
* split code in crt.s to create the _exit syscall; also use the value of
main() as exit status

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5244 c046a42c-6fe2-441c-8c8c-71466251a162

16 years ago[PATCH] alpha: fix linux syscall convention
aurel32 [Wed, 17 Sep 2008 22:04:29 +0000 (22:04 +0000)]
[PATCH] alpha: fix linux syscall convention

According to linux kernel sources, register a3 is set in case of failure
(and cleared in case of success) while register v0 contains the result
(or -errno in case of error).

The convention was not followed which results in weird behaviour.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5243 c046a42c-6fe2-441c-8c8c-71466251a162

16 years ago[PATCH] usb-serial: Fix data corruption with usb serial emulation
aurel32 [Wed, 17 Sep 2008 22:04:21 +0000 (22:04 +0000)]
[PATCH] usb-serial: Fix data corruption with usb serial emulation

* Remove the unused send_buf variable and its constant.

* Fix a math error
  The variables recv_ptr and recv_used are not large enough to hold
  the constant 384, which causes data corruption when the pointer is
  reset with: s->recv_ptr = (s->recv_ptr + len) % RECV_BUF;

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5242 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoEnable ld flag --warn-common
blueswir1 [Wed, 17 Sep 2008 19:05:19 +0000 (19:05 +0000)]
Enable ld flag --warn-common

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5241 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix warnings that would be caused by ld flag --warn-common
blueswir1 [Wed, 17 Sep 2008 19:04:14 +0000 (19:04 +0000)]
Fix warnings that would be caused by ld flag --warn-common

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5240 c046a42c-6fe2-441c-8c8c-71466251a162

16 years ago16550A UART: RHR irq enable bit also masks the Rx timeout irq.
balrog [Wed, 17 Sep 2008 00:21:05 +0000 (00:21 +0000)]
16550A UART: RHR irq enable bit also masks the Rx timeout irq.

The "Rx timeout" (aka. Character Timeout Indication) has no separate mask
bit in the IER register and according to the specs reading RHR is the only
way to reset the irq.  However on the hardware (tested on OMAP2 UART which
is an extended 16550A) the RHR_IT bit in IER disables the irc, too.  Linux
bluetooth serial dongle driver for N800 depends on this behavior.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5239 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: small optimizations
aurel32 [Tue, 16 Sep 2008 22:44:25 +0000 (22:44 +0000)]
target-alpha: small optimizations

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5238 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: fix TCG register names
aurel32 [Tue, 16 Sep 2008 22:44:17 +0000 (22:44 +0000)]
target-alpha: fix TCG register names

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5237 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: convert some arith3 instructions to TCG
aurel32 [Tue, 16 Sep 2008 22:44:10 +0000 (22:44 +0000)]
target-alpha: convert some arith3 instructions to TCG

Replace gen_arith3 generic macro and dyngen ops by instruction specific
optimized TCG code.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5236 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-alpha: convert arith2 instructions to TCG
aurel32 [Tue, 16 Sep 2008 22:44:02 +0000 (22:44 +0000)]
target-alpha: convert arith2 instructions to TCG

Replace gen_arith2 generic macro and dyngon ops by instruction specific
optimized TCG code.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5235 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMove offsetof to osdep.h, remove local defintions.
balrog [Tue, 16 Sep 2008 13:36:57 +0000 (13:36 +0000)]
Move offsetof to osdep.h, remove local defintions.

With this container_of can actually be used without causing build errors.
Reformat container_of.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5234 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoblock-raw is not a protocol
aliguori [Tue, 16 Sep 2008 13:21:58 +0000 (13:21 +0000)]
block-raw is not a protocol

The protocol_name "file" was added to the block driver when async IO was
introduced.  This can be used to select that a file is treated as a raw
device instead of probing for the type.  However, protocols are not subject
to path interpretation which cases qcow2 images with raw base images to not
function is the path was specified relatively.

The fix is simply to remove the protocol_name from the raw block driver.  The
proper way to force the use of a raw block format is to use the format= option
with -drive.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5233 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix range in the hid report descriptor for USB tablet.
balrog [Mon, 15 Sep 2008 22:26:35 +0000 (22:26 +0000)]
Fix range in the hid report descriptor for USB tablet.

Should prevent the ugly wrapping due to a typo in an earlier commit.
Fix by Gregor (gg@seh.de).

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5232 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMake sure to define fd_open when not on Linux
aliguori [Mon, 15 Sep 2008 16:48:11 +0000 (16:48 +0000)]
Make sure to define fd_open when not on Linux

My previous commit broke the build.  This was spotted by C.W. Betts.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5231 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoWMVi extension support (Stefano Stabellini)
aliguori [Mon, 15 Sep 2008 16:05:16 +0000 (16:05 +0000)]
WMVi extension support (Stefano Stabellini)

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5230 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agovnc dynamic resolution (Stefano Stabellini)
aliguori [Mon, 15 Sep 2008 16:03:41 +0000 (16:03 +0000)]
vnc dynamic resolution (Stefano Stabellini)

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5229 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRight now, kvm keeps the memory allocation split, so we can
aliguori [Mon, 15 Sep 2008 16:01:01 +0000 (16:01 +0000)]
Right now, kvm keeps the memory allocation split, so we can
handle different areas in different ways. This schema works with qemu
too, so it appears to be the common ground.

This patch proposes using this common ground for everyone, by spliting
raw qemu.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5228 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMake page_find() return 0 for too-large addresses (Eduardo Habkost)
aliguori [Mon, 15 Sep 2008 15:56:30 +0000 (15:56 +0000)]
Make page_find() return 0 for too-large addresses (Eduardo Habkost)

On some cases, such as under KVM, tb_invalidate_phys_page_range()
may be called for large addresses, when qemu is configured to more than
4GB of RAM.

On these cases, qemu was crashing because it was using an index too
large for l1_map[], that supports only 32-bit addresses when compiling
without CONFIG_USER_ONLY.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5227 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse common objects for qemu-img and qemu-nbd
aliguori [Mon, 15 Sep 2008 15:51:35 +0000 (15:51 +0000)]
Use common objects for qemu-img and qemu-nbd

Right now, we sprinkle #if defined(QEMU_IMG) && defined(QEMU_NBD) all over the
code.  It's ugly and causes us to have to build multiple object files for
linking against qemu and the tools.

This patch introduces a new file, qemu-tool.c which contains enough for
qemu-img, qemu-nbd, and QEMU to all share the same objects.

This also required getting qemu-nbd to be a bit more Windows friendly.  I also
changed the Windows block-raw to use normal IO instead of overlapping IO since
we don't actually do AIO yet on Windows.  I changed the various #if 0's to
 #if WIN32_AIO to make it easier for someone to eventually fix AIO on Windows.

After this patch, there are no longer any #ifdef's related to qemu-img and
qemu-nbd.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5226 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDefine a few structures instead of including a file, add "static"
blueswir1 [Mon, 15 Sep 2008 14:57:11 +0000 (14:57 +0000)]
Define a few structures instead of including a file, add "static"

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5225 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: Privilege check for instructions
aurel32 [Mon, 15 Sep 2008 08:49:15 +0000 (08:49 +0000)]
SH4: Privilege check for instructions

This patch adds check for all SH4 instructions which are
executed only in privileged mode.

(Shin-ichiro KAWASAKI)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5224 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoqemu sh4 nptl support
aurel32 [Mon, 15 Sep 2008 07:43:43 +0000 (07:43 +0000)]
qemu sh4 nptl support

(Michael Trimarchi)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5223 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agosh4: doesn't set the cpu_model_str
aurel32 [Mon, 15 Sep 2008 07:34:45 +0000 (07:34 +0000)]
sh4: doesn't set the cpu_model_str

Fix setting of cpu_model_str for sh4

(Michael Trimarchi)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5222 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: Serial controller improvement
aurel32 [Mon, 15 Sep 2008 07:05:18 +0000 (07:05 +0000)]
SH4: Serial controller improvement

Add receive character feature to SH4 SCIF.
SH4-SCI feature implementation work is left.

(Shin-ichiro KAWASAKI)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5221 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoSH4: sleep instruction bug fix
aurel32 [Mon, 15 Sep 2008 06:42:30 +0000 (06:42 +0000)]
SH4: sleep instruction bug fix

fix a bug on 'sleep' instruction, which have caused halt of idle task.
As i386 'hlt' instruction does, it should save PC before sleep.

(Shin-ichiro KAWASAKI)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5220 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix array subscript above array bounds error
blueswir1 [Sun, 14 Sep 2008 19:16:21 +0000 (19:16 +0000)]
Fix array subscript above array bounds error

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5219 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoppc: Convert op_andi to TCG
aurel32 [Sun, 14 Sep 2008 18:30:32 +0000 (18:30 +0000)]
ppc: Convert op_andi to TCG

Replace op_andi_... with tcg_gen_andi_tl.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5218 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoppc: Convert ctr, lr moves to TCG
aurel32 [Sun, 14 Sep 2008 18:30:23 +0000 (18:30 +0000)]
ppc: Convert ctr, lr moves to TCG

Introduce TCG variables cpu_{ctr,lr} and replace op_{load,store}_{lr,ctr}
with tcg_gen_mov_tl.

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5217 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoalpha: add tests
aurel32 [Sun, 14 Sep 2008 17:18:29 +0000 (17:18 +0000)]
alpha: add tests

This patch creates tests/alpha directory and adds an "hello world"
program as well as two tests.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5216 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMIPS: Fix tlbwi/tlbwr
aurel32 [Sun, 14 Sep 2008 17:09:56 +0000 (17:09 +0000)]
MIPS: Fix tlbwi/tlbwr

In CP0 Index register, bit 31 means 'Probe Failure', while lowest bits
contain the TLB index.

In tlbwi and tlbwr instructions, this Probe Failure bit must be ignored
when reading the TLB index.

Attached patch fixes it.

(Hervé Poussineau)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5215 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoMIPS: remove empty cpu_mips_irqctrl_init()
aurel32 [Sun, 14 Sep 2008 16:38:57 +0000 (16:38 +0000)]
MIPS: remove empty cpu_mips_irqctrl_init()

cpu_mips_irqctrl_init() function in hw/mips_timer.c is empty.
Attached patch removes it, and its callers.

(Hervé Poussineau)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5214 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agotarget-mips: fix warning
aurel32 [Sun, 14 Sep 2008 16:28:26 +0000 (16:28 +0000)]
target-mips: fix warning

Attached patch fixes a warning in cpu_mips_find_by_name().
'name' is a string, so it should be declared as char*, not unsigned char*.

(Hervé Poussineau)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5213 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoalpha: fix helper.h
aurel32 [Sun, 14 Sep 2008 16:09:56 +0000 (16:09 +0000)]
alpha: fix helper.h

the content of target-alpha/helper.h is duplicated twice

(Tristan Gingold)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5212 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoalpha: fix lit sign
aurel32 [Sun, 14 Sep 2008 16:09:15 +0000 (16:09 +0000)]
alpha: fix lit sign

according to the alpha arch reference, the literal field of an operate
instruction is unsigned:

If bit <12> of the instruction is 1, an 8-bit zero-extended literal
constant is formed by bits
<20:13> of the instruction. The l teral is interpreted as a positive
integer bet ween 0 and 255
and is zero-extended to 64 bits.

This patch fixes the mis-interpretation of the literal field.

(Tristan Gingold)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5211 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoqemu_next_deadline_dyntick is only used on Linux and Windows
blueswir1 [Sun, 14 Sep 2008 13:59:34 +0000 (13:59 +0000)]
qemu_next_deadline_dyntick is only used on Linux and Windows

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5210 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoRevert incorrect part of r4574 to avoid unaligned traps with i386 target
blueswir1 [Sun, 14 Sep 2008 13:56:10 +0000 (13:56 +0000)]
Revert incorrect part of r4574 to avoid unaligned traps with i386 target

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5209 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoDisplay TCGCond name in tcg dumper (original patch by Tristan Gingold)
blueswir1 [Sun, 14 Sep 2008 07:45:17 +0000 (07:45 +0000)]
Display TCGCond name in tcg dumper (original patch by Tristan Gingold)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5208 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoEnable gcc flag -Wwrite-strings
blueswir1 [Sun, 14 Sep 2008 06:46:31 +0000 (06:46 +0000)]
Enable gcc flag -Wwrite-strings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5207 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix warnings that would be caused by gcc flag -Wwrite-strings
blueswir1 [Sun, 14 Sep 2008 06:45:34 +0000 (06:45 +0000)]
Fix warnings that would be caused by gcc flag -Wwrite-strings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agousb: Support for removing device by host addr, improved auto filter syntax (Max Krasn...
aliguori [Sun, 14 Sep 2008 01:07:41 +0000 (01:07 +0000)]
usb: Support for removing device by host addr, improved auto filter syntax (Max Krasnyansky)

This patch adds support for removing USB devices by host address.
Which is usefull for things like libvirtd because there is no easy way to
find guest USB address of the host device.
In other words you can now do:
   usb_add host:3.5
   ...
   usb_del host:3.5
Before the patch 'usb_del' did not support 'host:' notation.

----
Syntax for specifying auto connect filters has been improved.
Old syntax was
    host:bus.dev
    host:pid:vid
New syntax is
    host:auto:bus.dev[:pid:vid]
In both the cases any attribute can be set to "*".

New syntax is more flexible and lets you do things like
    host:3.*:5533:* /* grab any device on bus 3 with vendor id 5533 */

It's now possible to remove auto filters. For example:
    usb_del host:auto:3.*:5533:*

Active filters are printed after all host devices in 'info usb' output.
Which now looks like this:

  Device 1.1, speed 480 Mb/s
    Hub: USB device 1d6b:0002, EHCI Host Controller
  Device 1.4, speed 480 Mb/s
    Class 00: USB device 1058:0704, External HDD
  Auto filters:
    Device 3.* ID *:*

Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5205 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agohusb: Make control transactions asynchronous (Max Krasnyansky)
aliguori [Sun, 14 Sep 2008 01:06:09 +0000 (01:06 +0000)]
husb: Make control transactions asynchronous (Max Krasnyansky)

USB is 99.8% async now :). 0.2% is the three control requests that
we need to execute synchronously. We could off-load that to a thread
or something but it's not worth the pain since those requests are
performed only during device initialization (ie when device is
connected to the VM).

The change is a bit bigger than I wanted due to the fact that generic
handle_packet()/handle_control() interface was not designed for
async transactions. So I ended up adding custom handle_packet()
code to usb-linux. We can make that generic if/when some other
component needs it.

Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5204 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoUse 64 bit loads for tlb addend only if addend size is 64 bits
blueswir1 [Sat, 13 Sep 2008 20:07:53 +0000 (20:07 +0000)]
Use 64 bit loads for tlb addend only if addend size is 64 bits

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5203 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix stack alignment on Sparc32 host
blueswir1 [Sat, 13 Sep 2008 20:05:32 +0000 (20:05 +0000)]
Fix stack alignment on Sparc32 host

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5202 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoFix mulscc with high bits set in either src1 or src2
blueswir1 [Sat, 13 Sep 2008 17:20:52 +0000 (17:20 +0000)]
Fix mulscc with high bits set in either src1 or src2

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5201 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agoLet snapshot work with protocols
aliguori [Fri, 12 Sep 2008 17:54:13 +0000 (17:54 +0000)]
Let snapshot work with protocols

realpath will horribly mangle a protocol so avoid calling it if the backing
file is a protocol.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5200 c046a42c-6fe2-441c-8c8c-71466251a162

16 years agouhci: Change default transaction lifetime to 32 frames (Max Krasnyansky)
aliguori [Thu, 11 Sep 2008 19:42:00 +0000 (19:42 +0000)]
uhci: Change default transaction lifetime to 32 frames (Max Krasnyansky)

Transaction lifetime was originally set to 10 frames. That was an arbitrary
number I picked without much thinking :).
I'm changing that to 32 frames because things like interrupt transfers
and such are scheduled at that rate. It seems like 1/32 is accepted as
lowest supported rate. OHCI, for example, defines exactly 32 interrupt
heads.

While testing USB webcam under XP I noticed that interrupt transactions were
being canceled and then resubmitted on a regular basis, which works but is a
waste of CPU cycles. This change fixes that.
All other devices I have are not affected.

Signed-off-by: Max Krasnyansky <maxk@kernel.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5199 c046a42c-6fe2-441c-8c8c-71466251a162