1. 04 9月, 2015 1 次提交
  2. 29 4月, 2015 1 次提交
  3. 21 4月, 2015 3 次提交
  4. 19 1月, 2015 1 次提交
  5. 15 12月, 2014 1 次提交
    • S
      KVM: PPC: Book3S HV: Fix inaccuracies in ICP emulation for H_IPI · 5b88cda6
      Suresh E. Warrier 提交于
      This fixes some inaccuracies in the state machine for the virtualized
      ICP when implementing the H_IPI hcall (Set_MFFR and related states):
      
      1. The old code wipes out any pending interrupts when the new MFRR is
         more favored than the CPPR but less favored than a pending
         interrupt (by always modifying xisr and the pending_pri). This can
         cause us to lose a pending external interrupt.
      
         The correct code here is to only modify the pending_pri and xisr in
         the ICP if the MFRR is equal to or more favored than the current
         pending pri (since in this case, it is guaranteed that that there
         cannot be a pending external interrupt). The code changes are
         required in both kvmppc_rm_h_ipi and kvmppc_h_ipi.
      
      2. Again, in both kvmppc_rm_h_ipi and kvmppc_h_ipi, there is a check
         for whether MFRR is being made less favored AND further if new MFFR
         is also less favored than the current CPPR, we check for any
         resends pending in the ICP. These checks look like they are
         designed to cover the case where if the MFRR is being made less
         favored, we opportunistically trigger a resend of any interrupts
         that had been previously rejected. Although, this is not a state
         described by PAPR, this is an action we actually need to do
         especially if the CPPR is already at 0xFF.  Because in this case,
         the resend bit will stay on until another ICP state change which
         may be a long time coming and the interrupt stays pending until
         then. The current code which checks for MFRR < CPPR is broken when
         CPPR is 0xFF since it will not get triggered in that case.
      
         Ideally, we would want to do a resend only if
      
         	prio(pending_interrupt) < mfrr && prio(pending_interrupt) < cppr
      
         where pending interrupt is the one that was rejected. But we don't
         have the priority of the pending interrupt state saved, so we
         simply trigger a resend whenever the MFRR is made less favored.
      
      3. In kvmppc_rm_h_ipi, where we save state to pass resends to the
         virtual mode, we also need to save the ICP whose need_resend we
         reset since this does not need to be my ICP (vcpu->arch.icp) as is
         incorrectly assumed by the current code. A new field rm_resend_icp
         is added to the kvmppc_icp structure for this purpose.
      Signed-off-by: NSuresh Warrier <warrier@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5b88cda6
  6. 05 8月, 2014 1 次提交
    • P
      KVM: PPC: Enable IRQFD support for the XICS interrupt controller · 25a2150b
      Paul Mackerras 提交于
      This makes it possible to use IRQFDs on platforms that use the XICS
      interrupt controller.  To do this we implement kvm_irq_map_gsi() and
      kvm_irq_map_chip_pin() in book3s_xics.c, so as to provide a 1-1 mapping
      between global interrupt numbers and XICS interrupt source numbers.
      For now, all interrupts are mapped as "IRQCHIP" interrupts, and no
      MSI support is provided.
      
      This means that kvm_set_irq can now get called with level == 0 or 1
      as well as the powerpc-specific values KVM_INTERRUPT_SET,
      KVM_INTERRUPT_UNSET and KVM_INTERRUPT_SET_LEVEL.  We change
      ics_deliver_irq() to accept all those values, and remove its
      report_status argument, as it is always false, given that we don't
      support KVM_IRQ_LINE_STATUS.
      
      This also adds support for interrupt ack notifiers to the XICS code
      so that the IRQFD resampler functionality can be supported.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Tested-by: NEric Auger <eric.auger@linaro.org>
      Tested-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      25a2150b
  7. 09 1月, 2014 1 次提交
  8. 18 10月, 2013 2 次提交
  9. 17 10月, 2013 3 次提交
  10. 28 8月, 2013 1 次提交
    • P
      KVM: PPC: Book3S: Fix compile error in XICS emulation · 7bfa9ad5
      Paul Mackerras 提交于
      Commit 8e44ddc3 ("powerpc/kvm/book3s: Add support for H_IPOLL and
      H_XIRR_X in XICS emulation") added a call to get_tb() but didn't
      include the header that defines it, and on some configs this means
      book3s_xics.c fails to compile:
      
      arch/powerpc/kvm/book3s_xics.c: In function ‘kvmppc_xics_hcall’:
      arch/powerpc/kvm/book3s_xics.c:812:3: error: implicit declaration of function ‘get_tb’ [-Werror=implicit-function-declaration]
      
      Cc: stable@vger.kernel.org [v3.10, v3.11]
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      7bfa9ad5
  11. 01 6月, 2013 1 次提交
  12. 02 5月, 2013 1 次提交
    • P
      KVM: PPC: Book3S: Add API for in-kernel XICS emulation · 5975a2e0
      Paul Mackerras 提交于
      This adds the API for userspace to instantiate an XICS device in a VM
      and connect VCPUs to it.  The API consists of a new device type for
      the KVM_CREATE_DEVICE ioctl, a new capability KVM_CAP_IRQ_XICS, which
      functions similarly to KVM_CAP_IRQ_MPIC, and the KVM_IRQ_LINE ioctl,
      which is used to assert and deassert interrupt inputs of the XICS.
      
      The XICS device has one attribute group, KVM_DEV_XICS_GRP_SOURCES.
      Each attribute within this group corresponds to the state of one
      interrupt source.  The attribute number is the same as the interrupt
      source number.
      
      This does not support irq routing or irqfd yet.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      5975a2e0
  13. 27 4月, 2013 5 次提交