1. 02 2月, 2013 1 次提交
  2. 28 1月, 2013 1 次提交
  3. 27 1月, 2013 2 次提交
  4. 15 1月, 2013 2 次提交
  5. 19 12月, 2012 2 次提交
  6. 26 11月, 2012 1 次提交
  7. 31 10月, 2012 1 次提交
    • E
      i386: kvm: filter CPUID feature words earlier, on cpu.c · bc74b7db
      Eduardo Habkost 提交于
      cpu.c contains the code that will check if all requested CPU features
      are available, so the filtering of KVM features must be there, so we can
      implement "check" and "enforce" properly.
      
      The only point where kvm_arch_init_vcpu() is called on i386 is:
      
      - cpu_x86_init()
        - x86_cpu_realize() (after cpu_x86_register() is called)
          - qemu_init_vcpu()
            - qemu_kvm_start_vcpu()
              - qemu_kvm_thread_fn() (on a new thread)
                - kvm_init_vcpu()
                  - kvm_arch_init_vcpu()
      
      With this patch, the filtering will be done earlier, at:
      - cpu_x86_init()
        - cpu_x86_register() (before x86_cpu_realize() is called)
      
      Also, the KVM CPUID filtering will now be done at the same place where
      the TCG CPUID feature filtering is done. Later, the code can be changed
      to use the same filtering code for the "check" and "enforce" modes, as
      now the cpu.c code knows exactly which CPU features are going to be
      exposed to the guest (and much earlier).
      
      One thing I was worrying about when doing this is that
      kvm_arch_get_supported_cpuid() depends on kvm_irqchip_in_kernel(), and
      maybe the 'kvm_kernel_irqchip' global variable wasn't initialized yet at
      CPU creation time. But kvm_kernel_irqchip is initialized during
      kvm_init(), that is called very early (much earlier than the machine
      init function), and kvm_init() is already a requirement to run the
      GET_SUPPORTED_CPUID ioctl() (as kvm_init() initializes the kvm_state
      global variable).
      
      Side note: it would be nice to keep KVM-specific code inside kvm.c. The
      problem is that properly implementing -cpu check/enforce code (that's
      inside cpu.c) depends directly on the feature bit filtering done using
      kvm_arch_get_supported_cpuid(). Currently -cpu check/enforce is broken
      because it simply uses the host CPU feature bits instead of
      GET_SUPPORTED_CPUID, and we need to fix that.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      bc74b7db
  8. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  9. 22 10月, 2012 1 次提交
    • A
      memory: manage coalesced mmio via a MemoryListener · 95d2994a
      Avi Kivity 提交于
      Instead of calling a global function on coalesced mmio changes, which
      routes the call to kvm if enabled, add coalesced mmio hooks to
      MemoryListener and make kvm use that instead.
      
      The motivation is support for multiple address spaces (which means we
      we need to filter the call on the right address space) but the result
      is cleaner as well.
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      95d2994a
  10. 10 9月, 2012 2 次提交
  11. 09 9月, 2012 1 次提交
  12. 09 8月, 2012 7 次提交
  13. 12 7月, 2012 1 次提交
  14. 11 7月, 2012 1 次提交
  15. 22 5月, 2012 5 次提交
  16. 17 5月, 2012 1 次提交
    • J
      kvm: Introduce basic MSI support for in-kernel irqchips · 04fa27f5
      Jan Kiszka 提交于
      This patch basically adds kvm_irqchip_send_msi, a service for sending
      arbitrary MSI messages to KVM's in-kernel irqchip models.
      
      As the original KVM API requires us to establish a static route from a
      pseudo GSI to the target MSI message and inject the MSI via toggling
      that virtual IRQ, we need to play some tricks to make this interface
      transparent. We create those routes on demand and keep them in a hash
      table. Succeeding messages can then search for an existing route in the
      table first and reuse it whenever possible. If we should run out of
      limited GSIs, we simply flush the table and rebuild it as messages are
      sent.
      
      This approach is rather simple and could be optimized further. However,
      latest kernels contains a more efficient MSI injection interface that
      will obsolete the GSI-based dynamic injection.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      04fa27f5
  17. 13 4月, 2012 2 次提交
  18. 15 3月, 2012 1 次提交
  19. 07 3月, 2012 1 次提交
  20. 09 2月, 2012 1 次提交
  21. 19 1月, 2012 3 次提交
    • J
      kvm: x86: Add user space part for in-kernel APIC · 680c1c6f
      Jan Kiszka 提交于
      This introduces the alternative APIC device which makes use of KVM's
      in-kernel device model. External NMI injection via LINT1 is emulated by
      checking the current state of the in-kernel APIC, only injecting a NMI
      into the VCPU if LINT1 is unmasked and configured to DM_NMI.
      
      MSI is not yet supported, so we disable this when the in-kernel model is
      in use.
      
      CC: Lai Jiangshan <laijs@cn.fujitsu.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      680c1c6f
    • J
      kvm: x86: Establish IRQ0 override control · 9b5b76d4
      Jan Kiszka 提交于
      KVM is forced to disable the IRQ0 override when we run with in-kernel
      irqchip but without IRQ routing support of the kernel. Set the fwcfg
      value correspondingly. This aligns us with qemu-kvm.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      9b5b76d4
    • J
      kvm: Introduce core services for in-kernel irqchip support · 84b058d7
      Jan Kiszka 提交于
      Add the basic infrastructure to active in-kernel irqchip support, inject
      interrupts into these models, and maintain IRQ routes.
      
      Routing is optional and depends on the host arch supporting
      KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as
      we can't route GSI0 to IOAPIC pin 2.
      
      In-kernel irqchip support will once be controlled by the machine
      property 'kernel_irqchip', but this is not yet wired up.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      84b058d7
  22. 20 12月, 2011 1 次提交
  23. 21 6月, 2011 1 次提交