aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-11-17QDict: Introduce qdict_iter()Luiz Capitulino
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>
2009-11-17Add a unit test for JSON supportAnthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Add a QObject JSON wrapperAnthony Liguori
This provides a QObject interface for creating QObjects from a JSON expression. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Add a JSON parserAnthony Liguori
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>
2009-11-17Add a JSON message boundary identifierAnthony Liguori
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>
2009-11-17Add a lexer for JSONAnthony Liguori
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>
2009-11-17Add a QBool typeAnthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Add unit test for QFloatAnthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Add a QFloat datatypeAnthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Allow strings to grow in sizeAnthony Liguori
This lets us use QString for building larger strings Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Add operations to qlist to allow it to be used as a stackAnthony Liguori
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>
2009-11-17Properly escape QDECREF macro argumentsAnthony Liguori
QDECREF does not properly escape the macro arguments which can lead to unexpected syntax errors. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Cleanup configure checks for dup3 and fallocateJan Kiszka
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>
2009-11-17kvm: x86: Refactor use of interrupt_bitmapJan Kiszka
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>
2009-11-17kvm: Add arch reset handlerJan Kiszka
Will be required by succeeding changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-17Enable migration without shared storage from the monitorlirans@il.ibm.com
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>
2009-11-17Block live migrationlirans@il.ibm.com
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>
2009-11-17Expose a mechanism to trace block writeslirans@il.ibm.com
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>
2009-11-17char: rename qemu_chr_reset to qemu_chr_generic_openAmit Shah
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>
2009-11-17char: Remove special init_reset handlingAmit Shah
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>
2009-11-17char: don't limit data sent to backends to 1k per bufferAmit Shah
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>
2009-11-16ARM PB-A8 supportPaul Brook
Add ARM Realview PB-A8 board support. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-16LAN9118 emulationPaul Brook
Add SMSC LAN9118 ethernet emulation. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-15mips_r4k: fix resetAurelien Jarno
(broken by 45a50b1668822c23afc2a89f724654e176518bc4) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-15PPC64: map Uni-North AGP bus aka fix Linux bootBlue Swirl
Uni-North AGP device mapping was accidentally dropped in 2e29bd04786003561303dcad940b38afe790fb9b. Map the device. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-15PPC64: Partial fix to Linux crash: revert to old devfnBlue Swirl
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>
2009-11-15PCI: make duplicate devfn allocation fatalBlue Swirl
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>
2009-11-14Do not execute shell scripts directlymalc
Signed-off-by: malc <av1474@comtv.ru>
2009-11-14mips malta: fix indentationAurelien Jarno
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-14target-mips: fix indentationAurelien Jarno
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-14mips-malta: fix resetAurelien Jarno
(broken by 45a50b1668822c23afc2a89f724654e176518bc4) Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-14mips: fix cpu_reset memory leakBlue Swirl
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>
2009-11-14fix make clean targetsMagnus Damm
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>
2009-11-14sh4 disasm fixesMagnus Damm
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>
2009-11-14tcg/i386: remove duplicate sar opcodeMagnus Damm
Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-11-14pci: Fix function pci_default_write_configStefan Weil
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>
2009-11-14mips: fix CPU resetAurelien Jarno
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>
2009-11-13Fix PPC crashBlue Swirl
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>
2009-11-13ARM MPCore tweaksPaul Brook
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>
2009-11-13Realview/EB procid hacksPaul Brook
Guess core tile ID based on CPU type. Signed-off-by: Paul Brook <paul@codesourcery.com>
2009-11-12pci: fix the conversion of config field from array to pointerJuan Quintela
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12qemu_system_reset: we need to call it before loadvm/migrationJuan Quintela
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12fdc: fix vmstate variable passedJuan Quintela
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>
2009-11-12vnc: improve capslock handling.Gerd Hoffmann
When capslock is toggled while the vnc window hasn't the focus qemu will miss the state change. Add sanity checks for the capslock state and toggle it if needed, so hosts and guests idea of capslock state stay in sync. Simliar logic for numlock is present in qemu already. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12e1000 fix: read access to some registers is missing.Kay Ackermann
While writing working on an e1000 driver for my university's OS I noticed that some registers aren't readable in QEMU, but they should be readable as stated in Intels Driver Developer Manual (and also verified on real hardware). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12Fix 32-bit overflow in parallels image supportDavid Woodhouse
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12kvm ppc: Remove unused labelHollis Blanchard
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12kvm: Move KVM mp_state accessors to i386-specific codeHollis Blanchard
Unbreaks PowerPC and S390 KVM builds. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12virtio-blk: Pass read errors to the guestKevin Wolf
We need to signal not only write errors, but also read errors to the guest driver. This fixes a regression introduced by 869a5c6d. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-11-12savevm: Delete existing snapshots in all imagesKevin Wolf
When creating a snapshot we can run into the situation that the first disk doesn't have a snapshot, but the second one does have one with the same name as the new snapshot. In this case, qemu doesn't recognize that there is a snapshot to be overwritten, so it starts to save the new snapshot and errors out later when it tries to snapshot the second image. With this patch, snapshots on secondary images are overwritten just like on the first image. Reported-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>