]> git.proxmox.com Git - qemu.git/log
qemu.git
14 years agoUpdate Changelog and VERSION for 0.11.0-rc1 release v0.11.0-rc1
Anthony Liguori [Wed, 29 Jul 2009 16:47:31 +0000 (11:47 -0500)]
Update Changelog and VERSION for 0.11.0-rc1 release

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMove CLOCKLIBS and PTHREADLIBS out of CONFIG_LINUX_USER_ONLY
Anthony Liguori [Fri, 17 Jul 2009 03:02:43 +0000 (22:02 -0500)]
Move CLOCKLIBS and PTHREADLIBS out of CONFIG_LINUX_USER_ONLY

Otherwise, -lrt doesn't get added to the softmmu build.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd a pc-0.11 machine type and make the pc type an alias
Mark McLoughlin [Wed, 22 Jul 2009 09:02:51 +0000 (10:02 +0100)]
Add a pc-0.11 machine type and make the pc type an alias

The pc-0.11 type allows users of qemu-0.11 to use a machine type which
they know will remain compatible when the upgrade to qemu-0.12.

Management tools may choose to canonicalize the 'pc' machine type to
'pc-0.11' so that if the 'pc' alias changes target in future versions
of qemu, the machine type used will remain compatible.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd machine type aliases
Mark McLoughlin [Wed, 22 Jul 2009 09:02:50 +0000 (10:02 +0100)]
Add machine type aliases

Add an 'alias' field to QEMUMachine and display it in the output of
'qemu -M ?' with an '(aliased to foo)' suffix.

Aliases can change targets in newer versions of qemu, so management tools
may choose canonicalize machine types to ensure that if a user chooses an
alias, that the actual machine type used will remain compatible in
future.

This is intended to mimic a symlink to a machine description file.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd support for fd=name to tap and socket networking
Mark McLoughlin [Wed, 22 Jul 2009 08:11:42 +0000 (09:11 +0100)]
Add support for fd=name to tap and socket networking

This allows a program to initialize a host networking device using a
file descriptor passed over a unix monitor socket.

The program must first pass the file descriptor using SCM_RIGHTS
ancillary data with the getfd monitor command. It then may do
"host_net_add tap fd=name" to use the named file descriptor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd monitor_get_fd() command for fetching named fds
Mark McLoughlin [Wed, 22 Jul 2009 08:11:41 +0000 (09:11 +0100)]
Add monitor_get_fd() command for fetching named fds

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd getfd and closefd monitor commands
Mark McLoughlin [Wed, 22 Jul 2009 08:11:40 +0000 (09:11 +0100)]
Add getfd and closefd monitor commands

Add monitor commands to support passing file descriptors via
SCM_RIGHTS.

getfd assigns the passed file descriptor a name for use with other
monitor commands.

closefd allows passed file descriptors to be closed. If a monitor
command actually uses a named file descriptor, closefd will not be
required.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd SCM_RIGHTS support to unix socket character devices
Mark McLoughlin [Wed, 22 Jul 2009 08:11:39 +0000 (09:11 +0100)]
Add SCM_RIGHTS support to unix socket character devices

If a file descriptor is passed via a message with SCM_RIGHTS ancillary
data on a unix socket, store the file descriptor for use in the
chr_read() handler. Close the file descriptor if it was not used.

The qemu_chr_get_msgfd() API provides access to the passed descriptor.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoMake tcp_chr_read() use recvmsg()
Mark McLoughlin [Wed, 22 Jul 2009 08:11:38 +0000 (09:11 +0100)]
Make tcp_chr_read() use recvmsg()

Split out tcp_chr_recv() out of tcp_chr_read() and implement it on
non-win32 using recvmsg(). This is needed for a subsequent patch
which implements SCM_RIGHTS support.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotap-win32: Use correct headers.
Filip Navara [Mon, 27 Jul 2009 15:02:01 +0000 (10:02 -0500)]
tap-win32: Use correct headers.

Replace the usage of DDK headers with the SDK counterpart "winioctl.h".

Signed-off-by: Filip Navara <filip.navara@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix broken migration
Glauber Costa [Fri, 24 Jul 2009 20:20:23 +0000 (16:20 -0400)]
fix broken migration

While fixing migration with -S, commit
89befdd1a6b18215153b8976682d57b7d03d5782 broke the rest of us. Poor
glommer, with a poor family, spare him his life from this monstruosity.

Since the unconditional vm_start, not autostart was the villain, I'm putting
back autostart. Let me know if you prefer other solutions, it doesn't really matter,
doesn't really matter to me.

Any way the wind blows...

Signed-off-by: Glauber Costa <glommer@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoslirp: Use monotonic clock if available (v2)
Ed Swierk [Thu, 23 Jul 2009 21:13:34 +0000 (14:13 -0700)]
slirp: Use monotonic clock if available (v2)

Calling gettimeofday() to compute a time interval can cause problems if
the system clock jumps forwards or backwards; replace updtime() with
qemu_get_clock(rt_clock), which calls clock_gettime(CLOCK_MONOTONIC) if
it is available.

Also remove some useless macros.

Signed-off-by: Ed Swierk <eswierk@aristanetworks.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu: msix nit: clear msix_entries_nr on error
Michael S. Tsirkin [Wed, 22 Jul 2009 15:51:14 +0000 (18:51 +0300)]
qemu: msix nit: clear msix_entries_nr on error

I don't think it's critical to do this, but it's
best to keep uninit and error recovery consistent.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHPET fixes for reg writes
Beth Kon [Fri, 24 Jul 2009 16:26:59 +0000 (12:26 -0400)]
HPET fixes for reg writes

This patch addresses the problems found by Andriy Gapon:

- The code was incorrectly overwriting the high order 32
  bits of the timer and hpet config registers. This didn't show up
  in testing because linux and windows use hpet in legacy mode,
  where the high order 32 bits (advertising available interrupts)
  of the timer config register are ignored, and the high order 32
  bits of the hpet config register are reserved and unused.

- The mask for level-triggered interrupts was off by a bit. (hpet
  doesn't currently support level-triggered interrupts).

In addition, I removed some unused #defines, and corrected the ioapic
interrupt values advertised. I'd set this up early in hpet development
and never went back to correct it, and no bugs resulted since linux and
windows use hpet in legacy mode where available interrupts are ignored.

Signed-off-by: Beth Kon <eak@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoslirp: Fix guestfwd for incoming data
Jan Kiszka [Wed, 22 Jul 2009 15:03:52 +0000 (17:03 +0200)]
slirp: Fix guestfwd for incoming data

Unless a virtual server address was explicitly defined (which is
impossible with the legacy -net channel format), guestfwd did not
properly forwarded host->guest packets. This patch fixes it.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-thread: use pthread_equal
Sebastian Herbszt [Sun, 19 Jul 2009 13:16:09 +0000 (15:16 +0200)]
qemu-thread: use pthread_equal

Fixes

qemu-thread.c: In function `qemu_thread_equal':
qemu-thread.c:161: error: invalid operands to binary ==

Use of pthread_equal suggested by Filip Navara.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosignrom.sh: portability fix
Christoph Egger [Fri, 17 Jul 2009 13:23:51 +0000 (15:23 +0200)]
signrom.sh: portability fix

Attached patch makes signrom.sh working on NetBSD.
The output of the 'od' command leads to a syntax error
which breaks the build.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqmu-img: fix qemu-img convert to generate a valid image when the source referenced...
Akkarit Sangpetch [Fri, 17 Jul 2009 08:02:15 +0000 (10:02 +0200)]
qmu-img: fix qemu-img convert to generate a valid image when the source referenced a backing file

Make 'qemu-img convert' copies unallocated parts of the source image
when -B option was not specified.

Signed-off-by: Akkarit Sangpetch <asangpet@andrew.cmu.edu>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agovmdk: Fix backing file handling
Kevin Wolf [Fri, 17 Jul 2009 06:20:41 +0000 (08:20 +0200)]
vmdk: Fix backing file handling

Instead of storing the backing file in its own BlockDriverState, VMDK uses the
BlockDriverState of the raw image file it opened. This is wrong and breaks
functions that access the backing file or protocols. This fix replaces all
occurrences of s->hd->backing_* with bs->backing_*.

This fixes qemu-iotests failure in 020 (Commit changes to backing file).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoAdd save/restore support to the LSI logic SCSI device model.
Nolan [Mon, 20 Jul 2009 21:11:35 +0000 (14:11 -0700)]
Add save/restore support to the LSI logic SCSI device model.

This patch requires "Handle BH's queued by AIO completions in
qemu_aio_flush()" to work reliably.  The combination of those two
patches survived 300+ migrations with heavy IO load running in the
guest.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHandle BH's queued by AIO completions in qemu_aio_flush()
Nolan [Mon, 20 Jul 2009 21:01:25 +0000 (14:01 -0700)]
Handle BH's queued by AIO completions in qemu_aio_flush()

Without this, the call to qemu_aio_flush during migration doesn't
actually flush all in-flight SCSI IOs.

Signed-off-by: Nolan Leake <nolan <at> sigbus.net>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoFix most warnings (errors with -Werror) when debugging is enabled
Blue Swirl [Mon, 20 Jul 2009 17:19:25 +0000 (17:19 +0000)]
Fix most warnings (errors with -Werror) when debugging is enabled

I used the following command to enable debugging:
perl -p -i -e 's/^\/\/#define DEBUG/#define DEBUG/g' * */* */*/*

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix build with DEBUG_PCI in pci_host.h enabled
Blue Swirl [Mon, 20 Jul 2009 10:37:51 +0000 (10:37 +0000)]
Fix build with DEBUG_PCI in pci_host.h enabled

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoisxdigit -> qemu_isxdigit
Christoph Egger [Fri, 17 Jul 2009 17:48:02 +0000 (17:48 +0000)]
isxdigit -> qemu_isxdigit

Hi!

Attached patch uses qemu_isxdigit() instead of isxdigit().
Fixes build warning on NetBSD.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

14 years agofix build warnings
Christoph Egger [Fri, 17 Jul 2009 17:48:01 +0000 (17:48 +0000)]
fix build warnings

Hi!

Attached patch fixes build warnings due to use of different pointer
signedness.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

14 years agoSuppress a Sparse warning
Blue Swirl [Fri, 17 Jul 2009 11:18:53 +0000 (11:18 +0000)]
Suppress a Sparse warning

Move the export to a file used by both qdev.c and sysbus.c.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: use hex for version numbers
Blue Swirl [Fri, 17 Jul 2009 11:01:50 +0000 (11:01 +0000)]
Sparc32: use hex for version numbers

0x10000000 looks better than 268435456.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: fix escc devices broken by ee6847d19be16c789b8bd4e553b7cd6701ba1245
Blue Swirl [Fri, 17 Jul 2009 11:01:49 +0000 (11:01 +0000)]
Sparc32: fix escc devices broken by ee6847d19be16c789b8bd4e553b7cd6701ba1245

The logic of Zilog makes channel B the first device and channel A the
second one.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: fix fdc io_base
Blue Swirl [Fri, 17 Jul 2009 11:01:48 +0000 (11:01 +0000)]
Sparc32: fix fdc io_base

On some Sparc32 machines, fdc is located above 4G limit, so uint32_t is not
appropriate type for io_base.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245
Blue Swirl [Fri, 17 Jul 2009 11:01:47 +0000 (11:01 +0000)]
Fix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245

Move the qdev_init(dev); call after the setting of d->size.
Thanks to Filip Navara.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoFix OpenBSD build
Blue Swirl [Fri, 17 Jul 2009 11:01:45 +0000 (11:01 +0000)]
Fix OpenBSD build

The header sys-queue.h must be #included early, otherwise at some point OS
queue macros will be used. On OpenBSD, those don't define TAILQ_FOREACH_SAFE.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoARM host fixes
Paul Brook [Fri, 17 Jul 2009 10:21:12 +0000 (11:21 +0100)]
ARM host fixes

Minor TCG cleanups and warning fixes for ARM hosts.

Signed-off-by: Paul Brook <paul@codesourcery.com>
14 years agoOnly allow -cpu host when KVM is enabled
Anthony Liguori [Fri, 17 Jul 2009 03:20:22 +0000 (22:20 -0500)]
Only allow -cpu host when KVM is enabled

-cpu host is not at all useful when using tcg.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoInitialize cpuid variables
Anthony Liguori [Fri, 17 Jul 2009 02:33:48 +0000 (21:33 -0500)]
Initialize cpuid variables

This causes a build break when !KVM.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoIgnore -Waddress for alsaaudio.c
malc [Fri, 17 Jul 2009 01:57:04 +0000 (05:57 +0400)]
Ignore -Waddress for alsaaudio.c

/usr/include/alsa/pcm.h contains:

#define snd_pcm_sw_params_alloca(ptr) do { assert(ptr); *ptr = (snd_pcm_sw_params_t *) alloca(snd_pcm_sw_params_sizeof()); memset(*ptr, 0, snd_pcm_sw_params_sizeof()); } while (0)

The assert generates: "error: the address of 'sw_params' will always
evaluate as 'true'" which combined with -Werror prevents alsaaudio.o
from being built with certain versions of GCC.

14 years agotcg: Fix tcg_gen_rotr_i64
Aurelien Jarno [Sat, 18 Jul 2009 09:15:40 +0000 (11:15 +0200)]
tcg: Fix tcg_gen_rotr_i64

Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
14 years agoUpdate version for 0.11.0-rc0 v0.11.0-rc0
Anthony Liguori [Thu, 16 Jul 2009 23:10:53 +0000 (18:10 -0500)]
Update version for 0.11.0-rc0

14 years agoGenerate $target_dir/config.h from $target_dir/config.mak
Juan Quintela [Thu, 16 Jul 2009 16:34:20 +0000 (18:34 +0200)]
Generate $target_dir/config.h from $target_dir/config.mak

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor config_softfloat selection in another list
Juan Quintela [Thu, 16 Jul 2009 16:34:19 +0000 (18:34 +0200)]
Refactor config_softfloat selection in another list

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agorename s/config_mak/config_host_mak/ and s/config_h/config_host_h/
Juan Quintela [Thu, 16 Jul 2009 16:34:18 +0000 (18:34 +0200)]
rename s/config_mak/config_host_mak/ and s/config_h/config_host_h/

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosimplify TARGET_ABI_DIR generation
Juan Quintela [Thu, 16 Jul 2009 16:34:17 +0000 (18:34 +0200)]
simplify TARGET_ABI_DIR generation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosimplify TARGET_ARCH2 generation
Juan Quintela [Thu, 16 Jul 2009 16:34:16 +0000 (18:34 +0200)]
simplify TARGET_ARCH2 generation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agosimplify TARGET_BASE_ARCH generation
Juan Quintela [Thu, 16 Jul 2009 16:34:15 +0000 (18:34 +0200)]
simplify TARGET_BASE_ARCH generation

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agogenerate TARGET_<arch name> for config.h
Juan Quintela [Thu, 16 Jul 2009 16:34:14 +0000 (18:34 +0200)]
generate TARGET_<arch name> for config.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agogenerate TARGET_ARCH for config.h
Juan Quintela [Thu, 16 Jul 2009 16:34:13 +0000 (18:34 +0200)]
generate TARGET_ARCH for config.h

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoOnly setup TARGET_ARCH when it is different of
Juan Quintela [Thu, 16 Jul 2009 16:34:12 +0000 (18:34 +0200)]
Only setup TARGET_ARCH when it is different of

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoprint only once TARGET_ARCH
Juan Quintela [Thu, 16 Jul 2009 16:34:11 +0000 (18:34 +0200)]
print only once TARGET_ARCH

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor targe_bigendian selection in another list
Juan Quintela [Thu, 16 Jul 2009 16:34:10 +0000 (18:34 +0200)]
Refactor targe_bigendian selection in another list

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor common code using a list
Juan Quintela [Thu, 16 Jul 2009 16:34:09 +0000 (18:34 +0200)]
Refactor common code using a list

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agogenerate ARCH name instead of coding it
Juan Quintela [Thu, 16 Jul 2009 16:34:08 +0000 (18:34 +0200)]
generate ARCH name instead of coding it

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoWe can wrap ARCH_CFLAGS/ARCH_LDFLAGS in CFLAGS/LDFLAGS at configure time
Juan Quintela [Thu, 16 Jul 2009 16:34:07 +0000 (18:34 +0200)]
We can wrap ARCH_CFLAGS/ARCH_LDFLAGS in CFLAGS/LDFLAGS at configure time

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoWe can wrap OS_CFLAGS/OS_LDFLAGS in CFLAGS/LDFLAGS at configure time
Juan Quintela [Thu, 16 Jul 2009 16:34:06 +0000 (18:34 +0200)]
We can wrap OS_CFLAGS/OS_LDFLAGS in CFLAGS/LDFLAGS at configure time

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu binary don't exist anymore. I guess not much people is compiling on alpha
Juan Quintela [Thu, 16 Jul 2009 16:34:05 +0000 (18:34 +0200)]
qemu binary don't exist anymore. I guess not much people is compiling on alpha

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRefactor a single rule to generate all qemu-* executables
Juan Quintela [Thu, 16 Jul 2009 16:34:04 +0000 (18:34 +0200)]
Refactor a single rule to generate all qemu-* executables

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoTARGET_ARCH == TARGET_BASE_ARCH in m68k and arm
Juan Quintela [Thu, 16 Jul 2009 16:34:03 +0000 (18:34 +0200)]
TARGET_ARCH == TARGET_BASE_ARCH in m68k and arm

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoBASE_LDFLAGS is not used anywhere else
Juan Quintela [Thu, 16 Jul 2009 16:34:02 +0000 (18:34 +0200)]
BASE_LDFLAGS is not used anywhere else

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure kqemu in a single place
Juan Quintela [Thu, 16 Jul 2009 16:34:01 +0000 (18:34 +0200)]
configure kqemu in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure kvm in a single place
Juan Quintela [Thu, 16 Jul 2009 16:34:00 +0000 (18:34 +0200)]
configure kvm in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure xen in a single place
Juan Quintela [Thu, 16 Jul 2009 16:33:59 +0000 (18:33 +0200)]
configure xen in a single place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agochange ifdefs by obj-$(TARGET_BASE_ARCH)
Juan Quintela [Thu, 16 Jul 2009 16:33:58 +0000 (18:33 +0200)]
change ifdefs by obj-$(TARGET_BASE_ARCH)

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoTARGET_ARCH2 is already known at configure time.
Juan Quintela [Thu, 16 Jul 2009 15:57:08 +0000 (17:57 +0200)]
TARGET_ARCH2 is already known at configure time.

Remove re-construction in Makefile.target

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoconfigure already knows what TARGET_BASE_ARCH we need, no need to put the logic in...
Juan Quintela [Thu, 16 Jul 2009 15:57:07 +0000 (17:57 +0200)]
configure already knows what TARGET_BASE_ARCH we need, no need to put the logic in Makefile.target

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoalready defined several lines before in block-obj-y
Juan Quintela [Thu, 16 Jul 2009 15:57:06 +0000 (17:57 +0200)]
already defined several lines before in block-obj-y

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove unused Makefile variable
Juan Quintela [Thu, 16 Jul 2009 15:57:05 +0000 (17:57 +0200)]
Remove unused Makefile variable

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agouse nwfpe-obj-y for consistence
Juan Quintela [Thu, 16 Jul 2009 15:57:04 +0000 (17:57 +0200)]
use nwfpe-obj-y for consistence

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agouse block-nested-y for files inside block/
Juan Quintela [Thu, 16 Jul 2009 15:57:03 +0000 (17:57 +0200)]
use block-nested-y for files inside block/

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove duplicated definition
Juan Quintela [Thu, 16 Jul 2009 15:57:02 +0000 (17:57 +0200)]
Remove duplicated definition

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix sparc not solaris build
Juan Quintela [Thu, 16 Jul 2009 15:57:01 +0000 (17:57 +0200)]
fix sparc not solaris build

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix XEN Build
Juan Quintela [Thu, 16 Jul 2009 15:57:00 +0000 (17:57 +0200)]
fix XEN Build

I miss s/yes/y/ in one place

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix for bad macaddr of e1000 in Windows 2003 server with original MS driver
Naphtali Sprei [Thu, 16 Jul 2009 15:17:53 +0000 (18:17 +0300)]
fix for bad macaddr of e1000 in Windows 2003 server with original MS driver

The sequence of reading from eeprom is "offset by one" moved because of a false
detection of a clock cycle after an eeprom reset. Keeping the last clock value
after a reset keeps it in sync.

Signed-off-by: Naphtali Sprei <nsprei@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: es1370+ac97 description
Gerd Hoffmann [Wed, 15 Jul 2009 11:50:13 +0000 (13:50 +0200)]
qdev: es1370+ac97 description

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev/compat: virtio-net-pci 0.10 compatibility.
Gerd Hoffmann [Wed, 15 Jul 2009 11:48:25 +0000 (13:48 +0200)]
qdev/compat: virtio-net-pci 0.10 compatibility.

Add vectors property, allowing to turn off msi by setting vectors=0.
Add compat property to pc-0.10 disabling msi.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: print device id in "info pci".
Gerd Hoffmann [Wed, 15 Jul 2009 11:43:36 +0000 (13:43 +0200)]
qdev: print device id in "info pci".

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev/compat: virtio-console-pci 0.10 compatibility.
Gerd Hoffmann [Wed, 15 Jul 2009 11:48:24 +0000 (13:48 +0200)]
qdev/compat: virtio-console-pci 0.10 compatibility.

Add class property to virtio-console-pci allowing to specify the PCI class.
Add compat property to pc-0.10 to set the old PCI class.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: add id= support for pci nics.
Gerd Hoffmann [Wed, 15 Jul 2009 11:43:35 +0000 (13:43 +0200)]
qdev: add id= support for pci nics.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev/compat: virtio-blk-pci 0.10 compatibility.
Gerd Hoffmann [Wed, 15 Jul 2009 11:48:23 +0000 (13:48 +0200)]
qdev/compat: virtio-blk-pci 0.10 compatibility.

Add class property to virtio-blk-pci allowing to specify the PCI class.
Add compat property to pc-0.10 to set the old PCI class.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: add user-specified identifier to devices.
Gerd Hoffmann [Wed, 15 Jul 2009 11:43:34 +0000 (13:43 +0200)]
qdev: add user-specified identifier to devices.

Add id field to DeviceState.  Make "info qtree" print it.

This helps users and management apps identifying devices in monitor
output, which is especially useful with otherwise identical devices
such as two virtio disks.

This patch doesn't add a way to set the id, followup patches will do.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev/compat: add pc-0.10 machine type.
Gerd Hoffmann [Wed, 15 Jul 2009 11:48:22 +0000 (13:48 +0200)]
qdev/compat: add pc-0.10 machine type.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: add no_user, alias and desc
Gerd Hoffmann [Wed, 15 Jul 2009 11:43:33 +0000 (13:43 +0200)]
qdev: add no_user, alias and desc

no_user: prevent users from adding certain devices.
desc: description of the device.
alias: to allow user friendly shortcuts on the command line, i.e.
  -device usbmouse  instead of  -device "QEMU USB Mouse"  or
  -device lsi       instead of  -device lsi53c895a

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev/compat: compat property infrastructure.
Gerd Hoffmann [Wed, 15 Jul 2009 11:48:21 +0000 (13:48 +0200)]
qdev/compat: compat property infrastructure.

This add support for switching devices into a compatibility mode
using device properties.  Machine types can have a list of properties
for specific devices attached to allow the easy creation of machine
types compatible to older qemu versions.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: factor out driver search to qdev_find_info()
Gerd Hoffmann [Wed, 15 Jul 2009 11:43:32 +0000 (13:43 +0200)]
qdev: factor out driver search to qdev_find_info()

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agocleanup: drop unused struct elements from VirtIOPCIProxy.
Gerd Hoffmann [Wed, 15 Jul 2009 11:48:20 +0000 (13:48 +0200)]
cleanup: drop unused struct elements from VirtIOPCIProxy.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqdev: rework device properties.
Gerd Hoffmann [Wed, 15 Jul 2009 11:43:31 +0000 (13:43 +0200)]
qdev: rework device properties.

This patch is a major overhaul of the device properties.  The properties
are saved directly in the device state struct now, the linked list of
property values is gone.

Advantages:
  * We don't have to maintain the list with the property values.
  * The value in the property list and the value actually used by
    the device can't go out of sync any more (used to happen for
    the pci.devfn == -1 case) because there is only one place where
    the value is stored.
  * A record describing the property is required now, you can't set
    random properties any more.

There are bus-specific and device-specific properties.  The former
should be used for properties common to all bus drivers.  Typical
use case is bus addressing, i.e. pci.devfn and i2c.address.

Properties have a PropertyInfo struct attached with name, size and
function pointers to parse and print properties.  A few common property
types have PropertyInfos defined in qdev-properties.c.  Drivers are free
to implement their own very special property parsers if needed.

Properties can have default values.  If unset they are zero-filled.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agomonitor: Add port write command
Jan Kiszka [Tue, 14 Jul 2009 08:20:11 +0000 (10:20 +0200)]
monitor: Add port write command

Useful for testing hardware emulations or manipulating its state to
stress guest drivers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoInitialize PS2 keyboard / mouse state on reset
Dinesh Subhraveti [Wed, 15 Jul 2009 01:30:53 +0000 (18:30 -0700)]
Initialize PS2 keyboard / mouse state on reset

Currently only common PS2 state is initialized, leaving keyboard and
mouse specific state to contain stale values.

Signed-off-by: Dinesh Subhraveti <dineshs@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agofix segfault in setting migration speed
Glauber Costa [Tue, 14 Jul 2009 22:26:51 +0000 (18:26 -0400)]
fix segfault in setting migration speed

Hi,

Whoever wrote this migrate_set_speed function is totally stupid.

Any failed or completed migration keeps its state to allow probing of
migration data, but has no associated file anymore. It is, thus,
possible to crash qemu by calling migrate_set_speed after a migration
is finished (or failed, or cancelled), but before another one starts.

This patch fixes it.

Signed-off-by: Glauber Costa <glommer@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoRemove dead i386 assembly code from softmmu_header.h
Stuart Brady [Sun, 12 Jul 2009 19:09:40 +0000 (20:09 +0100)]
Remove dead i386 assembly code from softmmu_header.h

This patch removes dead i386 assembly code from softmmu_header.h.

The code is conditional on ASM_SOFTMMU, which is never defined.
Optimisation for the fast path is already handled by tcg_out_qemu_ld()
and tcg_out_qemu_st(), so there seems to be little need for this code.

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-io: use BDRV_O_FILE to implement the growable open option
Christoph Hellwig [Wed, 15 Jul 2009 21:11:21 +0000 (23:11 +0200)]
qemu-io: use BDRV_O_FILE to implement the growable open option

Instead of doing our own check for protocols which fails because raw isn't
formally a protocol but special cased in find_protocol specify the BDRV_O_FILE
option to use the same code as bdrv_file_open does.

While we're at it also add the missing documentation for -g to the main
qemu-io help string.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agotlb flush cleanup
Igor Kovalenko [Sat, 11 Jul 2009 22:15:40 +0000 (02:15 +0400)]
tlb flush cleanup

Use static empty variable s_cputlb_empty_entry to clear entries,
also reset addend member when clearing entries.
This helps running with valgrind/memcheck

Signed-off-by: igor.v.kovalenko@gmail.com
--
Kind regards,
Igor V. Kovalenko
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoReset HPET config register on hpet_reset
Beth Kon [Mon, 13 Jul 2009 23:43:13 +0000 (19:43 -0400)]
Reset HPET config register on hpet_reset

Without this, after system reset, hpet does not detect transition from
non-legacy to legacy mode.

Signed-off-by: Beth Kon <eak@us.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoqemu-io: Implement bdrv_load_vmstate/bdrv_save_vmstate
Kevin Wolf [Wed, 15 Jul 2009 10:06:58 +0000 (12:06 +0200)]
qemu-io: Implement bdrv_load_vmstate/bdrv_save_vmstate

The load_vmstate and save_vmstate functions are implemented as a
variation of the normal read/write operation, enabled by the -b option.
This is the same mechanism as is used to switch from read/write to
pread/pwrite.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoHandle vga= in -append
Pascal Terjan [Mon, 13 Jul 2009 15:46:42 +0000 (17:46 +0200)]
Handle vga= in -append

Here is a patch I had sent twice to the list 2 years ago.
Hopefuly this time someone will be interested

It adds support for passing vga mode to linux kernel through
vga= option in -append

Signed-off-by: Pascal Terjan <pterjan@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for ioport address.
Isaku Yamahata [Tue, 14 Jul 2009 10:10:43 +0000 (19:10 +0900)]
ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for ioport address.

Using int for cpu_{in, out}[bwl] is inconsistent with other part
because for address or value, uintN_t is used by other qemu part.
At least, softmmu, CPU{Read, Write}MemoryFunc, pci, target_phys_addr_t
and the callers of cpu_{in, out}[bwl]().
This patch removes the inconsistency.

IO port has its own address space so define pio_addr_t as uint32_t
because PCI io space width is 32bit.
And use uint{32, 16, 8}_t for ioport value.
Changing signedness of value might cause subtle issue. However
only a suspicious caller is kvm_handle_io() which is ok. And other callers
pass unsigned value in the first place.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Stuart Brady <sdbrady@ntlworld.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Samuel Thibault <samuel.thibault@gnu.org>
Cc: Tristan Gingold <gingold@adacore.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoioport: remove some #ifdef DEBUG_UNUSED_IOPORT.
Isaku Yamahata [Tue, 14 Jul 2009 10:10:42 +0000 (19:10 +0900)]
ioport: remove some #ifdef DEBUG_UNUSED_IOPORT.

remove some #ifdef DEBUG_UNUSED_IOPORT in ioport.c
and use PRIx32 where appropriate

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Anthony Liguori <anthony@codemonkey.ws>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoraw-posix: Handle errors in raw_create
Stefan Weil [Sat, 11 Jul 2009 14:43:37 +0000 (16:43 +0200)]
raw-posix: Handle errors in raw_create

In qemu-iotests, some large images are created using qemu-img.

Without checks for errors, qemu-img will just create an
empty image, and later read / write tests will fail.

With the patch, failures during image creation are detected
and reported.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoomit 3DNOW! CPUID bits from qemu64 CPU model
Andre Przywara [Thu, 16 Jul 2009 12:49:31 +0000 (14:49 +0200)]
omit 3DNOW! CPUID bits from qemu64 CPU model

Since we recently do not disable 3DNOW! support anymore, we should
avoid setting the bits in the default qemu64 CPU model to ease
migration. TCG does not support it anyway and even AMD deprecates
it's usage nowadays.
If you want to use it in KVM, use the phenom, athlon or host CPU
model.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agohonor -S on incoming migration
Paolo Bonzini [Tue, 14 Jul 2009 16:07:50 +0000 (18:07 +0200)]
honor -S on incoming migration

-S is not honored by qemu on incoming migration.  If a domain is migrated
while paused, thus, it will start running on the remote machine; this
is wrong.

Given the trivial patch to fix this, it looks more like a thinko
than anything else, probably dating back to the qemu-kvm merge.
The interesting part is that the -S mechanism was in fact *used* when
migrating (setting autostart = 0) and the incoming migration code was
starting the VM at the end of the migration.

Since I was removing the vm_start from there, I also corrected a related
imprecision.  The code was doing a vm_stop "just in case", but we can
be sure that the VM is not running---the vm_start call in vl.c has not
been reached yet.  So the vm_stop is removed together with the vm_start.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
14 years agoUpdate to a hopefully more future proof FSF address
Blue Swirl [Thu, 16 Jul 2009 20:47:01 +0000 (20:47 +0000)]
Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: convert slavio interrupt controller to qdev
Blue Swirl [Thu, 16 Jul 2009 14:15:34 +0000 (14:15 +0000)]
Sparc32: convert slavio interrupt controller to qdev

Also increase QDEV_MAX_IRQ.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
14 years agoSparc32: refactor CPU init
Blue Swirl [Thu, 16 Jul 2009 13:48:20 +0000 (13:48 +0000)]
Sparc32: refactor CPU init

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>