1. 20 7月, 2008 8 次提交
  2. 25 6月, 2008 1 次提交
  3. 04 5月, 2008 5 次提交
  4. 27 4月, 2008 23 次提交
  5. 17 4月, 2008 1 次提交
  6. 31 1月, 2008 2 次提交
    • S
      KVM: x86 emulator: Only allow VMCALL/VMMCALL trapped by #UD · 571008da
      Sheng Yang 提交于
      When executing a test program called "crashme", we found the KVM guest cannot
      survive more than ten seconds, then encounterd kernel panic. The basic concept
      of "crashme" is generating random assembly code and trying to execute it.
      
      After some fixes on emulator insn validity judgment, we found it's hard to
      get the current emulator handle the invalid instructions correctly, for the
      #UD trap for hypercall patching caused troubles. The problem is, if the opcode
      itself was OK, but combination of opcode and modrm_reg was invalid, and one
      operand of the opcode was memory (SrcMem or DstMem), the emulator will fetch
      the memory operand first rather than checking the validity, and may encounter
      an error there. For example, ".byte 0xfe, 0x34, 0xcd" has this problem.
      
      In the patch, we simply check that if the invalid opcode wasn't vmcall/vmmcall,
      then return from emulate_instruction() and inject a #UD to guest. With the
      patch, the guest had been running for more than 12 hours.
      Signed-off-by: NFeng (Eric) Liu <eric.e.liu@intel.com>
      Signed-off-by: NSheng Yang <sheng.yang@intel.com>
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      571008da
    • A
      KVM: MMU: Avoid calling gfn_to_page() in mmu_set_spte() · d7824fff
      Avi Kivity 提交于
      Since gfn_to_page() is a sleeping function, and we want to make the core mmu
      spinlocked, we need to pass the page from the walker context (which can sleep)
      to the shadow context (which cannot).
      
      [marcelo: avoid recursive locking of mmap_sem]
      Signed-off-by: NAvi Kivity <avi@qumranet.com>
      d7824fff