s390/eventfacility: Fix receive/send masks
Currently we announce interchanged receive/send masks. This did nottrigger a bug, since the sclp console has the same masks forsend/receive and the Linux guest does not check the sclp mask for simpleevents like quiesce. With other event users like the sclp line mode...
s390/eventfacility: remove unused event_type variable
The event_type variable is never used. Get rid of it.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Reviewed-by: Alexander Graf <agraf@suse.de>
s390/eventfacility: allow childs to handle more than 1 event type
Currently all handlers (quiesce, console) only handle one event type.Some drivers will handle multiple (compatible) event types. Rework thecode accordingly.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
s390/ebcdic: Move conversion tables to header file
Move conversion tables to header file. - In SCLP line mode processing EBCDIC/ASCII conversion is needed. - An additional EBCDIC to ASCII conversion function is added.
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>...
s390/sclplmconsole: Add support for SCLP line-mode console
Add simple support for SCLP line-mode also known as operatingsystem messages. This can be added in addition to or instead ofthe SCLP full screen console with -device sclplmconsole.
Merge remote-tracking branch 'kraxel/usb.89' into staging
Merge remote-tracking branch 'sstabellini/xen-2013-09-09' into staging
Message-id: alpine.DEB.2.02.1309091718030.6397@kaball.uk.xensource.com...
Remove dev-bluetooth.c dependency from vl.c
Use usb_legacy_register handling to create bt-dongle device and remove codedependency from vl.c so CONFIG_USB_BLUETOOTH can be disabled.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Preparation for usb-bt-dongle conditional build
To allow disable usb-bt-dongle device using CONFIG_BLUETOOTH option, some offunctions in vl.c file has to be made accessible in dev-bluetooth.c. This ispure code moving.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>...
pc: Initializing ram_memory under Xen.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>CC: qemu-stable@nongnu.org
e1000: add interrupt mitigation support
This patch partially implements the e1000 interrupt mitigation mechanisms.Using a single QEMUTimer, it emulates the ITR register (which is the newermitigation register, recommended by Intel) and approximately emulates...
Merge remote-tracking branch 'mjt/trivial-patches' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pc,pci,virtio fixes and cleanups
This includes pc and pci cleanups and enhancements,and a virtio bugfix for level interrupts.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM device refactorings
spapr-pci: rework MSI/MSIX
On the sPAPR platform a guest allocates MSI/MSIX vectors via RTAShypercalls which return global IRQ numbers to a guest so it onlyoperates with those and never touches MSIMessage.
Therefore MSIMessage handling is completely hidden in QEMU....
pseries: Add H_SET_MODE hcall to change guest exception endianness
H_SET_MODE is used for controlling various partition settings. Oneof these settings is the endianness a guest takes its exceptions in.
Signed-off-by: Anton Blanchard <anton@samba.org>[agraf: fix whitespace]...
misc: Fix some typos in names and comments
Most typos were found using a modified version of codespell:
accross -> acrossissueing -> issuingTICNT_THRESHHOLD -> TICNT_THRESHOLDbandwith -> bandwidthVCARD_7816_PROPIETARY -> VCARD_7816_PROPRIETARYoccured -> occurred...
pc: reduce duplication, fix PIIX descriptions
We have a lot of code duplication between machine types,this increases with each new machine typeand each new field.
This has already introduced a minor bug: descriptionfor pc-1.3 says "Standard PC" while description for...
isa: Fix documentation of isa_register_portio_list()
Commit b40acf9 (ioport: Switch dispatching to memory core layer,2013-06-24) removed all instances of old_portio.
Signed-off-by: Hervé Poussineau <hpoussin@reactos.org>Acked-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: Pass size to qbus_create_inplace()
To be passed to object_initialize().
Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument isvoid*, so drop some superfluous (BusState *) casts or direct parentfield usages.
Signed-off-by: Andreas Färber <afaerber@suse.de>
pci: Pass size to pci_bus_new_inplace()
To be passed to qbus_create_inplace().
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
scsi: Pass size to scsi_bus_new()
Use DEVICE casts instead of direct parent field access.
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Acked-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
usb: Pass size to usb_bus_new()
Use DEVICE cast to avoid a direct parent field access.
Merge remote-tracking branch 'mst/tags/for_anthony' into stable-1.5
This includes pc and pci cleanups, future-proofing of ROM files,and a virtio bugfix correcting splice on virtio console.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definitionexcept "pseries" and "moxiesim", even though very few boards actuallycare for boot order, and "cad" makes sense for even fewer.
Machines that care:...
pc: fix regression for 64 bit PCI memory
commit 398489018183d613306ab022653552247d93919f pc: limit 64 bit hole to 2G by defaultintroduced a way for management to controlthe window allocated to the 64 bit PCI hole.
This is useful, but existing management tools do not know how to set...
pci: Introduce helper to retrieve a PCI device's DMA address space
A PCI device's DMA address space (possibly an IOMMU) is returned by amethod on the PCIBus. At the moment that only has one caller, so themethod is simply open coded. We'll need another caller for VFIO, so...
aio / timers: Switch entire codebase to the new timer API
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>...
loader: store FW CFG ROM files in RAM
ROM files that are put in FW CFG are copied to guest ram, by BIOS, butthey are not backed by RAM so they don't get migrated.
Each time we change two bytes in such a ROM this breaks cross-versionmigration: since we can migrate after BIOS has read the first byte but...
hw/arm/pic_cpu: Remove the now-unneeded arm_pic_init_cpu()
Now all the boards have been converted arm_pic_init_cpu()is unused and can just be deleted.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-15-git-send-email-peter.maydell@linaro.org
pc_sysfw: do not make it a device anymore
Move the code to hw/i386, the sole remaining property is availableas !pci_enabled.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Markus Armbruster <armbru@redhat.com>Message-id: 1376069702-22330-4-git-send-email-aliguori@us.ibm.com...
virtio: clear signalled_used_valid when switching from dataplane
When the dataplane thread stops, its vring.c implementation synchronizesvring state back to virtio.c so we can continue emulating the virtiodevice.
This patch ensures that virtio.c's signalled_used_valid flag is reset so...
pc: limit 64 bit hole to 2G by default
It turns out that some 32 bit windows guests crashif 64 bit PCI hole size is >2G.Limit it to 2G for piix and q35 by default.User may override default 64-bit PCI hole size byusing "pci-hole64-size" property.
Examples:...
qdev: Add SIZE type to qdev properties
This patch adds a 'SIZE' type property to qdev.
Signed-off-by: Ian Molton <ian.molton@collabora.co.uk>Signed-off-by: Vasilis Liaskovitis <vasilis.liaskovitis@profitbricks.com>Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>...
pc: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/ioapic.h
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Igor Mammedov <imammedo@redhat.com>Reviewed-by: Andreas Färber <afaerber@suse.de>...
sysbus: QOM parent field cleanup for SysBusDevice
Rename the parent field and hide it from gtk-doc.
sysbus: Drop FROM_SYSBUS()
As a replacement, use your own macro based on OBJECT_CHECK().
sysbus: Remove unused sysbus_new() prototype
m48t59: QOM cast cleanup for M48t59SysBusState
lm32_juart: QOM cast cleanup
escc: QOM cast cleanup
lm32_juart: Relocate and tidy header
pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types
Move PCIEPort's "port" property to the new type, same for "aer_log_max".Move PCIESlot's "chassis" and "slot" properties to the new type.
Reviewed-by: Don Koch <dkoch@verizon.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
pci-bridge: Turn PCIBridge into abstract QOM type
Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts.
Reviewed-by: Don Koch <dkoch@verizon.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>[AF: Updated pbm-bridge parent to TYPE_PCI_BRIDGE]...
Merge remote-tracking branch 'stefanha/block' into staging
Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings
pseries: savevm support for PCI host bridge
This adds the necessary support for saving the state of the PAPR virtualPCI host bridge (or host bridges).
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
pseries: savevm support with KVM
At present, the savevm / migration support for the pseries machine will notwork when KVM is enabled. That's because KVM manages the guest's hash pagetable in the host kernel, so qemu has no visibility of it. This patch...
xics: rename types to be sane and follow coding style
Basically, in HW the layout of the interrupt network is:
- One ICP per processor thread (the "presenter"). This contains the registers to fetch a pending interrupt (ack), EOI, and control the...
hw: import bitmap operations in qdev-core header
Made small tweaks in code to prevent compilation issueswhen importing qemu/bitmap.h in qdev-core
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>Message-id: 1375107465-25767-2-git-send-email-marcel.a@redhat.com...
qemu-help: Sort devices by logical functionality
Categorize devices that appear as output to "-device ?" commandby logical functionality. Sort the devices by logical categoriesbefore showing them to user.
The sort is done by functionality rather than alphabetical....
pseries: savevm support for VIO devices
This patch adds helpers to allow PAPR VIO devices to save state commonto all VIO devices during savevm.
spapr-tce: make sPAPRTCETable a proper device
Model TCE tables as a device that's hooked up as a child object tothe owner. Besides the code cleanup, we get a few nice benefits:
1) free actually works now (it was dead code before)
2) the TCE information is visible in the device tree...
pseries: savevm support for pseries machine
This adds the necessary pieces to implement savevm / migration for thepseries machine. The most complex part here is migrating the hashtable - for the paravirtualized pseries machine the guest's hash pagetable is not stored within guest memory, but externally and the guest...
dataplane: enable virtio-blk x-data-plane=on live migration
Although the dataplane thread does not cooperate with dirty memorylogging yet it's fairly easy to temporarily disable dataplane duringlive migration. This way virtio-blk can live migrate when...
target-i386: Disable PMU CPUID leaf by default
Bug description: QEMU currently gets all bits from GET_SUPPORTED_CPUIDfor CPUID leaf 0xA and passes them directly to the guest. This makesthe guest ABI depend on host kernel and host CPU capabilities, andbreaks live migration if we migrate between hosts with different...
Xen PV Device
Introduces a new Xen PV PCI device which will act as a binding point forPV drivers for Xen.The device has parameterized vendor-id, device-id and revision to allow tobe configured as a binding point for any vendor's PV drivers.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>...
hw/mips: align initrd to 64KB to avoid kernel error
The Linux kernel can be configured to use 64KB pages, but it alsorequires initrd to be page aligned. Therefore, to be safe, align theinitrd to 64KB using a new INITRD_PAGE_MASK rather thanTARGET_PAGE_MASK....
isa_mmio: delete
It is not used anymore.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Message-id: 1374501278-31549-15-git-send-email-pbonzini@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()
Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline()return an Error**. Prepare qdev initfns for QOM realize error model.
sysbus: Document SysBusDeviceClass::init and realize semantics
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>[AF: Syntax and wording changes]Signed-off-by: Andreas Färber <afaerber@suse.de>
q35: Use type-safe cast instead of direct access of parent dev
And remove variables if possible.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>[AF: Converted remaining access and renamed to parent_obj]Signed-off-by: Andreas Färber <afaerber@suse.de>
Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130722' into staging
arm-devs queue
hw/loader: Support ramdisk with u-boot header
Introduce 'load_ramdisk()' which can load "normal" ramdisks and ramdiskswith a u-boot header.To enable this and leverage synergies 'load_uimage()' is refactored toaccomodate this additional use case.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>...
arm/boot: Allow boards to modify the FDT blob
Add a callback hook in arm_boot_info to allow board models tomodify the device tree blob if they need to. (The major expecteduse case is to add virtio-mmio nodes for virtio-mmio transportsthat exist in QEMU but not in the hardware.)...
virtio: Add support for guest setting of queue size
The MMIO virtio transport spec allows the guest to tell the host howlarge the queue size is. Add virtio_queue_set_num() function whichimplements this in the QEMU common virtio support code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
virtio: Support transports which can specify the vring alignment
Support virtio transports which can specify the vring alignment(ie where the guest communicates this to the host) by providinga new virtio_queue_set_align() function. (The default alignment...
dataplane: sync virtio.c and vring.c virtqueue state
Load the virtio.c state into vring.c when we start dataplane mode andvice versa when stopping dataplane mode. This patch makes it possibleto start and stop dataplane any time while the guest is running....
pci,net,pc enhancements
This includes some fixes and enhancements that accumulated in my tree:pci fixes by dkoch, virtio-net enhancements by akong and mst,and a fix for xen pc by mst.
virtio-net: add feature bit for any header s/g
Old qemu versions required that 1st s/g entry is the header.
Since QEMU 1.5, patchset titled "virtio-net: iovec handling cleanup" removed this limitation but a feature bit is needed so guests know it'ssafe to lay out header differently....
PPC: dbdma: Move processing to io
Soon we will introduce intermediate processing pauses which willallow the bottom half to restart a DMA request that couldn't befulfilled yet.
For that to work, move the processing variable into the io structwhich is what DMA providers work with....
PPC: dbdma: Support unaligned DMA access
The DBDMA engine really just reads bytes from a producing device (IDEin our case) and shoves these bytes into memory. It doesn't care whetherany alignment takes place or not.
Our code today however assumes that block accesses always happen on...
PPC: dbdma: Move defines into header file
We usually keep struct and constant definitions in header files. Movethem there to stay consistent and to make access to fields easier.
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: dbdma: Introduce kick function
The DBDMA engine really is running all the time, waiting for input. Howeverwe don't want to waste cycles constantly polling.
So introduce a kick function that data providers can call to notify theDBDMA controller of new input....
PPC: dbdma: Move static bh variable to device struct
The DBDMA controller has a bottom half to asynchronously process DMArequest queues.
This bh was stored as a gross static variable. Move it into the devicestruct instead.
While at it, move all users of it to the new generic kick function....
pci: fix BRDIGE typo
Fix typo in macro name: PCI_CLASS_BRDIGE_PCI_INF_SUB.
Signed-off-by: Don Koch <dkoch@verizon.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci-bridge: update mappings for migration/restore
Fix for LP#1187529: Devices on PCI bridge stop working whenlive-migrated. Update bridge mappings for all PCI bridgedevices in get_pci_config_device().
intc/openpic: Build openpic only once
Since current_cpu is CPUState it no longer depends on CPUPPCState.
Move ppce500_set_mpic_proxy() to a new hw/ppc/ppc_e500.h becausehw/ppc/ppc.h is too heavily using CPUPPCState and PowerPCCPU.
pci,misc enhancements
This includes some pci enhancements:
Better support for systems with multiple PCI root busesFW cfg interface for more robust pci programming in BIOSMinor fixes/cleanups for fw cfg and cross-version migration -...
pci: Use helper to find device's root bus in pci_find_domain()
Currently pci_find_domain() performs two functions - it locates the PCIroot bus above the given bus, then looks up that root bus's domain number.This patch adds a helper function to perform the first task, finding the...
pci: Replace pci_find_domain() with more general pci_root_bus_path()
pci_find_domain() is used in a number of places where we want an id for awhole PCI domain (i.e. the subtree under a PCI root bus). The trouble isthat many platforms may support multiple independent host bridges with no...
pci: Add root bus argument to pci_get_bus_devfn()
pci_get_bus_devfn() interprets a full PCI address string to give a PCIBus *and device/function number within that bus. Currently it assumes it isworking on an address under the primary PCI root bus. This patch extends...
pci: Add root bus parameter to pci_nic_init()
At present, pci_nic_init() and pci_nic_init_nofail() assume that they willonly create a NIC under the primary PCI root. As we add support formultiple PCI roots, that may no longer be the case. This patch adds a root...
pci: Fold host_buses list into PCIHostState functionality
The host_buses list is an odd structure - a list of pointers to PCI rootbuses existing in parallel to the normal qdev tree structure. This patchremoves it, instead putting the link pointers into the PCIHostState...
pci: Abolish pci_find_root_bus()
pci_find_root_bus() takes a domain parameter. Currently PCI root buseswith domain other than 0 can't be created, so this is more or less a longwinded way of retrieving the main PCI root bus. Numbered domains don'tactually properly cover the (non x86) possibilities for multiple PCI root...
spapr_iommu: pass device to spapr_tce_new_table and use it to set owner
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
pam: pass device to init_pam and use it to set owner
memory: add ref/unref calls
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...
vmport: Disentangle read handler type from portio
In case the latter may vanish one day, make sure the vmport read handlertype 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>
dma: keep a device alive while it has SGLists
Reviewed-by: Anthony Liguori <aliguori@redhat.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
pci: Move pci_read_devaddr to pci-hotplug-old.c
pci_read_devaddr() is only used by the legacy functions for the old PCIhotplug interface in pci-hotplug-old.c. So we move the function there,and make it static.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>...
pvpanic: initialization cleanup
Avoid use of static variables: PC systemsinitialize pvpanic device through pvpanic_init,so we can simply create the fw_cfg file at that point.This also makes it possible to skip devicecreation completely if fw_cfg is not there, e.g. for xen -...
pci: store PCI hole ranges in guestinfo structure
Will be used to pass hole ranges to guests.
pc: pass PCI hole ranges to Guests
Guest currently has to jump through lots of hoops to guess the PCI holeranges. It's fragile, and makes us change BIOS each time we add a newchipset. Let's report the window in a ROM file, to make BIOS do exactlywhat QEMU intends....
PPC: Add clock-frequency export for Mac machines
Support in fwcfg has been around for exposure of the clock-frequencyCPU property. OpenBIOS reads it, we just never exposed it.
Since Mac OS X is very picky about its clock frequency values, let'sjust take a known good value and always expose that....
spapr-rtas: add CPU argument to RTAS calls
RTAS is a hypervisor provided binary blob that a guest loads andcalls into to execute certain functions. It's similar to thevsyscall page in Linux or the short lived VMCI paravirt interfacefrom VMware.
The QEMU implementation of the RTAS blob is simply a passthrough...
intc/openpic_kvm: Fix QOM and build issues
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
openpic: factor out some common defines into openpic.h
...for use by the KVM in-kernel irqchip stub.
Signed-off-by: Scott Wood <scottwood@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
kvm/openpic: in-kernel mpic support
Enables support for the in-kernel MPIC that thas been merged into theKVM next branch. This includes irqfd/KVM_IRQ_LINE support from AlexGraf (along with some other improvements).
Note from Alex regarding kvm_irqchip_create():...
intc/openpic: QOM'ify
Introduce type constant and cast macro.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Alexander Graf <agraf@suse.de>