summaryrefslogtreecommitdiff
path: root/hw/misc
AgeCommit message (Collapse)AuthorFilesLines
2013-07-04vmport: Disentangle read handler type from portioJan Kiszka1-2/+2
In case the latter may vanish one day, make sure the vmport read handler type will remain unaffected. This is also conceptually cleaner. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04applesmc: replace register_ioport*Jan Kiszka1-12/+38
Convert over to memory regions to obsolete register_ioport*. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-07-04pvpanic: fix fwcfg for big endian hostsMichael S. Tsirkin1-3/+4
Convert port number to little endian when exposing it in fw cfg. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-07-04pvpanic: initialization cleanupMichael S. Tsirkin1-14/+16
Avoid use of static variables: PC systems initialize pvpanic device through pvpanic_init, so we can simply create the fw_cfg file at that point. This also makes it possible to skip device creation completely if fw_cfg is not there, e.g. for xen - so the ports it reserves are not discoverable by guests. Also, make pvpanic_init void since callers ignore return status anyway. Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Paul Durrant <Paul.Durrant@citrix.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-07-01mac-io: Add escc-legacy memory alias regionAlexander Graf1-0/+47
Mac OS X's debugging serial driver accesses the ESCC through a different register layout, called "escc-legacy". This layout differs from the normal escc register layout purely by the location of the respective registers. This patch adds a memory alias region that takes normal escc registers and maps them into the escc-legacy register space. With this patch applied, a Mac OS X guest successfully emits debug output on the serial port when run with debug parameters set, for example by running: $ qemu-system-ppc -prom-env -'boot-args=-v debug=0x8 io=0xff serial=0x3' \ -cdrom 10.4.iso -boot d Signed-off-by: Alexander Graf <agraf@suse.de>
2013-06-28kvm: Change cpu_synchronize_state() argument to CPUStateAndreas Färber1-1/+1
Change Monitor::mon_cpu to CPUState as well. Reviewed-by: liguang <lig.fnst@cn.fujitsu.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-25i.MX31: Fix PRCS bit testStefan Weil1-1/+1
cppcheck detected a condition which was always false. According to the MCIMX31 Reference Manual, the PRCS bits have to be 01 to select the Frequency Pre-Multiplier (FPM). PRCS uses bits 1 and 2, so we have to test for 2. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Chubb <peter.chubb@nicta.com.au> Message-id: 1370810662-32320-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-20vfio: abort if an emulated iommu is usedAvi Kivity1-0/+2
vfio doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Avi Kivity <avi.kivity@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-06-20memory: make section size a 128-bit integerPaolo Bonzini1-2/+2
So far, the size of all regions passed to listeners could fit in 64 bits, because artificial regions (containers and aliases) are eliminated by the memory core, leaving only device regions which have reasonable sizes An IOMMU however cannot be eliminated by the memory core, and may have an artificial size, hence we may need 65 bits to represent its size. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-06-15Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpuBlue Swirl6-33/+34
* 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu: qdev: Drop FROM_QBUS() macro isa: QOM'ify ISADevice isa: QOM'ify ISABus i8259: Convert PICCommonState to use QOM realizefn kvm/i8259: QOM'ify some more i8259: QOM'ify some more i8254: Convert PITCommonState to QOM realizefn kvm/i8254: QOM'ify some more i8254: QOM'ify some more isa: Use realizefn for ISADevice cs4231a: QOM'ify some more gus: QOM'ify some more
2013-06-12ivshmem: add missing error exit(2)Stefan Hajnoczi1-0/+1
If the user fails to specify 'chardev' or 'shm' then we cannot continue. Exit right away so that we don't invoke shm_open(3) with a NULL pointer. It would be nice to replace exit(1) with error returns in the PCI device .init() function, but leave that for another patch since exit(1) is currently used elsewhere. Spotted by Coverity. Cc: Cam Macdonell <cam@cs.ualberta.ca> Cc: qemu-stable@nongnu.org Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-07isa: Use realizefn for ISADeviceAndreas Färber6-33/+34
Drop ISADeviceClass::init and the resulting no-op initfn and let children implement their own realizefn. Adapt error handling. Split off an instance_init where sensible. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-06-02pvpanic: use FWCfgState explicitlyMichael S. Tsirkin1-1/+1
Use the type-safe FWCfgState structure instead of the unsafe void *. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-06-02fw_cfg: add API to find FW cfg objectMichael S. Tsirkin1-1/+1
Remove some code duplication by adding a function to look up the fw cfg file. This way, we don't need to duplicate same strings everywhere. Use by both fw cfg and pvpanic device. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-05-18remove some double-includesMichael Tokarev1-1/+0
Some source files #include the same header more than once for no good reason. Remove second #includes in such cases. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-04-30pvpanic: create pvpanic by default for machine 1.5Hu Tao1-0/+7
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: f840042f0e1205041f8feaf0d39ca639884f3a00.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30pvpanic: pass configurable ioport to seabiosHu Tao1-0/+14
This lets seabios patch the corresponding SSDT entry. Also add fw_cfg object to /machine/fw_cfg so we can reference it elsewhere. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 60c65d95fe2b23b12bea67099126566010a11a1a.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-30introduce a new qom device to deal with panicked eventHu Tao2-0/+125
pvpanic device is used to send guest panic event from guest to qemu. When guest panic happens, pvpanic device driver will write a event number to IO port 0x505(which is the IO port occupied by pvpanic device, by default). On receiving the event, pvpanic device will pause guest cpu(s), and send a qmp event QEVENT_GUEST_PANICKED. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: b66077a40235b3531632a05a6ff373850afc7d2e.1366945969.git.hutao@cn.fujitsu.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29vmport: QOM'ifyAndreas Färber1-4/+8
Introduce type constant and cast macro to obsolete DO_UPCAST(). Prepares for ISA realizefn. Drop reserved underscore from struct name while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-20-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29sga: QOM'ifyAndreas Färber1-3/+7
Introduce type constant and cast macro. Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-17-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-29applesmc: QOM'ifyAndreas Färber1-14/+19
Add a typedef for the state struct and rename from Status to State. Add type constant and cast macro to obsolete DO_UPCAST(). Prepares for ISA realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1367093935-29091-2-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-19Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori2-6/+6
# By Stefan Weil (3) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: m25p80: Remove bogus include of devices.h ssh: Remove unnecessary use of strlen function. block/ssh: Add missing gcc format attributes linux-user: change do_semop to return target errno when unsuccessful w64: Fix compiler warnings (wrong format specifier) Remove unneeded type casts virtio.h: drop unused function prototypes bswap: fix compiler warning Message-id: 1366371241-23430-1-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-19Merge remote-tracking branch 'mst/tags/for_anthony' into stagingAnthony Liguori2-0/+326
pci: add pci test device This adds a new device that we can use for testing PCI PIO and MMIO, with and without ioeventfd in different configurations. FAST_MMIO will be added if/when kvm supports it. Also included are minor cleanups in kvm APIs that it needs. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 15 Apr 2013 05:42:24 PM CDT using RSA key ID D28D5469 # gpg: Can't check signature: public key not found # By Michael S. Tsirkin # Via Michael S. Tsirkin * mst/tags/for_anthony: pci: add pci test device kvm: support non datamatch ioeventfd kvm: support any size for pio eventfd kvm: remove unused APIs Message-id: cover.1366272004.git.mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-19Remove unneeded type castsStefan Weil2-6/+6
cpu_physical_memory_read, cpu_physical_memory_write take any pointer as 2nd argument without needing a type cast. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-04-16pci: add pci test deviceMichael S. Tsirkin2-0/+326
This device is used for kvm unit tests, currently it supports testing performance of ioeventfd. Using updated kvm unittest, here's an example output: mmio-no-eventfd:pci-mem 8796 mmio-wildcard-eventfd:pci-mem 3609 mmio-datamatch-eventfd:pci-mem 3685 portio-no-eventfd:pci-io 5287 portio-wildcard-eventfd:pci-io 1762 portio-datamatch-eventfd:pci-io 1777 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-04-15sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-15arm: fix location of some include filesPeter Maydell1-1/+1
The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/ Move these two headers to correct this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move private headers to hw/ subdirectories.Paolo Bonzini2-1/+48
Many headers are used only in a single directory. These can be kept in hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move other devices to hw/misc/, configure with default-configs/Paolo Bonzini23-0/+8113
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move VFIO and ivshmem to hw/misc/Paolo Bonzini3-0/+4038
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move target-independent files to subdirectoriesPaolo Bonzini10-0/+2974
This patch tackles all files that are compiled once, moving them to subdirectories of hw/. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: make subdirectories for devicesPaolo Bonzini1-0/+0
Prepare the new directory structure. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>