git: 5489d7e93a06 - main - xen: bump used interface version
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Mar 2023 16:14:31 UTC
The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=5489d7e93a06fbb5d06d6d7e43a4c56f1571c891 commit 5489d7e93a06fbb5d06d6d7e43a4c56f1571c891 Author: Roger Pau Monné <royger@FreeBSD.org> AuthorDate: 2022-11-21 15:21:16 +0000 Commit: Roger Pau Monné <royger@FreeBSD.org> CommitDate: 2023-03-09 16:13:17 +0000 xen: bump used interface version This is required for a further change that will make use of a field that was added in version 0x00040d00. No functional change expected. Sponsored by: Citrix Systems R&D --- sys/dev/xen/balloon/balloon.c | 2 -- sys/dev/xen/grant_table/grant_table.c | 4 ++-- sys/dev/xen/privcmd/privcmd.c | 6 +++--- sys/x86/xen/xen_intr.c | 3 +++ sys/xen/xen-os.h | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sys/dev/xen/balloon/balloon.c b/sys/dev/xen/balloon/balloon.c index 9fb3164cab7a..02dac3dfe757 100644 --- a/sys/dev/xen/balloon/balloon.c +++ b/sys/dev/xen/balloon/balloon.c @@ -155,7 +155,6 @@ increase_reservation(unsigned long nr_pages) vm_page_t page; long rc; struct xen_memory_reservation reservation = { - .address_bits = 0, .extent_order = 0, .domid = DOMID_SELF }; @@ -217,7 +216,6 @@ decrease_reservation(unsigned long nr_pages) int need_sleep = 0; int ret __diagused; struct xen_memory_reservation reservation = { - .address_bits = 0, .extent_order = 0, .domid = DOMID_SELF }; diff --git a/sys/dev/xen/grant_table/grant_table.c b/sys/dev/xen/grant_table/grant_table.c index 11e5071c7b0b..fdbec8ac14e8 100644 --- a/sys/dev/xen/grant_table/grant_table.c +++ b/sys/dev/xen/grant_table/grant_table.c @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); /* External tools reserve first few grant table entries. */ #define NR_RESERVED_ENTRIES 8 -#define GREFS_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_t)) +#define GREFS_PER_GRANT_FRAME (PAGE_SIZE / sizeof(grant_entry_v1_t)) static grant_ref_t **gnttab_list; static unsigned int nr_grant_frames; @@ -59,7 +59,7 @@ static struct resource *gnttab_pseudo_phys_res; /* Resource id for allocated physical address space. */ static int gnttab_pseudo_phys_res_id; -static grant_entry_t *shared; +static grant_entry_v1_t *shared; static struct gnttab_free_callback *gnttab_free_callback_list = NULL; diff --git a/sys/dev/xen/privcmd/privcmd.c b/sys/dev/xen/privcmd/privcmd.c index 459ac8bbe951..614ee8554a71 100644 --- a/sys/dev/xen/privcmd/privcmd.c +++ b/sys/dev/xen/privcmd/privcmd.c @@ -315,7 +315,7 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, } case IOCTL_PRIVCMD_MMAPBATCH: { struct ioctl_privcmd_mmapbatch *mmap; - struct xen_add_to_physmap_range add; + struct xen_add_to_physmap_batch add; xen_ulong_t *idxs; xen_pfn_t *gpfns; int *errs; @@ -338,7 +338,7 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, add.domid = DOMID_SELF; add.space = XENMAPSPACE_gmfn_foreign; - add.foreign_domid = mmap->dom; + add.u.foreign_domid = mmap->dom; /* * The 'size' field in the xen_add_to_physmap_range only @@ -370,7 +370,7 @@ privcmd_ioctl(struct cdev *dev, unsigned long cmd, caddr_t arg, bzero(errs, sizeof(*errs) * num); error = HYPERVISOR_memory_op( - XENMEM_add_to_physmap_range, &add); + XENMEM_add_to_physmap_batch, &add); if (error != 0) { error = xen_translate_error(error); goto mmap_out; diff --git a/sys/x86/xen/xen_intr.c b/sys/x86/xen/xen_intr.c index b9a909a14a67..262df1cefeea 100644 --- a/sys/x86/xen/xen_intr.c +++ b/sys/x86/xen/xen_intr.c @@ -71,6 +71,9 @@ __FBSDID("$FreeBSD$"); #include <ddb/ddb.h> #endif +/* The code below is the implementation of 2L event channels. */ +#define NR_EVENT_CHANNELS EVTCHN_2L_NR_CHANNELS + static MALLOC_DEFINE(M_XENINTR, "xen_intr", "Xen Interrupt Services"); static u_int first_evtchn_irq; diff --git a/sys/xen/xen-os.h b/sys/xen/xen-os.h index 183724be9749..e1d03b7322bc 100644 --- a/sys/xen/xen-os.h +++ b/sys/xen/xen-os.h @@ -30,7 +30,7 @@ #ifndef _XEN_XEN_OS_H_ #define _XEN_XEN_OS_H_ -#define __XEN_INTERFACE_VERSION__ 0x00030208 +#define __XEN_INTERFACE_VERSION__ 0x00040d00 #define GRANT_REF_INVALID 0xffffffff