1. 28 7月, 2012 2 次提交
  2. 10 7月, 2012 1 次提交
    • J
      apic: Defer interrupt updates to VCPU thread · 5d62c43a
      Jan Kiszka 提交于
      KVM performs TPR raising asynchronously to QEMU, specifically outside
      QEMU's global lock. When an interrupt is injected into the APIC and TPR
      is checked to decide if this can be delivered, a stale TPR value may be
      used, causing spurious interrupts in the end.
      
      Fix this by deferring apic_update_irq to the context of the target VCPU.
      We introduce a new interrupt flag for this, CPU_INTERRUPT_POLL. When it
      is set, the VCPU calls apic_poll_irq before checking for further pending
      interrupts. To avoid special-casing KVM, we also implement this logic
      for TCG mode.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      5d62c43a
  3. 29 6月, 2012 1 次提交
    • B
      x86: avoid AREG0 for exceptions · 77b2bc2c
      Blue Swirl 提交于
      Add an explicit CPUX86State parameter instead of relying on AREG0.
      
      Merge raise_exception_env() to raise_exception(), likewise with
      raise_exception_err_env() and raise_exception_err().
      
      Introduce cpu_svm_check_intercept_param() and cpu_vmexit()
      as wrappers.
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      77b2bc2c
  4. 15 6月, 2012 1 次提交
  5. 05 6月, 2012 2 次提交
  6. 16 4月, 2012 1 次提交
  7. 30 3月, 2012 1 次提交
    • A
      qtest: add test framework · c7f0f3b1
      Anthony Liguori 提交于
      The idea behind qtest is pretty simple.  Instead of executing a CPU via TCG or
      KVM, rely on an external process to send events to the device model that the CPU
      would normally generate.
      
      qtest presents itself as an accelerator.  In addition, a new option is added to
      establish a qtest server (-qtest) that takes a character device.  This is what
      allows the external process to send CPU events to the device model.
      
      qtest uses a simple line based protocol to send the events.  Documentation of
      that protocol is in qtest.c.
      
      I considered reusing the monitor for this job.  Adding interrupts would be a bit
      difficult.  In addition, logging would also be difficult.
      
      qtest has extensive logging support.  All protocol commands are logged with
      time stamps using a new command line option (-qtest-log).  Logging is important
      since ultimately, this is a feature for debugging.
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      c7f0f3b1
  8. 17 3月, 2012 1 次提交
    • S
      w64: Fix data type of next_tb and tcg_qemu_tb_exec · 69784eae
      Stefan Weil 提交于
      next_tb is the numeric value of a tcg target (= QEMU host) address.
      
      Using tcg_target_ulong instead of unsigned long shows this and makes
      the code portable for hosts with an unusual size of long (w64).
      
      The type cast '(long)(next_tb & ~3)' was not needed (casting
      unsigned long to long does not change the bits, and nor does
      casting long to pointer for most (= all non w64) hosts.
      It is removed here.
      
      Macro or function tcg_qemu_tb_exec is used to set next_tb.
      The function also returns next_tb. Therefore tcg_qemu_tb_exec
      must return a tcg_target_ulong.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      69784eae
  9. 15 3月, 2012 3 次提交
  10. 10 2月, 2012 1 次提交
  11. 06 10月, 2011 1 次提交
    • E
      PPC: Fix sync instructions problem in SMP · 4e85f82c
      Elie Richa 提交于
      In the current emulation of the load-and-reserve (lwarx) and
      store-conditional (stwcx.) instructions, the internal reservation
      mechanism is taken into account, however each CPU has its own
      reservation information and this information is not synchronized between
      CPUs to perform proper synchronization.
      The following test case with 2 CPUs shows that the semantics of the
      "lwarx" and "stwcx." instructions are not preserved by the emulation.
      The test case does the following :
      	- CPU0: reserve a memory location
      	- CPU1: reserve the same memory location
      	- CPU0: perform stwcx. on the location
      The last store-conditional operation succeeds while it is supposed to
      fail since the reservation was supposed to be lost at the second reserve
      operation.
      
      This (one line) patch fixes this problem in a very simple manner by
      removing the reservation of a CPU every time it is scheduled (in
      cpu_exec()). While this is a harsh workaround, it does not affect the
      guest code much because reservations are usually held for a very short
      time, that is an lwarx is almost always followed by an stwcx. a few
      instructions below. Therefore, in most cases, the reservation will be
      taken and consumed before a CPU switch occurs. However in the rare case
      where a CPU switch does occur between the lwarx and its corresponding
      stwcx.  this patch solves a potential erroneous behavior of the
      synchronization instructions.
      Signed-off-by: NElie Richa <richa@adacore.com>
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      4e85f82c
  12. 11 9月, 2011 2 次提交
  13. 10 9月, 2011 1 次提交
  14. 13 7月, 2011 1 次提交
  15. 27 6月, 2011 6 次提交
  16. 21 6月, 2011 1 次提交
  17. 01 6月, 2011 1 次提交
  18. 28 5月, 2011 2 次提交
  19. 22 5月, 2011 1 次提交
  20. 09 5月, 2011 2 次提交
  21. 08 5月, 2011 2 次提交
  22. 20 4月, 2011 1 次提交
  23. 19 4月, 2011 1 次提交
  24. 13 4月, 2011 1 次提交
  25. 16 3月, 2011 1 次提交
  26. 13 3月, 2011 1 次提交
  27. 07 3月, 2011 1 次提交