History log of /freebsd-current/sys/xen/privcmd.h
Revision Date Author Comments
# 40e1d9d4 01-Nov-2021 Elliott Mitchell <ehem+freebsd@m5p.com>

xen: add SPDX license tags to Xen headers

These are in fact GPLv2 when distributed with the Linux kernel, but the
license also allows MIT if distributed separately. Add the markers to
avoid interference by automated tools.

Differential Revision: https://reviews.freebsd.org/D32796
Reviewed by: royger


# 95ee2897 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 50d7d967 17-Nov-2021 Roger Pau Monné <royger@FreeBSD.org>

xen/privcmd: fix MMAP_RESOURCE ioctl to copy out results

The current definition for the MMAP_RESOURCE ioctl was wrong as it
didn't copy back the result to the caller. Fix the definition and also
remove the bogus attempt to copy the result in the implementation.

Note such copy back is only needed when querying the size of a
resource.

Sponsored by: Citrix Systems R&D


# a7650787 25-Jun-2020 Roger Pau Monne <roger.pau@citrix.com>

xen/privcmd: implement the restrict ioctl

Use an interface compatible with the Linux one so that the user-space
libraries already using the Linux interface can be used without much
modifications.

This allows an open privcmd instance to limit against which domains it
can act upon.

Sponsored by: Citrix Systems R&D


# ed78016d 25-Jun-2020 Roger Pau Monne <roger.pau@citrix.com>

xen/privcmd: implement the dm op ioctl

Use an interface compatible with the Linux one so that the user-space
libraries already using the Linux interface can be used without much
modifications.

This allows user-space to make use of the dm_op family of hypercalls,
which are used by device models.

Sponsored by: Citrix Systems R&D


# 658860e2 23-Jun-2020 Roger Pau Monne <roger.pau@citrix.com>

xen/privcmd: implement the map resource ioctl

The interface is mostly the same as the Linux ioctl, so that we don't
need to modify the user-space libraries that make use of it.

The ioctl is just a proxy for the XENMEM_acquire_resource hypercall.

Sponsored by: Citrix Systems R&D


# bf7313e3 22-Oct-2014 Roger Pau Monné <royger@FreeBSD.org>

xen: implement the privcmd user-space device

This device is only attached to priviledged domains, and allows the
toolstack to interact with Xen. The two functions of the privcmd
interface is to allow the execution of hypercalls from user-space, and
the mapping of foreign domain memory.

Sponsored by: Citrix Systems R&D

i386/include/xen/hypercall.h:
amd64/include/xen/hypercall.h:
- Introduce a function to make generic hypercalls into Xen.

xen/interface/xen.h:
xen/interface/memory.h:
- Import the new hypercall XENMEM_add_to_physmap_range used by
auto-translated guests to map memory from foreign domains.

dev/xen/privcmd/privcmd.c:
- This device has the following functions:
- Allow user-space applications to make hypercalls into Xen.
- Allow user-space applications to map memory from foreign domains,
this is accomplished using the newly introduced hypercall
(XENMEM_add_to_physmap_range).

xen/privcmd.h:
- Public ioctl interface for the privcmd device.

x86/xen/hvm.c:
- Remove declaration of hypercall_page, now it's declared in
hypercall.h.

conf/files:
- Add the privcmd device to the build process.