summaryrefslogtreecommitdiffstats
path: root/arch/ia64/kvm
Commit message (Collapse)AuthorAgeFilesLines
* KVM: ia64: Makefile fix for forcing to re-generate asm-offsets.hXiantao Zhang2008-10-281-2/+6
| | | | | | | To avoid using stale asm-offsets.h. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: ia64: Fix halt emulation logicXiantao Zhang2008-10-283-39/+44
| | | | | | | | | | Common halt logic was changed by x86 and did not update ia64. This patch updates halt for ia64. Fixes a regression causing guests to hang with more than 2 vcpus. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* KVM: Fix guest shared interrupt with in-kernel irqchipSheng Yang2008-10-281-3/+5
| | | | | | | | | | | | | | | | | | | | | | Every call of kvm_set_irq() should offer an irq_source_id, which is allocated by kvm_request_irq_source_id(). Based on irq_source_id, we identify the irq source and implement logical OR for shared level interrupts. The allocated irq_source_id can be freed by kvm_free_irq_source_id(). Currently, we support at most sizeof(unsigned long) different irq sources. [Amit: - rebase to kvm.git HEAD - move definition of KVM_USERSPACE_IRQ_SOURCE_ID to common file - move kvm_request_irq_source_id to the update_irq ioctl] [Xiantao: - Add kvm/ia64 stuff and make it work for kvm/ia64 guests] Signed-off-by: Sheng Yang <sheng@linux.intel.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Merge commit 'linus/master' into merge-linusArjan van de Ven2008-10-1710-106/+302
|\ | | | | | | | | | | Conflicts: arch/x86/kvm/i8254.c
| * KVM: ia64: Add intel iommu support for guests.Xiantao Zhang2008-10-152-0/+13
| | | | | | | | | | | | | | With intel iommu hardware, we can assign devices to kvm/ia64 guests. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: ia64: add directed mmio range support for kvm guestsXiantao Zhang2008-10-153-21/+32
| | | | | | | | | | | | | | | | | | Using vt-d, kvm guests can be assigned physcial devices, so this patch introduce a new mmio type (directed mmio) to handle its mmio access. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: ia64: Make pmt table be able to hold physical mmio entries.Xiantao Zhang2008-10-151-6/+13
| | | | | | | | | | | | | | | | | | Don't try to do put_page once the entries are mmio. Set the tag to indicate the mmio space for vmm setting TLB's memory attribute. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: Move irqchip_in_kernel() from ioapic.h to irq.hXiantao Zhang2008-10-152-0/+5
| | | | | | | | | | | | | | Moving irqchip_in_kernel() from ioapic.h to irq.h. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: Separate irq ack notification out of arch/x86/kvm/irq.cXiantao Zhang2008-10-152-6/+1
| | | | | | | | | | | | | | | | Moving irq ack notification logic as common, and make it shared with ia64 side. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: ia64: add support for Tukwila processorsXiantao Zhang2008-10-151-21/+91
| | | | | | | | | | | | | | | | | | | | | | In Tukwila processor, VT-i has been enhanced in its implementation, it is often called VT-i2 techonology. With VTi-2 support, virtulization performance should be improved. In this patch, we added the related stuff to support kvm/ia64 for Tukwila processors. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * KVM: ia64: Implement a uniform vps interfaceXiantao Zhang2008-10-154-51/+84
| | | | | | | | | | | | | | | | | | | | An uniform entry kvm_vps_entry is added for vps_sync_write/read, vps_resume_handler/guest, and branches to differnt PAL service according to the offset. Singed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * KVM: ia64: Implement kvm_arch_vcpu_ioctl_{set,get}_mpstateXiantao Zhang2008-10-151-2/+35
| | | | | | | | | | | | | | Two ioctl arch functions are added to set vcpu's smp state. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: ia64: Enable virtio driver for ia64 in KconfigXiantao Zhang2008-10-151-0/+2
| | | | | | | | | | | | | | kvm/ia64 uses the virtio drivers to optimize its I/O subsytem. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: ia64: add a dummy irq ack notificationXiantao Zhang2008-10-151-0/+32
| | | | | | | | | | | | | | | | Before enabling notify_acked_irq for ia64, leave the related APIs as nop-op first. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
| * KVM: ia64: 'struct fdesc' build fixJes Sorensen2008-09-191-6/+1
| | | | | | | | | | | | | | | | | | | | Commit 4611a77 ("[IA64] fix compile failure with non modular builds") introduced struct fdesc into asm/elf.h, which duplicates KVM's definition. Remove the latter to avoid the build error. Signed-off-by: Jes Sorensen <jes@sgi.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* | hrtimer: convert kvm-ia64 to the new hrtimer apisArjan van de Ven2008-09-051-1/+1
|/ | | | | | | | In order to be able to do range hrtimers we need to use accessor functions to the "expire" member of the hrtimer struct. This patch converts KVM-ia64 to these accessors. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
* KVM: ia64: Fix irq disabling leak in error handling codeJulia Lawall2008-07-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a call to local_irq_restore in the normal exit case, so it would seem that there should be one on an error return as well. The semantic patch that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @@ expression l; expression E,E1,E2; @@ local_irq_save(l); ... when != local_irq_restore(l) when != spin_unlock_irqrestore(E,l) when any when strict ( if (...) { ... when != local_irq_restore(l) when != spin_unlock_irqrestore(E1,l) + local_irq_restore(l); return ...; } | if (...) + {local_irq_restore(l); return ...; + } | spin_unlock_irqrestore(E2,l); | local_irq_restore(l); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: MMU: nuke shadowed pgtable pages and ptes on memslot destructionMarcelo Tosatti2008-07-201-0/+3
| | | | | | | Flush the shadow mmu before removing regions to avoid stale entries. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: Add coalesced MMIO support (ia64 part)Laurent Vivier2008-07-202-1/+5
| | | | | | | | | | | | This patch enables coalesced MMIO for ia64 architecture. It defines KVM_MMIO_PAGE_OFFSET and KVM_CAP_COALESCED_MMIO. It enables the compilation of coalesced_mmio.c. [akpm: fix compile error on ia64] Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: kvm_io_device: extend in_range() to manage len and write attributeLaurent Vivier2008-07-201-3/+3
| | | | | | | | | | Modify member in_range() of structure kvm_io_device to pass length and the type of the I/O (write or read). This modification allows to use kvm_io_device with coalesced MMIO. Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: Remove decache_vcpus_on_cpu() and related callbacksAvi Kivity2008-07-201-8/+0
| | | | | | Obsoleted by the vmx-specific per-cpu list. Signed-off-by: Avi Kivity <avi@qumranet.com>
* fix build error of arch/ia64/kvm/*Takashi Iwai2008-07-172-3/+3
| | | | | | | | | | | | | | | Fix calls of smp_call_function*() in arch/ia64/kvm for recent API changes. CC [M] arch/ia64/kvm/kvm-ia64.o arch/ia64/kvm/kvm-ia64.c: In function 'handle_global_purge': arch/ia64/kvm/kvm-ia64.c:398: error: too many arguments to function 'smp_call_function_single' arch/ia64/kvm/kvm-ia64.c: In function 'kvm_vcpu_kick': arch/ia64/kvm/kvm-ia64.c:1696: error: too many arguments to function 'smp_call_function_single' Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* KVM: ia64: fix zero extending for mmio ld1/2/4 emulation in KVMJes Sorensen2008-06-061-1/+2
| | | | | | | | | | | Only copy in the data actually requested by the instruction emulation and zero pad the destination register first. This avoids the problem where emulated mmio access got garbled data from ld2.acq instructions in the vga console driver. Signed-off-by: Jes Sorensen <jes@sgi.com> Acked-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: fix GVMM module including position-dependent objectsXiantao Zhang2008-05-183-2/+3
| | | | | | | | | | | | | | | | | The GVMM module is position independent since it is relocated to the guest address space. Commit ea696f9cf ("ia64 kvm fixes for O=... builds") broke this by linking GVMM with non-PIC objects. Fix by creating two files: memset.S and memcpy.S which just include the files under arch/ia64/lib/{memset.S, memcpy.S} respectively. [akpm: don't delete files which we need] Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Avi Kivity <avi@qumranet.com>
* rename div64_64 to div64_u64Roman Zippel2008-05-011-2/+1
| | | | | | | | | | | | | | | | | | | | | Rename div64_64 to div64_u64 to make it consistent with the other divide functions, so it clearly includes the type of the divide. Move its definition to math64.h as currently no architecture overrides the generic implementation. They can still override it of course, but the duplicated declarations are avoided. Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Cc: Avi Kivity <avi@qumranet.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Patrick McHardy <kaber@trash.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ia64 kvm fixes for O=... buildsAl Viro2008-04-281-5/+2
| | | | | | | | | * EXTRA_CFLAGS do not apply for *.S * don't bother with symlinks to ../lib/mem*.S, just add ../lib/mem*.o to object list Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* KVM: add ioctls to save/store mpstateMarcelo Tosatti2008-04-271-0/+12
| | | | | | | | | | | | | So userspace can save/restore the mpstate during migration. [avi: export the #define constants describing the value] [christian: add s390 stubs] [avi: ditto for ia64] Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: Rename VCPU_MP_STATE_* to KVM_MP_STATE_*Avi Kivity2008-04-271-13/+13
| | | | | | We wish to export it to userspace, so move it into the kvm namespace. Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: hlt emulation should take in-kernel APIC/PIT timers into accountMarcelo Tosatti2008-04-271-0/+5
| | | | | | | | | | | | | | | | | | Timers that fire between guest hlt and vcpu_block's add_wait_queue() are ignored, possibly resulting in hangs. Also make sure that atomic_inc and waitqueue_active tests happen in the specified order, otherwise the following race is open: CPU0 CPU1 if (waitqueue_active(wq)) add_wait_queue() if (!atomic_read(pit_timer->pending)) schedule() atomic_inc(pit_timer->pending) Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Stub out kvmtraceAvi Kivity2008-04-271-0/+3
| | | | Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Enable kvm build for ia64Xiantao Zhang2008-04-272-0/+107
| | | | | | | Update the related Makefile and KConfig for kvm build Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add kvm sal/pal virtulization supportXiantao Zhang2008-04-271-0/+500
| | | | | | | | Some sal/pal calls would be traped to kvm for virtulization from guest firmware. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add guest interruption injection supportXiantao Zhang2008-04-271-0/+970
| | | | | | | | process.c mainly handle interruption injection, and some faults handling. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Generate offset values for assembly code useXiantao Zhang2008-04-271-0/+251
| | | | | | | | | asm-offsets.c will generate offset values used for assembly code for some fileds of special structures. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add optimization for some virtulization faultsXiantao Zhang2008-04-271-0/+918
| | | | | | | | | optvfault.S Add optimization for some performance-critical virtualization faults. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add processor virtulization supportXiantao Zhang2008-04-271-0/+2163
| | | | | | | | vcpu.c provides processor virtualization logic for kvm. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add trampoline for guest/host mode switchXiantao Zhang2008-04-271-0/+1038
| | | | | | | trampoline code targets for guest/host world switch. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add mmio decoder for kvm/ia64Xiantao Zhang2008-04-271-0/+341
| | | | | | | | mmio.c includes mmio decoder, and related mmio logics. Signed-off-by: Anthony Xu <Anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add interruption vector table for vmmXiantao Zhang2008-04-271-0/+1424
| | | | | | | | vmm_ivt.S includes an ivt for vmm use. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add TLB virtulization supportXiantao Zhang2008-04-271-0/+636
| | | | | | | | vtlb.c includes tlb/VHPT virtulization. Signed-off-by: Anthony Xu <anthony.xu@intel.com> Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: VMM module interfacesXiantao Zhang2008-04-271-0/+66
| | | | | | | vmm.c adds the interfaces with kvm/module, and initialize global data area. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add header files for kvm/ia64Xiantao Zhang2008-04-275-0/+1421
| | | | | | | | | | kvm_minstate.h : Marcos about Min save routines. lapic.h: apic structure definition. vcpu.h : routions related to vcpu virtualization. vti.h : Some macros or routines for VT support on Itanium. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
* KVM: ia64: Add kvm arch-specific core code for kvm/ia64Xiantao Zhang2008-04-271-0/+1789
kvm_ia64.c is created to handle kvm ia64-specific core logic. Signed-off-by: Xiantao Zhang <xiantao.zhang@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
OpenPOWER on IntegriCloud