1. 03 12月, 2010 1 次提交
  2. 21 10月, 2010 1 次提交
  3. 25 9月, 2010 1 次提交
    • A
      Introduce qemu_madvise() · e78815a5
      Andreas Färber 提交于
      vl.c has a Sun-specific hack to supply a prototype for madvise(),
      but the call site has apparently moved to arch_init.c.
      
      Haiku doesn't implement madvise() in favor of posix_madvise().
      OpenBSD and Solaris 10 don't implement posix_madvise() but madvise().
      MinGW implements neither.
      
      Check for madvise() and posix_madvise() in configure and supply qemu_madvise()
      as wrapper. Prefer madvise() over posix_madvise() due to flag availability.
      Convert all callers to use qemu_madvise() and QEMU_MADV_*.
      
      Note that on Solaris the warning is fixed by moving the madvise() prototype,
      not by qemu_madvise() itself. It helps with porting though, and it simplifies
      most call sites.
      
      v7 -> v8:
      * Some versions of MinGW have no sys/mman.h header. Reported by Blue Swirl.
      
      v6 -> v7:
      * Adopt madvise() rather than posix_madvise() semantics for returning errors.
      * Use EINVAL in place of ENOTSUP.
      
      v5 -> v6:
      * Replace two leftover instances of POSIX_MADV_NORMAL with QEMU_MADV_INVALID.
        Spotted by Blue Swirl.
      
      v4 -> v5:
      * Introduce QEMU_MADV_INVALID, suggested by Alexander Graf.
        Note that this relies on -1 not being a valid advice value.
      
      v3 -> v4:
      * Eliminate #ifdefs at qemu_advise() call sites. Requested by Blue Swirl.
        This will currently break the check in kvm-all.c by calling madvise() with
        a supported flag, which will not fail. Ideas/patches welcome.
      
      v2 -> v3:
      * Reuse the *_MADV_* defines for QEMU_MADV_*. Suggested by Alexander Graf.
      * Add configure check for madvise(), too.
        Add defines to Makefile, not QEMU_CFLAGS.
        Convert all callers, untested. Suggested by Blue Swirl.
      * Keep Solaris' madvise() prototype around. Pointed out by Alexander Graf.
      * Display configure check results.
      
      v1 -> v2:
      * Don't rely on posix_madvise() availability, add qemu_madvise().
        Suggested by Blue Swirl.
      Signed-off-by: NAndreas Färber <afaerber@opensolaris.org>
      Cc: Blue Swirl <blauwirbel@gmail.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      e78815a5
  4. 11 8月, 2010 1 次提交
  5. 05 8月, 2010 2 次提交
  6. 22 7月, 2010 1 次提交
  7. 29 6月, 2010 2 次提交
  8. 12 5月, 2010 4 次提交
  9. 29 4月, 2010 1 次提交
  10. 26 4月, 2010 2 次提交
  11. 20 4月, 2010 1 次提交
  12. 18 4月, 2010 1 次提交
    • B
      kvm: avoid collision with dprintf macro in stdio.h, spotted by clang · 8c0d577e
      Blue Swirl 提交于
      Fixes clang errors:
        CC    i386-softmmu/kvm.o
      /src/qemu/target-i386/kvm.c:40:9: error: 'dprintf' macro redefined
      In file included from /src/qemu/target-i386/kvm.c:21:
      In file included from /src/qemu/qemu-common.h:27:
      In file included from /usr/include/stdio.h:910:
      /usr/include/bits/stdio2.h:189:12: note: previous definition is here
        CC    i386-softmmu/kvm-all.o
      /src/qemu/kvm-all.c:39:9: error: 'dprintf' macro redefined
      In file included from /src/qemu/kvm-all.c:23:
      In file included from /src/qemu/qemu-common.h:27:
      In file included from /usr/include/stdio.h:910:
      /usr/include/bits/stdio2.h:189:12: note: previous definition is here
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      8c0d577e
  13. 02 4月, 2010 2 次提交
  14. 30 3月, 2010 1 次提交
  15. 04 3月, 2010 2 次提交
    • 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
    • J
      KVM: Rework of guest debug state writing · b0b1d690
      Jan Kiszka 提交于
      So far we synchronized any dirty VCPU state back into the kernel before
      updating the guest debug state. This was a tribute to a deficite in x86
      kernels before 2.6.33. But as this is an arch-dependent issue, it is
      better handle in the x86 part of KVM and remove the writeback point for
      generic code. This also avoids overwriting the flushed state later on if
      user space decides to change some more registers before resuming the
      guest.
      
      We furthermore need to reinject guest exceptions via the appropriate
      mechanism. That is KVM_SET_GUEST_DEBUG for older kernels and
      KVM_SET_VCPU_EVENTS for recent ones. Using both mechanisms at the same
      time will cause state corruptions.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      b0b1d690
  16. 23 2月, 2010 1 次提交
  17. 22 2月, 2010 2 次提交
  18. 11 2月, 2010 1 次提交
  19. 10 2月, 2010 2 次提交
  20. 04 2月, 2010 2 次提交
    • J
      KVM: Move and rename regs_modified · 9ded2744
      Jan Kiszka 提交于
      Touching the user space representation of KVM's VCPU state is -
      naturally - a per-VCPU thing. So move the dirty flag into KVM_CPU_COMMON
      and rename it at this chance to reflect its true meaning.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      9ded2744
    • S
      kvm: Flush coalesced MMIO buffer periodly · 62a2744c
      Sheng Yang 提交于
      The default action of coalesced MMIO is, cache the writing in buffer, until:
      1. The buffer is full.
      2. Or the exit to QEmu due to other reasons.
      
      But this would result in a very late writing in some condition.
      1. The each time write to MMIO content is small.
      2. The writing interval is big.
      3. No need for input or accessing other devices frequently.
      
      This issue was observed in a experimental embbed system. The test image
      simply print "test" every 1 seconds. The output in QEmu meets expectation,
      but the output in KVM is delayed for seconds.
      
      Per Avi's suggestion, I hooked flushing coalesced MMIO buffer in VGA update
      handler. By this way, We don't need vcpu explicit exit to QEmu to
      handle this issue.
      Signed-off-by: NSheng Yang <sheng@linux.intel.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      62a2744c
  21. 04 12月, 2009 2 次提交
  22. 17 11月, 2009 1 次提交
  23. 13 11月, 2009 1 次提交
  24. 12 10月, 2009 1 次提交
  25. 05 10月, 2009 2 次提交
  26. 02 10月, 2009 2 次提交