usb-hid: fix tablet activation
Activate usb hid pointer devices (mouse+tablet) unconditionallyon polls, even if we NAK the poll due to lack of new events.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-ehci: fix reset
Two reset fixes: * pick up s->usbcmd value after ehci_reset call to make sure it keeps the reset value and doesn't get rubbish filled in when val is written back to the mmio register array later on. * make sure the frame timer is zapped on reset....
optimize screendump for the common non-switch case
switch console only if needed, also pass down whenever the console wasswitched or not because a displaysurface redraw is only needed in casethe console was switched.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
nic: zap obsolote romloading bits from ne2k + pcnet
These days one just needs to specify the romfile in PCiDeviceInfo andeverything magically works. It also allows to disable pxe rom loadingvia "romfile=<emptystring>" like it is possible for all other nics....
suspend: make acpi timer wakeup the guest.
Make the acpi timer wake up the guest.Guests can enable/disable this via acpi too.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vga: simplify screendump
The displaychangelistener isn't needed at all, we can simply save theimage when vga_hw_update is done instead of hooking into the updateprocess.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Remove screendump dummy functions.
The code in console.c verifies whenever a screen_dump functionpointer is present before calling it, so there is no need to supply andummy function. Remove them. Also report an error to notify the userthat he didn't got a screenshot....
suspend: switch acpi s3 to new infrastructure.
This patch switches pc s3 suspend over to the new infrastructure.The cmos_s3 qemu_irq is killed, the new notifier is used instead.The xen hack goes away with that too, the hypercall can simply bedone in a notifier function now....
suspend: make ps/2 devices wakeup the guest
This patch adds wakeup support to ps/2 emulation. Any key press on theps/2 keyboard will wakeup the guest. Likewise any mouse button presswill wakeup the guest. Mouse moves are ignored, so the guest will not...
suspend: make serial ports wakeup the guest.
Add a 'wakeup' property to the serial port. It is off by default. Whenenabled any incoming character on the serial line will wake up theguest. Useful for guests which have a serial console configured.
suspend: make rtc alarm wakeup the guest.
Make the rtc wake up the guest when the alarm fires.Add acpi windup to property support RTC_EN, so guestscan enable and disable this.
acpi: move around structs
Group all structs at the top of hw/acpi.h.Just moving around lines, no code changes.
acpi: add ACPIREGS
All those acpi structs are not independent from each other.Various acpi functions expecting multiple acpi structs passedin are a clean indicator for that ;)
So this patch bundles all acpi structs in the new ACPIREGSstruct, then use it everythere pass around acpi state....
acpi: don't pass overflow_time to acpi_pm1_evt_get_sts
Pretty pointless, can easily be reached via ACPIREGS now.
acpi: add acpi_pm1_evt_write_en
Do APCIREGS->pm1.evt.en updates using the new acpi_pm1_evt_write_enfunction, so the acpi code will see those updates.
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Merge remote-tracking branch 'bonzini/virtio-scsi' into staging
Revert "qemu-char: Print strerror message on failure" and deps
The commit's purpose is laudable:
The only way for chardev drivers to communicate an error was to return a NULL pointer, which resulted in an error message that said that something went wrong, but not why....
virtio-scsi: process control queue requests
Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-scsi: add migration support
scsi: fix wrong return for target INQUIRY
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi: fix searching for an empty id
The conditions for detecting no free target or LUN were wrong.
The LUN loop was followed by an "if" condition that is nevertrue, because the loop is exited as soon as lun becomes equalto bus->info->max_lun, and never becomes greater than it....
scsi-block: always use scsi_generic_ops for cache != none
ide: drop ide_tray_state_post_load()
This is used to sync the physical tray state after migration whenusing CD-ROM passthrough. However, migrating when using passthroughis broken anyway and shouldn't be supported...
So, drop this function as it causes a problem with the DEVICE_TRAY_MOVED...
block: Don't call bdrv_eject() if the tray state didn't change
It's not needed. Besides we can then assume that bdrv_eject() isonly called when there's a tray state change, which is useful tothe DEVICE_TRAY_MOVED event (going to be added in a futurecommit)....
block: Rename bdrv_mon_event() & BlockMonEventAction
They are QMP events, not monitor events. Rename them accordingly.
Also, move bdrv_emit_qmp_error_event() up in the file. A new event willbe added soon and it's good to have them next each other.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>...
jazz-led: use trace framework
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
jazz-led: convert to QOM
Some simplifications in I/O functions are possible becauseJazz LED only registers one byte of I/O.
hw/pc_sysfw: enable pc-sysfw as a qdev
Setup a pc-sysfw device type. It contains a singleproperty of 'rom_only' which is defaulted to enabled.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pc_sysfw: support system flash memory with pflash
Flash can be enabled by calling pc_system_firmware_initwith the system_flash_enabled parameter being non-zero.If system_flash_enabled is zero, then the older qemurom creation method will be used.
If flash is enabled and a pflash image is found, then...
hw/pc_piix: remove is_default for pc-0.15
hw/pc_piix: add pc-1.1
pc_piix/pc_sysfw: enable flash by default
Now, the pc-sysfw:rom_only property will defaultto false which enables flash by default.
All pc types below pc-1.1 set rom_only to true.This prevents flash from being enabled on thesepc machine types.
For pc-1.1 rom_only will use the default (false),...
pci: add accessors to get/set registers by mask
pci_regs.h specifies many registers by mask +shifted register values.There's always some duplication when using such:for example to override device type, we would need:
pci_word_test_and_clear_mask(cap + PCI_EXP_FLAGS,...
pci: set memory type for memory behind the bridge
As we make upper bits in IO and prefetcheable memoryregisters writeable, we should declare supportfor 64 bit prefetcheable memory and 32 bit ioin the bridge.
This changes the default for apb, dec, but I'm guessing...
pflash_cfi01/02: support read-only pflash devices
vl: make find_default_machine externally visible
hw/pc: move rom init to pc_sysfw.c
Merge remote-tracking branch 'bonzini/qdev-props-for-anthony' into staging
virtio-scsi: Add basic request processing infrastructure
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virtio-scsi: add basic SCSI bus operation
virtio-scsi: Add virtio-scsi stub device
Add a useless virtio SCSI HBA device:
qemu -device virtio-scsi-pci
scsi: add scatter/gather functionality
Scatter/gather functionality uses the newly added DMA helpers. Thedevice can choose between doing DMA itself, or calling scsi_req_dataas usual, which will use the newly added DMA helpers to copy piecewiseto/from the destination area(s)....
scsi-disk: enable scatter/gather functionality
scsi: add SCSIDevice vmstate definitions
scsi-generic: add migration support
scsi-disk: add migration support
ahci: use new DMA helpers
scsi: pass residual amount to command_complete
With the upcoming sglist support, HBAs will not see any transfer_datacall and will not have a way to detect short transfers. So pass theresidual amount of data upon command completion.
qdev: use built-in QOM string parser
object_property_parse lets us drop the legacy setters when their taskis done just as well by the string visitors.
qdev: drop unnecessary parse/print methods
More qdev printers could have been removed in the previous series, andobject_property_parse also made several parsers unnecessary. In fact,the new code is even more robust with respect to overflows, so cleanthem up!...
qdev: accept both strings and integers for PCI addresses
Visitors allow a limited form of polymorphism. Exploit it to supportsetting the non-legacy PCI address property both as a DD.F stringand as an 8-bit integer.
The 8-bit integer form is just too clumsy, it is unlikely that we will...
qdev: accept hex properties only if prefixed by 0x
Hex properties are an obstacle to removal of old qdev string parsing, buteven here we can lay down the foundations for future simplification. Ingeneral, they are rarely used and their printed form is more interesting...
qxl: drop vram bar minimum size
There is no reason to require a minimum size of 16 MB for the vram.Lower the limit to 4096 (one page). Make it disapper completely wouldbreak guests.
qxl: move ram size init to new function
Factor memory bar sizing bits out to a separate function.
qxl: add user-friendly bar size properties
Add two properties to specify bar sizes in megabytes instead of bytes,which is alot more user-friendly.
qxl: fix warnings on 32bit
qxl: don't render stuff when the vm is stopped.
This patch fixes the local qxl renderer to not kick spice-serverin case the vm is stopped. First it is largely pointless becausewe ask spice-server to process all not-yet processed commands whenthe vm is stopped, so there isn't much do do anyway. Second we...
qxl: set only off-screen surfaces dirty instead of the whole vram
We used to assure the guest surfaces were saved before migration bysetting the whole vram dirty. This patch sets dirty only the areasthat are actually used in the vram.
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>...
qxl: make sure primary surface is saved on migration also in compat mode
RHBZ #790083
Signed-off-by: Yonit Halperin <yhalperi@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
i8254: Do not raise IRQ level on reset
Avoid changing the IRQ level to high on reset as it may trigger spuriousevents. Instead, open-code the effects of pit_load_count(0) in the resethandler.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hpet: Save/restore cached RTC IRQ level
In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ8 but keeps track of the RTC output level and applies it when legacymode is turned off again. This value has to be preserved across save/restore as it cannot be reconstructed otherwise....
i8254: Factor out interface header
Move the public interface of the PIT into its own header file and updateall users.
i8254: Pass alternative IRQ output object on initialization
HPET legacy emulation will require control over the PIT IRQ output. Toenable this, add support for an alternative IRQ output object to the PITfactory function. If the isa_irq number is < 0, this object will be...
i8254: Rework & fix interaction with HPET in legacy mode
When the HPET enters legacy mode, the IRQ output of the PIT issuppressed and replaced by the HPET timer 0. But the current code toemulate this was broken in many ways. It reset the PIT state after...
pcspk: Convert to qdev
Convert the PC speaker device to a qdev ISA model. Move the publicinterface to a dedicated header file at this chance.
CC: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
i8254: Factor out pit_get_channel_info
Instead of providing 4 individual query functions for mode, gate, outputand initial counter state, introduce a service that queries allinformation at once. This comes with tiny additional costs forpcspk_callback but with a much cleaner interface. Also, it will simplify...
i8259: Do not clear level-triggered lines in IRR on init
When an input line is handled as level-triggered, it will immediatelyraise an IRQ on the output of a PIC again that goes through an initreset. So only clear the edge-triggered inputs from IRR in that...
qdev: Fix qdev_try_create() semantics
Since QOM'ification, qdev_try_create() uses object_new() internally,which asserts "type != NULL" when the type is not registered.This was revealed by the combination of kvmclock's kvm_enabled() checkand early QOM type registration....
Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
hw/pl031: Actually raise interrupt on timer expiry
Fix a typo in pl031_interrupt() which meant we were setting a bitin the interrupt mask rather than the interrupt status registerand thus not actually raising an interrupt. This fix allows thertctest program from the kernel's Documentation/rtc.txt to pass...
Remove unnecessary includes of primecell.h
The primecell.h header now only has the definitions of constantsindicating the usage of the arm_sysctl GPIO lines; remove obsoleteincludes of it from source files which don't care about those GPIOlines.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/primecell.h: Remove obsolete pl080_init() declaration
Remove an obsolete declaration of pl080_init(), which has beenincorrect since the conversion of pl080 to qdev back in 2009.
hw/arm_sysctl: Drop legacy init function
Drop the legacy init function arm_sysctl_init(), since it has nousers left any more. This allows us to drop the awkward '1' fromthe actual device init function.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/vexpress.c: Add vexpress-a15 machine
Add the vexpress-a15 machine, and the A-Series memory map it uses.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Andreas Färber <afaerber@suse.de>
arm_boot: Pass base address of GIC CPU interface, not whole GIC
The arm_boot secondary boot loader code needs the address ofthe GIC CPU interface. Obtaining this from the base addressof the private peripheral region was possible for A9 and 11MPcore,but the A15 puts the GIC CPU interface in a different place....
hw/vexpress.c: Instantiate the motherboard CLCD
Instantiate the CLCD on the vexpress motherboard as well as one onthe daughterboard -- the A15 daughterboard does not have a CLCDand so relies on the motherboard one.
At the moment QEMU doesn't provide infrastructure for selecting...
hw/vexpress.c: Factor out daughterboard-specific initialization
Factor out daughterboard specifics into a data structure anddaughterboard initialization function, in preparation for addingvexpress-a15 support.
hw/vexpress.c: Move secondary CPU boot code to SRAM
On real Versatile Express hardware, the boot ROM puts the secondaryCPU bootcode/holding pen in SRAM. We can therefore rely on Linux nottrashing this memory until secondary CPUs have booted up, and can...
hw/vexpress.c: Make motherboard peripheral memory map table-driven
Pull the addresses used for mapping motherboard peripherals intomemory out into a table. This will allow us to simply provide asecond table to implement the "Cortex-A Series" memory map used by...
hw/a15mpcore.c: Add Cortex-A15 private peripheral model
Add a model of the Cortex-A15 memory mapped private peripheralspace. This is fairly simple because the only memory mappedbit of the A15 is the GIC.
Note that we don't currently model a VGIC and therefore don't...
Exynos4210: added display controller implementation
Exynos4210 display controller (FIMD) has 5 hardware windows with alpha andchroma key blending functions.
Signed-off-by: Mitsyanko Igor <i.mitsyanko@samsung.com>Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>...
hw/exynos4210.c: Add LAN support for SMDKC210.
SMDKC210 uses lan9215 chip, but lan9118 in 16-bit mode seems tobe enough.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/lan9118: Add basic 16-bit mode support.
ARM: exynos4210: MCT support.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ARM: exynos4210: basic Power Management Unit implementation
Patch adds basic model for Exynos4210 SoC PMU.This model implements PMU registers just as a bulk of memory. Currently,the only reason this device exists is that secondary CPU boot loaderuses PMU INFORM5 register as a holding pen....
ARM: exynos4210: PWM support.
ARM: exynos4210: UART support
Add basic support of exynos4210 UART
Signed-off-by: Maksim Kozlov <m.kozlov@samsung.com>Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ARM: Samsung exynos4210-based boards emulation
Add initial support of NURI and SMDKC210 boards
ARM: exynos4210: IRQ subsystem support.
hw/arm: Remove redundant arguments from set_kernel_args*
The parameters initrd_size and base are already includedin the info parameter, so there is no need to pass themseparately.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>,
pxa2xx_lcd: SRAM is valid location for the framebuffer
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
nseries: attach monitor powerdown request to menelaus
I noticed some unused code in the twl92230, probably from beforeqdev-ification. This patch makes the machine use the chip's pwrbtnsignal.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'kraxel/usb.38' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
device_add: don't add a /peripheral link until init is complete
Otherwise we end up with a dangling reference which causes qdev_free() to fail.
Reported-by: Michael Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: print error message before aborting
qdev_prop_set_* functions are always called by machine init functionsthat should know what they're doing, so they abort on error. Still,an assert(!errp) does not aid debugging. Print an error before aborting....