Isaku Yamahata [Thu, 12 Nov 2009 05:58:39 +0000 (14:58 +0900)]
pci: clean up of pci_init_wmask().
This patch replaces for loop by memset in pci_init_wmask().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:38 +0000 (14:58 +0900)]
pci: kill unnecessary included in pci.c
including pci_host.h isn't needed by pci.c.
This patch kills it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:37 +0000 (14:58 +0900)]
pci_host: remove unnecessary & 0xff.
This patch removes unnecessary & 0xff in pci_dev_find_by_addr().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:36 +0000 (14:58 +0900)]
pci: s/pci_find_host_bus/pci_find_root_bus/g
This patch renames pci_find_host_bus() to pci_find_root_bus()
as suggested by "Michael S. Tsirkin" <mst@redhat.com>.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:35 +0000 (14:58 +0900)]
pci: remove pci_sub_bus() by open coding.
Because pci_sub_bus() is used only once so eliminate it
by open coding as suggested by "Michael S. Tsirkin" <mst@redhat.com>.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:34 +0000 (14:58 +0900)]
pci: shorten pci_host_{conf, data}_register_xxx function a bit.
pci_host_data_register_io_memory and its variants are too long a bit.
So shorten them. Now they are
pci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 11:17:23 +0000 (13:17 +0200)]
pci: rename (pci_/pcie_mmcfg_)addr_to_dev
This patch renames pci_addr_to_dev(), pcie_mmcfg_addr_to_dev()
to pci_dev_find_by_addr(), pcie_dev_find_by_mmcfg_addr()
as "Michael S. Tsirkin" <mst@redhat.com> suggested.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:32 +0000 (14:58 +0900)]
pci: remove pci_addr_to_config() by open code
This patch removes pci_addr_to_config() and open code it
as suggested by Michael S. Tsirkin <mst@redhat.com>.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Michael S. Tsirkin [Thu, 12 Nov 2009 05:58:31 +0000 (14:58 +0900)]
pci: simplify (pci_/pcie_mmcfg_)data_read()
Remove switch on length: we don't care about
high bits for value, so just return all ones
if no device. And add one assert().
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:30 +0000 (14:58 +0900)]
pci: move pci_data_{read, write}() declaration from pci.h to pci_host.h
Now pci host stuff has been moved from pci.[hc] to pci_host.[hc]
so the declaration of pci_data_{read, write}() should be in
pci_host.h
This patch moves them from pci.h to pci_host.h for consistency.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Isaku Yamahata [Thu, 12 Nov 2009 05:58:29 +0000 (14:58 +0900)]
pci: fix pci_info_device().
It printed wrong limit value of bridge.
This patch fixes it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Michael S. Tsirkin [Wed, 11 Nov 2009 12:59:56 +0000 (14:59 +0200)]
pci: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren't
defined in pci.h. Clean up moving things
to appropriate headers, and update all users.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Aurelien Jarno [Fri, 27 Nov 2009 17:42:26 +0000 (18:42 +0100)]
Revert "vga: do not resize the screen on hw_invalidate"
This causes ctrl+alt+u or ctrl+alt+f to not work when windows hasn't been
resized first. Other graphic emulators do resize the screen on
hw_invalidate.
This reverts commit
0bd8246bfec1dfb2eb959f52db535572c0260f4c.
Stefan Weil [Tue, 24 Nov 2009 09:20:49 +0000 (10:20 +0100)]
Makefile: Fix spelling
Replace defconfing -> defconfig
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Wed, 28 Oct 2009 21:44:34 +0000 (22:44 +0100)]
tcg: fix tcg_regset_{set,reset}_reg with more than 32 registers
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Arnaud Patard [Sat, 11 Apr 2009 14:02:46 +0000 (16:02 +0200)]
cpu-all.h: fix cpu_get_real_ticks on mips host
Fix cpu_get_real_ticks:
- check should be done on __mips and not __mips_isa_rev
- linux kernels >= 2.6.25 are emulating the 2 needed rdhwr functions
so it's safe to use rdhwr.
This is better than what's currently in but it doesn't mean it works nicely
Some tests needs to be done imho
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Arnaud Patard [Sun, 29 Mar 2009 23:18:20 +0000 (01:18 +0200)]
linux-user: remove hardcoded value of _NSIG in signal.c
In a bunch of places, 64 is used as value of _NSIG but it's wrong
at least on MIPS were _NSIG is 128.
Based on a patch from Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Wed, 4 Nov 2009 22:01:30 +0000 (23:01 +0100)]
tcg/ppc64,x86_64: fix constraints of op_qemu_st64
This op only takes two arguments, not two.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paul Brook [Tue, 24 Nov 2009 13:10:08 +0000 (13:10 +0000)]
Add missing break.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Anthony Liguori [Mon, 23 Nov 2009 18:52:29 +0000 (12:52 -0600)]
Update SeaBIOS
This includes the following changes:
42bc394 Make sure to reenable ata interrupts even on error.
494dfc6 Move SeaBIOS post/boot stack to avoid conflict with gPXE.
3133e38 Test for broken gcc -combine on FC12.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paul Brook [Sun, 22 Nov 2009 21:35:13 +0000 (21:35 +0000)]
ARM atomic ops rewrite
Implement ARMv6 atomic ops (ldrex/strex) using the same trick as PPC.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Fri, 20 Nov 2009 00:45:54 +0000 (00:45 +0000)]
ARM RealView I2C
Add ARM Realview I2C host emulation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Fri, 20 Nov 2009 23:37:15 +0000 (23:37 +0000)]
GPIO I2C rework
Reqrite bitbanging I2C implementation. New code improves stop/start
condition handling, and gives more accurate input line level.
Introduce intermediate abstraction layer for I2C bitbanging that
is not connected via a GPIO port.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Fri, 20 Nov 2009 00:21:33 +0000 (00:21 +0000)]
DS1338 RTC
Implement MAXIM SD1338 RTC+NVRAM.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Fri, 20 Nov 2009 00:03:47 +0000 (00:03 +0000)]
BCD cleanup
Combine multiple BCD implementations.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Sun, 22 Nov 2009 16:25:30 +0000 (16:25 +0000)]
Makefile dependencies for device configs
Add makefile dependencies for target specific device configs.
These will copy the default config if none exists, obsoleting the old
configure time code. If a config already exists but is older than the
default then print a warning.
Also remove config-devices.h. Code does not and should not care which
devices are being built.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Aurelien Jarno [Sun, 22 Nov 2009 13:37:04 +0000 (14:37 +0100)]
target-mips: fix physical address type in MMU functions
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Hervé Poussineau [Sun, 22 Nov 2009 12:36:11 +0000 (13:36 +0100)]
[WIN32] Enable -k option on Windows too
There is no reason to have it disabled on this platform.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sun, 22 Nov 2009 12:22:54 +0000 (13:22 +0100)]
target-mips: make CP0_LLAddr register CPU dependent
Depending on the CPU, CP0_LLAddr is either read-only or read-write,
and the returned value can be shifted by a variable amount of bits.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>
Aurelien Jarno [Sun, 22 Nov 2009 12:08:14 +0000 (13:08 +0100)]
target-mips: rename CP0_LLAddr into lladdr
The variable CP0_LLAddr represent the full lladdr, not the actual
register value, which is only part of this value and depends on the
CPU.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Juergen Lock [Fri, 20 Nov 2009 22:37:57 +0000 (23:37 +0100)]
Allow build of linuxboot.S with old assemblers
In the spirit of
ff56954baf9cfab5cbbe18d10b4a09e4a17f39a8, fix the
build of linuxboot.S with old as(1) (as found in some BSD base systems)
by emitting the bytes of the insn it doesn't like instead.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Juergen Lock [Fri, 20 Nov 2009 22:23:03 +0000 (23:23 +0100)]
Avoid segfault on net_tap_init() failure
Check for fd == -1 there.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Juergen Lock [Fri, 20 Nov 2009 22:31:55 +0000 (23:31 +0100)]
tap-bsd: handle ifname on FreeBSD hosts
Handle ifname on FreeBSD hosts; if no ifname is given, always start
the search from tap0. (Simplified/cleaned up version of what has been
in the FreeBSD ports for a long time.)
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Juergen Lock [Fri, 20 Nov 2009 22:19:53 +0000 (23:19 +0100)]
Fix tap breakage on BSD hosts (no IFF_VNET_HDR)
net/tap-bsd.c was assuming IFF_VNET_HDR was always available, which
I think isn't true on any BSD.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sat, 21 Nov 2009 09:06:46 +0000 (09:06 +0000)]
Fix OpenBSD build of qemu-io
GCC 3.3.5 generates warnings for static forward declarations of data, so
rearrange code to use static forward declarations of functions instead.
Use <getopt.h> for optind instead of local definition.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Stefan Weil [Mon, 16 Nov 2009 18:59:18 +0000 (19:59 +0100)]
configure: Fix spelling in comment and rework the comment
* Replace vill -> will.
* Comment was formatted to make it more readable
and to conform to the coding standard, too.
* Description of foo="" was completed.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Wed, 18 Nov 2009 15:14:09 +0000 (16:14 +0100)]
qemu-io: build on all platforms
Since
c32d766af127f68bb75ba5689f2f5239227bf559, qemu-io should be
portable. It is currently built only on linux and mingw32.
This patch enables qemu-io on all platforms. Tested on FreeBSD.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Mark McLoughlin [Fri, 20 Nov 2009 18:13:10 +0000 (18:13 +0000)]
slirp: fix use-after-free
460fec67ee introduced a use-after free in slirp.
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Paul Brook [Thu, 19 Nov 2009 16:45:21 +0000 (16:45 +0000)]
ARM PBX-A9 board support
Implement ARM RealView PBX-A9 board support.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Thu, 19 Nov 2009 16:45:20 +0000 (16:45 +0000)]
ARM Cortex-A9 cpu support
Basic Cortex-A9 support.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Thu, 19 Nov 2009 16:45:20 +0000 (16:45 +0000)]
ARM FP16 support
Implement the ARM VFP half precision floating point extensions.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Thu, 19 Nov 2009 16:42:45 +0000 (16:42 +0000)]
Built network devices once
Move some generic NICS into libhw, and build them for ARM targets.
Signed-off-by: Paul Brook <paul@codesourcery.com>
malc [Wed, 18 Nov 2009 16:17:03 +0000 (19:17 +0300)]
sb16: remove highspeed reset code
It was never enabled in any of the public builds anyway.
Noticed by Steve Grubb.
Signed-off-by: malc <av1474@comtv.ru>
malc [Wed, 18 Nov 2009 16:15:19 +0000 (19:15 +0300)]
audio: Remove conditional around sw which can not be NULL
Noticed by Steve Grubb.
Signed-off-by: malc <av1474@comtv.ru>
Aurelien Jarno [Mon, 16 Nov 2009 16:52:03 +0000 (17:52 +0100)]
audio: link with -lpulse in addition to -lpulse-simple
Link with -lpulse in addition to -lpulse-simple, needed when --no-add-needed
is passed to the linker (gold default).
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Tue, 17 Nov 2009 21:27:18 +0000 (21:27 +0000)]
Fix typo
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Tue, 17 Nov 2009 21:00:38 +0000 (21:00 +0000)]
Fix mingw32 build
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Tue, 17 Nov 2009 20:52:56 +0000 (20:52 +0000)]
Prevent configuring for a user emulator on a different type of OS
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Alexander Graf [Thu, 12 Nov 2009 20:53:15 +0000 (21:53 +0100)]
Add linuxboot to BLOBS
We should install linuxboot.bin too, so let's add it to the to-be-installed
blobs.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alexander Graf [Thu, 12 Nov 2009 20:53:14 +0000 (21:53 +0100)]
Convert linux bootrom to external rom and fw_cfg
We already have a working multiboot implementation that uses fw_cfg to get
its kernel module etc. data in int19 runtime now.
So what's missing is a working linux boot option rom. While at it I figured it
would be a good idea to take the opcode generator out of pc.c and instead use
a proper option rom, like we do with multiboot.
So here it is - an fw_cfg using option rom for -kernel with linux!
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alexander Graf [Thu, 12 Nov 2009 20:53:13 +0000 (21:53 +0100)]
Move common option rom code to header file
We will have a linux boot option rom soon, so let's take all functionality
that might be useful for both to a header file that both roms can include.
That way we only have to write fw_cfg access code once.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alexander Graf [Thu, 12 Nov 2009 20:53:12 +0000 (21:53 +0100)]
Convert multiboot to fw_cfg backed data storage
Right now we load the guest kernel to RAM, fire off the BIOS, hope it
doesn't clobber memory and run an option rom that jumps into the kernel.
That breaks with SeaBIOS, as that clears memory. So let's read all
kernel, module etc. data using the fw_cfg interface when in the int19
handler.
This patch implements said mechanism for multiboot.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Alexander Graf [Thu, 12 Nov 2009 20:53:11 +0000 (21:53 +0100)]
Introduce rom_copy
We have several rom helpers currently, but none of them can get us
code that spans several roms into a pointer.
This patch introduces a function that copies over rom contents.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Fri, 13 Nov 2009 10:59:20 +0000 (11:59 +0100)]
fw_cfg: change cur_offset to 32 bits
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Tue, 17 Nov 2009 14:23:40 +0000 (08:23 -0600)]
Update SeaBIOS to latest
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 19:16:03 +0000 (13:16 -0600)]
Add test suite for json marshalling
By reusing the qjson test suite. After checking that we can demarshal, marshal
again and compared to the expected decoded value. This doesn't work so well
for floats because they cannot be accurately represented in decimal but we
try our best.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 18:01:22 +0000 (12:01 -0600)]
Provide marshalling mechanism for json
This introduces qobject_to_json which will convert a QObject to a JSON string
representation.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Luiz Capitulino [Tue, 13 Oct 2009 16:56:58 +0000 (13:56 -0300)]
QDict: Introduce qdict_iter()
This adds iterator support to QDict, it will be used by the
(to be introduced) QError module.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:39:47 +0000 (10:39 -0600)]
Add a unit test for JSON support
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:42:41 +0000 (10:42 -0600)]
Add a QObject JSON wrapper
This provides a QObject interface for creating QObjects from a JSON expression.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:39:23 +0000 (10:39 -0600)]
Add a JSON parser
This is the third and final stage of the JSON parser. It parses lexical tokens
performing grammar validation and creating the final QObject representation. It
uses a recursive decent parser.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:38:59 +0000 (10:38 -0600)]
Add a JSON message boundary identifier
The second stage of our JSON parser is a simple state machine that identifies
individual JSON values by counting the levels of nesting of tokens. It does
not perform grammar validation. We use this to emit a full JSON value to the
parser.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:39:14 +0000 (10:39 -0600)]
Add a lexer for JSON
Our JSON parser is a three stage parser. The first stage tokenizes the stream
into a set of lexical tokens. Since the lexical grammar is regular, we can
use a finite state machine to model it. The state machine will emit tokens
as they are identified.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:37:39 +0000 (10:37 -0600)]
Add a QBool type
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:36:51 +0000 (10:36 -0600)]
Add unit test for QFloat
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:36:08 +0000 (10:36 -0600)]
Add a QFloat datatype
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:49:51 +0000 (10:49 -0600)]
Allow strings to grow in size
This lets us use QString for building larger strings
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:48:51 +0000 (10:48 -0600)]
Add operations to qlist to allow it to be used as a stack
This makes lists no longer invariant. It's a very useful bit of functionality
though.
To deal with the fact that lists are no longer invariant, introduce a deep
copy mechanism for lists.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Anthony Liguori [Wed, 11 Nov 2009 16:50:36 +0000 (10:50 -0600)]
Properly escape QDECREF macro arguments
QDECREF does not properly escape the macro arguments which can lead to
unexpected syntax errors.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Tue, 3 Nov 2009 09:54:44 +0000 (10:54 +0100)]
Cleanup configure checks for dup3 and fallocate
We have a function for this which does not issue annoying warnings.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Fri, 6 Nov 2009 18:39:24 +0000 (19:39 +0100)]
kvm: x86: Refactor use of interrupt_bitmap
Drop interrupt_bitmap from the cpustate and solely rely on the integer
interupt_injected. This prepares us for the new injected-interrupt
interface, which will deprecate the bitmap, while preserving
compatibility.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Jan Kiszka [Fri, 6 Nov 2009 18:39:24 +0000 (19:39 +0100)]
kvm: Add arch reset handler
Will be required by succeeding changes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lirans@il.ibm.com [Mon, 2 Nov 2009 13:41:13 +0000 (15:41 +0200)]
Enable migration without shared storage from the monitor
This patch adds the option to activate non-shared storage migration from the
monitor.
The migration command is as follows:
(qemu) migrate -d tcp:0:4444 # for ordinary live migration
(qemu) migrate -d -b tcp:0:4444 # for live migration with complete storage copy
(qemu) migrate -d -i tcp:0:4444 # for live migration with incremental storage copy, storage is cow based.
Changes from v4:
- Minor coding style issues.
Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lirans@il.ibm.com [Mon, 2 Nov 2009 13:40:58 +0000 (15:40 +0200)]
Block live migration
This patch introduces block migration called during live migration. Block
are being copied to the destination in an async way. First the code will
transfer the whole disk and then transfer all dirty blocks accumulted during
the migration.
Still need to improve transition from the iterative phase of migration to the
end phase. For now transition will take place when all blocks transfered once,
all the dirty blocks will be transfered during the end phase (guest is
suspended).
Changes from v4:
- Global variabels moved to a global state structure allocated dynamically.
- Minor coding style issues.
- Poll block.c for tracking of dirty blocks instead of manage it here.
Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lirans@il.ibm.com [Mon, 2 Nov 2009 13:40:41 +0000 (15:40 +0200)]
Expose a mechanism to trace block writes
To support live migration without shared storage we need to be able to trace
writes to disk while migrating. This Patch expose dirty block tracking per
device to be polled from upper layer.
Changes from v4:
- Register dirty tracking for each block device.
- Minor coding style issues.
- Block.c will now manage a dirty bitmap per device once
bdrv_set_dirty_tracking() is called. Bitmap is polled by the upper
layer (block-migration.c).
Signed-off-by: Liran Schour <lirans@il.ibm.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Tue, 3 Nov 2009 14:29:56 +0000 (19:59 +0530)]
char: rename qemu_chr_reset to qemu_chr_generic_open
This function sends out the OPENED event to backends that
have drive the chardevs. The 'reset' is now a historical
artifact and we can now just call the function for what it
is.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Tue, 3 Nov 2009 14:29:55 +0000 (19:59 +0530)]
char: Remove special init_reset handling
The initial_reset sent to chardevs doesn't do much other than setting
a bool to true. Char devices are interested in the open event and
that gets sent whenever the device is opened.
Moreover, the reset logic breaks as and when qemu's bh scheduling
changes.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Amit Shah [Tue, 3 Nov 2009 14:29:54 +0000 (19:59 +0530)]
char: don't limit data sent to backends to 1k per buffer
chardevs have a 'can_read' function via which backends specify
the amount of data they can receive. When can_read returns > 0,
apps can start sending data. However, each chardev driver here
allows a max. of 1k bytes inspite of the backend being able to
receive more.
The best we can do here is to allocate s->max_size bytes from
the heap on each call (which is the number returned by the
backend from the can_read call).
This is an intermediate step to bump up the bytes written in
each call to 4k.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Paul Brook [Mon, 16 Nov 2009 17:06:43 +0000 (17:06 +0000)]
ARM PB-A8 support
Add ARM Realview PB-A8 board support.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Mon, 16 Nov 2009 17:06:43 +0000 (17:06 +0000)]
LAN9118 emulation
Add SMSC LAN9118 ethernet emulation.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Aurelien Jarno [Sun, 15 Nov 2009 22:04:20 +0000 (23:04 +0100)]
mips_r4k: fix reset
(broken by
45a50b1668822c23afc2a89f724654e176518bc4)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Sun, 15 Nov 2009 17:42:17 +0000 (17:42 +0000)]
PPC64: map Uni-North AGP bus aka fix Linux boot
Uni-North AGP device mapping was accidentally dropped in
2e29bd04786003561303dcad940b38afe790fb9b.
Map the device.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 15 Nov 2009 14:30:56 +0000 (14:30 +0000)]
PPC64: Partial fix to Linux crash: revert to old devfn
Before
2e29bd04786003561303dcad940b38afe790fb9b, Uni-North host and AGP
bridge were using the same devfn, 11 << 3. The net effect was that only
AGP bridge was visible. This was changed in the commit to 13 << 3 for AGP.
Some of the later crashes happened due to NULL pointer dereferences generated
by
07b7d05377a5e2b242ef0cce3d461d3284700fc0 and insufficient return value
checks.
Disable host device and revert AGP to 11 << 3.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Blue Swirl [Sun, 15 Nov 2009 14:30:03 +0000 (14:30 +0000)]
PCI: make duplicate devfn allocation fatal
Only two callers of pci_create_simple/pci_register_device bothered
to check the return value. Other cases were prone to crashing with
spurious NULL pointer dereferences.
Make QEMU exit with an error message when devfn is attempted to
be duplicated, also applies to case when the bus is full. Remove
checks.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
malc [Sat, 14 Nov 2009 20:32:10 +0000 (23:32 +0300)]
Do not execute shell scripts directly
Signed-off-by: malc <av1474@comtv.ru>
Aurelien Jarno [Sat, 14 Nov 2009 12:10:43 +0000 (13:10 +0100)]
mips malta: fix indentation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 14 Nov 2009 12:10:00 +0000 (13:10 +0100)]
target-mips: fix indentation
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 14 Nov 2009 12:04:29 +0000 (13:04 +0100)]
mips-malta: fix reset
(broken by
45a50b1668822c23afc2a89f724654e176518bc4)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Sun, 8 Nov 2009 10:50:21 +0000 (12:50 +0200)]
mips: fix cpu_reset memory leak
Remove cpu_mips_register()
- move mmu_init(), fpu_init() and mvp_init() into cpu_mips_init()
- move the other parts in cpu_mips_init()
Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Magnus Damm [Fri, 13 Nov 2009 09:51:05 +0000 (18:51 +0900)]
fix make clean targets
This patch fixes clean in case of missing directories and
also adds code to distclean that removes the following files:
qemu-monitor.texi roms/seabios/config.mak roms/vgabios/config.mak
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Magnus Damm [Fri, 13 Nov 2009 09:54:22 +0000 (18:54 +0900)]
sh4 disasm fixes
Add the sh4 target to the monitor disassembly function,
and remove a duplicate "0x" printout from the sh4 dis-
assembly code.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Magnus Damm [Fri, 13 Nov 2009 09:58:08 +0000 (18:58 +0900)]
tcg/i386: remove duplicate sar opcode
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Stefan Weil [Fri, 13 Nov 2009 22:26:27 +0000 (23:26 +0100)]
pci: Fix function pci_default_write_config
Change
260c0cd3d985e51b15870ff47e17b7b930efbda1
(pci: use range helper functions) introduced a
bug which made pci cirrus vga on mips malta
(and maybe other pci devices) fail.
Don't change addr - its original value is needed
by ranges_overlap() and range_covers().
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Aurelien Jarno [Sat, 14 Nov 2009 00:04:29 +0000 (01:04 +0100)]
mips: fix CPU reset
Don't load the kernel twice during reset.
See
f2d74978764f62d832d61ac17bb5d934ade58816.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Blue Swirl [Fri, 13 Nov 2009 19:00:11 +0000 (19:00 +0000)]
Fix PPC crash
Because of a typo, structure field vga_bios_size was not initialized
properly and a bogus BAR6 for the nonexistent VGA BIOS appeared.
The bug was uncovered by
c169998802505c244b8bcad562633f29de7d74a4.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Paul Brook [Fri, 13 Nov 2009 04:31:22 +0000 (04:31 +0000)]
ARM MPCore tweaks
Allow the user to specify the number of cores present on the
RealView EB + ARM11MPCore board. Also split into its own config
rather than guessing from the CPU name.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Paul Brook [Fri, 13 Nov 2009 03:30:33 +0000 (03:30 +0000)]
Realview/EB procid hacks
Guess core tile ID based on CPU type.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Juan Quintela [Wed, 11 Nov 2009 23:39:14 +0000 (00:39 +0100)]
pci: fix the conversion of config field from array to pointer
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Wed, 11 Nov 2009 23:39:13 +0000 (00:39 +0100)]
qemu_system_reset: we need to call it before loadvm/migration
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Juan Quintela [Wed, 11 Nov 2009 23:39:12 +0000 (00:39 +0100)]
fdc: fix vmstate variable passed
When code was transformed to use qdev_reset/vmstate registration, vmstate
was passed a variable of the wrong type
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>