1. 03 12月, 2010 1 次提交
  2. 30 10月, 2010 1 次提交
  3. 21 10月, 2010 1 次提交
  4. 03 10月, 2010 1 次提交
  5. 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
  6. 28 8月, 2010 1 次提交
    • G
      Fix segfault in mmio subpage handling code. · 95c318f5
      Gleb Natapov 提交于
      It is possible that subpage mmio is registered over existing memory
      page. When this happens "memory" will have real memory address and not
      index into io_mem array so next access to the page will generate
      segfault. It is uncommon to have some part of a page to be accessed as
      memory and some as mmio, but qemu shouldn't crash even when guest does
      stupid things. So lets just pretend that the rest of the page is
      unassigned if guest configure part of the memory page as mmio.
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      95c318f5
  7. 23 8月, 2010 2 次提交
  8. 11 8月, 2010 1 次提交
  9. 22 7月, 2010 1 次提交
  10. 08 7月, 2010 1 次提交
  11. 06 7月, 2010 6 次提交
  12. 01 7月, 2010 1 次提交
  13. 15 6月, 2010 1 次提交
  14. 11 6月, 2010 1 次提交
  15. 09 6月, 2010 1 次提交
  16. 22 5月, 2010 1 次提交
  17. 12 5月, 2010 1 次提交
  18. 08 5月, 2010 1 次提交
  19. 06 5月, 2010 2 次提交
  20. 05 5月, 2010 1 次提交
    • P
      Remove PAGE_RESERVED · 2e9a5713
      Paul Brook 提交于
      The usermode PAGE_RESERVED code is not required by the current mmap
      implementation, and is already broken when guest_base != 0.
      Unfortunately the bsd emulation still uses the old mmap implementation,
      so we can't rip it out altogether.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      2e9a5713
  21. 25 4月, 2010 1 次提交
  22. 12 4月, 2010 1 次提交
  23. 10 4月, 2010 2 次提交
  24. 08 4月, 2010 1 次提交
  25. 05 4月, 2010 1 次提交
    • P
      Split TLB addend and target_phys_addr_t · 355b1943
      Paul Brook 提交于
      Historically the qemu tlb "addend" field was used for both RAM and IO accesses,
      so needed to be able to hold both host addresses (unsigned long) and guest
      physical addresses (target_phys_addr_t).  However since the introduction of
      the iotlb field it has only been used for RAM accesses.
      
      This means we can change the type of addend to unsigned long, and remove
      associated hacks in the big-endian TCG backends.
      
      We can also remove the host dependence from target_phys_addr_t.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      355b1943
  26. 02 4月, 2010 2 次提交
  27. 31 3月, 2010 1 次提交
    • J
      Get bsd-user host page protection code working on FreeBSD hosts · f01576f1
      Juergen Lock 提交于
      Use kinfo_getvmmap(3) on FeeBSD >= 7.x and /compat/linux/proc on older
      FreeBSD.  (kinfo_getvmmap is preferred since /compat/linux/proc is
      usually only mounted on hosts also using the Linuxolator.)
      
      This patch is a bit hacky because the includes needed for kinfo_getvmmap
      conflict with other definitions in exec.c by default so I had to `trick
      around' a little, but I built the result in FreeBSD 6.4-stable and
      7.2-stable tbs and on 8-stable on the host so the hacks at least
      should be stable.  (If this is a problem maybe we could also move the
      kinfo_getvmmap invocations into a seperate source file but that would
      be more work...)
      Signed-off-by: NJuergen Lock <nox@jelal.kn-bremen.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      f01576f1
  28. 30 3月, 2010 1 次提交
  29. 29 3月, 2010 1 次提交
  30. 27 3月, 2010 1 次提交
  31. 17 3月, 2010 1 次提交
    • P
      Large page TLB flush · d4c430a8
      Paul Brook 提交于
      QEMU uses a fixed page size for the CPU TLB.  If the guest uses large
      pages then we effectively split these into multiple smaller pages, and
      populate the corresponding TLB entries on demand.
      
      When the guest invalidates the TLB by virtual address we must invalidate
      all entries covered by the large page.  However the address used to
      invalidate the entry may not be present in the QEMU TLB, so we do not
      know which regions to clear.
      
      Implementing a full vaiable size TLB is hard and slow, so just keep a
      simple address/mask pair to record which addresses may have been mapped by
      large pages.  If the guest invalidates this region then flush the
      whole TLB.
      Signed-off-by: NPaul Brook <paul@codesourcery.com>
      d4c430a8