1. 24 3月, 2009 5 次提交
    • S
      KVM: Add support to disable MSI for assigned device · 17071fe7
      Sheng Yang 提交于
      MSI is always enabled by default for msi2intx=1. But if msi2intx=0, we
      have to disable MSI if guest require to do so.
      
      The patch also discard unnecessary msi2intx judgment if guest want to update
      MSI state.
      
      Notice KVM_DEV_IRQ_ASSIGN_MSI_ACTION is a mask which should cover all MSI
      related operations, though we only got one for now.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      17071fe7
    • M
      KVM: PIT: provide an option to disable interrupt reinjection · 52d939a0
      Marcelo Tosatti 提交于
      Certain clocks (such as TSC) in older 2.6 guests overaccount for lost
      ticks, causing severe time drift. Interrupt reinjection magnifies the
      problem.
      
      Provide an option to disable it.
      
      [avi: allow room for expansion in case we want to disable reinjection
            of other timers]
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      52d939a0
    • J
      KVM: Advertise guest debug capability per-arch · 971cc3dc
      Jan Kiszka 提交于
      Limit KVM_CAP_SET_GUEST_DEBUG only to those archs (currently x86) that
      support it. This simplifies user space stub implementations.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      971cc3dc
    • J
      KVM: ia64: stack get/restore patch · e9a999fe
      Jes Sorensen 提交于
      Implement KVM_IA64_VCPU_[GS]ET_STACK ioctl calls. This is required
      for live migrations.
      
      Patch is based on previous implementation that was part of old
      GET/SET_REGS ioctl calls.
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      e9a999fe
    • J
      KVM: New guest debug interface · d0bfb940
      Jan Kiszka 提交于
      This rips out the support for KVM_DEBUG_GUEST and introduces a new IOCTL
      instead: KVM_SET_GUEST_DEBUG. The IOCTL payload consists of a generic
      part, controlling the "main switch" and the single-step feature. The
      arch specific part adds an x86 interface for intercepting both types of
      debug exceptions separately and re-injecting them when the host was not
      interested. Moveover, the foundation for guest debugging via debug
      registers is layed.
      
      To signal breakpoint events properly back to userland, an arch-specific
      data block is now returned along KVM_EXIT_DEBUG. For x86, the arch block
      contains the PC, the debug exception, and relevant debug registers to
      tell debug events properly apart.
      
      The availability of this new interface is signaled by
      KVM_CAP_SET_GUEST_DEBUG. Empty stubs for not yet supported archs are
      provided.
      
      Note that both SVM and VTX are supported, but only the latter was tested
      yet. Based on the experience with all those VTX corner case, I would be
      fairly surprised if SVM will work out of the box.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      d0bfb940
  2. 15 2月, 2009 1 次提交
  3. 16 1月, 2009 1 次提交
  4. 31 12月, 2008 5 次提交
  5. 28 10月, 2008 1 次提交
  6. 15 10月, 2008 9 次提交
  7. 25 8月, 2008 1 次提交
    • A
      KVM: fix userspace ABI breakage · 1327138e
      Adrian Bunk 提交于
      The following part of commit 9ef621d3
      (KVM: Support mixed endian machines) changed on the size of a struct
      that is exported to userspace:
      
      include/linux/kvm.h:
      
      @@ -318,14 +318,14 @@ struct kvm_trace_rec {
       	__u32 vcpu_id;
       	union {
       		struct {
      -			__u32 cycle_lo, cycle_hi;
      +			__u64 cycle_u64;
       			__u32 extra_u32[KVM_TRC_EXTRA_MAX];
       		} cycle;
       		struct {
       			__u32 extra_u32[KVM_TRC_EXTRA_MAX];
       		} nocycle;
       	} u;
      -};
      +} __attribute__((packed));
      
      Packing a struct was the correct idea, but it packed the wrong struct.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      1327138e
  8. 29 7月, 2008 1 次提交
  9. 20 7月, 2008 2 次提交
    • T
      KVM: Support mixed endian machines · 9ef621d3
      Tan, Li 提交于
      Currently kvmtrace is not portable. This will prevent from copying a
      trace file from big-endian target to little-endian workstation for analysis.
      In the patch, kernel outputs metadata containing a magic number to trace
      log, and changes 64-bit words to be u64 instead of a pair of u32s.
      Signed-off-by: NTan Li <li.tan@intel.com>
      Acked-by: NJerone Young <jyoung5@us.ibm.com>
      Acked-by: NHollis Blanchard <hollisb@us.ibm.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      9ef621d3
    • L
      KVM: Add coalesced MMIO support (common part) · 5f94c174
      Laurent Vivier 提交于
      This patch adds all needed structures to coalesce MMIOs.
      Until an architecture uses it, it is not compiled.
      
      Coalesced MMIO introduces two ioctl() to define where are the MMIO zones that
      can be coalesced:
      
      - KVM_REGISTER_COALESCED_MMIO registers a coalesced MMIO zone.
        It requests one parameter (struct kvm_coalesced_mmio_zone) which defines
        a memory area where MMIOs can be coalesced until the next switch to
        user space. The maximum number of MMIO zones is KVM_COALESCED_MMIO_ZONE_MAX.
      
      - KVM_UNREGISTER_COALESCED_MMIO cancels all registered zones inside
        the given bounds (bounds are also given by struct kvm_coalesced_mmio_zone).
      
      The userspace client can check kernel coalesced MMIO availability by asking
      ioctl(KVM_CHECK_EXTENSION) for the KVM_CAP_COALESCED_MMIO capability.
      The ioctl() call to KVM_CAP_COALESCED_MMIO will return 0 if not supported,
      or the page offset where will be stored the ring buffer.
      The page offset depends on the architecture.
      
      After an ioctl(KVM_RUN), the first page of the KVM memory mapped points to
      a kvm_run structure. The offset given by KVM_CAP_COALESCED_MMIO is
      an offset to the coalesced MMIO ring expressed in PAGE_SIZE relatively
      to the address of the start of th kvm_run structure. The MMIO ring buffer
      is defined by the structure kvm_coalesced_mmio_ring.
      
      [akio: fix oops during guest shutdown]
      Signed-off-by: NLaurent Vivier <Laurent.Vivier@bull.net>
      Signed-off-by: NAkio Takebe <takebe_akio@jp.fujitsu.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      5f94c174
  10. 27 4月, 2008 14 次提交