summaryrefslogtreecommitdiff
path: root/hw/misc
AgeCommit message (Collapse)AuthorFilesLines
2013-10-02vfio-pci: Test device reset capabilitiesAlex Williamson1-0/+46
Not all resets are created equal. PM reset is not very reliable, especially for GPUs, so we might want to opt for a bus reset if a standard reset will only do a D3hot->D0 transition. We can also use this to tell if the standard reset will do a bus reset (if neither has_pm_reset or has_flr is probed, but the device still supports reset). Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-10-02vfio-pci: Add support for MSI affinityAlex Williamson1-7/+40
When MSI is accelerated through KVM the vectors are only programmed when the guest first enables MSI support.  Subsequent writes to the vector address or data fields are ignored.  Unfortunately that means we're ignore updates done to adjust SMP affinity of the vectors. MSI SMP affinity already works in non-KVM mode because the address and data fields are read from their backing store on each interrupt. This patch stores the MSIMessage programmed into KVM so that we can determine when changes are made and update the routes. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-08-30qom: Pass available size to object_initialize()Andreas Färber1-6/+7
To be passed on to object_initialize_with_type(). Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> (virtio-ccw) Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-08-30qdev: Pass size to qbus_create_inplace()Andreas Färber1-2/+2
To be passed to object_initialize(). Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is void*, so drop some superfluous (BusState *) casts or direct parent field usages. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-08-29Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5Anthony Liguori1-2/+2
* qemu-kvm/uq/master: kvm-stub: fix compilation kvm: shorten the parameter list for get_real_device() kvm: i386: fix LAPIC TSC deadline timer save/restore kvm-all.c: max_cpus should not exceed KVM vcpu limit kvm: Simplify kvm_handle_io kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled kvm: add KVM_IRQFD_FLAG_RESAMPLE support kvm: migrate vPMU state target-i386: remove tabs from target-i386/cpu.h Initialize IA32_FEATURE_CONTROL MSR in reset and migration Conflicts: target-i386/cpu.h target-i386/kvm.c aliguori: fixup trivial conflicts due to whitespace and added cpu argument Signed-off-by: Anthony Liguori <anthony@codemonkey.ws>
2013-08-22aio / timers: Switch entire codebase to the new timer APIAlex Bligh4-27/+27
This is an autogenerated patch using scripts/switch-timer-api. Switch the entire code base to using the new timer API. Note this patch may introduce some line length issues. Signed-off-by: Alex Bligh <alex@alex.org.uk> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-08-12hw/misc: make pvpanic known to userMarcel Apfelbaum1-15/+10
This patch is based on Hu Tao's: http://lists.nongnu.org/archive/html/qemu-devel/2013-08/msg00125.html The pvpanic device may be enabled now with "-device pvpanic" from command line. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Message-id: 1376233843-19410-3-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-08-09kvm: add KVM_IRQFD_FLAG_RESAMPLE supportVincenzo Maffione1-2/+2
Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as "resamplefd". See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for more details. When the added parameter is passed NULL, the behaviour of the function is unchanged with respect to the previous versions. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-29zynq_slcr: QOM cast cleanupAndreas Färber1-6/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29slavio_misc: QOM cast cleanup for APCStateAndreas Färber1-3/+7
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29slavio_misc: QOM cast cleanup for MiscStateAndreas Färber1-15/+20
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29puv3_pm: QOM cast cleanupAndreas Färber1-4/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29mst_fpga: QOM cast cleanupAndreas Färber1-32/+36
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29milkymist-pfpu: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29milkymist-hpdmc: QOM cast cleanupAndreas Färber1-4/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29lm32_sys: QOM cast cleanupAndreas Färber1-4/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29exynos4210_pmu: QOM cast cleanupAndreas Färber1-5/+9
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29eccmemctl: QOM cast cleanupAndreas Färber1-6/+11
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29arm_sysctl: QOM cast cleanupAndreas Färber1-7/+13
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29arm_l2x0: QOM cast cleanupAndreas Färber1-4/+8
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29arm_l2x0: Rename l2x0_state to L2x0StateAndreas Färber1-14/+14
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29imx_ccm: QOM cast cleanupAndreas Färber1-6/+10
Introduce type constant and use QOM casts. Acked-by: Peter Chubb <peter.chubb@nicta.com.au> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29devices: Associate devices to their logical categoryMarcel Apfelbaum7-0/+7
The category will be used to sort the devices displayed in the command line help. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25pc-testdev: add I/O port to test memory.c auto split/combinePaolo Bonzini1-0/+15
The ports at 0xe8..0xeb have impl.min/max_access_size == 1, so that memory accesses are split and combined by the memory core. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374501278-31549-29-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25pc-testdev: remove useless cpu_to_le64/le64_to_cpuPaolo Bonzini1-2/+0
So far the device was only used on little-endian machines. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374501278-31549-18-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25pc-testdev: support 8 and 16-bit accesses to 0xe0Paolo Bonzini1-2/+9
This will let us use the testdev to test endianness. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1374501278-31549-17-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-23misc/ivshmem: QOM parent field cleanupAndreas Färber1-15/+22
Replace direct uses of IVShmemState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/ivshmem: QOM Upcast SweepPeter Crosthwaite1-9/+13
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Simplified casts and converted two more DO_UPCAST()s] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/pci-testdev: QOM parent field cleanupAndreas Färber1-4/+7
Replace direct uses of PCITestDevState::dev with QOM casts and rename it to parent_obj. Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23misc/pci-testdev: QOM Upcast SweepPeter Crosthwaite1-4/+9
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and direct -> style upcasting. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Replaced another DO_UPCAST()] Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-22Merge remote-tracking branch 'stefanha/tracing' into stagingAnthony Liguori1-1/+1
# By Markus Armbruster # Via Stefan Hajnoczi * stefanha/tracing: trace-events: Fix up source file comments trace-events: Drop unused events milkymist-minimac2: Fix minimac2_read/_write tracepoints slavio_misc: Fix slavio_led_mem_readw/_writew tracepoints cleanup-trace-events.pl: New Message-id: 1374119369-26496-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18slavio_misc: Fix slavio_led_mem_readw/_writew tracepointsMarkus Armbruster1-1/+1
Broken since they got added in commit 97bf485. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-15vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devicesVijay Mohan Pandarathil1-0/+125
Add support for error containment when a VFIO device assigned to a KVM guest encounters an error. This is for PCIe devices/drivers that support AER functionality. When the host OS is notified of an error in a device either through the firmware first approach or through an interrupt handled by the AER root port driver, the error handler registered by the vfio-pci driver gets invoked. The qemu process is signaled through an eventfd registered per VFIO device by the qemu process. In the eventfd handler, qemu decides on what action to take. In this implementation, guest is brought down to contain the error. The kernel patches for the above functionality has been already accepted. This is a refresh of the QEMU patch which was reviewed earlier. http://marc.info/?l=linux-kernel&m=136281557608087&w=2 This patch has the same contents and has been built after refreshing to latest upstream and after the linux headers have been updated in qemu. - Create eventfd per vfio device assigned to a guest and register an event handler - This fd is passed to the vfio_pci driver through the SET_IRQ ioctl - When the device encounters an error, the eventfd is signalled and the qemu eventfd handler gets invoked. - In the handler decide what action to take. Current action taken is to stop the guest. Signed-off-by: Vijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-07-15vfio-pci: VGA quirk updateAlex Williamson1-336/+321
Turns out all the suspicions for AMD devices were correct, everywhere we read a BAR address that the address matches the config space offset, there's full access to PCI config space. Attempt to generalize some helpers to allow quirks to easily be added for mirrors and windows. Also fill in complete config space for AMD. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-07-11PPC: Add timer handler for newworld mac-ioAlexander Graf1-0/+33
Mac OS X accesses fancy timer registers inside of the mac-io on bootup. These really should be ticking at the mac-io bus frequency, but I don't see anyone upset when we just make them as fast as we want to. With this patch on top of my previous patch queue and latest OpenBIOS I am able to boot Mac OS X 10.4 with -M mac99. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Move processing to ioAlexander Graf1-4/+6
Soon we will introduce intermediate processing pauses which will allow the bottom half to restart a DMA request that couldn't be fulfilled yet. For that to work, move the processing variable into the io struct which is what DMA providers work with. While touching it, also change it into a bool Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Move static bh variable to device structAlexander Graf1-9/+15
The DBDMA controller has a bottom half to asynchronously process DMA request queues. This bh was stored as a gross static variable. Move it into the device struct instead. While at it, move all users of it to the new generic kick function. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Introduce kick functionAlexander Graf1-0/+5
The DBDMA engine really is running all the time, waiting for input. However we don't want to waste cycles constantly polling. So introduce a kick function that data providers can call to notify the DBDMA controller of new input. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Move defines into header fileAlexander Graf1-117/+0
We usually keep struct and constant definitions in header files. Move them there to stay consistent and to make access to fields easier. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Allow new commands in RUN stateAlexander Graf1-3/+3
The DBDMA controller can not change its command stream while it's actively streaming data, true. But the fact that it's in RUN state doesn't actually indicate anything. It could just as well be in WAIT while in RUN. And then it's legal to change commands. This fixes a real world issue I've encountered with Mac OS X. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Fix debug printAlexander Graf1-1/+2
There was a debug print that didn't compile for me because the format and the arguments weren't in sync. Fix it up. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: Mac: Add debug prints in macio and dbdma codeAlexander Graf1-3/+11
The macio code is basically undebuggable as it stands today, with no debug prints anywhere whatsoever. DBDMA was better, but I needed a few more to create reasonable logs that tell me where breakage is. Add a DPRINTF macro in the macio source file and add a bunch of debug prints that are all disabled by default of course. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: dbdma: Replace tabs with spacesAlexander Graf1-51/+51
s/^I/ /g on the file with a few manual tweaks to align things. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-11PPC: g3beige: Move secondary IDE bus to mac-ioAlexander Graf1-38/+55
On a real G3 Beige the secondary IDE bus lives on the mac-io chip, not on some random PCI device. Move it there to become more compatible. While at it, also clean up the IDE channel connection logic. Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-09cpu: Replace cpu_single_env with CPUState current_cpuAndreas Färber1-10/+16
Move it to qom/cpu.h. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-08Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori1-14/+17
pci,misc enhancements This includes some pci enhancements: Better support for systems with multiple PCI root buses FW cfg interface for more robust pci programming in BIOS Minor fixes/cleanups for fw cfg and cross-version migration - because of dependencies with other patches Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 07 Jul 2013 03:11:18 PM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By David Gibson (10) and others # Via Michael S. Tsirkin * mst/tags/for_anthony: pci: Fold host_buses list into PCIHostState functionality pci: Remove domain from PCIHostBus pci: Simpler implementation of primary PCI bus pci: Add root bus parameter to pci_nic_init() pci: Add root bus argument to pci_get_bus_devfn() pci: Replace pci_find_domain() with more general pci_root_bus_path() pci: Use helper to find device's root bus in pci_find_domain() pci: Abolish pci_find_root_bus() pci: Move pci_read_devaddr to pci-hotplug-old.c pci: Cleanup configuration for pci-hotplug.c pvpanic: fix fwcfg for big endian hosts pvpanic: initialization cleanup MAINTAINERS: s/Marcelo/Paolo/ e1000: cleanup process_tx_desc pc_piix: cleanup init compat handling pc: pass PCI hole ranges to Guests pci: store PCI hole ranges in guestinfo structure range: add Range structure Message-id: 1373228271-31223-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-04hw/m*: pass owner to memory_region_init* functionsPaolo Bonzini21-52/+57
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04vfio: pass device to vfio_mmap_bar and use it to set ownerPaolo Bonzini1-5/+6
Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04memory: add ref/unref callsPaolo Bonzini1-0/+2
Add ref/unref calls at the following places: - places where memory regions are stashed by a listener and used outside the BQL (including in Xen or KVM). - memory_region_find callsites - creation of aliases and containers (only the aliased/contained region gets a reference to avoid loops) - around calls to del_subregion/add_subregion, where the region could disappear after the first call Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04memory: add owner argument to initialization functionsPaolo Bonzini29-66/+66
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>