aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-03-13target-i386: Rename cpu_x86_register() to x86_cpu_load_def()Eduardo Habkost
There isn't any kind of "registration" involved in cpu_x86_register() anymore: it is simply looking up a CPU model name and loading the model definition data into the X86CPU object. Rename it to x86_cpu_load_def() to reflect what it does. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13cpu: Turn cpu_has_work() into a CPUClass hookAndreas Färber
Default to false. Tidy variable naming and inline cast uses while at it. Tested-by: Jia Liu <proljc@gmail.com> (or32) Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-xtensa: Clean up ENV_GET_CPU() usageAndreas Färber
Commits a00817cc4c18b7872e92765a4736fb2227cc237b and fdfba1a298ae26dd44bcfdb0429314139a0bc55a added usages of ENV_GET_CPU() macro in target-specific code. Use xtensa_env_get_cpu() instead. Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-unicore32: Clean up ENV_GET_CPU() usageAndreas Färber
Commit fdfba1a298ae26dd44bcfdb0429314139a0bc55a added a usage of ENV_GET_CPU() macro in target-specific code. Use uc32_env_get_cpu() instead. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-sparc: Clean up ENV_GET_CPU() usageAndreas Färber
Commits fdfba1a298ae26dd44bcfdb0429314139a0bc55a, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 and f606604f1c10b60ef294f1b9b229426521a365e3 added usages of ENV_GET_CPU() macro in target-specific code. Use sparc_env_get_cpu() instead and reuse the variables. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-s390x: Clean up ENV_GET_CPU() usageAndreas Färber
Commits f606604f1c10b60ef294f1b9b229426521a365e3, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 and 5ce5944dc0ffdc43c11b5cad11e526f699aabe4c added usages of ENV_GET_CPU() macro in target-specific code. Use s390_env_get_cpu() instead. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-ppc: Clean up ENV_GET_CPU() usageAndreas Färber
Commits fdfba1a298ae26dd44bcfdb0429314139a0bc55a, ab1da85791340e504d10487e1add81b9988afa98, f606604f1c10b60ef294f1b9b229426521a365e3 and 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 added usages of ENV_GET_CPU() macro in target-specific code. Use ppc_env_get_cpu() instead. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-i386: Clean up ENV_GET_CPU() usageAndreas Färber
Commits fdfba1a298ae26dd44bcfdb0429314139a0bc55a, f606604f1c10b60ef294f1b9b229426521a365e3 and 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 added usages of ENV_GET_CPU() macro in target-specific code. Use x86_env_get_cpu() or reuse existing X86CPU variable instead. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-arm: Clean up ENV_GET_CPU() usageAndreas Färber
Commits ab1da85791340e504d10487e1add81b9988afa98, fdfba1a298ae26dd44bcfdb0429314139a0bc55a, 2c17449b3022ca9623c4a7e2a504a4150ac4ad30 added usages of ENV_GET_CPU() macro to target-specific code. Use arm_env_get_cpu() instead and enforce separating variable declarations. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13target-alpha: Clean up ENV_GET_CPU() usageAndreas Färber
Commits 2c17449b3022ca9623c4a7e2a504a4150ac4ad30, fdfba1a298ae26dd44bcfdb0429314139a0bc55a, ab1da85791340e504d10487e1add81b9988afa98 and f606604f1c10b60ef294f1b9b229426521a365e3 added usages of ENV_GET_CPU() macro in target-specific code. Use alpha_env_get_cpu() instead. Cc: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13cpu: Don't clear cpu->exit_request on resetEdgar E. Iglesias
cpu->exit_request is part of the execution environment and should not be cleared when a CPU resets. Otherwise, we might deadlock QEMU if a CPU resets while there is I/O going on. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell
staging Block pull request # gpg: Signature made Thu 13 Mar 2014 13:50:49 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: (24 commits) block/raw-win32: bdrv_parse_filename() for hdev block/raw-posix: Strip protocol prefix on creation block/raw-posix: bdrv_parse_filename() for cdrom block/raw-posix: bdrv_parse_filename() for floppy block/raw-posix: bdrv_parse_filename() for hdev qemu-io: Fix warnings from static code analysis block: Unlink temporary file qcow2: Don't write with BDRV_O_INCOMING qcow2: Keep option in qcow2_invalidate_cache() qmp: add query-iothreads command iothread: stash thread ID away dataplane: replace internal thread with IOThread iothread: add "iothread" qdev property type qdev: make get_pointer() handle temporary strings iothread: add I/O thread object aio: add aio_context_acquire() and aio_context_release() rfifolock: add recursive FIFO lock object: add object_get_canonical_path_component() block: Rewrite the snapshot authorization mechanism for block filters. iotests: Test corruption during COW request ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13oslib-posix: Fix build on FreeBSDAndreas Färber
Commit 10f5bff622cad71645e22c027b77ac31e51008ef (util: Split out exec_dir from os_find_datadir) moved code from os-posix.c to util/oslib-posix.c but forgot to move a FreeBSD #include alongside, needed for CTL_KERN among others. Cc: Fam Zheng <famz@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Message-id: 1394717279-23406-1-git-send-email-andreas.faerber@web.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13block/raw-win32: bdrv_parse_filename() for hdevMax Reitz
The "host_device" protocol driver should strip the "host_device:" prefix from filenames if present. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block/raw-posix: Strip protocol prefix on creationMax Reitz
The hdev_create() implementation in block/raw-posix.c is used by the "host_device", "host_cdrom" and "host_floppy" protocol block drivers together. Thus, any of the associated prefixes may occur and exactly one should should be stripped, if it does (thus, "host_device:host_cdrom:/dev/cdrom" is not shortened to "/dev/cdrom"). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block/raw-posix: bdrv_parse_filename() for cdromMax Reitz
The "host_cdrom" protocol drivers should strip the "host_cdrom:" prefix from filenames if present. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block/raw-posix: bdrv_parse_filename() for floppyMax Reitz
The "host_floppy" protocol driver should strip the "host_floppy:" prefix from filenames if present. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block/raw-posix: bdrv_parse_filename() for hdevMax Reitz
The "host_device" protocol driver should strip the "host_device:" prefix from filenames if present. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qemu-io: Fix warnings from static code analysisStefan Weil
Smatch complains about several global symbols which should be local. Add the missing 'static' attributes and move the 'extern' declaration of variable qemuio_misalign to qemu-io.h. This variable also changes the type from 'int' to 'bool' which better fits documents its use. Signed-off-by: Stefan Weil <sw@weilnetz.de> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block: Unlink temporary fileMax Reitz
If the image file cannot be opened and was created as a temporary file, it should be deleted; thus, in this case, we should jump to the "unlink_and_fail" label and not just to "fail". Reported-by: Benoît Canet <benoit@irqsave.net> Signed-off-by: Max Reitz <mreitz@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qcow2: Don't write with BDRV_O_INCOMINGKevin Wolf
qcow2_open() causes writes when repairing an image with the dirty flag set and when clearing autoclear flags. It shouldn't do this when another qemu instance is still actively working on this image file. One effect of the bug is that images may have a cleared dirty flag while the migration source host still has it in use with lazy refcounts enabled, so refcounts are not accurate and the dirty flag must remain set. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qcow2: Keep option in qcow2_invalidate_cache()Kevin Wolf
Instead of manually building a list of all options from BDRVQcowState values just reuse the options that were used to open the image. qcow2_open() won't fully use all of the options in the QDict, but that's okay. This fixes all of the driver-specific options in qcow2, except for lazy-refcounts, which was special cased before. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qmp: add query-iothreads commandStefan Hajnoczi
The "query-iothreads" command returns a list of information about iothreads. See the patch for API documentation. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13iothread: stash thread ID awayStefan Hajnoczi
Keep the thread ID around so we can report it via QMP. There's only one problem: qemu_get_thread_id() (gettid() wrapper on Linux) must be called from the thread itself. There is no way to get the thread ID outside the thread. This patch uses a condvar to wait for iothread_run() to populate the thread_id inside the thread. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13dataplane: replace internal thread with IOThreadStefan Hajnoczi
Today virtio-blk dataplane uses a 1:1 device-per-thread model. Now that IOThreads have been introduced we can generalize this to N:M devices per threads. This patch drops thread code from dataplane in favor of running inside an IOThread AioContext. As a bonus we solve the case where a guest keeps submitting I/O requests while dataplane is trying to stop. Previously the dataplane thread would continue to process requests until the request gave it a break. Now we can shut down in bounded time thanks to aio_context_acquire/release. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13iothread: add "iothread" qdev property typeStefan Hajnoczi
Add a "iothread" qdev property type so devices can be hooked up to an IOThread from the comand-line: qemu -object iothread,id=iothread0 \ -device some-device,x-iothread=iothread0 Note that Paolo Bonzini <pbonzini@redhat.com> has suggested using QOM links instead. This way the relationship between the objects is reflected in QOM. There are currently shortcomings of object_property_add_link() which prevent this use case. I will attempt to fix them and move to QOM links in a separate series. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qdev: make get_pointer() handle temporary stringsIgor Mammedov
get_pointer()'s print() callback might return a heap allocated string, to avoid adding dedicated get_pointer_foo for this case convert current print() callbacks to return temporary heap allocated string and make get_pointer() free it. Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13iothread: add I/O thread objectStefan Hajnoczi
This is a stand-in for Michael Roth's QContext. I expect this to be replaced once QContext is completed. The IOThread object is an AioContext event loop thread. This patch adds the concept of multiple event loop threads, allowing users to define them. When SMP guests run on SMP hosts it makes sense to instantiate multiple IOThreads. This spreads event loop processing across multiple cores. Note that additional patches are required to actually bind a device to an IOThread. [Andreas Färber <afaerber@suse.de> pointed out that the embedded parent object instance should be called "parent_obj" and have a newline afterwards. This patch has been changed to reflect this. -- Stefan] Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13aio: add aio_context_acquire() and aio_context_release()Stefan Hajnoczi
It can be useful to run an AioContext from a thread which normally does not "own" the AioContext. For example, request draining can be implemented by acquiring the AioContext and looping aio_poll() until all requests have been completed. The following pattern should work: /* Event loop thread */ while (running) { aio_context_acquire(ctx); aio_poll(ctx, true); aio_context_release(ctx); } /* Another thread */ aio_context_acquire(ctx); bdrv_read(bs, 0x1000, buf, 1); aio_context_release(ctx); This patch implements aio_context_acquire() and aio_context_release(). Note that existing aio_poll() callers do not need to worry about acquiring and releasing - it is only needed when multiple threads will call aio_poll() on the same AioContext. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13rfifolock: add recursive FIFO lockStefan Hajnoczi
QemuMutex does not guarantee fairness and cannot be acquired recursively: Fairness means each locker gets a turn and the scheduler cannot cause starvation. Recursive locking is useful for composition, it allows a sequence of locking operations to be invoked atomically by acquiring the lock around them. This patch adds RFifoLock, a recursive lock that guarantees FIFO order. Its first user is added in the next patch. RFifoLock has one additional feature: it can be initialized with an optional contention callback. The callback is invoked whenever a thread must wait for the lock. For example, it can be used to poke the current owner so that they release the lock soon. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13object: add object_get_canonical_path_component()Stefan Hajnoczi
It is often useful to find an object's child property name. Also use this new function to simplify the implementation of object_get_canonical_path(). Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block: Rewrite the snapshot authorization mechanism for block filters.Benoît Canet
This patch keep the recursive way of doing things but simplify it by giving two responsabilities to all block filters implementors. They will need to do two things: -Set the is_filter field of their block driver to true. -Implement the bdrv_recurse_is_first_non_filter method of their block driver like it is done on the Quorum block driver. (block/quorum.c) [Paolo Bonzini <pbonzini@redhat.com> pointed out that this patch changes the semantics of blkverify, which now recurses down both bs->file and s->test_file. -- Stefan] Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13iotests: Test corruption during COW requestMax Reitz
Extend test file 060 by a test case for corruption occuring concurrently to a COW request. QEMU should not crash but rather return an appropriate error message. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block: bs->drv may be NULL in bdrv_debug_resume()Max Reitz
Currently, bdrv_debug_resume() requires every bs->drv in the BDS stack to be NULL until a bs->drv with an implementation of bdrv_debug_resume() is found. For a normal function, this would be fine, but this is a function for debugging purposes and should therefore allow intermediate BDS not to have a driver (i.e., be "ejected"). Otherwise, it is hard to debug such situations. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qcow2: Check bs->drv in copy_sectors()Max Reitz
Before dereferencing bs->drv for a call to its member bdrv_co_readv(), copy_sectors() should check whether that pointer is indeed valid, since it may have been set to NULL by e.g. a concurrent write triggering the corruption prevention mechanism. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13block: Update image size in bdrv_invalidate_cache()Kevin Wolf
After migration has completed, we call bdrv_invalidate_cache() so that drivers which cache some data drop their stale copy of the data and reread it from the image file to get a new version of data that the source modified while the migration was running. Reloading metadata from the image file is useless, though, if the size of the image file stays stale (this is a value that is cached for all image formats in block.c). Reads from (meta)data after the old EOF return only zeroes, causing image corruption. We need to update bs->total_sectors in all layers that could potentially have changed their size (i.e. backing files are not a concern - if they are changed, we're in bigger trouble) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13qcow2-refcount: Sanitize refcount table entryMax Reitz
When reading the refcount table entry in get_refcount(), only bits which are actually significant for the refcount block offset should be taken into account. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-03-13Merge remote-tracking branch 'remotes/afaerber/tags/ppc-for-2.0' into stagingPeter Maydell
PowerPC queue for 2.0-rc0 * QEMUMachine include cleanup * SLOF update * XICS reset fix * sPAPR PCI host bridge refactorings # gpg: Signature made Thu 13 Mar 2014 02:50:51 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/ppc-for-2.0: spapr-pci: Convert fprintf() to error_report() spapr-pci: Convert to QOM realize xics-kvm: Fix reset function pseries: Update SLOF firmware image to qemu-slof-20140304 Move QEMUMachine typedef to qemu/typedefs.h Revert "KVM: Split QEMUMachine typedef into separate header" Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13Merge remote-tracking branch 'remotes/afaerber/tags/qom-devices-for-peter' ↵Peter Maydell
into staging QOM/QTest infrastructure fixes and device conversions * QTest cleanups and test cases for some virtio devices * QTest for sPAPR PCI host bridge * qom-test now tests reading all properties beneath /machine * QOM API leak fixes * QOM cleanups for SSI devices * QOM conversion of QEMUMachine * QOM realize for buses * sPAPR PCI bus name change # gpg: Signature made Thu 13 Mar 2014 00:22:40 GMT using RSA key ID 3E7E013F # gpg: Good signature from "Andreas Färber <afaerber@suse.de>" # gpg: aka "Andreas Färber <afaerber@suse.com>" * remotes/afaerber/tags/qom-devices-for-peter: (31 commits) libqtest: Fix possible deadlock in qtest initialization pci: Move VMState registration/unregistration to QOM realize/unrealize qdev: Realize buses on device realization qdev: Prepare realize/unrealize hooks for BusState tests: Add spapr-pci-host-bridge qtest virtio-serial-port: Convert to QOM realize/unrealize virtio-console: QOM cast cleanup for VirtConsole tests: Add virtio-console qtest tests: Add virtio-serial qtest tests: Add virtio-scsi qtest tests: Add virtio-rng qtest tests: Add virtio-balloon qtest tests: Add virtio-blk qtest tests: Clean up IndustryPack TPCI200 gcov paths qom-test: Test QOM properties hw/boards: Convert current_machine to MachineState vl: Use MachineClass instead of global QEMUMachine list hw/core: Introduce QEMU machine as QOM object qdev-monitor-test: Don't test human-readable error message qdev-monitor-test: Simplify using g_assert_cmpstr() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-03-13libqtest: Avoid inline varargs functionsPeter Maydell
Older versions of gcc (eg 4.6) can't handle varargs functions declared inline for anything other than completely trivial uses, and complain: tests/qom-test.c: In function 'qmp': tests/libqtest.h:359:60: sorry, unimplemented: function 'qmp' can never be inlined because it uses variable argument lists Avoid this problem by putting the functions into libqtest.c instead of using inline definitions in libqtest.h. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
2014-03-13spapr-pci: Convert fprintf() to error_report()Alexey Kardashevskiy
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Mike Day <ncmike@ncultra.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13spapr-pci: Convert to QOM realizeAlexey Kardashevskiy
This converts the old-style SysBusDevice::init() callback to a new-style DeviceClass::realize() callback. As a part of conversion, this replaces fprintf(stderr) with error_setg() as realize() does not "return" any value, instead it puts the extended error into **errp. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Mike Day <ncmike@ncultra.org> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13xics-kvm: Fix reset functionAlexey Kardashevskiy
Currently interrupt priorities are set to 0 (highest) at the very beginning of the guest execution which is not correct and makes the guest produce random interrupt error messages such as: "Interrupt 0x1001 (real) is invalid, disabling it". This also prevents interrupt states from correct migration. This initializes priority to 0xFF as the emulated XICS does. Suggested-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13pseries: Update SLOF firmware image to qemu-slof-20140304Alexey Kardashevskiy
The changelog is: > version: update to 20140304 > Introduce dummy console device > vio-vscsi: Fix CRQ allocation alignment > version: update to 20140204 > virtio-9p: disable unused structure > Make "boot net:dhcp" boot from IPv4 only > Fix virtio device shutdown > Change shutdown method name for virtio-scsi > Add support for 64bit LE ABI v1 and v2 support > Change representation of string environment variable > cas: return error when unknown node found > version: update > Reset obp-tftp arguments before parsing > Enable seamless netboot on IPv6 network > Fix shutdown for virtio devices > Fix zero checksum in UDP header > Handle router advertisement message properly > [oex]hci_exit: Check before freeing/unmapping memory > Work around missing sc 1 traps on pHyp > fix print_version() to return where it came from > usb-xhci: memory freeing and using returns as bool uniformly > Output banner and initial display output in VNC window > use VERSION file to generate FW version > cas: remove warning > Add support for loading little endian ELF binaries. > Add bswap_{16,32,64}p > dhcpv6 and other minor net-snk fixes > Fix missing drop in virtio-fs setup-alias > Find next available alias name > SLOF does not exit if given 1KB disk > boot: enable support for bootindex > pci-properties: add properties to enable hotplug for spapr > e1000: remember node handle > Increase quiesce tokens array size > virtio: timeout after 5sec > Enable IPv6 support in dns > usb-ohci: fix warnings > Add ipv6 support in net-snk > ipv4: fix frame overwriting following arp_send_request > e1000: fix SLOF_dma_map_out arguments > Maintain single global packet buffer for tftp > Increase virtio-net receive queue size > Increase veth receive queue size > Fix dprintf macros at various points > usb-ohci: rewrite done_head processing code > boot: add net in default boot order > block 0 address in the allocator > scsi: make-media-alias fix > usb-xhci: add xhci host controller support > usb-xhci: add xhci support > Avoid veth read/write calls with zero length buffer > boot: include other aliases > usb-core: disable xhci Cc: Andreas Färber <afaerber@suse.de> Cc: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2014-03-13Move QEMUMachine typedef to qemu/typedefs.hAndreas Färber
As reported in commit 9c06a1f79f959fffd09bfb7efc3d76051a6cd2da, xen.h is not self-contained with regards to its use of QEMUMachine. Fix this. Reported-by: Alexander Graf <agraf@suse.de> Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13Revert "KVM: Split QEMUMachine typedef into separate header"Andreas Färber
This reverts commit 9c06a1f79f959fffd09bfb7efc3d76051a6cd2da. The new header sysemu/qemumachine.h is undesired. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13libqtest: Fix possible deadlock in qtest initializationMarcel Apfelbaum
'socket_accept' waits for QEMU to init its unix socket. If QEMU encounters an error during command line parsing, it can exit before initializing the communication channel. Using a timeout for sockets fixes the issue. Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13pci: Move VMState registration/unregistration to QOM realize/unrealizeBandan Das
Use the realize and unrealize hooks to register and unregister vmstate_pcibus respectively. Relocate some stuff to avoid forward declarations. Signed-off-by: Bandan Das <bsd@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> [AF: Keep using PCI_BUS() cast macro] Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13qdev: Realize buses on device realizationBandan Das
Integrate (un)realization of child buses with realization/unrealization of the device hosting them. Code in device_unparent() is reordered for unrealization of buses to work as part of device unrealization. That way no changes need to be made to bus instantiation. Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13qdev: Prepare realize/unrealize hooks for BusStateBandan Das
Add a "realized" property calling realize/unrealize hooks as for devices. Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>