aliguori [Fri, 31 Oct 2008 19:10:00 +0000 (19:10 +0000)]
Move network redirection code out of vl.c and into net.c
Mostly code motion.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5581
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 18:49:55 +0000 (18:49 +0000)]
Move CharDriverState code out of vl.c
The motivating goal behind this is to allow other tools to use the CharDriver
code. This patch is pure code motion except for the Makefile changes and the
copyright/header in qemu-char.c.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5580
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 18:44:40 +0000 (18:44 +0000)]
Move some declarations around in the QEMU CharDriver code
The goal of this series is to move the CharDriverState code out of vl.c and
into its own file, qemu-char.c. This patch moves around some declarations so
the next patch can be pure code motion.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5579
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 18:40:25 +0000 (18:40 +0000)]
Increase default IO timeout from 10ms to 5s
With the recent changes to the main loop, we no longer have unconditional
polling. This means we can now sleep in select() for much longer than we
previously did. This patch increases our select() sleep time from 10ms to 5s
which is effectively unlimited since we're going to wake up sooner than that
in almost all circumstances.
With this patch, I see the number of wake-ups with an idle dynamic ticks guest
drop from 80 per second to about 15 times per second.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5578
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 18:07:17 +0000 (18:07 +0000)]
Main loop fixes/cleanup
Tidy up win32 main loop bits, allow timeout >= 1s, and force timeout to 0 if
there is a pending bottom half.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5577
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 17:42:00 +0000 (17:42 +0000)]
Clarify qemu_bh_schedule_idle() usage
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5576
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 17:31:29 +0000 (17:31 +0000)]
Implement "info chardev" command. (Gerd Hoffmann)
This patch makes qemu keep track of the character devices in use and
implements a "info chardev" monitor command to print a list.
qemu_chr_open() sticks the devices into a linked list now. It got a new
argument (label), so there is a name for each device. It also assigns a
filename to each character device. By default it just copyes the
filename passed in. Individual drivers can fill in something else
though. qemu_chr_open_pty() sets the filename to name of the pseudo tty
allocated.
Output looks like this:
(qemu) info chardev
monitor: filename=unix:/tmp/run.sh-26827/monitor,server,nowait
serial0: filename=unix:/tmp/run.sh-26827/console,server
serial1: filename=pty:/dev/pts/5
parallel0: filename=vc:640x480
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5575
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 17:28:00 +0000 (17:28 +0000)]
fix bdrv_aio_read API breakage in qcow2 (Andrea Arcangeli)
I noticed the qemu_aio_flush was doing nothing at all. And a flood of
cmd_writeb commands leading to a noop-invocation of qemu_aio_flush
were executed.
In short all 'memset;goto redo' places must be fixed to use the bh and
not to call the callback in the context of bdrv_aio_read or the
bdrv_aio_read model falls apart. Reading from qcow2 holes is possible
with phyisical readahead (kind of breada in linux buffer cache).
This is needed at least for scsi, ide is lucky (or it has been
band-aided against this API breakage by fixing the symptom and not the
real bug).
Same bug exists in qcow of course, can be fixed later as it's less
urgent.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5574
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 17:25:56 +0000 (17:25 +0000)]
Make DMA bottom-half driven (v2)
The current DMA routines are driven by a call in main_loop_wait() after every
select.
This patch converts the DMA code to be driven by a constantly rescheduled
bottom half. The advantage of using a scheduled bottom half is that we can
stop scheduling the bottom half when there no DMA channels are runnable. This
means we can potentially detect this case and sleep longer in the main loop.
The only two architectures implementing DMA_run() are cris and i386. For cris,
I converted it to a simple repeating bottom half. I've only compile tested
this as cris does not seem to work on a 64-bit host. It should be functionally
identical to the previous implementation so I expect it to work.
For x86, I've made sure to only fire the DMA bottom half if there is a DMA
channel that is runnable. The effect of this is that unless you're using sb16
or a floppy disk, the DMA bottom half never fires.
You probably should test this malc. My own benchmarks actually show slight
improvement by it's possible the change in timing could affect your demos.
Since v1, I've changed the code to use a BH instead of a timer. cris at least
seems to depend on faster than 10ms polling.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5573
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 31 Oct 2008 17:24:21 +0000 (17:24 +0000)]
Make bottom halves more robust
Bottom halves are supposed to not complete until the next iteration of the main
loop. This is very important to ensure that guests can not cause stack
overflows in the block driver code. Right now, if you attempt to schedule a
bottom half within a bottom half callback, you will enter an infinite loop.
This patch uses the same logic that we use for the IOHandler loop to make the
bottom half processing robust in list manipulation while in a callback.
This patch also introduces idle scheduling for bottom halves. qemu_bh_poll()
returns an indication of whether any bottom halves were successfully executed.
qemu_aio_wait() uses this to immediately return if a bottom half was executed
instead of waiting for a completion notification.
qemu_bh_schedule_idle() works around this by not reporting the callback has
run in the qemu_bh_poll loop. qemu_aio_wait() probably needs some refactoring
but that would require a larger code audit. idle scheduling seems like a good
compromise.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5572
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 29 Oct 2008 14:37:18 +0000 (14:37 +0000)]
Use qemu_gettimeofday.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5571
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Wed, 29 Oct 2008 14:16:31 +0000 (14:16 +0000)]
Fix restore of older snapshots for target-i386 on big endian hosts
A target_ulong may be 64-bit. Passing it to a function expecting a 32-bit
pointer is wrong and unfortunately happens to work for x86. It won't work on
big endian hosts though. Change the code to work properly on all hosts.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5570
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Tue, 28 Oct 2008 18:22:59 +0000 (18:22 +0000)]
Use locally defined structure.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5569
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Tue, 28 Oct 2008 17:55:32 +0000 (17:55 +0000)]
Sun4c cleanups (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5568
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Tue, 28 Oct 2008 14:08:49 +0000 (14:08 +0000)]
fix off-by-one generating vmdk backing files (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5567
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 10:59:59 +0000 (10:59 +0000)]
Set default max_cpus to one.
Clean-up machine definitions.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5566
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 10:39:39 +0000 (10:39 +0000)]
Fix return value printing for shmat (Lauro Ramos Venancio).
The shmat syscall returns an address, so we must use the
print_syscall_ret_addr function.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5565
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 10:26:29 +0000 (10:26 +0000)]
Recvmsg must return the number of bytes received (Lauro Ramos Venancio).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5564
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 10:24:11 +0000 (10:24 +0000)]
page_check_range: fix wrap around test (Lauro Ramos Venancio).
Move up the warp around test because line
'end = TARGET_PAGE_ALIGN(start+len);'
can interfere with it.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5563
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 10:21:03 +0000 (10:21 +0000)]
Fix iovec for the case with invalid elements (Lauro Ramos Venancio).
We must call the writev even if an iovec element is invalid. For
example, if the second element is invalid, the linux process the first
one.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5562
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 10:18:28 +0000 (10:18 +0000)]
Use the host exit syscall for exiting (Lauro Ramos Venancio).
We can't call the libc _exit function because it calls the exit_group
host syscall. We must call directly the exit host syscall.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5561
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Tue, 28 Oct 2008 00:13:15 +0000 (00:13 +0000)]
CRIS: Plug more temp leaks.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5560
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 00:11:06 +0000 (00:11 +0000)]
Control + i and [tab] share keycode in curses, simulate [tab].
Spotted by Blue Swirl.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5559
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Tue, 28 Oct 2008 00:03:28 +0000 (00:03 +0000)]
Fix cpuid ext_features value for Atom N270 (Blue Swirl).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5558
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 27 Oct 2008 22:50:39 +0000 (22:50 +0000)]
target-ppc: use consistent names for variables
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5557
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 27 Oct 2008 22:50:31 +0000 (22:50 +0000)]
target-ppc: indentation fixes
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5556
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 27 Oct 2008 22:50:22 +0000 (22:50 +0000)]
target-ppc: convert rotation instructions to TCG
Also fix rlwimi and rldimi for corner cases.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5555
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 21:10:26 +0000 (21:10 +0000)]
CRIS: Plug a few temp leaks.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5554
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 20:44:27 +0000 (20:44 +0000)]
ETRAX-FS: Process outgoing DMA channels until EOL.
For outgoing DMA channels, keep processing descriptors until hitting end
of list.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5553
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 20:24:59 +0000 (20:24 +0000)]
CRIS: Remove cpu_T.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5552
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Mon, 27 Oct 2008 19:49:12 +0000 (19:49 +0000)]
Ansify to please sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5551
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 16:46:29 +0000 (16:46 +0000)]
CRIS: Avoid more cpu_T usage.
* Explicit operand passing to prep_alu_r.
* Avoid some more cpu_T[] usage.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5550
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Mon, 27 Oct 2008 15:56:56 +0000 (15:56 +0000)]
Move sun4c to its own hwdef (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5549
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 13:55:28 +0000 (13:55 +0000)]
CRIS: Avoid cpu_T[1] for move_r.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5548
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 13:52:44 +0000 (13:52 +0000)]
CRIS: Avoid using cpu_T[0] for testing condition codes.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5547
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Mon, 27 Oct 2008 12:39:30 +0000 (12:39 +0000)]
CRIS: Add branch-free versions of abs, lsl, lsr and asr.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5546
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Sun, 26 Oct 2008 23:18:06 +0000 (23:18 +0000)]
CRIS: Correct tcg globals allocation for 64bit hosts.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5545
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 20:33:16 +0000 (20:33 +0000)]
Preliminary BSD user emulator support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5544
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 19:13:20 +0000 (19:13 +0000)]
Update from binutils 2.17
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5543
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 19:10:38 +0000 (19:10 +0000)]
Document the binutils source files used in constructing sparc-dis.c
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5542
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 16:40:27 +0000 (16:40 +0000)]
Add "const"
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5541
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 15:26:09 +0000 (15:26 +0000)]
Fix inline use warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5540
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 13:43:07 +0000 (13:43 +0000)]
Fix undeclared symbol warnings from sparse
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5539
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 10:22:11 +0000 (10:22 +0000)]
Fix incorrect use of pstrcpy (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5538
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sun, 26 Oct 2008 09:54:50 +0000 (09:54 +0000)]
Fix undefined pthread_sigmask warning on FreeBSD (Juergen Lock)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5537
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 13:48:59 +0000 (13:48 +0000)]
Change freeing method because the allocation function was changed in r5532
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5536
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:47:20 +0000 (11:47 +0000)]
Silence warnings about unused variables
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5535
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:26:41 +0000 (11:26 +0000)]
Suppress a GCC warning about unused function
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5534
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:25:48 +0000 (11:25 +0000)]
Fix GCC 4 signedness warning
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5533
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:23:27 +0000 (11:23 +0000)]
Replace uses of strndup (a GNU extension) with Qemu pstrdup
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5532
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:21:28 +0000 (11:21 +0000)]
Replace uses of strncpy (a GNU extension) with Qemu pstrcpy
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:19:14 +0000 (11:19 +0000)]
Fix undefined pthread_sigmask warning on OpenBSD
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5530
c046a42c-6fe2-441c-8c8c-
71466251a162
blueswir1 [Sat, 25 Oct 2008 11:18:12 +0000 (11:18 +0000)]
Use snprintf to please OpenBSD linker
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5529
c046a42c-6fe2-441c-8c8c-
71466251a162
balrog [Sat, 25 Oct 2008 00:10:20 +0000 (00:10 +0000)]
Fix a bad memcpy length (Bruce Rogers).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5528
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 24 Oct 2008 22:10:31 +0000 (22:10 +0000)]
Fix whitespace in migration code.
Replace tabs with spaces.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5527
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 24 Oct 2008 22:08:22 +0000 (22:08 +0000)]
Fix possibly SEGV in tcp migration error case.
Spotted by hpoussin.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5526
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 24 Oct 2008 21:55:17 +0000 (21:55 +0000)]
Live migration for Win32 (Hervé Poussineau)
This patch fixes migration so that it works on Win32. This requires using
socket specific calls since sockets cannot be treated like file descriptors
on win32.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5525
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Fri, 24 Oct 2008 14:11:41 +0000 (14:11 +0000)]
Fix windows build after migration changes
The live migration code broke the windows build. As part of this
change, I've switched the BIOS path to C:\Program Files\Qemu instead of
/c/Program Files/Qemu. The later is only valid when launching from MSYS
but the former is always valid.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5524
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 24 Oct 2008 13:12:52 +0000 (13:12 +0000)]
Add missing return statement (fixes compiler warning).
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5523
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 24 Oct 2008 13:12:42 +0000 (13:12 +0000)]
hw/pc: don't register the memory hole as unassigned twice
Since revision 5228, we don't register the memory hole (0xa00000 to
0xfffff) anymore. As a consequence, we don't need to register it again
as unassigned.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5522
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Fri, 24 Oct 2008 12:03:16 +0000 (12:03 +0000)]
Fix typos in PPC TCG conversion.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5521
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Fri, 24 Oct 2008 09:18:39 +0000 (09:18 +0000)]
ETRAX-FS: Drop DMA polling for ethernet.
* Drop DMA poll mode. Instead immediately push rx frames straight into the DMA
without waiting for DMA_run to poll them of the fifo.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5520
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Thu, 23 Oct 2008 13:52:00 +0000 (13:52 +0000)]
protect exec-all.h frm multiple inclusion (Glauber Costa)
Signed-off-by: Glauber Costa <glommer@redhat.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5519
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 21:42:54 +0000 (21:42 +0000)]
Additional exclusive load/store instruction are v6K, not v6T2.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5518
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 20:35:54 +0000 (20:35 +0000)]
Fix ARMv6t2 strex instructions.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5517
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Wed, 22 Oct 2008 19:58:32 +0000 (19:58 +0000)]
ETRAX-FS: Add support for passing kernel command lines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5516
c046a42c-6fe2-441c-8c8c-
71466251a162
edgar_igl [Wed, 22 Oct 2008 19:35:08 +0000 (19:35 +0000)]
ETRAX-FS: Correct booting of elf linux images from ram.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5515
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 19:22:30 +0000 (19:22 +0000)]
Fix ARMv6 translation table base address calculation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5514
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 18:20:20 +0000 (18:20 +0000)]
Use load address when loading ELF images.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5513
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 16:14:08 +0000 (16:14 +0000)]
Optimize redundant cp15 coprocessor access control register writes.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5512
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 15:55:18 +0000 (15:55 +0000)]
Update old fashioned function prototypes.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5511
c046a42c-6fe2-441c-8c8c-
71466251a162
pbrook [Wed, 22 Oct 2008 15:11:31 +0000 (15:11 +0000)]
* Use function pointers for symbol lookup (currently for elf32 and elf64,
could be expanded). This also fixes the bug with mips elf64 symbols
in current Qemu trunk.
* Use quicksort and binary search for symbol lookup.
* Remove unneeded entries from symbol table. This reduced a typical table
size (linux mips kernel) from 1764487 to 11656 entries.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5510
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Tue, 21 Oct 2008 16:34:20 +0000 (16:34 +0000)]
Keep usb host scanning from leaking file descriptors
If the first case does not succeed, then the usb scanning code will leak file
descriptors on every scan.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5509
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 16:31:31 +0000 (16:31 +0000)]
target-ppc: convert branch related instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5508
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Tue, 21 Oct 2008 16:27:28 +0000 (16:27 +0000)]
Fix broken USB support for Linux host (Bjorn Danielsson)
Make "host:" usb devices work again on systems that have the
file /proc/bus/usb/devices. This was broken in r5441 due to
incorrect logic for the USB_FS_SYS case in usb_host_scan().
Signed-off-by: Bjorn Danielsson <bdq@dax.nu>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5507
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:31:27 +0000 (11:31 +0000)]
target-ppc: convert logical instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5506
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:31:14 +0000 (11:31 +0000)]
target-ppc: convert crf related instructions to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5505
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:30:45 +0000 (11:30 +0000)]
TCG: add tcg_const_local_tl()
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5504
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:29:55 +0000 (11:29 +0000)]
target-ppc: use the new TCG logical operations
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5503
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:29:11 +0000 (11:29 +0000)]
target-alpha: use the new TCG logical operations
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5502
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:28:59 +0000 (11:28 +0000)]
TCG: add logical operations found on alpha and powerpc processors
- andc_i32/i64 t0, t1, t2
- eqv_i32/i64 t0, t1, t2
- nand_i32/i64 t0, t1, t2
- nor_i32/i64 t0, t1, t2
- orc_i32/i64 t0, t1, t2
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5501
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 21 Oct 2008 11:28:46 +0000 (11:28 +0000)]
target-ppc: Convert XER accesses to TCG
Define XER bits as a single register and access them individually to
avoid defining 5 32-bit registers (TCG doesn't permit to map 8-bit
registers).
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5500
c046a42c-6fe2-441c-8c8c-
71466251a162
bellard [Fri, 17 Oct 2008 17:31:57 +0000 (17:31 +0000)]
added explicit license
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5499
c046a42c-6fe2-441c-8c8c-
71466251a162
bellard [Fri, 17 Oct 2008 17:28:58 +0000 (17:28 +0000)]
allow SLIRP to make an ARP request to get the client MAC address. It is useful if an inbound connection is done to a VM which did not send outbound IP packets
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5498
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 17 Oct 2008 08:08:56 +0000 (08:08 +0000)]
scsi-generic: correct error management
this patch allows to fully use a tape device connected to qemu through
the scsi-generic interface.
Previous patch introduced tape SCSI commands management, this one
improve error case management:
- the SCSI controller command completion must be called with the status
value, not the sense value. In the case of scsi-generic, the SCSI status
is given by the field status of sg_io_hdr_t (the value is left shifted
by one regarding status codes defined in /usr/include/scsi/scsi.h)
- when a read is aborted due to a mark/EOF/EOD/EOM, the len reported to
controller can be 0. LSI controller emulation doesn't know how to manage
this. A workaround found is to call the completion routine with
SCSI_REASON_DONE just after calling it with SCSI_REASON_DATA with len=0.
This patch also manages correctly the block size of the tape device.
This patch has been tested with a real tape device "HP C5683A", linux
guest (debian etch) and tools like "mt", "tar" and "btape".
Windows guest is not better supported than before...
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5497
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Fri, 17 Oct 2008 08:08:48 +0000 (08:08 +0000)]
i386/SVM: return amount of ASIDs
With SVM the TLB supports tagging to distinguish TLB entries from
different virtual CPUs. This tag is called an ASID. The amount of ASIDs is
given in EBX of the SVM-CPUID-leaf. Currently we return 0, which might
break hypervisors. Let's better return something >0 here, say 0x10.
Since we're flushing the complete TLB on every VM entry and exit we're not
making use of the ASID information anyways.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5496
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Wed, 15 Oct 2008 22:25:21 +0000 (22:25 +0000)]
PPC: fix dcbi instruction
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5495
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Wed, 15 Oct 2008 17:00:45 +0000 (17:00 +0000)]
PPC: convert SPE logical instructions to TCG
(Nathan Froyd)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5494
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Wed, 15 Oct 2008 17:00:37 +0000 (17:00 +0000)]
ppc: convert integer load/store to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5493
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Wed, 15 Oct 2008 17:00:29 +0000 (17:00 +0000)]
target-ppc: fix a TCG local variable creation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5492
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Wed, 15 Oct 2008 17:00:18 +0000 (17:00 +0000)]
PPC: convert SPE effective address computation to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5491
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 14 Oct 2008 19:55:54 +0000 (19:55 +0000)]
PPC: convert effective address computation to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5490
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 14 Oct 2008 19:23:35 +0000 (19:23 +0000)]
gdbstub: remove unused local variable
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5489
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Tue, 14 Oct 2008 19:20:52 +0000 (19:20 +0000)]
target-i386: Add Core Duo Definition
This patch adds a CPU definition for the Core Duo CPU. I tried to
resemble the original as closely as possible and document what features
are missing still. This patch enables the use of a recent CPU definition
on 32 bit platforms.
It also fixes two issues that went along the line:
- invalid xlevel in core2duo spec
While looking though the CPUIDs again, I found that xlevel is actually 8.
- non-PSE36 support
The CoreDuo CPUID does not expose the PSE36 capability, but CPUID
0x80000008 is tied to 36 bits. This broke Windows XP installation for
me, so I just set it to 32 bits width when PSE36 is not available. The
original CPU also exposes 32 bit width in CPUID 0x80000008.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5488
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Tue, 14 Oct 2008 18:14:47 +0000 (18:14 +0000)]
Fix previous commit (spotted by Robert Riebisch).
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5487
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Tue, 14 Oct 2008 18:00:38 +0000 (18:00 +0000)]
Define O_DSYNC as O_SYNC if necessary.
O_DSYNC isn't available on OS X.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5486
c046a42c-6fe2-441c-8c8c-
71466251a162
aliguori [Tue, 14 Oct 2008 14:42:54 +0000 (14:42 +0000)]
Expand cache= option and use write-through caching by default
This patch changes the cache= option to accept none, writeback, or writethough
to control the host page cache behavior. By default, writethrough caching is
now used which internally is implemented by using O_DSYNC to open the disk
images. When using -snapshot, writeback is used by default since data integrity
it not at all an issue.
cache=none has the same behavior as cache=off previously. The later syntax is
still supported by now deprecated. I also cleaned up the O_DIRECT
implementation to avoid many of the #ifdefs.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5485
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 13 Oct 2008 21:08:55 +0000 (21:08 +0000)]
linux-user: implement msg* syscalls
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5484
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 13 Oct 2008 21:08:44 +0000 (21:08 +0000)]
linux-user: fix and cleanup IPCOP_msg* ipc calls handling
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5483
c046a42c-6fe2-441c-8c8c-
71466251a162
aurel32 [Mon, 13 Oct 2008 21:08:34 +0000 (21:08 +0000)]
open() can also return EPERM for O_RDWR on a readonly device
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5482
c046a42c-6fe2-441c-8c8c-
71466251a162