summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pci: Use helper to find device's root bus in pci_find_domain()David Gibson2013-07-074-11/+17
| | | | | | | | | | | | | Currently pci_find_domain() performs two functions - it locates the PCI root 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 root bus for a given PCI device. This is then used in pci_find_domain(). This changes pci_find_domain()'s signature slightly, taking a PCIDevice instead of a PCIBus - since all callers passed something of the form dev->bus, this simplifies things slightly. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci: Abolish pci_find_root_bus()David Gibson2013-07-074-15/+42
| | | | | | | | | | | | | pci_find_root_bus() takes a domain parameter. Currently PCI root buses with domain other than 0 can't be created, so this is more or less a long winded way of retrieving the main PCI root bus. Numbered domains don't actually properly cover the (non x86) possibilities for multiple PCI root buses, so this patch for now enforces the domain == 0 restriction in other places to replace pci_find_root_bus() with an explicit pci_find_primary_bus(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci: Move pci_read_devaddr to pci-hotplug-old.cDavid Gibson2013-07-043-17/+17
| | | | | | | | | pci_read_devaddr() is only used by the legacy functions for the old PCI hotplug 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> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci: Cleanup configuration for pci-hotplug.cDavid Gibson2013-07-046-12/+8
| | | | | | | | | | | | | | | | | | | | | | pci-hotplug.c and the CONFIG_PCI_HOTPLUG variable which controls its compilation are misnamed. They're not about PCI hotplug in general, but rather about the pci_add/pci_del interface which are now deprecated in favour of the more general device_add/device_del interface. This patch therefore renames them to pci-hotplug-old.c and CONFIG_PCI_HOTPLUG_OLD. CONFIG_PCI_HOTPLUG=y was listed twice in {i386,x86_64}-softmmu.make for no particular reason, so we clean that up too. In addition it was included in ppc64-softmmu.mak for which the old hotplug interface was never used and is unsuitable, so we remove that too. Most of pci-hotplug.c was additionaly protected by #ifdef TARGET_I386. The small piece which wasn't is only called from the pci_add and pci_del hooks in hmp-commands.hx, which themselves were protected by #ifdef TARGET_I386. This patch therefore also removes the #ifdef from pci-hotplug-old.c, and changes the ifdefs in hmp-commands.hx to use CONFIG_PCI_HOTPLUG_OLD. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pvpanic: fix fwcfg for big endian hostsMichael S. Tsirkin2013-07-041-3/+4
| | | | | | | Convert port number to little endian when exposing it in fw cfg. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pvpanic: initialization cleanupMichael S. Tsirkin2013-07-042-15/+17
| | | | | | | | | | | | | | | | | 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>
* MAINTAINERS: s/Marcelo/Paolo/Michael S. Tsirkin2013-07-041-1/+1
| | | | | | | | Marcelo doesn't maintain kvm anymore, Paolo is taking over the job. Update MAINTAINERS to stop flooding Marcelo with mail. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* e1000: cleanup process_tx_descAndrew Jones2013-07-041-8/+10
| | | | | | | | | | | | | | | | | | Coverity complains about two overruns in process_tx_desc(). The complaints are false positives, but we might as well eliminate them. The problem is that "hdr" is defined as an unsigned int, but then used to offset an array of size 65536, and another of size 256 bytes. hdr will actually never be greater than 255 though, as it's assigned only once and to the value of tp->hdr_len, which is an uint8_t. This patch simply gets rid of hdr, replacing it with tp->hdr_len, which makes it consistent with all other tp member use in the function. v2: - also cleanup coding style issues in the touched lines Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pc_piix: cleanup init compat handlingMichael S. Tsirkin2013-07-041-14/+4
| | | | | | | | Make sure 1.4 calls 1.5, 1.3 calls 1.4 etc. This way it's enough to add enough new compat hook in a single place in piix. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pc: pass PCI hole ranges to GuestsMichael S. Tsirkin2013-07-044-3/+52
| | | | | | | | | Guest currently has to jump through lots of hoops to guess the PCI hole ranges. It's fragile, and makes us change BIOS each time we add a new chipset. Let's report the window in a ROM file, to make BIOS do exactly what QEMU intends. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* pci: store PCI hole ranges in guestinfo structureMichael S. Tsirkin2013-07-047-4/+92
| | | | | | Will be used to pass hole ranges to guests. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* range: add Range structureMichael S. Tsirkin2013-07-041-0/+16
| | | | | | | | | | | | | Sometimes we need to pass ranges around, add a handy structure for this purpose. Note: memory.c defines its own concept of AddrRange structure for working with 128 addresses. It's necessary there for doing range math. This is not needed for most users: struct Range is much simpler, and is only used for passing the range around. Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2013-07-033-52/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | # By Michael S. Tsirkin (2) and others # Via Paolo Bonzini * qemu-kvm/uq/master: kvmclock: clock should count only if vm is running pci-assign: remove the duplicate function name in debug message kvm: skip system call when msi route is unchanged kvm: zero-initialize KVM_SET_GSI_ROUTING input kvm: add detail error message when fail to add ioeventfd Message-id: 1372841072-22265-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * kvmclock: clock should count only if vm is runningMarcelo Tosatti2013-07-031-34/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kvmclock should not count while vm is paused, because: 1) if the vm is paused for long periods, timekeeping math can overflow while converting the (large) clocksource delta to nanoseconds. 2) Users rely on CLOCK_MONOTONIC to count run time, that is, time which OS has been in a runnable state (see CLOCK_BOOTTIME). Change kvmclock driver so as to save clock value when vm transitions from runnable to stopped state, and to restore clock value from stopped to runnable transition. Cc: qemu-stable@nongnu.org Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * pci-assign: remove the duplicate function name in debug messageWanlong Gao2013-07-031-6/+6
| | | | | | | | | | | | | | | | While DEBUG() already includes the function name. Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * kvm: skip system call when msi route is unchangedMichael S. Tsirkin2013-07-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | Some guests do a large number of mask/unmask calls which currently trigger expensive route update system calls. Detect that route in unchanged and skip the system call. Reported-by: "Zhanghaoyu (A)" <haoyu.zhang@huawei.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
| * kvm: zero-initialize KVM_SET_GSI_ROUTING inputMichael S. Tsirkin2013-07-031-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kvm_add_routing_entry makes an attempt to zero-initialize any new routing entry. However, it fails to initialize padding within the u field of the structure kvm_irq_routing_entry. Other functions like kvm_irqchip_update_msi_route also fail to initialize the padding field in kvm_irq_routing_entry. It's better to just make sure all input is initialized. Once it is, we can also drop complex field by field assignment and just do the simple *a = *b to update a route entry. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
| * kvm: add detail error message when fail to add ioeventfdAmos Kong2013-07-031-0/+4
|/ | | | | | | | | | | | I try to hotplug 28 * 8 multiple-function devices to guest with old host kernel, ioeventfds in host kernel will be exhausted, then qemu fails to allocate ioeventfds for blk/nic devices. It's better to add detail error here. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
* Merge remote-tracking branch 'agraf/ppc-for-upstream' into stagingAnthony Liguori2013-07-0138-205/+792
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Alexander Graf (12) and others # Via Alexander Graf * agraf/ppc-for-upstream: (32 commits) PPC: Ignore writes to L2CR mac-io: Add escc-legacy memory alias region PPC: Newworld: Add second uninorth control register set PPC: Newworld: Add uninorth token register PPC: Add clock-frequency export for Mac machines PPC: Introduce an alias cache for faster lookups PPC: Fix GDB read on code area for PPC6xx PPC: Add dump_mmu() for 6xx target-ppc: Introduce unrealizefn for PowerPCCPU booke_ppc: limit booke timer to max when timeout overflow Graphics: Switch to 800x600x32 as default mode pseries: Update MAINTAINERS information target-ppc kvm: save cr register pseries: Fix compiler warning (conversion of pointer to integral value) spapr-rtas: add CPU argument to RTAS calls target-ppc: Change default machine for 64-bit ppc: do not register IABR SPR twice for 603e target-ppc: Drop redundant flags assignments from CPU families mpc8544_guts: Turn qdev initfn into instance_init mpc8544_guts: QOM'ify ... Message-id: 1372556709-23868-1-git-send-email-agraf@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * PPC: Ignore writes to L2CRAlexander Graf2013-07-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | The L2CR register contains a number of bits that either impose configuration which we can't deal with or mean "something is in progress until the bit is 0 again". Since we don't model the former and we do want to accomodate guests using the latter semantics, let's just ignore writes to L2CR. That way guests always read back 0 and are usually happy with that. Signed-off-by: Alexander Graf <agraf@suse.de>
| * mac-io: Add escc-legacy memory alias regionAlexander Graf2013-07-011-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>
| * PPC: Newworld: Add second uninorth control register setAlexander Graf2013-07-011-0/+4
| | | | | | | | | | | | | | Mac OS X requires a second uninorth register set to be mapped a few bytes above the first one. Let's just expose it to make it happy. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Newworld: Add uninorth token registerAlexander Graf2013-07-011-2/+11
| | | | | | | | | | | | | | | | | | | | Mac OS X expects the uninorth control register set to contain one register that always reads back what it writes in. Expose that. This is just a temporary hack. Eventually, we want to expose the uninorth (/uni-n in device tree) as a separate QOM device. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Add clock-frequency export for Mac machinesAlexander Graf2013-07-013-0/+5
| | | | | | | | | | | | | | | | | | | | | | Support in fwcfg has been around for exposure of the clock-frequency CPU property. OpenBIOS reads it, we just never exposed it. Since Mac OS X is very picky about its clock frequency values, let's just take a known good value and always expose that. Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Introduce an alias cache for faster lookupsAlexander Graf2013-07-013-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running QEMU with "-cpu ?" we walk through every alias for every target CPU we know about. This takes several seconds on my very fast host system. Let's introduce a class object cache in the alias table. Using that we don't have to go through the tedious work of finding our target class. Instead, we can just go directly from the alias name to the target class pointer. This patch brings -cpu "?" to reasonable times again. Before: real 0m4.716s After: real 0m0.025s Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Fix GDB read on code area for PPC6xxFabien Chouteau2013-07-011-1/+9
| | | | | | | | | | | | | | | | | | | | | | On PPC 6xx, data and code have separated TLBs. Until now QEMU was only looking at data TLBs, which is not good when GDB wants to read code. This patch adds a second call to get_physical_address() with an ACCESS_CODE type of access when the first call with ACCESS_INT fails. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Add dump_mmu() for 6xxFabien Chouteau2013-07-011-0/+92
| | | | | | | | | | | | | | | | | | "(qemu) info tlb" is a very useful tool for debugging, so I implemented the missing 6xx version. Signed-off-by: Fabien Chouteau <chouteau@adacore.com> [agraf: fix printfs on hwaddr to PRI] Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Introduce unrealizefn for PowerPCCPUAndreas Färber2013-07-012-2/+18
| | | | | | | | | | | | | | | | Use it to clean up the opcode table, resolving a former TODO from Jocelyn. Also switch from malloc() to g_malloc(). Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * booke_ppc: limit booke timer to max when timeout overflowBharat Bhushan2013-07-011-4/+20
| | | | | | | | | | | | | | | | | | Limit watchdog and fit timer to maximum timeout value which qemu timer can support (INT64_MAX). This maximum timeout will be hundreds of years, so limiting to max timeout is pretty safe. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * Graphics: Switch to 800x600x32 as default modeAlexander Graf2013-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We have stayed at 800x600x15 as default graphics mode for the last 9 years. If there ever was a reason to be there, surely nobody remembers it. However, recently non-Linux PPC guests started to show bad effects on 15 bit color mode. They do work just fine with 32 bits however. So let's switch to 32 bit color as the default graphic mode. Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Alexander Graf <agraf@suse.de>
| * pseries: Update MAINTAINERS informationDavid Gibson2013-07-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | I'm no longer at IBM, and therefore no long actively working on the pseries (aka sPAPR) qemu machine type. This patch removes my information in the MAINTAINERS file. While we're at it, I've added some extra file patterns for pseries specific files that weren't included in the existing pattern. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: Remove new maintainer addition] Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc kvm: save cr registerAlexey Kardashevskiy2013-07-011-0/+5
| | | | | | | | | | | | | | | | | | This adds a missing code to save CR (condition register) via kvm_arch_put_registers(). kvm_arch_get_registers() already has it. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
| * pseries: Fix compiler warning (conversion of pointer to integral value)Stefan Weil2013-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | This kind of type cast must use uintptr_t or target_ulong to be portable for hosts with sizeof(void *) != sizeof(long). Here the value is assigned to a variable of type target_ulong. Signed-off-by: Stefan Weil <sw@weilnetz.de> [agraf: fix compilation on 32bit hosts] Signed-off-by: Alexander Graf <agraf@suse.de>
| * spapr-rtas: add CPU argument to RTAS callsAnthony Liguori2013-07-018-28/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTAS is a hypervisor provided binary blob that a guest loads and calls into to execute certain functions. It's similar to the vsyscall page in Linux or the short lived VMCI paravirt interface from VMware. The QEMU implementation of the RTAS blob is simply a passthrough that proxies all RTAS calls to the hypervisor via an hypercall. While we pass a CPU argument for hypercall handling in QEMU, we don't pass it for RTAS calls. Since some RTAs calls require making hypercalls (normally RTAS is implemented as guest code) we have nasty hacks to allow that. Add a CPU argument to RTAS call handling so we can more easily invoke hypercalls just as guest code would. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Change default machine for 64-bitDavid Gibson2013-07-012-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently, for qemu-system-ppc64, the default machine type is 'mac99'. The mac99 machine is not being actively maintained, and represents a bizarre hybrid of components that never actually existed as a real system. This patch changes the default machine to 'pseries', which is actively maintained and works well with most modern ppc64 Linux distributions as a guest. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: adjust commit message] Signed-off-by: Alexander Graf <agraf@suse.de>
| * ppc: do not register IABR SPR twice for 603eHervé Poussineau2013-07-011-5/+0
| | | | | | | | | | | | | | | | IABR SPR is already registered in gen_spr_603(), called from init_proc_603E(). Signed-off-by: Hervé Poussineau <hpoussin@reactos.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * target-ppc: Drop redundant flags assignments from CPU familiesAndreas Färber2013-07-011-45/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous code has #define POWERPC_INSNS2_<family> PPC_NONE in some places for macrofied assignment to insns_flags2 field. PPC_NONE is defined as zero though and QOM classes are zero-initialized, so drop any pcc->insns_flags2 = PPC_NONE; assignments. PPC_NONE itself is still in use in translate.c. Suggested-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * mpc8544_guts: Turn qdev initfn into instance_initAndreas Färber2013-07-011-13/+5
| | | | | | | | | | | | | | SysBus can deal with NULL SysBusDeviceClass::init since 4ce5dae. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * mpc8544_guts: QOM'ifyAndreas Färber2013-07-011-5/+9
| | | | | | | | | | | | | | Introduce type constant, cast macro and rename parent field. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * mpc8544_guts: Fix MemoryRegion nameAndreas Färber2013-07-011-1/+1
| | | | | | | | | | | | | | 6544 -> 8544 Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * intc/openpic_kvm: Fix QOM and build issuesAndreas Färber2013-07-013-22/+35
| | | | | | | | | | Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * intc/openpic: Convert to QOM realizeAndreas Färber2013-07-011-15/+19
| | | | | | | | | | | | | | | | | | Split qdev initfn into instance_init and realize functions. Change one occurrence of "klass" while at it. 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>
| * intc/openpic: QOM'ifyAndreas Färber2013-07-014-8/+15
| | | | | | | | | | | | | | | | 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>
| * kvm/openpic: in-kernel mpic supportScott Wood2013-07-018-6/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables support for the in-kernel MPIC that thas been merged into the KVM next branch. This includes irqfd/KVM_IRQ_LINE support from Alex Graf (along with some other improvements). Note from Alex regarding kvm_irqchip_create(): On x86, one would call kvm_irqchip_create() to initialize an in-kernel interrupt controller. That function then goes ahead and initializes global capability variables as well as the default irq routing table. On ppc, we can't call kvm_irqchip_create() because we can have different types of interrupt controllers. So we want to do all the things that function would do for us in the in-kernel device init handler. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: squash in kvm_irqchip_commit_routes patch, fix non-kvm build, fix ppcemb] Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: Add non-kvm stub fileAlexander Graf2013-07-012-0/+13
| | | | | | | | | | | | | | | | | | | | There are cases where a kvm provided function is called from generic hw code that doesn't know whether kvm is available or not. Provide a stub file which can provide simple replacement functions for those cases. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
| * KVM: PIC: Only commit irq routing when necessaryAlexander Graf2013-07-013-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The current logic updates KVM's view of our interrupt map every time we change it. While this is nice and bullet proof, it slows things down badly for me. QEMU spends about 3 seconds on every start telling KVM what news it has on its routing maps. Instead, let's just synchronize the whole irq routing map as a whole when we're done constructing it. For things that change during runtime, we can still update the routing table on demand. Signed-off-by: Alexander Graf <agraf@suse.de>
| * PPC: e500: factor out mpic init codeScott Wood2013-07-011-22/+34
| | | | | | | | | | | | | | | | KVM in-kernel MPIC support is going to expand this even more, so let's keep it contained. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
| * openpic: factor out some common defines into openpic.hScott Wood2013-07-012-22/+29
| | | | | | | | | | | | | | ...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: MSI: Swap payload to native endiannessAlexander Graf2013-07-011-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | The usual MSI injection mechanism writes msi.data into memory using an le32 wrapper. So on big endian guests, this swaps msg.data into the expected byte order. For irqfd however, we don't swap the payload right now, rendering in-kernel MPIC emulation broken on PowerPC. Swap msg.data to the correct endianness whenever we touch it. Signed-off-by: Alexander Graf <agraf@suse.de>
| * KVM: Export kvm_init_irq_routingAlexander Graf2013-07-013-2/+7
| | | | | | | | | | | | | | | | | | | | On PPC, we can have different types of interrupt controllers, so we really only know that we are going to use one when we created it. Export kvm_init_irq_routing() to common code, so that we don't have to call kvm_irqchip_create(). Signed-off-by: Alexander Graf <agraf@suse.de>
OpenPOWER on IntegriCloud