1. 18 5月, 2009 1 次提交
  2. 14 5月, 2009 1 次提交
  3. 11 5月, 2009 4 次提交
    • D
      c416daa9
    • D
      intel-iommu: Fix tiny theoretical race in write-buffer flush. · 462b60f6
      David Woodhouse 提交于
      In iommu_flush_write_buffer() we read iommu->gcmd before taking the
      register_lock, and then we mask in the WBF bit and write it to the
      register.
      
      There is a tiny chance that something else could have _changed_
      iommu->gcmd before we take the lock, but after we read it. So we could
      be undoing that change.
      
      Never actually going to have happened in practice, since nothing else
      changes that register at runtime -- aside from the write-buffer flush
      it's only ever touched at startup for enabling translation, etc.
      
      But worth fixing anyway.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      462b60f6
    • D
      intel-iommu: Clean up handling of "caching mode" vs. IOTLB flushing. · 1f0ef2aa
      David Woodhouse 提交于
      As we just did for context cache flushing, clean up the logic around
      whether we need to flush the iotlb or just the write-buffer, depending
      on caching mode.
      
      Fix the same bug in qi_flush_iotlb() that qi_flush_context() had -- it
      isn't supposed to be returning an error; it's supposed to be returning a
      flag which triggers a write-buffer flush.
      
      Remove some superfluous conditional write-buffer flushes which could
      never have happened because they weren't for non-present-to-present
      mapping changes anyway.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      1f0ef2aa
    • D
      intel-iommu: Clean up handling of "caching mode" vs. context flushing. · 4c25a2c1
      David Woodhouse 提交于
      It really doesn't make a lot of sense to have some of the logic to
      handle caching vs. non-caching mode duplicated in qi_flush_context() and
      __iommu_flush_context(), while the return value indicates whether the
      caller should take other action which depends on the same thing.
      
      Especially since qi_flush_context() thought it was returning something
      entirely different anyway.
      
      This patch makes qi_flush_context() and __iommu_flush_context() both
      return void, removes the 'non_present_entry_flush' argument and makes
      the only call site which _set_ that argument to 1 do the right thing.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      4c25a2c1
  4. 10 5月, 2009 1 次提交
  5. 01 5月, 2009 1 次提交
  6. 29 4月, 2009 1 次提交
    • F
      Intel IOMMU Pass Through Support · 4ed0d3e6
      Fenghua Yu 提交于
      The patch adds kernel parameter intel_iommu=pt to set up pass through
      mode in context mapping entry. This disables DMAR in linux kernel; but
      KVM still runs on VT-d and interrupt remapping still works.
      
      In this mode, kernel uses swiotlb for DMA API functions but other VT-d
      functionalities are enabled for KVM. KVM always uses multi level
      translation page table in VT-d. By default, pass though mode is disabled
      in kernel.
      
      This is useful when people don't want to enable VT-d DMAR in kernel but
      still want to use KVM and interrupt remapping for reasons like DMAR
      performance concern or debug purpose.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      Acked-by: NWeidong Han <weidong@intel.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      4ed0d3e6
  7. 22 4月, 2009 17 次提交
  8. 20 4月, 2009 9 次提交
  9. 19 4月, 2009 3 次提交
    • M
      virtio: fix suspend when using virtio_balloon · 84a139a9
      Marcelo Tosatti 提交于
      Break out of wait_event_interruptible() if freezing has been requested,
      in the vballoon thread. Without this change vballoon refuses to stop and
      the system can't suspend.
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: stable@kernel.org
      84a139a9
    • R
      lguest: fix guest crash on non-linear addresses in gdt pvops · a489f0b5
      Rusty Russell 提交于
      Fixes guest crash 'lguest: bad read address 0x4800000 len 256'
      
      The new per-cpu allocator ends up handing a non-linear address to
      write_gdt_entry.  We do __pa() on it, and hand it to the host, which
      kills us.
      
      I've long wanted to make the hypercall "LOAD_GDT_ENTRY" to match the IDT
      code, but had no pressing reason until now.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: lguest@ozlabs.org
      a489f0b5
    • M
      lguest: fix crash on vmlinux images · 88df781a
      Matias Zabaljauregui 提交于
      Typical message: 'lguest: unhandled trap 6 at 0x418726 (0x0)'
      
      vmlinux guests were broken by 4cd8b5e2
      'lguest: use KVM hypercalls', which rewrites guest text from kvm hypercalls
      to trap 31.
      
      The Launcher mmaps the kernel image.  The Guest executes and
      immediately faults in the first text page (read-only).  Then it hits a
      hypercall, and we rewrite that hypercall, causing a copy-on-write.
      But the Guest pagetables still refer to the old page: we fault again,
      but as Host we see the hypercall already rewritten, and pass the fault
      back to the Guest.  The Guest hasn't set up an IDT yet, so we kill it.
      
      This doesn't happen with bzImages: they unpack themselves and so the
      text pages are already read-write.
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Tested-by: NPatrick McHardy <kaber@trash.net>
      88df781a
  10. 18 4月, 2009 2 次提交