[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 0/4] introduce XENMEM_exchange_and_pin and XENMEM_unpin

Hi all,
this patch series introduces two new hypercalls to allow autotranslate
guests to allocate a contiguous buffer in machine addresses.
The XENMEM_exchange_and_pin returns the mfns and makes sure to pin the
pages so that the hypervisor won't change their p2m mappings while in
XENMEM_unpin simply unpins the pages.



Changes in v4:
- move steal_page to common code;
- introduce a generic p2m walker and use it in p2m_lookup,
  guest_physmap_pin_range and guest_physmap_unpin_range;
- return -EINVAL when the P2M_DMA_PIN check fails;
- change the printk into a gdprintk;
- add a comment on what type of page can be pinned;
- rename XENMEM_get_dma_buf to XENMEM_exchange_and_pin;
- rename XENMEM_get_dma_buf to XENMEM_unpin;
- move the pinning before we copy back the mfn to the guest;
- propagate errors returned by guest_physmap_pin_range;
- use xen_memory_exchange_t as parameter for XENMEM_exchange_and_pin;
- use an unsigned iterator in unpin;
- improve the documentation of the new hypercalls;
- add a note about out.address_bits for XENMEM_exchange.

Changes in v3:
- implement guest_physmap_pin_range and guest_physmap_unpin_range on
- implement XENMEM_put_dma_buf.

Changes in v2:
- actually don't print the warning more than once.

Stefano Stabellini (4):
      xen/arm: implement steal_page
      xen/arm: introduce a generic p2m walker and use it in p2m_lookup
      xen: implement guest_physmap_(un)pin_range
      xen: introduce XENMEM_exchange_and_pin and XENMEM_unpin

 xen/arch/arm/mm.c           |    6 --
 xen/arch/arm/p2m.c          |  147 +++++++++++++++++++++++++++++++++++-------
 xen/arch/x86/mm.c           |   49 --------------
 xen/common/memory.c         |  116 +++++++++++++++++++++++++++++++++-
 xen/include/asm-arm/mm.h    |    6 +-
 xen/include/asm-arm/page.h  |    7 ++-
 xen/include/asm-x86/mm.h    |    2 -
 xen/include/asm-x86/p2m.h   |   12 ++++
 xen/include/public/memory.h |   38 +++++++++++
 xen/include/xen/mm.h        |    1 +
 10 files changed, 297 insertions(+), 87 deletions(-)

git://xenbits.xen.org/people/sstabellini/xen-unstable.git exchange_and_pin_3

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.