]> git.proxmox.com Git - qemu.git/log
qemu.git
14 years agofinish VPATH -> vpath translation staging origin/staging
Paolo Bonzini [Mon, 4 Jan 2010 10:02:28 +0000 (11:02 +0100)]
finish VPATH -> vpath translation

This adds a few more vpath suffixes and points the remaining two paths
explicitly to $(SRC_PATH) in order to eliminate the VPATH assignment
from config-host.mak.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomultiboot: Separate multiboot loading into separate file
Adam Lackorzynski [Sat, 26 Dec 2009 13:13:46 +0000 (14:13 +0100)]
multiboot: Separate multiboot loading into separate file

Move multiboot loading code into separate files as suggested by Alex Graf.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomultiboot: Support arbitrary number of modules.
Adam Lackorzynski [Sat, 26 Dec 2009 13:13:45 +0000 (14:13 +0100)]
multiboot: Support arbitrary number of modules.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agolinuxboot: fix gdt address calculation
Avi Kivity [Thu, 24 Dec 2009 13:38:50 +0000 (15:38 +0200)]
linuxboot: fix gdt address calculation

The gdt address calculation in linuxboot.bin is broken in two ways: first
it loads %cs into %eax, but that instruction leaves the high bits of %eax
undefined and we did not clear them.  Secondly, we completely ignore the
incorrect %eax, and use the undefined %ebx instead.

With these issues fixed, linuxboot works again.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoQMP: Drop wrong assert()
Luiz Capitulino [Tue, 22 Dec 2009 03:09:06 +0000 (01:09 -0200)]
QMP: Drop wrong assert()

Some commands return a QList of QDicts, which is valid,
but will trig the assert().

Just drop it.

Reported-by: Nathan Baum <nathan@parenthephobia.org.uk>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoblock/vdi: allow disk sizes not multiple of block size
François Revol [Tue, 22 Dec 2009 11:40:49 +0000 (12:40 +0100)]
block/vdi: allow disk sizes not multiple of block size

The disk image I created from my old laptop disk with VBoxManage
internalcommand converthd obviously was not a multiple of 1MB as when
created from scratch. This fixes QEMU refusing it. We still require the
size to be a multiple of sector size though.
It then boots correctly.

Allow opening VDI images with size not multiple of 1MB (as when converted from a raw disk).

Signed-off-by: François Revol <revol@free.fr>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agonet: add API to disable/enable polling
Michael S. Tsirkin [Thu, 24 Dec 2009 12:46:29 +0000 (14:46 +0200)]
net: add API to disable/enable polling

When vhost is bound to a backend device, we need to stop polling it when
vhost is started, and restart polling when vhost is stopped.
Add an API for that for use by vhost, and implement in tap backend.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agodebugcon: support for debugging consoles (e.g. Bochs port 0xe9)
H. Peter Anvin [Tue, 29 Dec 2009 21:51:36 +0000 (13:51 -0800)]
debugcon: support for debugging consoles (e.g. Bochs port 0xe9)

Add generic support for debugging consoles (simple I/O ports which
when written to cause debugging output to be written to a target.)
The current implementation matches Bochs' port 0xe9, allowing the same
debugging code to be used for both Bochs and Qemu.

There is no vm state associated with the debugging port, simply
because it has none -- the entire interface is a single, stateless,
write-only port.

Most of the code was cribbed from the serial port driver.

v2: removed non-ISA variants (they can be introduced when/if someone
wants them, using code from the serial port); added configurable
readback (Bochs returns 0xe9 on a read from this register, mimic that
by default)  This retains the apparently somewhat controversial user
friendly option, however.

v3: reimplemented the user friendly option as a synthetic option
("-debugcon foo" basically ends up being a parser-level shorthand for
"-chardev stdio,id=debugcon -device isa-debugcon,chardev=debugcon") --
this dramatically reduced the complexity while keeping the same level
of user friendliness.

v4: spaces, not tabs.

v5: update to match current top of tree.  Calling qemu_chr_open()
already during parsing no longer works; defer until we are parsing the
other console-like devices.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMakefile: Update unmodified config-devices.mak automatically
Stefan Weil [Sun, 20 Dec 2009 14:39:03 +0000 (15:39 +0100)]
Makefile: Update unmodified config-devices.mak automatically

This makes rebuilds after source updates easier
for most users (who don't edit config-devices.mak).

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoUse vpath directive
Paolo Bonzini [Mon, 21 Dec 2009 09:06:55 +0000 (10:06 +0100)]
Use vpath directive

The vpath directive has two advantages over the VPATH variable:
1) it allows to skip searching of .o files; 2) the default semantics
are to append to the vpath, so there is no confusion between "VPATH=xyz"
and "VPATH+=xyz".

Since "vpath %.c %.h PATH" is not valid, I'm introducing a wrapper
macro to append one or more directories to the vpath.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agooss: workaround for cases when OSS_GETVERSION is not defined
malc [Fri, 8 Jan 2010 08:26:27 +0000 (11:26 +0300)]
oss: workaround for cases when OSS_GETVERSION is not defined

Thanks to Juergen Lock.

Signed-off-by: malc <av1474@comtv.ru>
14 years agoSparc32: clear exception_index with -1 value
Blue Swirl [Thu, 7 Jan 2010 20:02:04 +0000 (20:02 +0000)]
Sparc32: clear exception_index with -1 value

See also 821b19fe923ac49a24cdb4af902584fdd019cee6.

Spotted by Artyom Tarasenko and Igor Kovalenko.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoDrop --whole-archive and static libraries
Andreas Färber [Wed, 6 Jan 2010 19:24:05 +0000 (20:24 +0100)]
Drop --whole-archive and static libraries

Juan has contributed a cool Makefile infrastructure that enables us to drop
static libraries completely:

Move shared obj-y definitions to Makefile.objs, prefixed {common-,hw-,user-},
and link those object files directly into the executables.

Replace HWLIB by HWDIR, specifying only the directory.

Drop --whole-archive and ARLIBS in Makefiles and configure.

Drop GENERATED_HEADERS dependency in rules.mak, since this rebuilds all
common objects after generating a target-specific header; add dependency
rules to Makefile and Makefile.target instead.

v2:
- Don't try to include /config.mak for user emulators
- Changes to user object paths ("Quickfix for libuser.a drop") were obsoleted
  by "user_only: compile everything with -fpie" (Kirill A. Shutemov)

v3:
- Fix dependency modelling for tools
- Remove comment on GENERATED_HEADERS obsoleted by this patch

Signed-off-by: Andreas Färber <afaerber@opensolaris.org>
Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Palle Lyckegaard <palle@lyckegaard.dk>
Cc: Ben Taylor <bentaylor.solx86@gmail.com>
Cc: Juan Quintela <quintela@trasno.org>
Cc: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agovnc: Fix artifacts in hextile decoding
Anthony Liguori [Thu, 7 Jan 2010 13:55:34 +0000 (07:55 -0600)]
vnc: Fix artifacts in hextile decoding

02c2b87 introduced a regression whereas the foreground color in a hextile
update was not being properly invalidated leading to artifacts.

It's still necessary to explicitly invalidate the foreground color with a
SubrectColoured tile even though we no longer send a foreground color as
part of the tile.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoCocoa: Use optimized drawing for the window
Andreas Färber [Sun, 13 Dec 2009 02:06:20 +0000 (03:06 +0100)]
Cocoa: Use optimized drawing for the window

Default is NO.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Suppress window resize animation
Andreas Färber [Sun, 13 Dec 2009 01:49:57 +0000 (02:49 +0100)]
Cocoa: Suppress window resize animation

Disable the nice resize animation, to avoid drawing glitches
following a guest's screen size change.

Based on patch by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Shutdown when window is closed
Andreas Färber [Mon, 14 Dec 2009 21:13:27 +0000 (22:13 +0100)]
Cocoa: Shutdown when window is closed

The application is not very useful once the guest window is closed.
QEMU is not a document-based application; terminating it automatically
saves the user another action and resembles SDL behavior.

v2:
- Use delegate method, suggested by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Don't unconditionally show the window
Andreas Färber [Sun, 13 Dec 2009 01:11:44 +0000 (02:11 +0100)]
Cocoa: Don't unconditionally show the window

When QEMU was launched in no-graphic, Curses or VNC mode,
don't run it as a Cocoa application.

Based on patch by Alexander Graf.

v1:
- Avoid type mismatch warning for argv
- Drop noCocoa variable
- Coding Style changes

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Alexander Graf <agraf@suse.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Redraw the View asynchronously
Andreas Färber [Sun, 13 Dec 2009 01:08:58 +0000 (02:08 +0100)]
Cocoa: Redraw the View asynchronously

Cf. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CustomViews.html

Based on patch by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Mark the View as opaque
Andreas Färber [Sun, 13 Dec 2009 01:03:33 +0000 (02:03 +0100)]
Cocoa: Mark the View as opaque

Default is NO.

Cf. http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CustomViews.html

Based on patch by Juha Riihimäki.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Juha Riihimäki <juha.riihimaki@nokia.com>
Cc: Alexander Graf <alex@csgraf.de>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Fix compilation on Mac OS X v10.4 and earlier
Andreas Färber [Sun, 13 Dec 2009 00:52:29 +0000 (01:52 +0100)]
Cocoa: Fix compilation on Mac OS X v10.4 and earlier

NSView's enterFullScreenMode:withOptions: and
exitFullScreenModeWithOptions: are available on v10.5
and later only. Undefined methods raise warnings and
undefined constants result in errors.

Reported by Ryan Schmidt.

While at it, avoid a warning on v10.3.9,
where MAC_OS_X_VERSION_10_4 is not defined.

Spotted by John Arbuckle.

Fix associated comments.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Cc: Ryan Schmidt <qemu-2009@ryandesign.com>
Cc: Mike Kronenberg <mike.kronenberg@kronenberg.org>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Silence type warning
Andreas Färber [Sun, 13 Dec 2009 00:16:27 +0000 (01:16 +0100)]
Cocoa: Silence type warning

Add const for "qemu" character literal, to avoid:

warning: initialization discards qualifiers from pointer target type

An earlier patch by John proposed to use char[5]. Since we do not modify
the text and later copy it into malloc'ed memory, marking it as const
seems sufficient.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Silence warning on Big Endian host
Andreas Färber [Sat, 12 Dec 2009 23:58:21 +0000 (00:58 +0100)]
Cocoa: Silence warning on Big Endian host

__LITTLE_ENDIAN__ is undefined on Big Endian host.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: Silence warning for cocoa_keycode_to_qemu
Andreas Färber [Sat, 12 Dec 2009 23:55:53 +0000 (00:55 +0100)]
Cocoa: Silence warning for cocoa_keycode_to_qemu

Make cocoa_keycode_to_qemu static, to avoid:

warning: no previous prototype for ‘cocoa_keycode_to_qemu’

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: malc <av1474@comtv.ru>
14 years agoCocoa: ppc64 host support
Andreas Färber [Sat, 12 Dec 2009 23:45:40 +0000 (00:45 +0100)]
Cocoa: ppc64 host support

Fix integer usage in the Cocoa backend: NSInteger is long on LP64.

http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-BBCFHHCD

This makes the graphical display show up on a ppc64 host.

v3:
- Confine NSInteger to Mac OS X v10.5 and later

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: malc <av1474@comtv.ru>
14 years agosparc64: clear exception_index with -1 value
Igor V. Kovalenko [Wed, 6 Jan 2010 17:35:22 +0000 (17:35 +0000)]
sparc64: clear exception_index with -1 value

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoMerge remote branch 'mst/for_anthony' into staging
Anthony Liguori [Wed, 6 Jan 2010 13:16:59 +0000 (07:16 -0600)]
Merge remote branch 'mst/for_anthony' into staging

14 years agopass env to raise_exception if called outside of op_helper code
Igor V. Kovalenko [Sun, 3 Jan 2010 12:09:27 +0000 (15:09 +0300)]
pass env to raise_exception if called outside of op_helper code

- this fixes stepping with gdb, where do_unassigned_access
  may be called from gdb handler, outside of generated code

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosparc64: switch to MMU global registers in more MMU related traps
Igor V. Kovalenko [Sun, 3 Jan 2010 12:16:51 +0000 (12:16 +0000)]
sparc64: switch to MMU global registers in more MMU related traps

- extended range of MMU related traps which use MMU global registers,
  as listed in Ultrasparc-IIi document
- no visible changes, since emulation do not cause added traps

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotarget-i386: Fix "call im" on x86_64 when executing 32-bit code
Aurelien Jarno [Sun, 3 Jan 2010 02:08:19 +0000 (03:08 +0100)]
target-i386: Fix "call im" on x86_64 when executing 32-bit code

Similarly to what is done in 32938e127f50a40844a0fb9c5abb8691aeeccf7e
for "jmp im", trunc the immediate to 32-bit when not running in 64-bit
mode.

Reported-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoloader: don't call realloc(non_null, 0) when no symbols are present
Aurelien Jarno [Mon, 28 Dec 2009 20:18:12 +0000 (21:18 +0100)]
loader: don't call realloc(non_null, 0) when no symbols are present

According to C99, realloc(non_null, 0) != free(non_null), that's why
it is forbidden in QEMU.

When there are no symbols, nsyms equals to 0. Free the syms structure
and set it to NULL instead of reallocating it with a size of 0.

This fixes -kernel with stripped kernels.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoSparc64: split DPRINTF into CPUIRQ and EBUS versions
Blue Swirl [Wed, 30 Dec 2009 12:27:17 +0000 (12:27 +0000)]
Sparc64: split DPRINTF into CPUIRQ and EBUS versions

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc64: fix compile with DEBUG_IRQ enabled
Blue Swirl [Wed, 30 Dec 2009 12:26:01 +0000 (12:26 +0000)]
Sparc64: fix compile with DEBUG_IRQ enabled

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosdl: print the reason why SDL thinks SDL_Init failed before exiting
malc [Wed, 30 Dec 2009 01:26:34 +0000 (04:26 +0300)]
sdl: print the reason why SDL thinks SDL_Init failed before exiting

Signed-off-by: malc <av1474@comtv.ru>
14 years agoAdd missing newline at the end of options list
Michael Tokarev [Thu, 24 Dec 2009 09:15:47 +0000 (12:15 +0300)]
Add missing newline at the end of options list

In qemu-kvm this place looks even more "interesting":

 -runas user     Change to user id user just before starting the VM.
 -readconfig <file>
 -writeconfig <file>
                read/write config file-no-kvm         disable KVM hardware virtualization
 -no-kvm-irqchip disable KVM kernel mode PIC/IOAPIC/LAPIC
 -no-kvm-pit     disable KVM kernel mode PIT

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoUpdate Sparc64 OpenBIOS image to r649.
Blue Swirl [Mon, 28 Dec 2009 11:28:40 +0000 (11:28 +0000)]
Update Sparc64 OpenBIOS image to r649.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc64: move APB PCI memory base to correct location
Blue Swirl [Sun, 27 Dec 2009 20:52:39 +0000 (20:52 +0000)]
Sparc64: move APB PCI memory base to correct location

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoPCI: Fix bus address conversion
Blue Swirl [Sun, 27 Dec 2009 20:52:36 +0000 (20:52 +0000)]
PCI: Fix bus address conversion

Pass physical addresses to map functions instead of PCI bus addresses.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosparc: make command line available also via firmware configuration device
Blue Swirl [Sun, 27 Dec 2009 18:25:49 +0000 (18:25 +0000)]
sparc: make command line available also via firmware configuration device

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg: Add tcg_unsigned_cond.
Richard Henderson [Sun, 27 Dec 2009 09:09:41 +0000 (09:09 +0000)]
tcg: Add tcg_unsigned_cond.

Returns an unsigned version of a signed condition;
returns the original condition otherwise.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoblock/bochs: improve format checking
Blue Swirl [Fri, 25 Dec 2009 19:27:18 +0000 (19:27 +0000)]
block/bochs: improve format checking

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoblock.c: fix warning with _FORTIFY_SOURCE
Kirill A. Shutemov [Fri, 25 Dec 2009 18:19:22 +0000 (18:19 +0000)]
block.c: fix warning with _FORTIFY_SOURCE

  CC    block.o
cc1: warnings being treated as errors
block.c: In function 'bdrv_open2':
block.c:400: error: ignoring return value of 'realpath', declared with attribute warn_unused_result

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoblock/bochs.c: fix warning with _FORTIFY_SOURCE
Kirill A. Shutemov [Fri, 25 Dec 2009 18:19:20 +0000 (18:19 +0000)]
block/bochs.c: fix warning with _FORTIFY_SOURCE

  CC    block/bochs.o
cc1: warnings being treated as errors
block/bochs.c: In function 'seek_to_sector':
block/bochs.c:202: error: ignoring return value of 'read', declared with attribute warn_unused_result
make: *** [block/bochs.o] Error 1

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agosavevm.c: fix warning with _FORTIFY_SOURCE
Kirill A. Shutemov [Fri, 25 Dec 2009 18:19:19 +0000 (18:19 +0000)]
savevm.c: fix warning with _FORTIFY_SOURCE

  CC    savevm.o
cc1: warnings being treated as errors
savevm.c: In function 'file_put_buffer':
savevm.c:342: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result
make: *** [savevm.o] Error 1

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoslirp/misc.c: fix warning with _FORTIFY_SOURCE
Kirill A. Shutemov [Fri, 25 Dec 2009 18:19:18 +0000 (18:19 +0000)]
slirp/misc.c: fix warning with _FORTIFY_SOURCE

  CC    slirp/misc.o
cc1: warnings being treated as errors
slirp/misc.c: In function 'fork_exec':
slirp/misc.c:209: error: ignoring return value of 'write', declared with attribute warn_unused_result
make: *** [slirp/misc.o] Error 1

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agohw/pc.c: fix warnings with _FORTIFY_SOURCE
Kirill A. Shutemov [Fri, 25 Dec 2009 18:19:17 +0000 (18:19 +0000)]
hw/pc.c: fix warnings with _FORTIFY_SOURCE

  CC    i386-softmmu/pc.o
cc1: warnings being treated as errors
/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c: In function 'load_multiboot':
/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:614: error: ignoring return value of 'fread', declared with attribute warn_unused_result
/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c: In function 'load_linux':
/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:888: error: ignoring return value of 'fread', declared with attribute warn_unused_result
/usr/src/RPM/BUILD/qemu-0.11.92/hw/pc.c:889: error: ignoring return value of 'fread', declared with attribute warn_unused_result
make[1]: *** [pc.o] Error 1

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agopath.c fix warning with _FORTIFY_SOURCE
Kirill A. Shutemov [Fri, 25 Dec 2009 18:19:15 +0000 (18:19 +0000)]
path.c fix warning with _FORTIFY_SOURCE

  CC    libuser/path.o
cc1: warnings being treated as errors
/usr/src/RPM/BUILD/qemu-0.11.92/path.c: In function 'new_entry':
/usr/src/RPM/BUILD/qemu-0.11.92/path.c:49: error: ignoring return value of 'asprintf', declared with attribute warn_unused_result
make[1]: *** [path.o] Error 1

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoPCI: partially revert 2e01c8cf4b076b05013c87723e3fc710b50a0a7a
Blue Swirl [Fri, 25 Dec 2009 18:18:29 +0000 (18:18 +0000)]
PCI: partially revert 2e01c8cf4b076b05013c87723e3fc710b50a0a7a

Bus address conversion was not correct.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoPCI: make pci_mem_base private
Blue Swirl [Fri, 25 Dec 2009 16:50:36 +0000 (16:50 +0000)]
PCI: make pci_mem_base private

Make pci_mem_base private to PCIBus. Add a function to set it.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix Sparse error: dubious one-bit signed bitfield
Blue Swirl [Fri, 25 Dec 2009 16:12:26 +0000 (16:12 +0000)]
Fix Sparse error: dubious one-bit signed bitfield

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix Sparse warning: dubious: !x & y
Blue Swirl [Fri, 25 Dec 2009 16:12:17 +0000 (16:12 +0000)]
Fix Sparse warning: dubious: !x & y

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoscsi: fix Sparse warning: Initializer entry defined twice
Blue Swirl [Fri, 25 Dec 2009 16:11:40 +0000 (16:11 +0000)]
scsi: fix Sparse warning: Initializer entry defined twice

Both REWIND and REZERO_UNIT use 0x01, READ_POSITION and PRE_FETCH
share 0x34.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoMAC DBDMA: store register values in native endianness
Aurelien Jarno [Thu, 24 Dec 2009 00:00:41 +0000 (01:00 +0100)]
MAC DBDMA: store register values in native endianness

Store the register values in native endianness, by dropping all the
endianness conversion functions, and converting the endianness in
dbdma_readl/dbdma_writel instead.

Also guard the endianness conversion with TARGET_WORDS_BIGENDIAN to
simulate the backward connection of the bus.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoIntel CPUs starting from pentium have apic
Gleb Natapov [Thu, 24 Dec 2009 14:14:33 +0000 (16:14 +0200)]
Intel CPUs starting from pentium have apic

Intel CPUs starting from pentium have apic. Lets advertise it.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoloader: more ignores for rom intended to be loaded by the bios
Aurelien Jarno [Thu, 24 Dec 2009 18:30:25 +0000 (19:30 +0100)]
loader: more ignores for rom intended to be loaded by the bios

Similarly to what has been done in e405a2ba91b68817cae2a428de55fe9616a4cf37,
ignore rom intended to be loaded by the bios in find_rom() and rom_copy().

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoDon't load options roms intended to be loaded by the bios in qemu
Avi Kivity [Tue, 22 Dec 2009 09:57:02 +0000 (11:57 +0200)]
Don't load options roms intended to be loaded by the bios in qemu

The first such option rom will load at address 0, which isn't very nice,
and the second will report a conflict and abort, which is horrible.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-arm: fix strexd
Aurelien Jarno [Wed, 23 Dec 2009 23:18:23 +0000 (00:18 +0100)]
target-arm: fix strexd

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agolinux-user: fix build with gcc-4.1
Aurelien Jarno [Wed, 23 Dec 2009 23:17:12 +0000 (00:17 +0100)]
linux-user: fix build with gcc-4.1

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agolinuxboot.bin is a generated file
Juan Quintela [Wed, 23 Dec 2009 18:28:11 +0000 (19:28 +0100)]
linuxboot.bin is a generated file

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoqemu-nbd: fix OpenBSD linker warning
Blue Swirl [Wed, 23 Dec 2009 15:45:30 +0000 (15:45 +0000)]
qemu-nbd: fix OpenBSD linker warning

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoe1000: add link to data sheet
Michael S. Tsirkin [Wed, 23 Dec 2009 15:05:21 +0000 (17:05 +0200)]
e1000: add link to data sheet

Link to data sheet at intel.com so people can find it.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoqemu-io: suppress a warning with gcc 4.0.2
Blue Swirl [Wed, 23 Dec 2009 15:35:17 +0000 (15:35 +0000)]
qemu-io: suppress a warning with gcc 4.0.2

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoCompile qemu-nbd also on OpenBSD and Solaris
Blue Swirl [Wed, 23 Dec 2009 15:34:04 +0000 (15:34 +0000)]
Compile qemu-nbd also on OpenBSD and Solaris

basename() needs #include <libgen.h>.

No prototype for daemon() is available on Solaris, but link
succeeds.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agolist MST as pci layer maintainer
Michael S. Tsirkin [Sun, 13 Dec 2009 14:08:54 +0000 (16:08 +0200)]
list MST as pci layer maintainer

List MST as PCI maintainer so that people know
whom to Cc on patches.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopiix_pci: add link to i440fx data sheet.
Isaku Yamahata [Tue, 15 Dec 2009 11:26:07 +0000 (20:26 +0900)]
piix_pci: add link to i440fx data sheet.

add link to i440fx data sheet.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopiix_pci: use range helper function
Isaku Yamahata [Tue, 15 Dec 2009 11:26:06 +0000 (20:26 +0900)]
piix_pci: use range helper function

use range helper function in i440fx_write_config().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopiix_pci: define symbolic value for PAM0, PAM6 and SMRAM.
Isaku Yamahata [Tue, 15 Dec 2009 11:26:05 +0000 (20:26 +0900)]
piix_pci: define symbolic value for PAM0, PAM6 and SMRAM.

Define symbolic value in i440fx configuration space
for 0x59, 0x5f and 0x7f and use them.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agomsix: use range helper function.
Isaku Yamahata [Tue, 15 Dec 2009 11:26:04 +0000 (20:26 +0900)]
msix: use range helper function.

use range helper function in msix_write_config().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agoacpi: use range helper function.
Isaku Yamahata [Tue, 15 Dec 2009 11:26:03 +0000 (20:26 +0900)]
acpi: use range helper function.

use range helper function in pm_write_config().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agogt64xxx: remove gt64120_{read, write}_config().
Isaku Yamahata [Tue, 15 Dec 2009 11:26:02 +0000 (20:26 +0900)]
gt64xxx: remove gt64120_{read, write}_config().

They call only pci_default_{read, write}_config().
So they aren't necessary.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopci: use pci_regs.h
Isaku Yamahata [Tue, 15 Dec 2009 11:26:01 +0000 (20:26 +0900)]
pci: use pci_regs.h

include pci_regs.h and remove duplicated defines.
And remove unused PCI_REVISION and PCI_SUBDEVICE_ID.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopci: import Linux pci_regs.h
Isaku Yamahata [Tue, 15 Dec 2009 11:26:00 +0000 (20:26 +0900)]
pci: import Linux pci_regs.h

Import Linux pci_regs.h. Later PCI register definitions in pci.h
will be eliminated.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopci: s/PCI_SUBVENDOR_ID/PCI_SUBSYSTEM_VENDOR_ID/g
Isaku Yamahata [Tue, 15 Dec 2009 11:25:59 +0000 (20:25 +0900)]
pci: s/PCI_SUBVENDOR_ID/PCI_SUBSYSTEM_VENDOR_ID/g

To match Linux PCI register definition,
rename PCI_SUBVENDOR_ID to PCI_SUBSYSTEM_VENDOR_ID.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopci: remove PCIBus::config_reg.
Isaku Yamahata [Tue, 15 Dec 2009 11:25:58 +0000 (20:25 +0900)]
pci: remove PCIBus::config_reg.

PCIBus::config_reg isn't used anymore, so remove it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
14 years agopci: remove unused macro
Michael S. Tsirkin [Thu, 10 Dec 2009 17:28:53 +0000 (19:28 +0200)]
pci: remove unused macro

PCI_STATUS_DEVSEL is unused, and it also
has a different name in pci_regs.h
Remove.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agousb-ohci: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 17:27:32 +0000 (19:27 +0200)]
usb-ohci: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agousb-uhci: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 17:25:03 +0000 (19:25 +0200)]
usb-uhci: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agoac97: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 17:21:55 +0000 (19:21 +0200)]
ac97: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agowdt_i6300esb: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 17:06:46 +0000 (19:06 +0200)]
wdt_i6300esb: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agoes1370: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 17:04:25 +0000 (19:04 +0200)]
es1370: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agopci: add another devsel macro
Michael S. Tsirkin [Thu, 10 Dec 2009 17:04:02 +0000 (19:04 +0200)]
pci: add another devsel macro

will be used by ensoniq emulation

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agolsi: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 16:56:42 +0000 (18:56 +0200)]
lsi: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agovmware_vga: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 16:51:49 +0000 (18:51 +0200)]
vmware_vga: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agocmd646: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 16:36:40 +0000 (18:36 +0200)]
cmd646: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agopiix: symbolic constants
Michael S. Tsirkin [Thu, 10 Dec 2009 16:18:19 +0000 (18:18 +0200)]
piix: symbolic constants

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agoeepro100: symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 15:52:10 +0000 (17:52 +0200)]
eepro100: symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change in meaningful ways.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agopci: add more status bits
Michael S. Tsirkin [Thu, 10 Dec 2009 15:42:19 +0000 (17:42 +0200)]
pci: add more status bits

will be used by eepro100.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agopcnet: switch to symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 14:51:04 +0000 (16:51 +0200)]
pcnet: switch to symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agortl: switch to symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 13:57:34 +0000 (15:57 +0200)]
rtl: switch to symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agone2000: switch to symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 13:42:56 +0000 (15:42 +0200)]
ne2000: switch to symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agoe1000: switch to symbolic names for pci registers
Michael S. Tsirkin [Thu, 10 Dec 2009 13:23:59 +0000 (15:23 +0200)]
e1000: switch to symbolic names for pci registers

No functional changes. I verified that the generated
object binary does not change.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Glauber Costa <glommer@gmail.com>
14 years agoRevert "Revert "pci: interrupt disable bit support""
Michael S. Tsirkin [Wed, 23 Dec 2009 14:33:56 +0000 (16:33 +0200)]
Revert "Revert "pci: interrupt disable bit support""

This reverts commit d587e0787153f0224a6140c5015609963ceaabfb.

14 years agoUSB: Improve usbdevice error messages
Scott Tsai [Tue, 22 Dec 2009 20:30:18 +0000 (04:30 +0800)]
USB: Improve usbdevice error messages

When an non-existent USB device is specified on the command line,
print "qemu: could not add USB device 'X'".
Likewise for the usb_{add,del} monitor commands.

Signed-off-by: Scott Tsai <scottt.tw@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotarget-alpha: Initialize fpcr
Richard Henderson [Mon, 21 Dec 2009 21:02:40 +0000 (13:02 -0800)]
target-alpha: Initialize fpcr

Linux, at least, disables exceptions by default.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agotcg-sparc: Implement brcond2.
Richard Henderson [Sun, 20 Dec 2009 04:23:19 +0000 (20:23 -0800)]
tcg-sparc: Implement brcond2.

Split out tcg_out_cmp and properly handle immediate arguments.
Fix constraints on brcond to match what SUBCC accepts.
Add tcg_out_brcond2_i32 for 32-bit host.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Use TCG_TARGET_REG_BITS in conditional compilation.
Richard Henderson [Fri, 18 Dec 2009 07:47:54 +0000 (23:47 -0800)]
tcg-sparc: Use TCG_TARGET_REG_BITS in conditional compilation.

The test TCG_TARGET_REG_BITS==64 is exactly the feature that we
are checking for, whereas something involving __sparc_v9__ or
__sparc_v8plus__ should be reserved for something ISA related,
as with SMULX.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Improve tcg_out_movi for sparc64.
Richard Henderson [Sun, 20 Dec 2009 03:45:27 +0000 (19:45 -0800)]
tcg-sparc: Improve tcg_out_movi for sparc64.

Generate sign-extended 32-bit constants with SETHI+XOR.
Otherwise tidy the routine to avoid the need for
conditional compilation and code duplication with movi_imm32.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agotcg-sparc: Fix imm13 check in movi.
Richard Henderson [Thu, 17 Dec 2009 23:20:24 +0000 (15:20 -0800)]
tcg-sparc: Fix imm13 check in movi.

We were unnecessarily restricting imm13 constants to 12 bits.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoARM PBX-A9 memory map tweaks
Paul Brook [Mon, 21 Dec 2009 20:19:12 +0000 (20:19 +0000)]
ARM PBX-A9 memory map tweaks

Add core tile memeory to the RealView PBX-A9 board.  Document the
memeory maps that are known to work with the qemu bootloader.

Signed-off-by: Paul Brook <paul@codesourcery.com>
14 years agoLAN9118 improvements
Paul Brook [Mon, 21 Dec 2009 15:05:57 +0000 (15:05 +0000)]
LAN9118 improvements

Implement LAN9118 general purpose timer and PHY interrupts. Fix global
interrupt status bit.

Signed-off-by: Paul Brook <paul@codesourcery.com>