1. 31 12月, 2008 4 次提交
  2. 28 10月, 2008 1 次提交
  3. 15 10月, 2008 9 次提交
  4. 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
  5. 29 7月, 2008 1 次提交
  6. 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
  7. 27 4月, 2008 15 次提交
  8. 03 3月, 2008 1 次提交
    • A
      KVM: Make the supported cpuid list a host property rather than a vm property · 674eea0f
      Avi Kivity 提交于
      One of the use cases for the supported cpuid list is to create a "greatest
      common denominator" of cpu capabilities in a server farm.  As such, it is
      useful to be able to get the list without creating a virtual machine first.
      
      Since the code does not depend on the vm in any way, all that is needed is
      to move it to the device ioctl handler.  The capability identifier is also
      changed so that binaries made against -rc1 will fail gracefully.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      674eea0f
  9. 31 1月, 2008 4 次提交
  10. 30 1月, 2008 2 次提交
    • J
      KVM: Add ifdef in irqchip struct for x86 only structures · 51e29625
      Jerone Young 提交于
      This patch fixes a small issue where sturctures:
      	kvm_pic_state
      	kvm_ioapic_state
      
      are defined inside x86 specific code and may or may not
      be defined in anyway for other architectures. The problem
      caused is one cannot compile userspace apps (ex. libkvm)
      for other archs since a size cannot be determined for these
      structures.
      Signed-off-by: NJerone Young <jyoung5@us.ibm.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      51e29625
    • D
      KVM: Enhance guest cpuid management · 07716717
      Dan Kenigsberg 提交于
      The current cpuid management suffers from several problems, which inhibit
      passing through the host feature set to the guest:
      
       - No way to tell which features the host supports
      
        While some features can be supported with no changes to kvm, others
        need explicit support.  That means kvm needs to vet the feature set
        before it is passed to the guest.
      
       - No support for indexed or stateful cpuid entries
      
        Some cpuid entries depend on ecx as well as on eax, or on internal
        state in the processor (running cpuid multiple times with the same
        input returns different output).  The current cpuid machinery only
        supports keying on eax.
      
       - No support for save/restore/migrate
      
        The internal state above needs to be exposed to userspace so it can
        be saved or migrated.
      
      This patch adds extended cpuid support by means of three new ioctls:
      
       - KVM_GET_SUPPORTED_CPUID: get all cpuid entries the host (and kvm)
         supports
      
       - KVM_SET_CPUID2: sets the vcpu's cpuid table
      
       - KVM_GET_CPUID2: gets the vcpu's cpuid table, including hidden state
      
      [avi: fix original KVM_SET_CPUID not removing nx on non-nx hosts as it did
            before]
      Signed-off-by: NDan Kenigsberg <danken@qumranet.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      07716717