Commit graph

4997 commits

Author SHA1 Message Date
aliguori bc352085d2 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
2008-08-14 18:11:52 +00:00
aliguori 768706a52f 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
2008-08-14 18:11:00 +00:00
aliguori 095a9c58ce 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
2008-08-14 18:10:28 +00:00
aliguori 52d893ecf9 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
2008-08-14 18:09:32 +00:00
aliguori 052035244f 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
2008-08-14 18:08:21 +00:00
aliguori 108534b968 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
2008-08-14 18:07:12 +00:00
malc 16b98a97a9 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
2008-08-13 21:48:01 +00:00
ths eec2743ec2 Allow diskless operation for all mips platforms.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5001 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-13 13:01:28 +00:00
ths 2ba27c7fa8 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
2008-08-13 12:54:23 +00:00
ths 9ceb2a77ad 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
2008-08-13 11:30:10 +00:00
aurel32 abb8a13918 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
2008-08-13 04:23:17 +00:00
blueswir1 f88e4b91be 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
2008-08-12 15:58:35 +00:00
blueswir1 66de733bdb Use C99 initializers
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4996 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-12 15:51:09 +00:00
aliguori 53e656001a 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
2008-08-12 13:22:50 +00:00
aliguori 41a2b9596c 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
2008-08-11 18:52:14 +00:00
aliguori 81174dae3f 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
2008-08-11 14:17:04 +00:00
blueswir1 06057e6f6c Fix faligndata (Vince Weaver)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4992 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-06 19:50:16 +00:00
blueswir1 43e9e742b9 Fix I/D MMU tag reads
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4991 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-06 18:16:08 +00:00
blueswir1 01b1fa6d16 Fix Sparc64 shifts
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4990 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-06 18:13:54 +00:00
aliguori ae6b5e5afd 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
2008-08-06 16:55:50 +00:00
blueswir1 95f9397c75 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
2008-08-06 15:28:20 +00:00
aliguori 4105de6732 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
2008-08-06 14:11:44 +00:00
ths 2137b4cca9 Add qemu_realloc(), by Gerd Hoffmann.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-06 08:37:17 +00:00
malc bf6bca527c 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
2008-08-03 19:04:11 +00:00
malc f9bf298717 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
2008-08-03 19:04:07 +00:00
blueswir1 60e26a9167 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
2008-08-02 11:18:40 +00:00
aliguori 7e00eb9b98 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
2008-08-02 01:57:02 +00:00
ths 0fd70f8f20 Delete unused variable.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4981 c046a42c-6fe2-441c-8c8c-71466251a162
2008-08-01 17:14:35 +00:00
blueswir1 a7a044f29e 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
2008-08-01 15:13:58 +00:00
aliguori bc0129d978 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
2008-08-01 15:12:34 +00:00
aliguori e94f3a609e 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
2008-08-01 15:04:00 +00:00
aliguori 61fce45f12 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
2008-08-01 15:00:04 +00:00
aliguori 396f929762 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
2008-08-01 14:51:02 +00:00
aliguori ccf21c31fa 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
2008-07-29 20:08:37 +00:00
malc 52781543ad 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
2008-07-29 20:08:17 +00:00
aliguori 23cde8bb12 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
2008-07-29 20:00:31 +00:00
aliguori c6a6a5e3bb 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
2008-07-29 19:41:19 +00:00
aliguori 48c643630c 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
2008-07-29 19:40:04 +00:00
blueswir1 dd5e6304aa 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
2008-07-29 18:11:20 +00:00
balrog ab17b46d00 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
2008-07-29 17:29:41 +00:00
balrog c580d92b0e 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
2008-07-29 14:19:16 +00:00
balrog eae473c187 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
2008-07-29 14:09:57 +00:00
balrog d0c22f49ba 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
2008-07-29 13:57:48 +00:00
balrog 9ad97e6503 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
2008-07-29 13:16:31 +00:00
malc 2fa7d3bf59 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
2008-07-29 12:58:44 +00:00
edgar_igl 5ce042b1cf Remove dyngen leftovers.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4963 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-29 07:46:53 +00:00
malc fe6f943f3b Immediate versions of some operations
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4962 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-28 23:46:06 +00:00
malc 000a2d866a Do not try handle "special" arguments of and/or/xor/shl/shr, upper level does it
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4961 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-28 23:46:03 +00:00
malc e924bbec7a Set the L field of CMP[L][I] when dealing with 64 bit quantities
This (along with previous 2 commits) makes X86_64 work on ppc64 too.

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4960 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-28 19:42:23 +00:00
malc 880e52b8b0 Fix preprocessor guard condition
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4959 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-28 19:42:20 +00:00