search for: xc_gnttab_open

Displaying 8 results from an estimated 8 matches for "xc_gnttab_open".

2012 Dec 13
3
[PATCH] xenconsoled: use grant references instead of map_foreign_range
...etpagesize()); - d->interface = NULL; + domain_unmap_interface(d); if (d->xce_handle != NULL) xc_evtchn_close(d->xce_handle); d->xce_handle = NULL; @@ -736,6 +757,13 @@ void enum_domains(void) xc_dominfo_t dominfo; struct domain *dom; + if (enum_pass == 0) { + xcg_handle = xc_gnttab_open(NULL, 0); + if (xcg_handle == NULL) { + dolog(LOG_DEBUG, "Failed to open xcg handle: %d (%s)", + errno, strerror(errno)); + } + } enum_pass++; while (xc_domain_getinfo(xc, domid, 1, &dominfo) == 1) { @@ -946,6 +974,7 @@ void handle_io(void) errno, strerror(err...
2007 Mar 19
0
[PATCH 2/3] [RFC] User-space grant table device - changes to libxc
...xen/memory.h> #include <xen/sys/evtchn.h> +#include <xen/sys/gntdev.h> #include <unistd.h> #include <fcntl.h> @@ -361,6 +362,143 @@ void discard_file_cache(int fd, int flus out: errno = saved_errno; +} + +#define GNTTAB_DEV_NAME "/dev/xen/gntdev" + +int xc_gnttab_open(void) +{ + struct stat st; + int fd; + int devnum; + + devnum = xc_find_device_number("gntdev"); + + /* Make sure any existing device file links to correct device. */ + if ( (lstat(GNTTAB_DEV_NAME, &st) != 0) || !S_ISCHR(st.st_mode) || + (st.st_rdev != devnum...
2008 Jul 11
1
Question about using xenctl
...ment) Open xcg_handle Error! [root@vm1 program]# ======= Source code: #include <stdio.h> #include <stdint.h> #include <time.h> #include <sys/select.h> #include <xenctrl.h> #include <sys/mman.h> int main(void) { int xcg_handle; xcg_handle = xc_gnttab_open(); if(xcg_handle == -1) { printf("Open xcg_handle Error!\n"); return -1; } else printf("Open xcg_handle Success!\n"); void* start_address; start_address = xc_gnttab_map_grant_ref(xcg_han...
2012 Apr 17
2
[PATCH BUILD FIX 0/2] build xc_hvm_inject_msi on Xen < 4.2
Hi all, this small patch series fixes the build breakage introduced by f1dbf015dfb0aa7f66f710a1f1bc58b662951de2 with Xen < 4.2. The problem is that xc_hvm_inject_msi is only defined from Xen 4.2 onwards so we need to provide a compatibility function for older Xen versions. Stefano Stabellini (2): xen,configure: detect Xen 4.2 xen: add a dummy xc_hvm_inject_msi for Xen < 4.2
2013 Jan 10
10
[PATCH v2 1/2] xenconsoled: use grant references instead of map_foreign_range
...; d->xce_handle = NULL; @@ -730,7 +752,7 @@ static void shutdown_domain(struct domain *d) static unsigned enum_pass = 0; -void enum_domains(void) +static void enum_domains(void) { int domid = 1; xc_dominfo_t dominfo; @@ -957,6 +979,14 @@ void handle_io(void) } } + xcg_handle = xc_gnttab_open(NULL, 0); + if (xcg_handle == NULL) { + dolog(LOG_DEBUG, "Failed to open xcg handle: %d (%s)", + errno, strerror(errno)); + } + + enum_domains(); + for (;;) { struct domain *d, *n; int max_fd = -1; @@ -1097,6 +1127,10 @@ void handle_io(void) xc_evtchn_close(xce_handle);...
2013 Jul 15
6
[PATCH 0 of 6 RESEND v2] blktap3/sring: shared ring between tapdisk and the front-end
This patch series introduces the shared ring used by the front-end to pass request descriptors to tapdisk, as well as responses from tapdisk to the front-end. Requests from this ring end up in tapdisk''s standard request queue. When the tapback daemon detects that the front-end tries to connect to the back-end, it spawns a tapdisk and tells it to connect to the shared ring. The shared
2010 Aug 12
59
[PATCH 00/15] RFC xen device model support
Hi all, this is the long awaited patch series to add xen device model support in qemu; the main author is Anthony Perard. Developing this series we tried to come up with the cleanest possible solution from the qemu point of view, limiting the amount of changes to common code as much as possible. The end result still requires a couple of hooks in piix_pci but overall the impact should be very
2012 Jan 25
26
[PATCH v4 00/23] Xenstore stub domain
Changes from v3: - mini-os configuration files moved into stubdom/ - mini-os extra console support now a config option - Fewer #ifdefs - grant table setup uses hypercall bounce - Xenstore stub domain syslog support re-enabled Changes from v2: - configuration support added to mini-os build system - add mini-os support for conditionally compiling frontends, xenbus -