From: Linus Torvalds Date: Tue, 24 Jul 2012 19:01:20 +0000 (-0700) Subject: Merge tag 'kvm-3.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5fecc9d8f59e765c2a48379dd7c6f5cf88c7d75a;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Merge tag 'kvm-3.6-1' of git://git./virt/kvm/kvm Pull KVM updates from Avi Kivity: "Highlights include - full big real mode emulation on pre-Westmere Intel hosts (can be disabled with emulate_invalid_guest_state=0) - relatively small ppc and s390 updates - PCID/INVPCID support in guests - EOI avoidance; 3.6 guests should perform better on 3.6 hosts on interrupt intensive workloads) - Lockless write faults during live migration - EPT accessed/dirty bits support for new Intel processors" Fix up conflicts in: - Documentation/virtual/kvm/api.txt: Stupid subchapter numbering, added next to each other. - arch/powerpc/kvm/booke_interrupts.S: PPC asm changes clashing with the KVM fixes - arch/s390/include/asm/sigp.h, arch/s390/kvm/sigp.c: Duplicated commits through the kvm tree and the s390 tree, with subsequent edits in the KVM tree. * tag 'kvm-3.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (93 commits) KVM: fix race with level interrupts x86, hyper: fix build with !CONFIG_KVM_GUEST Revert "apic: fix kvm build on UP without IOAPIC" KVM guest: switch to apic_set_eoi_write, apic_write apic: add apic_set_eoi_write for PV use KVM: VMX: Implement PCID/INVPCID for guests with EPT KVM: Add x86_hyper_kvm to complete detect_hypervisor_platform check KVM: PPC: Critical interrupt emulation support KVM: PPC: e500mc: Fix tlbilx emulation for 64-bit guests KVM: PPC64: booke: Set interrupt computation mode for 64-bit host KVM: PPC: bookehv: Add ESR flag to Data Storage Interrupt KVM: PPC: bookehv64: Add support for std/ld emulation. booke: Added crit/mc exception handler for e500v2 booke/bookehv: Add host crit-watchdog exception support KVM: MMU: document mmu-lock and fast page fault KVM: MMU: fix kvm_mmu_pagetable_walk tracepoint KVM: MMU: trace fast page fault KVM: MMU: fast path of handling guest page fault KVM: MMU: introduce SPTE_MMU_WRITEABLE bit KVM: MMU: fold tlb flush judgement into mmu_spte_update ... --- 5fecc9d8f59e765c2a48379dd7c6f5cf88c7d75a diff --cc Documentation/virtual/kvm/api.txt index 2c9948379469,310fe508d9cd..bf33aaa4c59f --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@@ -1930,22 -1930,41 +1930,56 @@@ The "pte_enc" field provides a value th PTE's RPN field (ie, it needs to be shifted left by 12 to OR it into the hash PTE second double word). +4.75 KVM_IRQFD -4.75 KVM_PPC_ALLOCATE_HTAB +Capability: KVM_CAP_IRQFD +Architectures: x86 +Type: vm ioctl +Parameters: struct kvm_irqfd (in) +Returns: 0 on success, -1 on error + +Allows setting an eventfd to directly trigger a guest interrupt. +kvm_irqfd.fd specifies the file descriptor to use as the eventfd and +kvm_irqfd.gsi specifies the irqchip pin toggled by this event. When +an event is tiggered on the eventfd, an interrupt is injected into +the guest using the specified gsi pin. The irqfd is removed using +the KVM_IRQFD_FLAG_DEASSIGN flag, specifying both kvm_irqfd.fd +and kvm_irqfd.gsi. + ++4.76 KVM_PPC_ALLOCATE_HTAB + + Capability: KVM_CAP_PPC_ALLOC_HTAB + Architectures: powerpc + Type: vm ioctl + Parameters: Pointer to u32 containing hash table order (in/out) + Returns: 0 on success, -1 on error + + This requests the host kernel to allocate an MMU hash table for a + guest using the PAPR paravirtualization interface. This only does + anything if the kernel is configured to use the Book 3S HV style of + virtualization. Otherwise the capability doesn't exist and the ioctl + returns an ENOTTY error. The rest of this description assumes Book 3S + HV. + + There must be no vcpus running when this ioctl is called; if there + are, it will do nothing and return an EBUSY error. + + The parameter is a pointer to a 32-bit unsigned integer variable + containing the order (log base 2) of the desired size of the hash + table, which must be between 18 and 46. On successful return from the + ioctl, it will have been updated with the order of the hash table that + was allocated. + + If no hash table has been allocated when any vcpu is asked to run + (with the KVM_RUN ioctl), the host kernel will allocate a + default-sized hash table (16 MB). + + If this ioctl is called when a hash table has already been allocated, + the kernel will clear out the existing hash table (zero all HPTEs) and + return the hash table order in the parameter. (If the guest is using + the virtualized real-mode area (VRMA) facility, the kernel will + re-create the VMRA HPTEs on the next KVM_RUN of any vcpu.) + 5. The kvm_run structure ------------------------ diff --cc arch/powerpc/kvm/booke_interrupts.S index 8fd4b2a0911b,09456c4719f3..bb46b32f9813 --- a/arch/powerpc/kvm/booke_interrupts.S +++ b/arch/powerpc/kvm/booke_interrupts.S @@@ -52,16 -53,21 +52,21 @@@ (1<eoi_write == eoi_write); + (*drv)->eoi_write = eoi_write; + } + } + /* * Power management */