1. 17 5月, 2012 1 次提交
  2. 18 2月, 2012 1 次提交
    • J
      kvmvapic: Introduce TPR access optimization for Windows guests · e5ad936b
      Jan Kiszka 提交于
      This enables acceleration for MMIO-based TPR registers accesses of
      32-bit Windows guest systems. It is mostly useful with KVM enabled,
      either on older Intel CPUs (without flexpriority feature, can also be
      manually disabled for testing) or any current AMD processor.
      
      The approach introduced here is derived from the original version of
      qemu-kvm. It was refactored, documented, and extended by support for
      user space APIC emulation, both with and without KVM acceleration. The
      VMState format was kept compatible, so was the ABI to the option ROM
      that implements the guest-side para-virtualized driver service. This
      enables seamless migration from qemu-kvm to upstream or, one day,
      between KVM and TCG mode.
      
      The basic concept goes like this:
       - VAPIC PV interface consisting of I/O port 0x7e and (for KVM in-kernel
         irqchip) a vmcall hypercall is registered
       - VAPIC option ROM is loaded into guest
       - option ROM activates TPR MMIO access reporting via port 0x7e
       - TPR accesses are trapped and patched in the guest to call into option
         ROM instead, VAPIC support is enabled
       - option ROM TPR helpers track state in memory and invoke hypercall to
         poll for pending IRQs if required
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      e5ad936b
  3. 15 2月, 2012 1 次提交
  4. 04 2月, 2012 1 次提交
    • A
      qdev: register all types natively through QEMU Object Model · 39bffca2
      Anthony Liguori 提交于
      This was done in a mostly automated fashion.  I did it in three steps and then
      rebased it into a single step which avoids repeatedly touching every file in
      the tree.
      
      The first step was a sed-based addition of the parent type to the subclass
      registration functions.
      
      The second step was another sed-based removal of subclass registration functions
      while also adding virtual functions from the base class into a class_init
      function as appropriate.
      
      Finally, a python script was used to convert the DeviceInfo structures and
      qdev_register_subclass functions to TypeInfo structures, class_init functions,
      and type_register_static calls.
      
      We are almost fully converted to QOM after this commit.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      39bffca2
  5. 28 1月, 2012 1 次提交
  6. 19 1月, 2012 5 次提交
    • J
      apic: Open-code timer save/restore · 7a380ca3
      Jan Kiszka 提交于
      To enable migration between accelerated and non-accelerated APIC models,
      we will need to handle the timer saving and restoring specially and can
      no longer rely on the automatics of VMSTATE_TIMER. Specifically,
      accelerated model will not start any QEMUTimer.
      
      This patch therefore factors out the generic bits into apic_next_timer
      and use a post-load callback to implemented model-specific logic.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      7a380ca3
    • J
      apic: Factor out base class for KVM reuse · dae01685
      Jan Kiszka 提交于
      The KVM in-kernel APIC model will reuse parts of the user space model
      while providing the same frontend view to guest and most management
      interfaces.
      
      Factor out an APIC base class to encapsulate those parts that will be
      shared by user space and KVM model. This class offers callback hooks for
      init, base/tpr setting, and the external NMI delivery that will be
      set via APICCommonInfo structure and implemented specifically in the
      subclasses.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      dae01685
    • J
      apic: Introduce apic_report_irq_delivered · 343270ea
      Jan Kiszka 提交于
      The in-kernel i8259 and IOAPIC backends for KVM will need this, so
      encapsulate the shared bits.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      343270ea
    • J
      apic: Inject external NMI events via LINT1 · 02c09195
      Jan Kiszka 提交于
      On real hardware, NMI button events are injected via the LINT1 line of
      the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC
      LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that
      should not receive them. Change the APIC emulation code to reflect this.
      
      Based on qemu-kvm patch by Lai Jiangshan.
      
      CC: Lai Jiangshan <laijs@cn.fujitsu.com>
      Reported-by: NKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      02c09195
    • J
      apic: Stop timer on reset · ab388a98
      Jan Kiszka 提交于
      All LVTs are masked on reset, so the timer becomes ineffective. Letting
      it tick nevertheless is harmless, but will at least create a spurious
      trace event.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      ab388a98
  7. 28 11月, 2011 1 次提交
  8. 16 10月, 2011 1 次提交
    • J
      pc: Fix and clean up PIC-to-APIC IRQ path · d96e1737
      Jan Kiszka 提交于
      The master PIC is connected to the LINTIN0 of the APICs. As the APIC
      currently does not track the state of that line, we have to ask the PIC
      to reinject its IRQ after the CPU picked up an event from the APIC.
      
      This introduces pic_get_output to read the master PIC IRQ line state
      without changing it. The APIC uses this function to decide if a PIC IRQ
      should be reinjected on apic_update_irq. This reflects better how the
      real hardware works.
      
      The patch fixes some failures of the kvm unit tests apic and eventinj by
      allowing to enable the proper CPU IRQ deassertion when the guest masks
      some pending IRQs at PIC level.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      d96e1737
  9. 23 8月, 2011 1 次提交
  10. 22 8月, 2011 1 次提交
  11. 21 3月, 2011 1 次提交
    • P
      change all other clock references to use nanosecond resolution accessors · 74475455
      Paolo Bonzini 提交于
      This was done with:
      
          sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
              $(git grep -l 'qemu_get_clock\>' )
          sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
              $(git grep -l 'qemu_new_timer\>' )
      
      after checking that get_clock and new_timer never occur twice
      on the same line.  There were no missed occurrences; however, even
      if there had been, they would have been caught by the compiler.
      
      There was exactly one false positive in qemu_run_timers:
      
           -    current_time = qemu_get_clock (clock);
           +    current_time = qemu_get_clock_ns (clock);
      
      which is of course not in this patch.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      74475455
  12. 14 2月, 2011 1 次提交
  13. 04 2月, 2011 1 次提交
  14. 21 12月, 2010 1 次提交
  15. 11 12月, 2010 1 次提交
    • A
      Add endianness as io mem parameter · 2507c12a
      Alexander Graf 提交于
      As stated before, devices can be little, big or native endian. The
      target endianness is not of their concern, so we need to push things
      down a level.
      
      This patch adds a parameter to cpu_register_io_memory that allows a
      device to choose its endianness. For now, all devices simply choose
      native endian, because that's the same behavior as before.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2507c12a
  16. 16 11月, 2010 1 次提交
  17. 21 10月, 2010 1 次提交
  18. 19 6月, 2010 5 次提交
  19. 30 5月, 2010 1 次提交
  20. 22 3月, 2010 1 次提交
  21. 04 3月, 2010 1 次提交
    • J
      KVM: Rework VCPU state writeback API · ea375f9a
      Jan Kiszka 提交于
      This grand cleanup drops all reset and vmsave/load related
      synchronization points in favor of four(!) generic hooks:
      
      - cpu_synchronize_all_states in qemu_savevm_state_complete
        (initial sync from kernel before vmsave)
      - cpu_synchronize_all_post_init in qemu_loadvm_state
        (writeback after vmload)
      - cpu_synchronize_all_post_init in main after machine init
      - cpu_synchronize_all_post_reset in qemu_system_reset
        (writeback after system reset)
      
      These writeback points + the existing one of VCPU exec after
      cpu_synchronize_state map on three levels of writeback:
      
      - KVM_PUT_RUNTIME_STATE (during runtime, other VCPUs continue to run)
      - KVM_PUT_RESET_STATE   (on synchronous system reset, all VCPUs stopped)
      - KVM_PUT_FULL_STATE    (on init or vmload, all VCPUs stopped as well)
      
      This level is passed to the arch-specific VCPU state writing function
      that will decide which concrete substates need to be written. That way,
      no writer of load, save or reset functions that interact with in-kernel
      KVM states will ever have to worry about synchronization again. That
      also means that a lot of reasons for races, segfaults and deadlocks are
      eliminated.
      
      cpu_synchronize_state remains untouched, just as Anthony suggested. We
      continue to need it before reading or writing of VCPU states that are
      also tracked by in-kernel KVM subsystems.
      
      Consequently, this patch removes many cpu_synchronize_state calls that
      are now redundant, just like remaining explicit register syncs.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      ea375f9a
  22. 07 11月, 2009 1 次提交
    • G
      v3: don't call reset functions on cpu initialization · c1699988
      Glauber Costa 提交于
      There is absolutely no need to call reset functions when initializing
      devices. Since we are already registering them, calling qemu_system_reset()
      should suffice. Actually, it is what happens when we reboot the machine,
      and using the same process instead of a special case semantics will even
      allow us to find bugs easier.
      
      Furthermore, the fact that we initialize things like the cpu quite early,
      leads to the need to introduce synchronization stuff like qemu_system_cond.
      This patch removes it entirely. All we need to do is call qemu_system_reset()
      only when we're already sure the system is up and running
      
      I tested it with qemu (with and without io-thread) and qemu-kvm, and it
      seems to be doing okay - although qemu-kvm uses a slightly different patch.
      
      [ v2: user mode still needs cpu_reset, so put it in ifdef. ]
      [ v3: leave qemu_system_cond for now. ]
      Signed-off-by: NGlauber Costa <glommer@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      c1699988
  23. 05 10月, 2009 1 次提交
  24. 02 10月, 2009 2 次提交
  25. 11 9月, 2009 1 次提交
  26. 10 9月, 2009 1 次提交
  27. 28 8月, 2009 2 次提交
  28. 26 8月, 2009 1 次提交
  29. 17 7月, 2009 1 次提交
  30. 30 6月, 2009 1 次提交