1. 16 7月, 2007 9 次提交
  2. 03 5月, 2007 3 次提交
    • A
      KVM: Per-vcpu statistics · 1165f5fe
      Avi Kivity 提交于
      Make the exit statistics per-vcpu instead of global.  This gives a 3.5%
      boost when running one virtual machine per core on my two socket dual core
      (4 cores total) machine.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      1165f5fe
    • A
      KVM: MMU: Fix hugepage pdes mapping same physical address with different access · d28c6cfb
      Avi Kivity 提交于
      The kvm mmu keeps a shadow page for hugepage pdes; if several such pdes map
      the same physical address, they share the same shadow page.  This is a fairly
      common case (kernel mappings on i386 nonpae Linux, for example).
      
      However, if the two pdes map the same memory but with different permissions, kvm
      will happily use the cached shadow page.  If the access through the more
      permissive pde will occur after the access to the strict pde, an endless pagefault
      loop will be generated and the guest will make no progress.
      
      Fix by making the access permissions part of the cache lookup key.
      
      The fix allows Xen pae to boot on kvm and run guest domains.
      
      Thanks to Jeremy Fitzhardinge for reporting the bug and testing the fix.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      d28c6cfb
    • A
      KVM: MMU: Remove unnecessary check for pdptr access · ca5aac1f
      Avi Kivity 提交于
      We already special case the pdptr access, so no need to check it again.
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      ca5aac1f
  3. 04 3月, 2007 2 次提交
  4. 13 2月, 2007 1 次提交
  5. 27 1月, 2007 2 次提交
  6. 23 1月, 2007 1 次提交
    • A
      [PATCH] KVM: fix bogus pagefault on writable pages · fc3dffe1
      Avi Kivity 提交于
      If a page is marked as dirty in the guest pte, set_pte_common() can set the
      writable bit on newly-instantiated shadow pte.  This optimization avoids
      a write fault after the initial read fault.
      
      However, if a write fault instantiates the pte, fix_write_pf() incorrectly
      reports the fault as a guest page fault, and the guest oopses on what appears
      to be a correctly-mapped page.
      
      Fix is to detect the condition and only report a guest page fault on a user
      access to a kernel page.
      
      With the fix, a kvm guest can survive a whole night of running the kernel
      hacker's screensaver (make -j9 in a loop).
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fc3dffe1
  7. 06 1月, 2007 15 次提交
  8. 31 12月, 2006 1 次提交
  9. 14 12月, 2006 1 次提交
  10. 11 12月, 2006 1 次提交
    • A
      [PATCH] kvm: userspace interface · 6aa8b732
      Avi Kivity 提交于
      web site: http://kvm.sourceforge.net
      
      mailing list: kvm-devel@lists.sourceforge.net
        (http://lists.sourceforge.net/lists/listinfo/kvm-devel)
      
      The following patchset adds a driver for Intel's hardware virtualization
      extensions to the x86 architecture.  The driver adds a character device
      (/dev/kvm) that exposes the virtualization capabilities to userspace.  Using
      this driver, a process can run a virtual machine (a "guest") in a fully
      virtualized PC containing its own virtual hard disks, network adapters, and
      display.
      
      Using this driver, one can start multiple virtual machines on a host.
      
      Each virtual machine is a process on the host; a virtual cpu is a thread in
      that process.  kill(1), nice(1), top(1) work as expected.  In effect, the
      driver adds a third execution mode to the existing two: we now have kernel
      mode, user mode, and guest mode.  Guest mode has its own address space mapping
      guest physical memory (which is accessible to user mode by mmap()ing
      /dev/kvm).  Guest mode has no access to any I/O devices; any such access is
      intercepted and directed to user mode for emulation.
      
      The driver supports i386 and x86_64 hosts and guests.  All combinations are
      allowed except x86_64 guest on i386 host.  For i386 guests and hosts, both pae
      and non-pae paging modes are supported.
      
      SMP hosts and UP guests are supported.  At the moment only Intel
      hardware is supported, but AMD virtualization support is being worked on.
      
      Performance currently is non-stellar due to the naive implementation of the
      mmu virtualization, which throws away most of the shadow page table entries
      every context switch.  We plan to address this in two ways:
      
      - cache shadow page tables across tlb flushes
      - wait until AMD and Intel release processors with nested page tables
      
      Currently a virtual desktop is responsive but consumes a lot of CPU.  Under
      Windows I tried playing pinball and watching a few flash movies; with a recent
      CPU one can hardly feel the virtualization.  Linux/X is slower, probably due
      to X being in a separate process.
      
      In addition to the driver, you need a slightly modified qemu to provide I/O
      device emulation and the BIOS.
      
      Caveats (akpm: might no longer be true):
      
      - The Windows install currently bluescreens due to a problem with the
        virtual APIC.  We are working on a fix.  A temporary workaround is to
        use an existing image or install through qemu
      - Windows 64-bit does not work.  That's also true for qemu, so it's
        probably a problem with the device model.
      
      [bero@arklinux.org: build fix]
      [simon.kagstrom@bth.se: build fix, other fixes]
      [uril@qumranet.com: KVM: Expose interrupt bitmap]
      [akpm@osdl.org: i386 build fix]
      [mingo@elte.hu: i386 fixes]
      [rdreier@cisco.com: add log levels to all printks]
      [randy.dunlap@oracle.com: Fix sparse NULL and C99 struct init warnings]
      [anthony@codemonkey.ws: KVM: AMD SVM: 32-bit host support]
      Signed-off-by: NYaniv Kamay <yaniv@qumranet.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      Cc: Simon Kagstrom <simon.kagstrom@bth.se>
      Cc: Bernhard Rosenkraenzer <bero@arklinux.org>
      Signed-off-by: NUri Lublin <uril@qumranet.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Roland Dreier <rolandd@cisco.com>
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAnthony Liguori <anthony@codemonkey.ws>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6aa8b732