sdk/emulator/qemu.git
15 years agoClean up generated qemu-img-cmds.h
Blue Swirl [Tue, 9 Jun 2009 18:45:16 +0000 (18:45 +0000)]
Clean up generated qemu-img-cmds.h

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoFix Sparse warning
Blue Swirl [Tue, 9 Jun 2009 18:38:51 +0000 (18:38 +0000)]
Fix Sparse warning

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agomicroblaze-dis.c does not need to be executable
Blue Swirl [Tue, 9 Jun 2009 18:27:02 +0000 (18:27 +0000)]
microblaze-dis.c does not need to be executable

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoFix warning
Blue Swirl [Tue, 9 Jun 2009 17:51:21 +0000 (20:51 +0300)]
Fix warning

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoRemove unused and misnamed field and variable
Blue Swirl [Tue, 9 Jun 2009 17:16:53 +0000 (17:16 +0000)]
Remove unused and misnamed field and variable

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoUpdate irqs on reset and device load
Blue Swirl [Tue, 9 Jun 2009 17:11:48 +0000 (17:11 +0000)]
Update irqs on reset and device load

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoRegister reset functions for e1000 and rtl8139
Blue Swirl [Tue, 9 Jun 2009 15:02:00 +0000 (15:02 +0000)]
Register reset functions for e1000 and rtl8139

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoqdev: c99 initilaizers for bus_type_names
Gerd Hoffmann [Mon, 8 Jun 2009 12:33:57 +0000 (14:33 +0200)]
qdev: c99 initilaizers for bus_type_names

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
15 years agoxen nic: use XC_PAGE_SIZE instead of PAGE_SIZE.
Gerd Hoffmann [Mon, 8 Jun 2009 12:33:27 +0000 (14:33 +0200)]
xen nic: use XC_PAGE_SIZE instead of PAGE_SIZE.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
15 years agoxen nic: use qemu_malloc
Gerd Hoffmann [Mon, 8 Jun 2009 12:33:25 +0000 (14:33 +0200)]
xen nic: use qemu_malloc

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
15 years agokvm: Improve upgrade notes when facing unsupported kernels
Jan Kiszka [Sun, 7 Jun 2009 09:30:25 +0000 (11:30 +0200)]
kvm: Improve upgrade notes when facing unsupported kernels

Users complained that it is not obvious what to do when kvm refuses to
build or run due to an unsupported host kernel, so let's improve the
hints.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
15 years agoFix generation of CONFIG_KVM
Blue Swirl [Sun, 7 Jun 2009 13:29:26 +0000 (13:29 +0000)]
Fix generation of CONFIG_KVM

When configuring for several targets, some with KVM and some without, CONFIG_KVM was accidentally disabled for some of the targets.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoUse hxtool for qemu-img command list
Stuart Brady [Sat, 6 Jun 2009 23:42:17 +0000 (00:42 +0100)]
Use hxtool for qemu-img command list

Use hxtool to generate the 'command syntax' section of qemu-img's help
message, and the corresponding section of the texinfo documentation.

This has the side-effect of adding 'check' to this list of commands in
the texinfo documentation.

Signed-off-by: Stuart Brady <stuart.brady@gmail.com>
15 years agodoc: Update information on supported network adapters.
Stefan Weil [Sat, 6 Jun 2009 16:05:58 +0000 (18:05 +0200)]
doc: Update information on supported network adapters.

* There are no ISA PCI network adapters.
* MIPS Malta is supported with any PCI network card.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
15 years agoxen: net backend doesn't need linux headers.
Gerd Hoffmann [Tue, 2 Jun 2009 07:05:24 +0000 (09:05 +0200)]
xen: net backend doesn't need linux headers.

Drop them to make qemu build on OpenSolaris.

Cc: Andreas Färber <andreas.faerber@web.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
15 years agoDocument changes in qemu-img interface
Kevin Wolf [Thu, 4 Jun 2009 13:39:39 +0000 (15:39 +0200)]
Document changes in qemu-img interface

Update the documentation to reflect the introduction of format specific options
with -o. Don't advertise -e or -6 any more, they exist only for compatibility
reasons and can be replaced by the corresponding -o options.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
15 years agoqemu-img: Print available options with -o ?
Kevin Wolf [Thu, 4 Jun 2009 13:39:38 +0000 (15:39 +0200)]
qemu-img: Print available options with -o ?

This patch adds a small help text to each of the options in the block drivers
which can be displayed by using qemu-img create -f fmt -o ?

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
15 years agoFix spelling in comment.
Stefan Weil [Sat, 6 Jun 2009 15:00:31 +0000 (17:00 +0200)]
Fix spelling in comment.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
15 years agoUse hxtool to generate monitor documentation and C structures
Blue Swirl [Sat, 6 Jun 2009 08:22:04 +0000 (08:22 +0000)]
Use hxtool to generate monitor documentation and C structures

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
15 years agoUse correct type for SPARC cpu_cc_op
Paul Brook [Sat, 6 Jun 2009 01:54:03 +0000 (02:54 +0100)]
Use correct type for SPARC cpu_cc_op

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoFix typo
Paul Brook [Sat, 6 Jun 2009 01:49:32 +0000 (02:49 +0100)]
Fix typo

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoqdev: add monitor command to dump the tree.
Gerd Hoffmann [Fri, 5 Jun 2009 14:53:17 +0000 (15:53 +0100)]
qdev: add monitor command to dump the tree.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoRecord device property types
Paul Brook [Fri, 5 Jun 2009 14:52:04 +0000 (15:52 +0100)]
Record device property types

Record device property types, and provide a list of properties at device
registration time.

Add a "device" property type that holds a reference to annother device.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoFix elf loader range checking
Paul Brook [Fri, 5 Jun 2009 14:16:41 +0000 (15:16 +0100)]
Fix elf loader range checking

The ELF loader tracks the range of addresses used by a binary.
However this incorrectly assumes zero is not a valid address.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoRemove ARM NVIC initialization hack
Paul Brook [Thu, 4 Jun 2009 12:12:05 +0000 (13:12 +0100)]
Remove ARM NVIC initialization hack

The ARMv7-M NVIC device pokes itself into the CPU state.  Now we have a
proper device model we can have the CPU/SoC code do this.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoAdd --enable-debug
Paul Brook [Thu, 4 Jun 2009 10:39:04 +0000 (11:39 +0100)]
Add --enable-debug

New configure option for debug builds.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoqdev: kill DeviceState->name
Gerd Hoffmann [Wed, 27 May 2009 20:54:29 +0000 (22:54 +0200)]
qdev: kill DeviceState->name

is redundant with DeviceState->type->name

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
15 years agofix gdbstub support for multiple threads in usermode, v3
Nathan Froyd [Wed, 3 Jun 2009 18:33:08 +0000 (11:33 -0700)]
fix gdbstub support for multiple threads in usermode, v3

When debugging multi-threaded programs, QEMU's gdb stub would report the
correct number of threads (the qfThreadInfo and qsThreadInfo packets).
However, the stub was unable to actually switch between threads (the T
packet), since it would report every thread except the first as being
dead.  Furthermore, the stub relied upon cpu_index as a reliable means
of assigning IDs to the threads.  This was a bad idea; if you have this
sequence of events:

initial thread created
new thread #1
new thread #2
thread #1 exits
new thread #3

thread #3 will have the same cpu_index as thread #1, which would confuse
GDB.  (This problem is partly due to the remote protocol not having a
good way to send thread creation/destruction events.)

We fix this by using the host thread ID for the identifier passed to GDB
when debugging a multi-threaded userspace program.  The thread ID might
wrap, but the same sort of problems with wrapping thread IDs would come
up with debugging programs natively, so this doesn't represent a
problem.

Signed-off-by: Nathan Froyd <froydnj@codesourcery.com>
15 years agoCRIS: Remove duplicated flag defines.
Edgar E. Iglesias [Wed, 3 Jun 2009 20:48:05 +0000 (22:48 +0200)]
CRIS: Remove duplicated flag defines.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Fix loading of petalogix s3adsp1800 dtb.
Edgar E. Iglesias [Wed, 3 Jun 2009 19:54:31 +0000 (21:54 +0200)]
microblaze: Fix loading of petalogix s3adsp1800 dtb.

Provide a petalogix-s3adsp1800.dtb blob.
Correct loading of the petalogix dtb.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoStellaris qdev conversion
Paul Brook [Wed, 3 Jun 2009 14:16:49 +0000 (15:16 +0100)]
Stellaris qdev conversion

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoImplement multiple samplers on stellaris ADC
Paul Brook [Tue, 2 Jun 2009 14:30:27 +0000 (15:30 +0100)]
Implement multiple samplers on stellaris ADC

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoUse relative path for bios
Paul Brook [Fri, 29 May 2009 23:52:44 +0000 (00:52 +0100)]
Use relative path for bios

Look for bios and other support files relative to qemu binary, rather than
a hardcoded prefix.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoUpdate maintainer list.
Edgar E. Iglesias [Thu, 28 May 2009 12:00:49 +0000 (14:00 +0200)]
Update maintainer list.

Add myself as maintainer for the microblaze cpu and boards.
Update list of CRIS machines.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoInstall keymaps from new location
Anthony Liguori [Thu, 28 May 2009 08:11:42 +0000 (03:11 -0500)]
Install keymaps from new location

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agovvfat: one more missing BlockDriver C99 initializer conversion
Christoph Hellwig [Wed, 27 May 2009 14:14:13 +0000 (16:14 +0200)]
vvfat: one more missing BlockDriver C99 initializer conversion

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoMove keymaps into pc-bios
Anthony Liguori [Wed, 27 May 2009 14:36:33 +0000 (09:36 -0500)]
Move keymaps into pc-bios

This isn't the most ideal layout, but it makes -L /path/to/git/pc-bios Just
Work which is very convenient.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Mark full address range dirty on live migration start
Jan Kiszka [Fri, 22 May 2009 21:51:45 +0000 (23:51 +0200)]
kvm: Mark full address range dirty on live migration start

As Avi correctly noted, last_ram_offset does not mark the last physical
RAM address the guest may see (due to non-continuous memory regions).
Ensure that we catch them all by marking the full possible address range
dirty.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoAdd detection of pthread library name
Sebastian Herbszt [Sun, 24 May 2009 20:07:53 +0000 (22:07 +0200)]
Add detection of pthread library name

Try to detect the name of the pthread library.
Currently it looks for "-pthread" and "-pthreadGC2".

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoUser networking: Show active connections
Alexander Graf [Tue, 26 May 2009 11:03:27 +0000 (13:03 +0200)]
User networking: Show active connections

In case you're wondering what connections exactly you have open
or maybe redir'ed in the past, you can't really find out from qemu
right now.

This patch enables you to see all current connections the host
only networking holds open, so you can kill them using the previous
patch.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoUser Networking: Enable removal of redirections
Alexander Graf [Tue, 26 May 2009 11:03:26 +0000 (13:03 +0200)]
User Networking: Enable removal of redirections

Using the new host_net_redir command you can easily create redirections
on the fly while your VM is running.

While that's great, it's missing the removal of redirections, in case you
want to have a port closed again at a later point in time.

This patch adds support for removal of redirections.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoAllow monitor interaction when using migrate -exec
Chris Lalancette [Mon, 25 May 2009 14:38:23 +0000 (16:38 +0200)]
Allow monitor interaction when using migrate -exec

All,
     I've recently been playing around with migration via exec.  Unfortunately,
when starting the incoming qemu process with "-incoming exec:cmd", it suffers
the same problem that -incoming tcp used to suffer; namely, that you can't
interact with the monitor until after the migration has happened.  This causes
problems for libvirt usage of -incoming exec, since libvirt expects to be able
to access the monitor ahead of time.  This fairly simple patch allows you to
access the monitor both before and after the migration has completed using exec.

(note: developed/tested with qemu-kvm, but applies perfectly fine to qemu)

Signed-off-by: Chris Lalancette <clalance@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agofully split aio_pool from BlockDriver
Christoph Hellwig [Mon, 25 May 2009 10:37:32 +0000 (12:37 +0200)]
fully split aio_pool from BlockDriver

Now that we have a separate aio pool structure we can remove those
aio pool details from BlockDriver.

Every driver supporting AIO now needs to declare a static AIOPool
with the aiocb size and the cancellation method.  This cleans up the
current code considerably and will make it cleaner and more obvious
to support two different aio implementations behind a single
BlockDriver.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoqcow: add qcow_aio_setup helper
Christoph Hellwig [Mon, 25 May 2009 13:45:37 +0000 (15:45 +0200)]
qcow: add qcow_aio_setup helper

[this one is required for [PATCH] fully split aio_pool from BlockDriver,
 sorry for not sending it out earlier]

Add a qcow_aio_setup helper to qcow to shared common code between
the aio_readv and aio_writev methods.  Based on the function with
the same name in qcow2.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoraw-posix: fix hdev_create
Christoph Hellwig [Mon, 25 May 2009 08:29:13 +0000 (10:29 +0200)]
raw-posix: fix hdev_create

We do need hdev_create unconditionally on all platforms so that qemu-img
create support for host device works on all platforms.

Also relax the check to allow character devices in addition to block
devices.  On many Unix platforms block devices have buffered block
nodes and unbuffered character device nodes, and on FreeBSD the block
nodes don't even exist anymore.  Also on Linux we do support the
/dev/sgN scsi passthrough devices through the host device driver,
and probably the old-style /dev/raw/rawN raw devices although I haven't
tested that.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agofix raw_pread_aligned return value
Christoph Hellwig [Mon, 25 May 2009 08:08:52 +0000 (10:08 +0200)]
fix raw_pread_aligned return value

raw_pread_aligned currently returns the raw return value from
lseek/read, which is always -1 in case of an error.  But the
callers higher up the stack expect it to return the negated
errno just like raw_pwrite_aligned.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoVNC: Fix memory allocation (wrong structure size).
Stefan Weil [Sun, 24 May 2009 20:33:34 +0000 (22:33 +0200)]
VNC: Fix memory allocation (wrong structure size).

Pointer vs addresses a VncDisplay structure,
so it is sufficient to allocate sizeof(VncDisplay)
or sizeof(*vs) bytes instead of the much larger
sizeof(VncState).

Maybe the misleading name should be fixed, too:
the code contains many places where vs is used,
sometimes it is a VncState *, sometimes it is a
VncDisplay *. vd would be a better name.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoDrop bdrv_create2
Kevin Wolf [Wed, 27 May 2009 12:48:06 +0000 (14:48 +0200)]
Drop bdrv_create2

This patch converts the remaining users of bdrv_create2 to bdrv_create and
removes the now unused function.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoqcow2: Update multiple refcounts at once
Kevin Wolf [Tue, 26 May 2009 12:36:03 +0000 (14:36 +0200)]
qcow2: Update multiple refcounts at once

Don't write each single changed refcount block entry to the disk after it is
written, but update all entries of the block and write all of them at once.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoqcow2: Refactor update_refcount
Kevin Wolf [Tue, 26 May 2009 12:36:02 +0000 (14:36 +0200)]
qcow2: Refactor update_refcount

This is a preparation patch with no functional changes. It moves the allocation
of new refcounts block to a new function and makes update_cluster_refcount (for
one cluster) call update_refcount (for multiple clusters) instead the other way
round.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoqcow/qcow2: Drop synchronous qcow_write()
Kevin Wolf [Mon, 25 May 2009 09:38:59 +0000 (11:38 +0200)]
qcow/qcow2: Drop synchronous qcow_write()

There is only one (internal) user left and it can be switched to the normal
emulation provided in block.c

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoe1000: Ignore reset command
Kevin Wolf [Sat, 23 May 2009 09:21:33 +0000 (11:21 +0200)]
e1000: Ignore reset command

When a reset is requested, the current e1000 emulation never clears the
reset bit which may cause a driver to hang. This patch masks the reset
bit out when setting the control registert, so the reset is immediately
completed.

Signed-off-by: Kevin Wolf <mail@kevin-wolf.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoFix output of uninitialized strings
Kevin Wolf [Tue, 19 May 2009 16:51:34 +0000 (18:51 +0200)]
Fix output of uninitialized strings

Commit ffad4116b96e29e0fbe892806f97c0a6c903d30d removed the "scratch buffer"
from check_params, but didn't care for the error messages which actually
included this string to tell the user which option was wrong. Now this string
is uninitialized, so this patch removes it from the message.

This means that the user is only told the whole parameter string and has to
pick the wrong option by himself as the callers of check_params can't know this
value any more. An alternative approach would be to revert that commit and do
whatever is needed to fix the original problem without changing check_params.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agomicroblaze: Conditionalize FDT features.
Edgar E. Iglesias [Wed, 27 May 2009 08:49:12 +0000 (10:49 +0200)]
microblaze: Conditionalize FDT features.

If libfdt is not available, disable the fdt manipulation features.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agodoc: Briefly mention CRIS and MicroBlaze.
Edgar E. Iglesias [Tue, 26 May 2009 23:34:02 +0000 (01:34 +0200)]
doc: Briefly mention CRIS and MicroBlaze.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Make writes to MMU_ZPR flush the TLB.
Edgar E. Iglesias [Tue, 26 May 2009 23:19:58 +0000 (01:19 +0200)]
microblaze: Make writes to MMU_ZPR flush the TLB.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Correct typo.
Edgar E. Iglesias [Tue, 26 May 2009 23:10:26 +0000 (01:10 +0200)]
microblaze: Correct typo.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Hook into the build-system.
Edgar E. Iglesias [Wed, 20 May 2009 19:17:31 +0000 (21:17 +0200)]
microblaze: Hook into the build-system.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add GDB stub support.
Edgar E. Iglesias [Wed, 20 May 2009 18:16:31 +0000 (20:16 +0200)]
microblaze: Add GDB stub support.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add petalogix s3a1800dsp MMU linux ref-design.
Edgar E. Iglesias [Wed, 20 May 2009 18:16:11 +0000 (20:16 +0200)]
microblaze: Add petalogix s3a1800dsp MMU linux ref-design.

This setup was designed by petalogix and is supported by upstream linux.
The design targets a xilinx spartan-3a-1800 dsp board with MMU.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoxilinx: Add ethlite emulation.
Edgar E. Iglesias [Wed, 20 May 2009 18:13:24 +0000 (20:13 +0200)]
xilinx: Add ethlite emulation.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoxilinx: Add uartlite emulation.
Edgar E. Iglesias [Wed, 20 May 2009 18:12:42 +0000 (20:12 +0200)]
xilinx: Add uartlite emulation.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoxilinx: Add OPB timer.
Edgar E. Iglesias [Wed, 20 May 2009 18:11:44 +0000 (20:11 +0200)]
xilinx: Add OPB timer.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoxilinx: Add interrupt controller.
Edgar E. Iglesias [Wed, 20 May 2009 18:11:30 +0000 (20:11 +0200)]
xilinx: Add interrupt controller.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add CPU interrupt wrapper logic.
Edgar E. Iglesias [Wed, 20 May 2009 18:08:59 +0000 (20:08 +0200)]
microblaze: Add CPU interrupt wrapper logic.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add MMU emulation.
Edgar E. Iglesias [Wed, 20 May 2009 18:08:24 +0000 (20:08 +0200)]
microblaze: Add MMU emulation.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add disassembler.
Edgar E. Iglesias [Wed, 20 May 2009 18:07:38 +0000 (20:07 +0200)]
microblaze: Add disassembler.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: linux-user support.
Edgar E. Iglesias [Wed, 20 May 2009 19:31:33 +0000 (21:31 +0200)]
microblaze: linux-user support.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add syscall, signal and termbits defs for linux-user.
Edgar E. Iglesias [Wed, 20 May 2009 17:45:05 +0000 (19:45 +0200)]
microblaze: Add syscall, signal and termbits defs for linux-user.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agomicroblaze: Add translation routines.
Edgar E. Iglesias [Wed, 20 May 2009 17:37:39 +0000 (19:37 +0200)]
microblaze: Add translation routines.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
15 years agoRemove temporary config-host.h
Paul Brook [Tue, 26 May 2009 14:07:56 +0000 (15:07 +0100)]
Remove temporary config-host.h

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoRemove qdev irq sink handling
Paul Brook [Tue, 26 May 2009 13:56:11 +0000 (14:56 +0100)]
Remove qdev irq sink handling

We have both IRQ sinks and GPIO inputs.  These are in principle exactly
the same thing, so remove the former.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoAdd dummy command to submakefiles
Paul Brook [Mon, 25 May 2009 17:54:53 +0000 (18:54 +0100)]
Add dummy command to submakefiles

Add a dummy command to the all: rule in sub-makefiles.
This avoids "Nothing to be done for `all'." messages from make.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoRemove unused variable
Paul Brook [Sun, 24 May 2009 20:24:33 +0000 (21:24 +0100)]
Remove unused variable

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoETRAX: Removed unused struct entry and fixed Windows build.
Stefan Weil [Sat, 23 May 2009 19:32:30 +0000 (21:32 +0200)]
ETRAX: Removed unused struct entry and fixed Windows build.

"struct timeval last" caused a compilation error with mingw32
(missing header for struct timeval).

It is unused, so it was possible to remove it.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
15 years agoAdd common BusState
Paul Brook [Fri, 22 May 2009 23:05:19 +0000 (00:05 +0100)]
Add common BusState

Implement and use a common device bus state.  The main side-effect is
that creating a bus and attaching it to a parent device are no longer
separate operations.  For legacy code we allow a NULL parent, but that
should go away eventually.

Also tweak creation code to veriry theat a device in on the right bus.

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoFix lance segfaults
Paul Brook [Fri, 22 May 2009 16:44:32 +0000 (17:44 +0100)]
Fix lance segfaults

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agoAvoid errors when curl-config does not exist
Paul Brook [Fri, 22 May 2009 16:22:38 +0000 (17:22 +0100)]
Avoid errors when curl-config does not exist

Signed-off-by: Paul Brook <paul@codesourcery.com>
15 years agobios: Use the correct mask to size the PCI option ROM BAR
Anthony Liguori [Fri, 22 May 2009 14:57:32 +0000 (09:57 -0500)]
bios: Use the correct mask to size the PCI option ROM BAR

Bit 0 is the enable bit, which we not only don't want to set, but
it will stick and make us think it's an I/O port resource.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agox86: Add support for resume flag
Jan Kiszka [Sun, 10 May 2009 20:30:53 +0000 (22:30 +0200)]
x86: Add support for resume flag

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
15 years agonet: Fix dump time stamps
Jan Kiszka [Sun, 10 May 2009 20:23:23 +0000 (22:23 +0200)]
net: Fix dump time stamps

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
15 years agoAdd HTTP protocol using curl v6
Alexander Graf [Mon, 11 May 2009 15:41:42 +0000 (17:41 +0200)]
Add HTTP protocol using curl v6

Currently Qemu can read from posix I/O and NBD. This patch adds a
third protocol to the game: HTTP.

In certain situations it can be useful to access HTTP data directly,
for example if you want to try out an http provided OS image, but
don't know if you want to download it yet.

Using this patch you can now try it on on the fly. Just use it like:

qemu -cdrom http://host/path/my.iso

Signed-off-by: Alexander Graf <agraf@suse.de>
15 years agoUSB serial device support
Jason Wessel [Mon, 18 May 2009 15:00:28 +0000 (10:00 -0500)]
USB serial device support

Add in a workaround to allow the usb serial devices to work with the
usb pass through mechanism.  The ioctl() to request an alternate
interface will always return < 0 for a usb-serial device based on the
kernel driver.  This means there is no alternate interface end point.

This was fully tested with a pl2303 usb serial device.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agoserial: fix lost character after sysrq
Jason Wessel [Mon, 18 May 2009 15:00:27 +0000 (10:00 -0500)]
serial: fix lost character after sysrq

After creating an automated regression test to test the sysrq
responses while running a linux image in qemu, I found that the
simulated uart was eating the character right after the sysrq about
75% of the time.

The problem is that the qemu sets the LSR_DR (data ready) bit on a
serial break.  The automated tests can send a break and the sysrq
character quickly enough that the qemu serial fifo has a real
character available. When there is valid character in the fifo, it
gets consumed by the serial driver in the guest OS.

The real hardware also appears to set the LSR_DR but always appears to
have a null byte in this condition.  This patch changes the qemu
behavior to match the tested characteristics of a real 16550 chip.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agousb-serial: implement break event.
Jason Wessel [Mon, 18 May 2009 15:00:26 +0000 (10:00 -0500)]
usb-serial: implement break event.

Implement the serial break via usb serial.

The second data byte in ftdi status packet contains the break status.
The values were already defined in usb-serial.c so it was a matter of
making use of the event_trigger to form a urb to send over to the host
controller with the serial break status set.

This was tested against a linux development image which enables sysrq
via a serial break on the ftdi usb console.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
15 years agoslirp: Reassign same address to same DHCP client
Jan Kiszka [Thu, 21 May 2009 20:43:39 +0000 (22:43 +0200)]
slirp: Reassign same address to same DHCP client

In case a client restarts a DHCP recovery without releasing its old
address, reassign the same address to prevent consuming free addresses
and moving away from the standard client address.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
15 years agokvm: x86: Save/restore KVM-specific CPU states
Jan Kiszka [Sat, 2 May 2009 00:18:38 +0000 (02:18 +0200)]
kvm: x86: Save/restore KVM-specific CPU states

Save and restore all so far neglected KVM-specific CPU states. Handling
the TSC stabilizes migration in KVM mode. The interrupt_bitmap and
mp_state are currently unused, but will become relevant for in-kernel
irqchip support. By including proper saving/restoring already, we avoid
having to increment CPU_SAVE_VERSION later on once again.

v2:
 - initialize mp_state runnable (for the boot CPU)

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Rework VCPU reset
Jan Kiszka [Fri, 1 May 2009 22:29:37 +0000 (00:29 +0200)]
kvm: Rework VCPU reset

Use standard callback with highest order to synchronize VCPU on reset
after all device callbacks were execute. This allows to remove the
special kvm hook in qemu_system_reset.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoIntroduce reset notifier order
Jan Kiszka [Fri, 1 May 2009 22:29:37 +0000 (00:29 +0200)]
Introduce reset notifier order

Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0.

Note: At least for x86, the existing users seem to assume that handlers
are called in their registration order. Therefore, the patch preserves
this property. If someone feels bored, (s)he could try to identify this
dependency and express it properly on callback registration.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Fix framebuffer dirty log sync
Jan Kiszka [Fri, 1 May 2009 22:29:37 +0000 (00:29 +0200)]
kvm: Fix framebuffer dirty log sync

kvm_physical_sync_dirty_bitmap() takes the end address as second
argument, not the region size. Moverover, the kvm API should not be used
directly here, but cpu_physical_sync_dirty_bitmap().

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Add missing bits to support live migration
Jan Kiszka [Fri, 1 May 2009 22:22:51 +0000 (00:22 +0200)]
kvm: Add missing bits to support live migration

This patch adds the missing hooks to allow live migration in KVM mode.
It adds proper synchronization before/after saving/restoring the VCPU
states (note: PPC is untested), hooks into
cpu_physical_memory_set_dirty_tracking() to enable dirty memory logging
at KVM level, and synchronizes that drity log into QEMU's view before
running ram_live_save().

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Rework dirty bitmap synchronization
Jan Kiszka [Fri, 1 May 2009 18:52:47 +0000 (20:52 +0200)]
kvm: Rework dirty bitmap synchronization

Extend kvm_physical_sync_dirty_bitmap() so that is can sync across
multiple slots. Useful for updating the whole dirty log during
migration. Moreover, properly pass down errors the whole call chain.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Fix dirty log temporary buffer size
Jan Kiszka [Fri, 1 May 2009 18:52:47 +0000 (20:52 +0200)]
kvm: Fix dirty log temporary buffer size

The buffer passed to KVM_GET_DIRTY_LOG requires one bit per page. Fix
the size calculation in kvm_physical_sync_dirty_bitmap accordingly,
avoiding allocation of extremly oversized buffers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Introduce kvm_set_migration_log
Jan Kiszka [Fri, 1 May 2009 18:52:46 +0000 (20:52 +0200)]
kvm: Introduce kvm_set_migration_log

Introduce a global dirty logging flag that enforces logging for all
slots. This can be used by the live migration code to enable/disable
global logging withouth destroying the per-slot setting.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agokvm: Conditionally apply workaround for KVM slot handling bug
Jan Kiszka [Fri, 1 May 2009 18:42:15 +0000 (20:42 +0200)]
kvm: Conditionally apply workaround for KVM slot handling bug

Only apply the workaround for broken slot joining in KVM when the
capability was not found that signals the corresponding fix existence.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoqcow2: Allow different cluster sizes
Kevin Wolf [Tue, 19 May 2009 15:57:21 +0000 (17:57 +0200)]
qcow2: Allow different cluster sizes

Add an option to specify the cluster size of a newly created qcow2 image.
Default is 4k which is the same value that was hard-coded before.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoConvert qemu-img convert to new bdrv_create
Kevin Wolf [Mon, 18 May 2009 14:42:12 +0000 (16:42 +0200)]
Convert qemu-img convert to new bdrv_create

This is part two of the qemu-img conversion. This really works the same as the
previous conversion of qemu-img create: It introduces a new -o option for the
generic approach and adds the old-style options to this option set.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoConvert qemu-img create to new bdrv_create
Kevin Wolf [Mon, 18 May 2009 14:42:11 +0000 (16:42 +0200)]
Convert qemu-img create to new bdrv_create

This patch changes qemu-img to actually use the new bdrv_create interface. It
translates the old-style qemu-img options which have been bdrv_create2
parameters or flags so far to option structures. As the generic approach, it
introduces an -o option which accepts any parameter the driver knows.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoConvert all block drivers to new bdrv_create
Kevin Wolf [Mon, 18 May 2009 14:42:10 +0000 (16:42 +0200)]
Convert all block drivers to new bdrv_create

Now we can make use of the newly introduced option structures. Instead of
having bdrv_create carry more and more parameters (which are format specific in
most cases), just pass a option structure as defined by the driver itself.

bdrv_create2() contains an emulation of the old interface to simplify the
transition.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
15 years agoCreate qemu-option.h
Kevin Wolf [Mon, 18 May 2009 14:42:09 +0000 (16:42 +0200)]
Create qemu-option.h

This patch creates a new header file and the corresponding implementation file
for parsing of parameter strings for options (like used in -drive). Part of
this is code moved from vl.c (so qemu-img can use it later).

The idea is to have a data structure describing all accepted parameters. When
parsing a parameter string, the structure is copied and filled with the
parameter values.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>