summaryrefslogtreecommitdiffstats
path: root/hw
Commit message (Collapse)AuthorAgeFilesLines
* target-or32: Add target stubs and QOM cpuJia Liu2012-07-271-0/+1
| | | | | | | Add OpenRISC target stubs, QOM cpu and basic machine. Signed-off-by: Jia Liu <proljc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori2012-07-2326-30/+30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/net: remove unused QemuOpts parameter from net init functions convert net_init_bridge() to NetClientOptions convert net_init_tap() to NetClientOptions convert net_init_vde() to NetClientOptions convert net_init_socket() to NetClientOptions convert net_init_slirp() to NetClientOptions convert net_init_dump() to NetClientOptions convert net_init_nic() to NetClientOptions convert net_client_init() to OptsVisitor hw, net: "net_client_type" -> "NetClientOptionsKind" (qapi-generated) qapi schema: add Netdev types qapi schema: remove trailing whitespace qapi: introduce OptsVisitor expose QemuOpt and QemuOpts struct definitions to interested parties qapi: introduce "size" type qapi: generate C types for fixed-width integers qapi: add test case for deallocating traversal of incomplete structure qapi: fix error propagation MAINTAINERS: Replace net maintainer Mark McLoughlin with Stefan Hajnoczi
| * hw, net: "net_client_type" -> "NetClientOptionsKind" (qapi-generated)Laszlo Ersek2012-07-2326-30/+30
| | | | | | | | | | | | | | NET_CLIENT_TYPE_ -> NET_CLIENT_OPTIONS_KIND_ Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2012-07-234-54/+53
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stefanha/trivial-patches: Fix some more Qemus in documentation and help text qdev: Fix Open Firmware comment cpus.c: Make all_cpu_threads_idle() static Use macro QEMU_PACKED for new packed structures Recognize PCID feature powerpc pci: fixed packing of ranges[]
| * | qdev: Fix Open Firmware commentStefan Weil2012-07-211-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 0d936928ef87ca1bb7b41b5b89c400c699a7691c removed code, but left the related comment at a location where it no longer belongs to. The patch moves the comment to the correct callback and improves the text. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | Use macro QEMU_PACKED for new packed structuresStefan Weil2012-07-212-47/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 541dc0d47f10973c241e9955afc2aefc96adec51, some new packed structures were added without using QEMU_PACKED. QEMU_PACKED is needed for compilations with MinGW. For other platforms nothing changes. The code was fixed using this command: git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/' Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
| * | powerpc pci: fixed packing of ranges[]Alexey Kardashevskiy2012-07-211-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default mingw-gcc is trying to pack structures the way to preserve binary compatibility with MS Visual C what leads to incorrect and unexpected padding in the PCI bus ranges property of the sPAPR PHB. The patch replaces __attribute__((packed)) with more strict QEMU_PACKED which actually is __attribute__((gcc_struct, packed)) on Windows. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Tested-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Stefan Weil <sw@weilnetz.de> Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* | exynos4210: add Exynos4210 i2c implementationMitsyanko Igor2012-07-204-1/+365
| | | | | | | | | | | | | | | | Create 9 exynos4210 i2c interfaces. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | hw/exynos4210_rtc.c: remove unnecessary codeOleg Ogurtsov2012-07-201-4/+1
| | | | | | | | | | Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | hw/exynos4210_rtc.c: Fix calculating for value of yearOleg Ogurtsov2012-07-201-1/+1
| | | | | | | | | | Signed-off-by: Oleg Ogurtsov <o.ogurtsov@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | hw/vexpress.c: Allow >4GB of RAM for Cortex-A15 daughterboardPeter Maydell2012-07-201-3/+10
| | | | | | | | | | | | | | | | | | | | | | Now that we have LPAE support and can handle passing 64 bit RAM sizes to Linux via the device tree, we can lift the restriction in the Versatile Express A15 daughterboard model on not having more than 2GB of RAM. Allow up to 30GB, which is the maximum that can fit in the address map before running into the (unmodelled) aliases of the first 2GB. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* | hw/arm_boot.c: Support DTBs which use 64 bit addressesPeter Maydell2012-07-201-3/+32
| | | | | | | | | | | | | | | | | | | | Support the case where the device tree blob specifies that #address-cells and #size-cells are greater than 1. (This is needed for device trees which can handle 64 bit physical addresses and thus total RAM sizes over 4GB.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
* | hw/arm_boot.c: Check for RAM sizes exceeding ATAGS capacityPeter Maydell2012-07-201-0/+6
| | | | | | | | | | | | | | | | | | The legacy ATAGS format for passing information to the kernel only allows RAM sizes which fit in 32 bits; enforce this restriction rather than silently doing something weird. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
* | hw/arm_boot.c: Consistently use ram_size from arm_boot_info structPeter Maydell2012-07-201-2/+3
| | | | | | | | | | | | | | | | | | Clean up the mix of getting the RAM size from the global ram_size and from the ram_size field in the arm_boot_info structure, so that we always use the structure field. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
* | hw/arm_boot.c: Make ram_size a uint64_tPeter Maydell2012-07-201-1/+1
| | | | | | | | | | | | | | | | Make the RAM size in arm_boot_info a uint64_t so it can express the larger RAM sizes that may be seen in LPAE systems. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
* | hw/pl011.c: Avoid crash on read when no chr backend presentPeter Maydell2012-07-201-1/+3
|/ | | | | | | | | | Add a missing guard that meant we would segfault if the guest read UARTDR on a PL011 serial device which had no chr backend connected. (This didn't happen for Linux guests because Linux reads the flags register and doesn't try to read the UART if it's empty.) Reported-by: Christian Müller <christian.mueller@heig-vd.ch> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
* Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-07-1822-227/+656
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: (41 commits) fdc-test: Clean up a bit fdc-test: introduce test_relative_seek fdc: fix relative seek qemu-iotests: Valgrind support coroutine-ucontext: Help valgrind understand coroutines qemu-io: Fix memory leaks hw/block-common: Factor out fall back to legacy -drive cyls=... blockdev: Don't limit DriveInfo serial to 20 characters hw/block-common: Factor out fall back to legacy -drive serial=... hw/block-common: Move BlockConf & friends from block.h Relax IDE CHS limits from 16383,16,63 to 65535,16,255 blockdev: Drop redundant CHS validation for if=ide hd-geometry: Compute BIOS CHS translation in one place qtest: Test we don't put hard disk info into CMOS for a CD-ROM ide pc: Put hard disk info into CMOS only for hard disks block: Geometry and translation hints are now useless, purge them qtest: Cover qdev property for BIOS CHS translation ide: qdev property for BIOS CHS translation qdev: New property type chs-translation qdev: Collect private helpers in one place ...
| * fdc: fix relative seekPavel Hrdina2012-07-171-4/+6
| | | | | | | | | | Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hw/block-common: Factor out fall back to legacy -drive cyls=...Markus Armbruster2012-07-176-85/+62
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * blockdev: Don't limit DriveInfo serial to 20 charactersMarkus Armbruster2012-07-172-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | All current users (IDE, SCSI and virtio-blk) happen to share this 20 characters limit. Still, it should be left to device models. They already enforce their limits. They have to, as the DriveInfo limit only affects legacy -drive serial=..., not the qdev properties. usb-storage, which doesn't limit serial number length, also uses DriveInfo for -usbdevice. But that doesn't provide access to DriveInfo serial. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hw/block-common: Factor out fall back to legacy -drive serial=...Markus Armbruster2012-07-177-33/+34
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hw/block-common: Move BlockConf & friends from block.hMarkus Armbruster2012-07-176-3/+48
| | | | | | | | | | | | | | | | This stuff doesn't belong to block layer, and was put there only because a better home didn't exist then. Now it does. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * Relax IDE CHS limits from 16383,16,63 to 65535,16,255Markus Armbruster2012-07-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | New limits straight from ATA4 6.2 Register delivered data transfer command sector addressing. I figure the old sector limit 63 was blindly copied from the BIOS int 13 limit. Doesn't apply to the hardware. No idea where the old cylinder limit comes from. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Compute BIOS CHS translation in one placeMarkus Armbruster2012-07-175-16/+18
| | | | | | | | | | | | | | | | | | | | | | Currently, it is split between hd_geometry_guess() and pc_cmos_init_late(). Confusing. info qtree shows the result of the former. Also confusing. Fold the part done in pc_cmos_init_late() into hd_geometry_guess(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * ide pc: Put hard disk info into CMOS only for hard disksMarkus Armbruster2012-07-171-1/+1
| | | | | | | | | | | | | | | | In particular, don't set disk type and geometry when a CD-ROM on bus ide.0 has media during CMOS initialization. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * block: Geometry and translation hints are now useless, purge themMarkus Armbruster2012-07-174-19/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two producers of these hints: drive_init() on behalf of -drive, and hd_geometry_guess(). The only consumer of the hint is hd_geometry_guess(). The callers of hd_geometry_guess() call it only when drive_init() didn't set the hints. Therefore, drive_init()'s hints are never used. Thus, hd_geometry_guess() only ever sees hints it produced itself in a prior call. Only the first call computes something, subsequent calls just repeat the first call's results. However, hd_geometry_guess() is never called more than once: the device models don't, and the block device is destroyed on unplug. Thus, dropping the repeat feature doesn't break anything now. If a block device wasn't destroyed on unplug and could be reused with a new device, then repeating old results would be wrong. Thus, dropping the repeat feature prevents future breakage. This renders the hints unused. Purge them from the block layer. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * ide: qdev property for BIOS CHS translationMarkus Armbruster2012-07-172-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't quite orthodox. CHS translation is firmware configuration, communicated via the RTC's CMOS RAM, not a property of the disk. But it's best to treat it just like geometry anyway. Maintain backward compatibility exactly like for geometry: fall back to DriveInfo's translation, set with -drive trans=... Bonus: info qtree now shows the translation. Except when it shows "auto": that's resolved by pc_cmos_init_late(). To be addressed shortly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qdev: New property type chs-translationMarkus Armbruster2012-07-172-0/+18
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * qdev: Collect private helpers in one placeMarkus Armbruster2012-07-171-72/+72
| | | | | | | | | | | | | | | | Just code motion, with one long line wrapped to keep checkpatch.pl happy. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * ide: qdev properties for disk geometryMarkus Armbruster2012-07-173-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry needs to be qdev properties, because it belongs to the disk's guest part. Maintain backward compatibility exactly like for serial: fall back to DriveInfo's geometry, set with -drive cyls=... Do this only for ide-hd. ide-drive is legacy. ide-cd doesn't have a geometry. Bonus: info qtree now shows the geometry. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * virtio-blk: qdev properties for disk geometryMarkus Armbruster2012-07-173-9/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Geometry needs to be qdev properties, because it belongs to the disk's guest part. Maintain backward compatibility exactly like for serial: fall back to DriveInfo's geometry, set with -drive cyls=... Bonus: info qtree now shows the geometry. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * scsi-hd: qdev properties for disk geometryMarkus Armbruster2012-07-171-23/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry needs to be qdev properties, because it belongs to the disk's guest part. Maintain backward compatibility exactly like for serial: fall back to DriveInfo's geometry, set with -drive cyls=... Do this only for scsi-hd. scsi-disk is legacy. scsi-cd doesn't have a geometry. scsi-block should get geometry from the host disk. Bonus: info qtree now shows the geometry. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Switch to uint32_t to match BlockConfMarkus Armbruster2012-07-175-6/+6
| | | | | | | | | | | | | | | | | | | | | | Best to use the same type, to avoid unwanted truncation or sign extension. BlockConf can't use plain int for cyls, heads and secs, because integer properties require an exact width. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * ide pc: Cut out the block layer geometry middlemanMarkus Armbruster2012-07-175-31/+49
| | | | | | | | | | | | | | | | | | | | PC BIOS setup needs IDE geometry information. Get it directly from the device model rather than through the block layer. In preparation of purging geometry from the block layer, which will happen later in this series. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Cut out block layer translation middlemanMarkus Armbruster2012-07-175-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | hd_geometry_guess() picks geometry and translation. Callers can get the geometry directly, via parameters, but for translation they need to go through the block layer. Add a parameter for translation, so it can optionally be gotten just like geometry. In preparation of purging translation from the block layer, which will happen later in this series. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Clean up confusing use of prior translation hintMarkus Armbruster2012-07-171-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When hd_geometry_guess() picks a geometry, it also picks the appropriate translation, but only when the prior translation hint is BIOS_ATA_TRANSLATION_AUTO. Looks wrong, because such a prior translation would be passed to the BIOS whether it's suitable for the geometry or not. Fortunately, that can't happen. There are just two ways for the translation hint to get set to something other than BIOS_ATA_TRANSLATION_AUTO: drive_init() on behalf of -drive trans=..., and hd_geometry_guess(). Both set it only when they also set a valid geometry hint, i.e. one with a non-zero number of cylinders. Since hd_geometry_guess() returns right away when it finds a valid geometry hint, translation can only be BIOS_ATA_TRANSLATION_AUTO in the remainder of the function. Assert this, and simplify accordingly. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Clean up gratuitous goto in hd_geometry_guess()Markus Armbruster2012-07-171-14/+8
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Factor out guess_chs_for_size()Markus Armbruster2012-07-171-12/+20
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Unnest conditional in hd_geometry_guess()Markus Armbruster2012-07-171-42/+42
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Add tracepointsMarkus Armbruster2012-07-171-4/+3
| | | | | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * hd-geometry: Move disk geometry guessing back from block.cMarkus Armbruster2012-07-176-5/+191
| | | | | | | | | | | | | | | | | | | | | | Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible, except it was put into block.c. Device-specific functionality should be kept in device code, not the block layer. Move it to hw/hd-geometry.c, and make stylistic changes required to keep checkpatch.pl happy. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
| * fdc: Move floppy geometry guessing back from block.cMarkus Armbruster2012-07-173-20/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 5bbdbb46 moved it to block.c because "other geometry guessing functions already reside in block.c". Device-specific functionality should be kept in device code, not the block layer. Move it back. Disk geometry guessing is still in block.c. To be moved out in a later patch series. Bonus: the floppy type used in pc_cmos_init() now obviously matches the one in the FDrive. Before, we relied on bdrv_get_floppy_geometry_hint() picking the same type both in fd_revalidate() and in pc_cmos_init(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* | Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2012-07-189-100/+128
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/uq/master: virtio: move common irqfd handling out of virtio-pci virtio: move common ioeventfd handling out of virtio-pci event_notifier: add event_notifier_set_handler memory: pass EventNotifier, not eventfd ivshmem: wrap ivshmem_del_eventfd loops with transaction ivshmem: use EventNotifier and memory API event_notifier: add event_notifier_init_fd event_notifier: remove event_notifier_test event_notifier: add event_notifier_set apic: Defer interrupt updates to VCPU thread apic: Reevaluate pending interrupts on LVT_LINT0 changes apic: Resolve potential endless loop around apic_update_irq kvm: expose tsc deadline timer feature to guest kvm_pv_eoi: add flag support kvm: Don't abort on kvm_irqchip_add_msi_route()
| * | virtio: move common irqfd handling out of virtio-pciPaolo Bonzini2012-07-123-27/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All transports can use the same event handler for the irqfd, though the exact mechanics of the assignment will be specific. Note that there are three states: handled by the kernel, handled in userspace, disabled. This also lets virtio use event_notifier_set_handler. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | virtio: move common ioeventfd handling out of virtio-pciPaolo Bonzini2012-07-123-34/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All transports can use the same event handler for the ioeventfd, though the exact setup (address/memory region) will be specific. This lets virtio use event_notifier_set_handler. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | memory: pass EventNotifier, not eventfdPaolo Bonzini2012-07-124-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Under Win32, EventNotifiers will not have event_notifier_get_fd, so we cannot call it in common code such as hw/virtio-pci.c. Pass a pointer to the notifier, and only retrieve the file descriptor in kvm-specific code. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | ivshmem: wrap ivshmem_del_eventfd loops with transactionPaolo Bonzini2012-07-121-0/+4
| | | | | | | | | | | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | ivshmem: use EventNotifier and memory APIPaolo Bonzini2012-07-121-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | All of ivshmem's usage of eventfd now has a corresponding API in EventNotifier. Simplify the code by using it, and also use the memory API consistently to set up and tear down the ioeventfds. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | apic: Defer interrupt updates to VCPU threadJan Kiszka2012-07-103-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KVM performs TPR raising asynchronously to QEMU, specifically outside QEMU's global lock. When an interrupt is injected into the APIC and TPR is checked to decide if this can be delivered, a stale TPR value may be used, causing spurious interrupts in the end. Fix this by deferring apic_update_irq to the context of the target VCPU. We introduce a new interrupt flag for this, CPU_INTERRUPT_POLL. When it is set, the VCPU calls apic_poll_irq before checking for further pending interrupts. To avoid special-casing KVM, we also implement this logic for TCG mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | apic: Reevaluate pending interrupts on LVT_LINT0 changesJan Kiszka2012-07-101-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | When the guest modifies the LVT_LINT0 register, we need to check if some pending PIC interrupt can now be delivered. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
OpenPOWER on IntegriCloud