qemu
15 years agoParallel Port Direction Fix
aurel32 [Fri, 22 Aug 2008 08:57:09 +0000 (08:57 +0000)]
Parallel Port Direction Fix

The direction bit in the control register should not be directly

set using PPWCONTROL. The kernel gives the following debug message.

    parport0 (ppdev0): use data_reverse for this!

More over setting the data pins to forward mode does not work,
perhaps a bug in the Linux PP driver. The right way to do this is
to use PPDATADIR to set the direction. The patch checks if the
user is toggling the direction bit, and invokes PPDATADIR to
do the job.

Signed-off-by: Vijay Kumar B <vijaykumar@bravegnu.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years ago*FreeBSD: pulseaudio is a possible audio driver
aurel32 [Thu, 21 Aug 2008 23:03:15 +0000 (23:03 +0000)]
*FreeBSD: pulseaudio is a possible audio driver

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agoPC: suggest a workaround to boot a kernel without hard-disk
aurel32 [Thu, 21 Aug 2008 22:52:22 +0000 (22:52 +0000)]
PC: suggest a workaround to boot a kernel without hard-disk

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agoIgnore IDE command if issued while IDE is busy (Gleb Natapov)
aliguori [Thu, 21 Aug 2008 22:40:00 +0000 (22:40 +0000)]
Ignore IDE command if issued while IDE is busy (Gleb Natapov)

Feature, Sector Count, LBA Low/Mid/High and Device registers should be
written only when both BSY and DRQ are cleared to zero.
Command register shall only be written when BSY and DRQ are set to zero
for all commands except DEVICE RESET.
Data Port register shall be accessed for host PIO data transfer only when
DRQ is set to one.

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

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

15 years agoAdd image format option for USB mass-storage devices
aurel32 [Thu, 21 Aug 2008 22:24:32 +0000 (22:24 +0000)]
Add image format option for USB mass-storage devices

(fix CVE-2008-1945)

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agomove GUI_REFRESH_INTERVAL define from vl.c to console.h (Gerd Hoffmann)
aliguori [Thu, 21 Aug 2008 20:12:05 +0000 (20:12 +0000)]
move GUI_REFRESH_INTERVAL define from vl.c to console.h (Gerd Hoffmann)

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@5058 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoadd container_of() macro to osdep.h (Gerd Hoffmann)
aliguori [Thu, 21 Aug 2008 20:11:11 +0000 (20:11 +0000)]
add container_of() macro to osdep.h (Gerd Hoffmann)

From linux kernel sources, xen bits will use it, put it
into a place where others can see and use it too ;)

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@5057 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoadd DisplayState->idle (Samuel Thibault)
aliguori [Thu, 21 Aug 2008 20:08:55 +0000 (20:08 +0000)]
add DisplayState->idle (Samuel Thibault)

Add idle field to DisplayState struct, so drivers can figure
the display is idle and take advantage of that.

The xen framebuffer driver will use this to communicate the
idle state to the guest, so it knows it can stop doing updates
to a virtual display which is invisible anyway.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoHandle terminating signals (Gerd Hoffmann)
aliguori [Thu, 21 Aug 2008 20:08:03 +0000 (20:08 +0000)]
Handle terminating signals (Gerd Hoffmann)

This patch makes qemu handle signals better.  It sets the request_shutdown
flag, making the main_loop exit and qemu taking the usual exit route, with
atexit handlers being called and so on, instead of qemu just being killed
by the signal.

To avoid calling vm_start() from the signal handler main_loop() got an
additional check so qemu_system_shutdown_request() works even when the
vm is in stopped state.

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@5055 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agouhci: fixes for save/load-vm (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:33:09 +0000 (19:33 +0000)]
uhci: fixes for save/load-vm (Max Krasnyansky)

For some reason we were not registering save/load-vm handler for piix3
flavor of UHCI and hence save/load was broken.

Async transactions need to be canceled when we save the VM because there
is no way we can save/restore all that state. Since we do not mess the
original TD/QH the driver will simply resubmit the transfers.

Tested with Windows XP-SP2 running under QEMU/KQEMU.

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@5054 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohusb: Fixup printfs and stuff based on the review comments (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:32:29 +0000 (19:32 +0000)]
husb: Fixup printfs and stuff based on the review comments (Max Krasnyansky)

Addressing Anthony's comments regarding printf and stuff.

Anthony, if you you want I can fold this commit and resend
the original patch.

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@5053 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohusb: remove disconnect detection timer (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:31:52 +0000 (19:31 +0000)]
husb: remove disconnect detection timer (Max Krasnyansky)

On top of my previous USB patchset.

Async completion handler can detect device disconnects without polling.
We do not need the timer anymore.

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@5052 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohusb: rewrite Linux host USB layer, fully async operation (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:31:10 +0000 (19:31 +0000)]
husb: rewrite Linux host USB layer, fully async operation (Max Krasnyansky)

This is a follow up to the async UHCI patch. Both BULK and ISOC transactions
are now fully asynchrounous. I left CONTROL synchronous for now, ideally
we want it to be async too and it should not be that hard to do now.

This patch obviously requires UHCI patch. The combo has been tested with
various devices. See the UHCI patch description for list of the devices.
Most of the testing was done with the KVM flavor of QEMU.

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@5051 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agouhci: rewrite UHCI emulator, fully async operation with multiple outstanding transact...
aliguori [Thu, 21 Aug 2008 19:30:31 +0000 (19:30 +0000)]
uhci: rewrite UHCI emulator, fully async operation with multiple outstanding transactions (Max Krasnyansky)

This is esentially a re-write of the QEMU UHCI layer. My initial goal
was to support fully async operation with multiple outstanding async
transactions. Along the way I realized that I can greatly simplify
and cleanup the overall logic. There was a lot of duplicate and confusing
code in the UHCI data structure parsing and other places.
We were actually violating UHCI spec in handling async ISOC transaction
(host controller is not supposed to write into the frame pointer).

The reason I wanted to support fully async operation is because current
synchronous version is unusable with most devices exported from host
(via usb-linux.c). Transactions take a long time and the whole VM becomes
slow as hell.

Current async support is very rudimentory and for the most part
non-functional. Single transaction at a time is simply not enough. I have
a device for which XP driver submits both IN and OUT packets at the same
time. IN packet always times out unless OUT packet makes it to the device.
Hence we must be able to process both in order for that device to work.

The new code is backwards compatible and was first tested agains original
synchronous usb-linux.c and builtin usb devices like tablet which is also
synchronous. Rewrite of the usb-linux.c is coming up next.

Async support was tested against various XP versions (ie XP, SP2, SP3) and
a bunch of different USB devices: serial port controllers, mice, keyboard,
JTAG dongles (from Xilinx and Altera).

ISOC support was only lighly tested and needs more work. It's not any worse
than current code though.

UHCI parser changes are probably somewhat hard to review without the
understanding of the UHCI spec.
The async design should be fairly easy to follow. Basically we have a list
of async objects for each pending transfer. Async objects are tagged with
the original TD (transfer descriptor) address and token. We now support
unlimited number of outstanding isoc and one outstanding bulk/intr/ctrl
transfer per QH (queue head). UHCI spec does not have a clear protocol for
the cancelation of the trasfer requests. Driver can yank out TDs on any
frame boundary. In oder to handle that I added somewhat fancy TD validation
logic logic to avoid unnecessary cancelations.

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@5050 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agousb: generic packet handler cleanup and documentation (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:29:38 +0000 (19:29 +0000)]
usb: generic packet handler cleanup and documentation (Max Krasnyansky)

A bit better documentation of the USB device API, namely
return codes.
Rewrite of usb_generic_handle_packet() to make it more
reable and easier to follow.

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@5049 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohusb: support for USB host device auto connect (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:28:55 +0000 (19:28 +0000)]
husb: support for USB host device auto connect (Max Krasnyansky)

QEMU can now automatically grab host USB devices that match the filter.
For now I just extended 'host:X.Y' and 'host:VID:PID' syntax to handle
wildcards. So for example if you do something like
   usb_add host:5.*
QEMU will automatically grab any non-hub device with host address 5.*.

Same with the 'host:PID:*', we grab any device that matches PID.

Filtering itself is very generic so we can probably add more elaborate
syntax like 'host:BUS.ADDR:VID:PID'. So that we can do 'host:5.*:6000:*'.

Anyway, it's implemented using a periodic timer that scans host devices
and grabs those that match the filter. Timer is started when the first
filter is added.

We now keep the list of all host devices that we grabbed to make sure that
we do not grab the same device twice.

btw It's currently possible to grab the same host device more than once.
ie You can just do "usb_add host:1.1" more than once, which of course does
not work. So this patch fixes that issue too.

Along with auto disconnect patch that I send a minute ago the setup is very
seamless now. You can just allocate some usb ports to the VMs and plug/unplug
devices at any time.

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@5048 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agohusb: support for USB host device auto disconnect (Max Krasnyansky)
aliguori [Thu, 21 Aug 2008 19:27:48 +0000 (19:27 +0000)]
husb: support for USB host device auto disconnect (Max Krasnyansky)

I got really annoyed by the fact that you have to manually do
usb_del in the monitor when host device is unplugged and decided
to fix it :)

Basically we now automatically remove guest USB device
when the actual host device is disconnected.

At first I've extended set_fd_handlerX() stuff to support checking
for exceptions on fds. But unfortunately usbfs code does not wake up
user-space process when device is removed, which means we need a
timer to periodically check if device is still there. So I removed
fd exception stuff and implemented it with the timer.

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@5047 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix windows build
aliguori [Thu, 21 Aug 2008 19:25:45 +0000 (19:25 +0000)]
Fix windows build

Right now, the Windows build is broken because of NBD.  Using a mingw32 cross
compiler is also badly broken.

This patch fixes the Windows build by stubbing out NBD support until someone
fixes it for Windows.  It also santizing the mingw32 cross compiler support
by replacing the --enable-mingw32 option with a compiler check to determine
if we're on windows or not.

Also remove the weird SDL pseudo-detection for mingw32 using a cross compiler.
The hardcoded sdl-config name is seemly arbitrary.  If you cross compiler SDL
correctly and modify your PATH variable appropriately, it will Just Work when
cross compiling.

The audio driver detection is also broken for cross compiling so you have to
specify the audio drivers explicitly for now.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoFix OSS on OpenBSD
blueswir1 [Thu, 21 Aug 2008 18:00:53 +0000 (18:00 +0000)]
Fix OSS on OpenBSD

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

15 years agoFix OpenBSD linker warnings
blueswir1 [Thu, 21 Aug 2008 17:58:08 +0000 (17:58 +0000)]
Fix OpenBSD linker warnings

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

15 years agoFix wrwim masking (Luis Pureza)
blueswir1 [Thu, 21 Aug 2008 17:34:42 +0000 (17:34 +0000)]
Fix wrwim masking (Luis Pureza)

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

15 years agoUse initial CPU definition structure for some CPU fields instead of copying
blueswir1 [Thu, 21 Aug 2008 17:33:42 +0000 (17:33 +0000)]
Use initial CPU definition structure for some CPU fields instead of copying
them around, based on patch by Luis Pureza.

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

15 years agoDe-assert PIC IRQs properly at APIC level
aurel32 [Thu, 21 Aug 2008 03:14:52 +0000 (03:14 +0000)]
De-assert PIC IRQs properly at APIC level

[ Taking latest isapc changes into account. ]

Ensure that PIC-delivered IRQs are properly de-asserted in case the APIC
is in EXTINT or FIXED mode (with level-triggering selected) on LINT0.
Fixes EFI-BIOS boot issues.

This patch also cleans up a bit the interface between PIC and APIC,
making apic_local_deliver private again.

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@5041 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDe-assert ISA PIC IRQs properly
aurel32 [Thu, 21 Aug 2008 03:14:41 +0000 (03:14 +0000)]
De-assert ISA PIC IRQs properly

[ Taking latest isapc changes into account. ]

In case the PIC IRQ gets de-asserted on an isapc machine, we also have
to reset CPU_INTERRUPT_HARD. This is what older qemu (before the
routing-through-APIC changes) used to do as well.

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@5040 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agobios: update from bochs release 2.3.7
aurel32 [Thu, 21 Aug 2008 03:14:29 +0000 (03:14 +0000)]
bios: update from bochs release 2.3.7

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

15 years agoRelax qemu_ld/st constraints for !SOFTMMU case
malc [Thu, 21 Aug 2008 01:14:07 +0000 (01:14 +0000)]
Relax qemu_ld/st constraints for !SOFTMMU case

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

15 years agoKludge to support linux-user on a PPC64
malc [Wed, 20 Aug 2008 22:39:28 +0000 (22:39 +0000)]
Kludge to support linux-user on a PPC64

Some headers (e.g. signal.h) include asm/elf.h and the chaos of macro
redefinitions ensues, this kludge avoids it.

Alternative way to fight that would be to change all ELF_XXX and some
other definitions to QEMU_ELF_XXX or something to that effect.

This patch concludes the quest for enabling linux-user on PPC64,
however, since qemu_mallocz uses mmap and, at least on this system,
mmap tends to return values that do not fit into 32bit, emulation for
32bit targets does not work without some hacks wich are to disgusting
to commit (and as `man mmap' tells us MAP_32BIT is only implemented on
X86_64)

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

15 years agoFix tswap size
malc [Wed, 20 Aug 2008 22:39:26 +0000 (22:39 +0000)]
Fix tswap size

p in this case is uint32_t *

e1/e2 are unsigned ints initialized from arithmetics performed on
unsigned longs

The mistake was, probably, never noticed due to the absence of any
big endian linux-user host. The types e1/e2 and p begs the quesiton
why this function takes longs at all.

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

15 years agoCorrect version of Heikki Lindholms ppc64.ld script
malc [Wed, 20 Aug 2008 22:39:24 +0000 (22:39 +0000)]
Correct version of Heikki Lindholms ppc64.ld script

Was butchered by c&p

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

15 years agoRelax qemu_ld/st constraints for !SOFTMMU case
malc [Wed, 20 Aug 2008 22:39:22 +0000 (22:39 +0000)]
Relax qemu_ld/st constraints for !SOFTMMU case

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

15 years agoAvoid clobbering input/aliased registers in !SOFTMMU+64bit+bswap case
malc [Wed, 20 Aug 2008 22:39:19 +0000 (22:39 +0000)]
Avoid clobbering input/aliased registers in !SOFTMMU+64bit+bswap case

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

15 years agoClear the upper 32 bits of addr_reg in TARGET_LONG_BITS == 32 case
malc [Wed, 20 Aug 2008 22:39:17 +0000 (22:39 +0000)]
Clear the upper 32 bits of addr_reg in TARGET_LONG_BITS == 32 case

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

15 years agoMove tcg_out_tlb_read into #ifdef CONFIG_SOFTMMU block to avoid compiler warning
malc [Wed, 20 Aug 2008 22:39:14 +0000 (22:39 +0000)]
Move tcg_out_tlb_read into #ifdef CONFIG_SOFTMMU block to avoid compiler warning

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

15 years agoSilence vmport unless DEBUG is enabled.
aliguori [Tue, 19 Aug 2008 19:13:06 +0000 (19:13 +0000)]
Silence vmport unless DEBUG is enabled.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoRemove unnecessary #includes from block-nbd.c
aliguori [Tue, 19 Aug 2008 19:10:38 +0000 (19:10 +0000)]
Remove unnecessary #includes from block-nbd.c

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoRevert r4979 since it breaks the monitor
aliguori [Tue, 19 Aug 2008 14:44:22 +0000 (14:44 +0000)]
Revert r4979 since it breaks the monitor

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoACPI suspend type field is 3 bits long
aurel32 [Tue, 19 Aug 2008 13:14:17 +0000 (13:14 +0000)]
ACPI suspend type field is 3 bits long

According to ACPI spec table 4-13 suspend type field should be 3 bits
long.

(Gleb Natapov)

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

15 years agoi386: fix isapc machine
aurel32 [Tue, 19 Aug 2008 12:55:20 +0000 (12:55 +0000)]
i386: fix isapc machine

- cirrus vga: enable graphic console
- pc: don't use apic for interrupts on ISA machine

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agoi386: Catch all non-present ptes in cpu_get_phys_page_debug (Jan Kiszka)
aliguori [Mon, 18 Aug 2008 18:00:31 +0000 (18:00 +0000)]
i386: Catch all non-present ptes in cpu_get_phys_page_debug (Jan Kiszka)

It helps debugging guests when yet unmapped pages are correctly reported
as, well, unmapped.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoAPIC: Do not start zero-period timers (Jan Kiszka)
aliguori [Mon, 18 Aug 2008 14:19:42 +0000 (14:19 +0000)]
APIC: Do not start zero-period timers (Jan Kiszka)

The APIC timer must not start when the initial count is (still) zero.

This caused occasional stalls when booting secondary CPUs of Linux SMP
guests.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoReport unmapped addresses in memory_dump (Jan Kiszka)
aliguori [Mon, 18 Aug 2008 14:00:20 +0000 (14:00 +0000)]
Report unmapped addresses in memory_dump (Jan Kiszka)

Instead of dumping incorrect (ie. previously read) data, report the
invalid virtual address to the user.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoFix some warnings that would be generated by gcc -Wmissing-prototypes
blueswir1 [Sun, 17 Aug 2008 20:26:25 +0000 (20:26 +0000)]
Fix some warnings that would be generated by gcc -Wmissing-prototypes

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

15 years agoFix warnings that would be generated by gcc -Wstrict-prototypes
blueswir1 [Sun, 17 Aug 2008 20:21:51 +0000 (20:21 +0000)]
Fix warnings that would be generated by gcc -Wstrict-prototypes

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

15 years agoFix 64 bit constant generation
blueswir1 [Sun, 17 Aug 2008 20:14:16 +0000 (20:14 +0000)]
Fix 64 bit constant generation

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

15 years agoFix 32 bit address overflow
blueswir1 [Sun, 17 Aug 2008 16:13:02 +0000 (16:13 +0000)]
Fix 32 bit address overflow

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

15 years agoRestore AREG0 after calls
blueswir1 [Sun, 17 Aug 2008 14:34:27 +0000 (14:34 +0000)]
Restore AREG0 after calls

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

15 years agoCorrect 32bit carry flag for add instruction (Igor Kovalenko)
blueswir1 [Sun, 17 Aug 2008 08:33:47 +0000 (08:33 +0000)]
Correct 32bit carry flag for add instruction (Igor Kovalenko)

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

15 years agoFix g364fb video emulation
aurel32 [Sun, 17 Aug 2008 01:44:53 +0000 (01:44 +0000)]
Fix g364fb video emulation

(Hervé Poussineau)

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

15 years agoVMDK: Remove debug message
aurel32 [Sun, 17 Aug 2008 01:44:40 +0000 (01:44 +0000)]
VMDK: Remove debug message

(Hervé Poussineau)

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

15 years agoSparc code generator update (fix qemu_ld & qemu_st)
blueswir1 [Sat, 16 Aug 2008 19:54:01 +0000 (19:54 +0000)]
Sparc code generator update (fix qemu_ld & qemu_st)

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

15 years agoUse C99 initializers
aurel32 [Fri, 15 Aug 2008 21:30:28 +0000 (21:30 +0000)]
Use C99 initializers

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

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

15 years agoPreliminary OpenBSD host support (based on OpenBSD patches by Todd T. Fries)
blueswir1 [Fri, 15 Aug 2008 18:33:42 +0000 (18:33 +0000)]
Preliminary OpenBSD host support (based on OpenBSD patches by Todd T. Fries)

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

15 years agoCancel IDE outstanding IO on device reset (Gleb Natapov)
aliguori [Fri, 15 Aug 2008 18:21:58 +0000 (18:21 +0000)]
Cancel IDE outstanding IO on device reset (Gleb Natapov)

Cancel AIO in IDE layer on device rest in order to be in deterministic state
during next boot.

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

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

15 years agoUse AIO only if host supports it (based on OpenBSD patches by Todd T. Fries)
blueswir1 [Fri, 15 Aug 2008 18:20:52 +0000 (18:20 +0000)]
Use AIO only if host supports it (based on OpenBSD patches by Todd T. Fries)

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

15 years agoSparc code generator update
blueswir1 [Fri, 15 Aug 2008 18:14:44 +0000 (18:14 +0000)]
Sparc code generator update

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

15 years agoqcow2: Try to aggregate free clusters and freed clusters (Laurent Vivier)
aliguori [Thu, 14 Aug 2008 18:11:52 +0000 (18:11 +0000)]
qcow2: Try to aggregate free clusters and freed clusters (Laurent Vivier)

In alloc_cluster_offset(), try to aggregate free clusters and freed clusters.

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@5008 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2: Make sure to return an error when L2 table loading fails
aliguori [Thu, 14 Aug 2008 18:11:00 +0000 (18:11 +0000)]
qcow2: Make sure to return an error when L2 table loading fails

This was suggested by Kevin Wolf since this is, in fact, an error condition.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoqcow2: Aggregate same type clusters (Laurent Vivier)
aliguori [Thu, 14 Aug 2008 18:10:28 +0000 (18:10 +0000)]
qcow2: Aggregate same type clusters (Laurent Vivier)

Modify get_cluster_offset(), alloc_cluster_offset() to specify how many clusters
we want.

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@5006 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoExtract compressing part from alloc_cluster_offset() (Laurent Vivier)
aliguori [Thu, 14 Aug 2008 18:09:32 +0000 (18:09 +0000)]
Extract compressing part from alloc_cluster_offset() (Laurent Vivier)

Divide alloc_cluster_offset() into alloc_cluster_offset() and
alloc_compressed_cluster_offset().
Common parts are moved to free_any_clusters() and get_cluster_table();

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@5005 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoDivide get_cluster_offset() (Laurent Vivier)
aliguori [Thu, 14 Aug 2008 18:08:21 +0000 (18:08 +0000)]
Divide get_cluster_offset() (Laurent Vivier)

Divide get_cluster_offset() into get_cluster_offset() and
alloc_cluster_offset().

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@5004 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoqcow2: Extract code from get_cluster_offset() (Laurent Vivier)
aliguori [Thu, 14 Aug 2008 18:07:12 +0000 (18:07 +0000)]
qcow2: Extract code from get_cluster_offset() (Laurent Vivier)

Extract code from get_cluster_offset() into new functions:

- seek_l2_table()

Search an l2 offset in the l2_cache table.

- l2_load()

Read the l2 entry from disk

- l2_allocate()

Allocate a new l2 entry.

Some comment fixups from Kevin Wolf

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Kevin Wolf <kwolf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoHandle remaining driver names when traversing audio_drv_list (Initial patch by BlueSwirl)
malc [Wed, 13 Aug 2008 21:48:01 +0000 (21:48 +0000)]
Handle remaining driver names when traversing audio_drv_list (Initial patch by BlueSwirl)

Probes for SDL/CoreAudio/DirectSound are probably needed there.

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

15 years agoAllow diskless operation for all mips platforms.
ths [Wed, 13 Aug 2008 13:01:28 +0000 (13:01 +0000)]
Allow diskless operation for all mips platforms.

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

15 years agoAdd the altgr key name to the monitor, by Samuel Thibault.
ths [Wed, 13 Aug 2008 12:54:23 +0000 (12:54 +0000)]
Add the altgr key name to the monitor, by Samuel Thibault.

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

15 years agoFix encoding of efsctsiz (powerpc spe), by Tristan Gingold.
ths [Wed, 13 Aug 2008 11:30:10 +0000 (11:30 +0000)]
Fix encoding of efsctsiz (powerpc spe), by Tristan Gingold.

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

15 years agousb-serial: add support for modem lines
aurel32 [Wed, 13 Aug 2008 04:23:17 +0000 (04:23 +0000)]
usb-serial: add support for modem lines

Signed-off-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@4998 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAllow boot without a drive on Sparc machines (partly extracted from Xen)
blueswir1 [Tue, 12 Aug 2008 15:58:35 +0000 (15:58 +0000)]
Allow boot without a drive on Sparc machines (partly extracted from Xen)

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

15 years agoUse C99 initializers
blueswir1 [Tue, 12 Aug 2008 15:51:09 +0000 (15:51 +0000)]
Use C99 initializers

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

15 years agoserial: Always update iir, even when ier is empty (Samuel Thibault)
aliguori [Tue, 12 Aug 2008 13:22:50 +0000 (13:22 +0000)]
serial: Always update iir, even when ier is empty (Samuel Thibault)

This fixes installation of Windows XP.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoIDE SEEK_STAT flag
aliguori [Mon, 11 Aug 2008 18:52:14 +0000 (18:52 +0000)]
IDE SEEK_STAT flag

Add SEEK_STAT in all non-error cases except sleep request, since our
seek times are virtually 0.  Although this flag is deprecated by newer
ATA standards, Linux at least checks it for CD drives, and would timeout
in some case if we do not set it.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoUpgrade emulated UART to 16550A (Stefano Stabellini)
aliguori [Mon, 11 Aug 2008 14:17:04 +0000 (14:17 +0000)]
Upgrade emulated UART to 16550A (Stefano Stabellini)

This patch upgrades the emulated UART to 16550A, the code comes from
xen-unstable. The main improvement was introduced with the following patch and
subsequent email thread:

http://lists.xensource.com/archives/html/xen-devel/2007-12/msg00129.html

The changes compared to previous version are:

- change clock_gettime to qemu_get_clock

- no token bucket anymore;

- fixed a small bug handling IRQs; this was the problem that prevented
kgdb to work over the serial (thanks to Jason Wessel for the help
spotting and reproducing this bug).

- many many style fixes;

- savevm version number increased;

- not including termios.h and sys/ioctl.h anymore, declaring static
constants in qemu-char.h instead;

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@4993 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix faligndata (Vince Weaver)
blueswir1 [Wed, 6 Aug 2008 19:50:16 +0000 (19:50 +0000)]
Fix faligndata (Vince Weaver)

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

15 years agoFix I/D MMU tag reads
blueswir1 [Wed, 6 Aug 2008 18:16:08 +0000 (18:16 +0000)]
Fix I/D MMU tag reads

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

15 years agoFix Sparc64 shifts
blueswir1 [Wed, 6 Aug 2008 18:13:54 +0000 (18:13 +0000)]
Fix Sparc64 shifts

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

15 years agoFix gnutls autodetection when using a cross-compiler.
aliguori [Wed, 6 Aug 2008 16:55:50 +0000 (16:55 +0000)]
Fix gnutls autodetection when using a cross-compiler.

It is not enough to check for pkg-config gnutls.  You may be using a
cross-compiler and have gnutls available on the host but not for the target.
This patch changes the detection to try and build an application using gnutls
and whatever compiler is available.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoFix offset handling for ASI loads and stores (Vince Weaver)
blueswir1 [Wed, 6 Aug 2008 15:28:20 +0000 (15:28 +0000)]
Fix offset handling for ASI loads and stores (Vince Weaver)

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

15 years agoonly check RCTL_EN in e1000_can_receive()
aliguori [Wed, 6 Aug 2008 14:11:44 +0000 (14:11 +0000)]
only check RCTL_EN in e1000_can_receive()

e1000_receive() has code to raise a receive overflow interrupt when the receive
buffer head and tail match. However, with the present implementation of
e1000_can_receive(), this code is unreachable -- and etherboot breaks as a
result.

Signed-off-by: Charles Duffy <charles_duffy@messageone.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoAdd qemu_realloc(), by Gerd Hoffmann.
ths [Wed, 6 Aug 2008 08:37:17 +0000 (08:37 +0000)]
Add qemu_realloc(), by Gerd Hoffmann.

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

15 years agoAccount for MacOS X ABI reserved space in linkage area (Andreas Faerber)
malc [Sun, 3 Aug 2008 19:04:11 +0000 (19:04 +0000)]
Account for MacOS X ABI reserved space in linkage area (Andreas Faerber)

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

15 years agoPreliminary MacOS X on PPC32 support
malc [Sun, 3 Aug 2008 19:04:07 +0000 (19:04 +0000)]
Preliminary MacOS X on PPC32 support

Big thanks to BlueSwirl for Sparc failure analysis.

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

15 years agoUpdate OpenBIOS images to SVN revision 218. Changes:
blueswir1 [Sat, 2 Aug 2008 11:18:40 +0000 (11:18 +0000)]
Update OpenBIOS images to SVN revision 218. Changes:
r186: Revert broken r161, fix identification string printing (Igor Kovalenko)
r187: Fix NetBSD reset problem
r188: Add a TODO for Sparc
r189: Fix some Sparc32 compile warnings
r190: Fix some Sparc64 compile warnings
r191: Add prototypes for [v]snprintf
r192: Add a common header file for libgcc functions
r193: Implement obmem for NetBSD loader
r194: Add Make dependencies for some files, unify Sparc32/64 build.xml files
r195: Remove debug messages
r196: Add a.out support for SILO
r198: Add a CPU node
r199: Add (bogus) memory nodes
r200: Add idprom node
r201: Make serial console usable
r202: Add MMU node and ops
r203: Add trap table setting function to client interface
r204: Fix MMU translation
r205: Handle 32 bit windows, remove now unused files
r206: Support for simple boot device selection
r207: Fix TLB entry generation
r208: Fix printing of exception messages
r209: Set up tick_cmpr, update assembly flags
r210: Add a clock-frequency node
r211:
Fix available and total memory
Implement a static list of mmu translations
Map more pages
Add a fake unmap method
r212: Fix builtin.c dependencies
r213: Add FCode boot loader for Solaris etc.
r214: Add correct reset vectors
r215: Add T1 and T2 CPUs
r216: Fix wrong translations
r217: Add bootargs property for kernel command line
r218:
Finally fix the very obscure problem which prevented normal and especially
FCode boot: too small heap (used for Forth memory)!
Remove forced arch_init and boot hacks

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

15 years agoFix compilation of nbd on Solaris (Andreas Faerber)
aliguori [Sat, 2 Aug 2008 01:57:02 +0000 (01:57 +0000)]
Fix compilation of nbd on Solaris (Andreas Faerber)

Compilation of QEMU is currently broken on Solaris due to nbd's use of _IO and
due to network libraries not being linked into qemu-img.

The attached patch adds the appropriate libraries (copied from Makefile.target)
and includes an additional Sun-specific header for _IO.

With these fixes it compiles okay, on OpenSolaris snv_93 (amd64).

Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoDelete unused variable.
ths [Fri, 1 Aug 2008 17:14:35 +0000 (17:14 +0000)]
Delete unused variable.

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

15 years agoHandle wrapped registers correctly when saving
blueswir1 [Fri, 1 Aug 2008 15:13:58 +0000 (15:13 +0000)]
Handle wrapped registers correctly when saving
Fix typo
Save and load interrupt_index and pil_in
Original patch by Luis Pureza

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

15 years agoSet focus to monitor to ask password if line is multiplexed (Laurent Vivier)
aliguori [Fri, 1 Aug 2008 15:12:34 +0000 (15:12 +0000)]
Set focus to monitor to ask password if line is multiplexed (Laurent Vivier)

This patch allows to display the "Password:" prompt if we use encrypted
disk with "-nographic" option.

It also modifies management of "-nographic" to not override user's
choices for "-serial", "-parallel" and "-monitor".

When qemu has to ask a password with "-nographic" with a multiplexed
serial interface, it forces the focus to the monitor and restore
original focus after.

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@4979 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoRevert 4977. Laurent asked for this not to be applied but I mistakenly applied
aliguori [Fri, 1 Aug 2008 15:04:00 +0000 (15:04 +0000)]
Revert 4977.  Laurent asked for this not to be applied but I mistakenly applied
it.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoqemu-img: set encrypted disk image password (Laurent Vivier)
aliguori [Fri, 1 Aug 2008 15:00:04 +0000 (15:00 +0000)]
qemu-img: set encrypted disk image password (Laurent Vivier)

This patch modify qemu-img to ask and set a password when an encrypted
disk image is created.

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>

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

15 years agoAsk password when encrypted disk image is used (Laurent Vivier)
aliguori [Fri, 1 Aug 2008 14:51:02 +0000 (14:51 +0000)]
Ask password when encrypted disk image is used (Laurent Vivier)

This patch repairs the management of encrypted disk images and allows to
enter the password.

Changelog:
v2:
- move read_password() before do_loadvm()
- really start monitor if output is stdio.

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@4976 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoMove audio/sys-queue.h => sys-queue.h
aliguori [Tue, 29 Jul 2008 20:08:37 +0000 (20:08 +0000)]
Move audio/sys-queue.h => sys-queue.h

This makes it easier to reuse in other parts of QEMU.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

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

15 years agoOn ppc32 make tb_set_jmp_target1 behave like it does on a ppc64
malc [Tue, 29 Jul 2008 20:08:17 +0000 (20:08 +0000)]
On ppc32 make tb_set_jmp_target1 behave like it does on a ppc64

Avoids nasty warnings about flush_icache_range from gcc4 and inability
to compile [cpu-]exec.c with gcc3 and -O, also the function is much
too large to be candidate for inlining anyway.

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

15 years agoUpdate sys-queue.h (Gerd Hoffmann)
aliguori [Tue, 29 Jul 2008 20:00:31 +0000 (20:00 +0000)]
Update sys-queue.h (Gerd Hoffmann)

 - got recent copy from netbsd.
 - deleted debug code.
 - deleted some list implementations, left in only the ones which
   qemu already has.

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@4973 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoe1000: use common checksumming code
aliguori [Tue, 29 Jul 2008 19:41:19 +0000 (19:41 +0000)]
e1000: use common checksumming code

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@4972 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoAdd IP checksumming functions to qemu (Gerd Hoffmann)
aliguori [Tue, 29 Jul 2008 19:40:04 +0000 (19:40 +0000)]
Add IP checksumming functions to qemu (Gerd Hoffmann)

This can be shared between the e1000, virtio-net, and xennet.

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@4971 c046a42c-6fe2-441c-8c8c-71466251a162

15 years agoFix cmp/subcc/addcc op bugs reported by Vince Weaver
blueswir1 [Tue, 29 Jul 2008 18:11:20 +0000 (18:11 +0000)]
Fix cmp/subcc/addcc op bugs reported by Vince Weaver

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

15 years agoCorrect audio api usage in OMAP EAC (spotted by malc).
balrog [Tue, 29 Jul 2008 17:29:41 +0000 (17:29 +0000)]
Correct audio api usage in OMAP EAC (spotted by malc).

This is to improve the usage of audio API thanks to explanation from malc.
Functionally may not be better.

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

15 years agoFill in WLAN and BT platform data in CAL area as expected by Maemo.
balrog [Tue, 29 Jul 2008 14:19:16 +0000 (14:19 +0000)]
Fill in WLAN and BT platform data in CAL area as expected by Maemo.

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

15 years agoUnswap qemu-arm data and prefetch abort addresses (Laurent Desnogues).
balrog [Tue, 29 Jul 2008 14:09:57 +0000 (14:09 +0000)]
Unswap qemu-arm data and prefetch abort addresses (Laurent Desnogues).

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

15 years agoFix load width for slave address in i2c_bus_load (Chris Lalancette).
balrog [Tue, 29 Jul 2008 13:57:48 +0000 (13:57 +0000)]
Fix load width for slave address in i2c_bus_load (Chris Lalancette).

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

15 years agoSimplify -usbdevice net: syntax, allow VLANs with no NICs.
balrog [Tue, 29 Jul 2008 13:16:31 +0000 (13:16 +0000)]
Simplify -usbdevice net: syntax, allow VLANs with no NICs.

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

15 years agoFor consistncy with --target-list accept coma separated items in --audio-card/drv...
malc [Tue, 29 Jul 2008 12:58:44 +0000 (12:58 +0000)]
For consistncy with --target-list accept coma separated items in --audio-card/drv-list

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