summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* linux-user: Fix error handling in lock_iovec()Peter Maydell2014-02-181-5/+7
| | | | | | | | | | In lock_iovec() if lock_user() failed we were doing an unlock_user but not a free(vec), which is the wrong way round. We were also assuming that free() and unlock_user() don't touch errno, which is not guaranteed. Fix both these problems. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user/signal.c: Don't pass sigaction uninitialised sa_flagsPeter Maydell2014-02-181-0/+1
| | | | | | | | | When forcing a fatal signal, we weren't initialising the sa_flags field in the struct sigaction we used to reset the signal handler to SIG_DFL. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user/elfload.c: Avoid calling g_free() on uninitialized dataPeter Maydell2014-02-181-4/+12
| | | | | | | | | | | Avoid calling g_free() on unintialized data in the error-handling paths in elf_core_dump() by splitting the initialization of the elf_note_info struct out of fill_note_info() so that it's always valid to call free_note_info() whether we got to the point of being able to fill_note_info() or not. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* linux-user: sync syscall numbers upto 3.13Riku Voipio2014-02-1815-3/+94
| | | | | | | All others updated except unicore, which doesn't look right to begin with. Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
* Fix QEMU build on OpenBSD on x86 archsBrad2014-02-172-1/+9
| | | | | | | | | | | | | | | | | This resolves the build issue with building the ROMs on OpenBSD on x86 archs. As of OpenBSD 5.3 the compiler builds PIE binaries by default and thus the whole OS/packages and so forth. The ROMs need to have PIE disabled. Check in configure whether the compiler supports the flags for disabling PIE, and if it does then use them for building the ROMs. This fixes the following buildbot failure: >From the OpenBSD buildbots.. Building optionrom/multiboot.img ld: multiboot.o: relocation R_X86_64_16 can not be used when making a shared object; recompile with -fPIC Signed-off by: Brad Smith <brad@comstyle.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* libvixl: fix 64bit constants usageMichael Tokarev2014-02-152-15/+21
| | | | | | | | | | | | | | | | | | | | Since commit 999b53ec8794f203964db3ecf939a3da5c4bc843: Author: Claudio Fontana <claudio.fontana@linaro.org> Date: Wed Feb 5 17:27:28 2014 +0000 disas: Implement disassembly output for A64 Use libvixl to implement disassembly output in debug logs for A64, for use with both AArch64 hosts and targets. disas/libvixl/ contains functions which uses 64bit constants without using appropriate suffixes, which fails on 32bits. Fix this by using ULL suffix. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-02-15' ↵Peter Maydell2014-02-159-425/+188
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into staging trivial patches for 2014-02-15 # gpg: Signature made Sat 15 Feb 2014 12:10:46 GMT using RSA key ID 74F0C838 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # 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: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: E190 8639 3B10 B51B AC2C 8B73 5253 C5AD 74F0 C838 * remotes/mjt/tags/trivial-patches-2014-02-15: char/serial: Fix emptyness check gitignore: anchor all ignored names vl: trim includes vl: remove old, long-unused defines net: declare struct iovec in checksum.h to fix compiler warning linux-user: refactor do_socketcall() configure: add hints to a remedy for feature_not_found errors configure: add hint of libfdt to DTC dependency not found message sparc/leon3: Initialize stack pointer misc: Fix case Qemu -> QEMU Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * char/serial: Fix emptyness checkPeter Crosthwaite2014-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | This was guarding against a full fifo rather than an empty fifo when popping. Fix. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * gitignore: anchor all ignored namesMichael Tokarev2014-02-151-75/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by default, patterns/names in .gitignore are applied recursively to all subdirectories. So any name mentioned in .gitignore is ignored in all subdirectores. This is good for, say. object files (*.o), but not good for particular names which should be ignored only in one directory. For example, qemu-img.1 file is generated in the top directory, and it should be ignored only there, not in some subdir. At first, this might not matter much, but we have lots of examples already where it actually does not help at all. For example, top-level .gitignore ignores a file/dir named "patches" (which is very questionable by itself), but it is applied recursively, so git also ignores, for example, debian/patches/ which should not be ignored. So anchor all the names where appropriate. .gitignore should be cleaned up further, which will be addressed in a subsequent patch. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * vl: trim includesMichael Tokarev2014-02-151-51/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over time, lots of stuff moved from vl.c into separate files. But include statements has never been cleaned, and they continue to carry lots of anymore-unused stuff. Remove includes which are not relevant for vl.c anymore. Apparently there are more includes like this, because many are included from qemu-common.h and the like, or, for example, I don't see were we use win32-specific stuff in vl.c (so that maybe #include <windows.h> might be removed too). Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * vl: remove old, long-unused definesMichael Tokarev2014-02-151-3/+0
| | | | | | | | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * net: declare struct iovec in checksum.h to fix compiler warningMichael Tokarev2014-02-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The checksum calculation header exports a function that refers to struct iov defined in iov.h. Without including the former, build fails like this: In file included from hw/net/fsl_etsec/rings.c:24:0: include/net/checksum.h:51:31: error: ‘struct iovec’ declared inside parameter list [-Werror] include/net/checksum.h:51:31: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] Mention struct iovec there. Reported-by: Alexander Graf <agraf@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * linux-user: refactor do_socketcall()Michael Tokarev2014-02-151-258/+68
| | | | | | | | | | | | | | | | | | | | | | | | Refactor do_socketcall() to do argument conversion/checking first, according to a lookup table (which call has how many args) and by calling the right function second with ready-to-go arguments. This ensures that all arguments are handled as abi_long, according to socketcall prototype, and simplifies argument handling alot too. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
| * configure: add hints to a remedy for feature_not_found errorsStewart Smith2014-02-151-33/+35
| | | | | | | | | | | | | | | | | | | | | | | | Modify feature_not_found to accept an optional second parameter to be printed after the generic feature not found error. Modify most calls to feature_not_found to provide hints as to the packages that may be missing. The few calls remaining without a remedy are ones I couldn't work out how to remedy myself. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * configure: add hint of libfdt to DTC dependency not found messageStewart Smith2014-02-151-2/+2
| | | | | | | | | | | | | | | | | | Most distros package it as libfdt, and mentioning libfdt here makes it much easier to find the package you're missing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * sparc/leon3: Initialize stack pointerSebastian Huber2014-02-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | A lot of real world LEON3 systems are shipped with the GRMON boot loader. This boot loader initializes the stack pointer with the end of RAM address. The application can use this to detect the RAM size of a particular board variant. Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de> Reviewed-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
| * misc: Fix case Qemu -> QEMUStefan Weil2014-02-152-2/+2
| | | | | | | | | | | | | | Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* | Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ↵Peter Maydell2014-02-1510-50/+115
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | staging Block pull request # gpg: Signature made Fri 14 Feb 2014 17:26:30 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: block: Open by reference will try device then node_name. block: Relax bdrv_lookup_bs constraints. blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on close. block: mirror - use local_err to avoid NULL errp qemu-iotests: Don't run 005 on vmdk split formats block: qemu-iotests - add vhdx log replay tests for qemu-img block: qemu-iotests - fix test 070 (vhdx) block: Don't throw away errno via error_setg block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepare blockdev: Remove 'type' parameter from blockdev_init() sdhci: Drop unnecessary #include Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | block: Open by reference will try device then node_name.Benoît Canet2014-02-142-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we introduced node_name for named bs of the graph modify the opening by reference to use it as a fallback. This patch also enforce the separation of the device id and graph node namespaces. Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: Relax bdrv_lookup_bs constraints.Benoît Canet2014-02-141-15/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The following patch will reuse bdrv_lookup_bs in order to open images by references so the rules of usage of bdrv_lookup_bs must be relaxed a bit. Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev: Fix wrong usage of QDECREF causing snapshoted quorum to crash on ↵Benoît Canet2014-02-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | close. As bdrv_open() documentation states: "The reference to the QDict belongs to the block layer * after the call (even on failure), so if the caller intends to reuse the * dictionary, it needs to use QINCREF() before calling bdrv_open." the optional options dict will not be reused after bdrv_open() and should belong to the block layer so remove the extra QDECREF(options). Signed-off-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: mirror - use local_err to avoid NULL errpJeff Cody2014-02-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When starting a block job, commit_active_start() relies on whether *errp is set by mirror_start_job. This allows it to determine if the mirror job start failed, so that it can clean up any changes to open flags from the bdrv_reopen(). If errp is NULL, then it will not be able to determine if mirror_start_job failed or not. To avoid this, use a local Error variable, and then propagate the error (if any) to errp. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | qemu-iotests: Don't run 005 on vmdk split formatsFam Zheng2014-02-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There would be too many extents that VMDK driver can't open all of them: 005 0s ... - output mismatch (see 005.out.bad) --- 005.out 2013-12-24 09:27:27.608181030 +0800 +++ 005.out.bad 2014-02-13 10:00:15.282184557 +0800 @@ -4,10 +4,10 @@ Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=5368709120000 small read -read 4096/4096 bytes at offset 1024 -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +qemu-io: can't open device /tmp/qemu-iotests/t.vmdk: Could not open '/tmp/qemu-iotests/t-s1016.vmdk': Too many open files +no file open, try 'help open' small write -wrote 4096/4096 bytes at offset 8192 -4 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) +qemu-io: can't open device /tmp/qemu-iotests/t.vmdk: Could not open '/tmp/qemu-iotests/t-s1016.vmdk': Too many open files +no file open, try 'help open' *** done So disable the two subformats. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: qemu-iotests - add vhdx log replay tests for qemu-imgJeff Cody2014-02-142-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | VHDX logs can now be replayed via 'qemu-img check -r all'. Add tests to verify that the log replay is successful when using qemu-img. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: qemu-iotests - fix test 070 (vhdx)Jeff Cody2014-02-142-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VHDX test 070 failed, due to different output from qemu-io / qemu when opening an image read-only that contains a log file. Filter the output, and update the expected results to match the correct output. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: Don't throw away errno via error_setgJeff Cody2014-02-143-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a handful of places in the block layer where a failure path has a valid -errno value, yet error_setg() is used. Those instances should instead use error_setg_errno(), to preserve as much error information as possible. This patch replaces those instances with error_setg_errno(), so that errno is passed up the stack in the error message. Reported-By: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepareJeff Cody2014-02-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iSCSI currently does not need to do any actions to support the current usage of bdrv_reopen(). However, it is important to note a couple of things: 1.) A connection will not be re-established to an iSCSI target, and 2.) If iscsi_open() is changed to parse 'flags', then iscsi_reopen_prepare() may need to be more than a stub. In light of the above, this commit adds comments above both of the functions to bring attention to these facts. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | blockdev: Remove 'type' parameter from blockdev_init()Kevin Wolf2014-02-141-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blockdev-add doesn't know about the device that the backend will be attached to, this is a legacy -drive concept. Move the remaining checks that use it to drive_init(). [Fam Zheng <famz@redhat.com> suggested line-wrapping to 80 chars as required by the coding standard. I have fixed this. --Stefan] Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
| * | sdhci: Drop unnecessary #includeKevin Wolf2014-02-141-1/+0
| | | | | | | | | | | | | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | | Merge remote-tracking branch 'remotes/jliu/or32-ld-st' into stagingPeter Maydell2014-02-151-67/+32
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * remotes/jliu/or32-ld-st: target-openrisc: Use new qemu_ld/st opcodes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | target-openrisc: Use new qemu_ld/st opcodesRichard Henderson2014-02-121-67/+32
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Richard Henderson <rth@twiddle.net> Acked-by: Jia Liu <proljc@gmail.com> Signed-off-by: Jia Liu <proljc@gmail.com>
* | | | Merge remote-tracking branch 'remotes/jovanovic/mips-ufrp' into stagingPeter Maydell2014-02-156-8/+152
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/jovanovic/mips-ufrp: target-mips: add user-mode FR switch support for MIPS32r5 target-mips: add support for CP0_Config5 target-mips: add support for CP0_Config4 target-mips: add CPU definition for MIPS32R5 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | target-mips: add user-mode FR switch support for MIPS32r5Petar Jovanovic2014-02-104-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description of UFR feature: Required in MIPS32r5 if floating point is implemented and user-mode FR switching is supported. The UFR register allows user-mode to clear StatusFR by executing a CTC1 to UFR with GPR[0] as input, and read StatusFR by executing a CFC1 to UFR. helper_ctc1 has been extended with an additional parameter rt to check requirements for UFR feature. Definition of mips32r5-generic has been modified to include support for UFR. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: Eric Johnson <eric.johnson@imgtec.com>
| * | | target-mips: add support for CP0_Config5Petar Jovanovic2014-02-105-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CP0_Config5, define rw_bitmask and enable modifications. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: Eric Johnson <eric.johnson@imgtec.com>
| * | | target-mips: add support for CP0_Config4Petar Jovanovic2014-02-105-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add CP0_Config4, define rw_bitmask. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: Eric Johnson <eric.johnson@imgtec.com>
| * | | target-mips: add CPU definition for MIPS32R5Petar Jovanovic2014-02-102-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mips32r5-generic among CPU definitions for MIPS. Define ISA_MIPS32R3 and ISA_MIPS32R5. Signed-off-by: Petar Jovanovic <petar.jovanovic@imgtec.com> Reviewed-by: Eric Johnson <eric.johnson@imgtec.com>
* | | | PPC: KVM: Add missing address space to ldl_phys helperAlexander Graf2014-02-141-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | We now have to pass an address space to our _phys helpers. During the transition apparently the EPR exit path missed out, so let's put it there. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell2014-02-1338-461/+540
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acpi,pc,pci fixes and enhancements Most changes here are hotplug related: This merges hotplug infrastructure changes by Igor, some acpi related fixes, and PC fixes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 10 Feb 2014 09:13:26 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.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: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: ACPI: Remove commented-out code from HPET._CRS hw/pci: switch to a generic hotplug handling for PCIDevice pci/pcie: convert PCIE hotplug to use hotplug-handler API pci/shpc: convert SHPC hotplug to use hotplug-handler API acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API qdev:pci: refactor PCIDevice to use generic "hotpluggable" property hw/acpi: move typeinfo to the file end qdev: add "hotpluggable" property to Device qdev: add to BusState "hotplug-handler" link define hotplug interface loader: document that errno is set pc.c: better error message on initrd sizing failure pc_piix: enable legacy hotplug for Xen qtest: don't report signals if qtest driver enabled hw:piix4:acpi: reuse pcihp code for legacy PCI hotplug pcihp: remove unused AcpiPciHpPciStatus.device_present field pcihp: make pci_read() mmio calback compatible with legacy ACPI hotplug pcihp: make PCI hotplug mmio handlers indifferent to PCI_HOTPLUG_ADDR pcihp: replace enable|disable_device() with oneliners pcihp: reduce number of device check events Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * | | ACPI: Remove commented-out code from HPET._CRSGabriel L. Somlo2014-02-101-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IRQNoFlags on HPET._CRS crashes WinXP because it causes the HPET to conflict with the system timer and/or the RTC. It only occurs on Apple hardware, and even there it is exposed fully only when OS X is detected (via _OSI). Recent OS X versions work on QEMU without this statement, so at this time there is no need to find a better way to conditionally include the statement. This patch removes the commented out (and wrong, should have been {0, 8}) statement from HPET._CRS. Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-By: Igor Mammedov <imammedo@redhat.com>
| * | | hw/pci: switch to a generic hotplug handling for PCIDeviceIgor Mammedov2014-02-105-45/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | make qdev_unplug()/device_set_realized() to call hotplug handler's plug/unplug methods if available and remove not needed anymore hot(un)plug handling from PCIDevice. In case if hotplug handler is not available, revert to the legacy hotplug method for compatibility with not yet converted buses. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pci/pcie: convert PCIE hotplug to use hotplug-handler APIIgor Mammedov2014-02-103-25/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split pcie_cap_slot_hotplug() into hotplug/unplug callbacks and register them as "hotplug-handler" interface implementation of PCIE_SLOT device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS "hotplug-handler" property to PCI_BRIDGE_DEV device. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pci/shpc: convert SHPC hotplug to use hotplug-handler APIIgor Mammedov2014-02-103-47/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split shpc_device_hotplug() into hotplug/unplug callbacks and register them as "hotplug-handler" interface implementation of PCI_BRIDGE_DEV device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS "hotplug-handler" property to PCI_BRIDGE_DEV device. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler APIIgor Mammedov2014-02-104-30/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split piix4_device_hotplug() into hotplug/unplug callbacks and register them as "hotplug-handler" interface implementation of PIIX4_PM device. Replace pci_bus_hotplug() wiring with setting link on PCI BUS "hotplug-handler" property to PIIX4_PM device. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | qdev:pci: refactor PCIDevice to use generic "hotpluggable" propertyIgor Mammedov2014-02-1016-30/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and use generic DeviceClass.hotpluggable field instead. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | hw/acpi: move typeinfo to the file endIgor Mammedov2014-02-101-46/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do so to avoid not necessary forward declarations and place typeinfo registration at the file end where it's usually expected. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | qdev: add "hotpluggable" property to DeviceIgor Mammedov2014-02-102-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently it's possible to make PCIDevice not hotpluggable by using no_hotplug field of PCIDeviceClass. However it limits this only to PCI devices and prevents from generalizing hotplug code. So add similar field to DeviceClass so it could be reused with other Devices and would allow to replace PCI specific hotplug callbacks with generic implementation. Following patches will replace PCIDeviceClass.no_hotplug with this new property. In addition expose field as "hotpluggable" readonly property, to make it possible to read its value via QOM interface. Make DeviceClass hotpluggable by default as it was assumed before. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | qdev: add to BusState "hotplug-handler" linkIgor Mammedov2014-02-102-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will allow to reuse field with different BUSes, reducing code duplication. Field is intended for replacing 'hotplug_qdev' field in PCIBus and also will allow to avoid adding equivalent field to DimmBus with possiblitity to refactor other BUSes to use it instead of custom field. In addition once all users of allow_hotplug field are converted to new API, link could replace allow_hotplug field in qdev hotplug code. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | define hotplug interfaceIgor Mammedov2014-02-103-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide a generic hotplug interface for hotplug handlers. Intended for replacing hotplug mechanism used by PCI/PCIE/SHPC code and will be used for memory hotplug. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | loader: document that errno is setMichael S. Tsirkin2014-02-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document that get_image_size sets errno on failure. Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * | | pc.c: better error message on initrd sizing failureMichael S. Tsirkin2014-02-051-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
OpenPOWER on IntegriCloud