search for: xc_handle

Displaying 20 results from an estimated 65 matches for "xc_handle".

2012 Sep 14
1
[PATCH] xenpm: make argument parsing and error handling more consistent
...n exit code of zero only in the (partial) success case (there may still be a small number of questionable cases). Signed-off-by: Jan Beulich <jbeulich@suse.com> --- a/tools/misc/xenpm.c +++ b/tools/misc/xenpm.c @@ -36,7 +36,7 @@ #define CPUFREQ_TURBO_ENABLED 1 static xc_interface *xc_handle; -static int max_cpu_nr; +static unsigned int max_cpu_nr; /* help message */ void show_help(void) @@ -77,6 +77,33 @@ void help_func(int argc, char *argv[]) show_help(); } +static void parse_cpuid(const char *arg, int *cpuid) +{ + if ( sscanf(arg, "%d", cpuid) != 1 || *cpuid...
2009 Jan 14
5
[PATCH] Support cross-bitness guest when core-dumping
This patch allows core-dumping to work on a cross-bit host/guest configuration, whereas previously that was not supported. It supports both PV and FV guests. The core file format generated by the host, needs to match that of the guest, so an alignment issue is addressed, along with the p2m frame list handling being done according to the guest size. Signed-off-by: Bruce Rogers
2007 Jan 11
0
[PATCH 6/8] HVM save restore: guest memory handling
...uf; + + while (r < count) { + s = read(fd, &b[r], count - r); + if ((s == -1) && (errno == EINTR)) + continue; + if (s <= 0) { + break; + } + r += s; + } + + return (r == count) ? 1 : 0; +} int xc_hvm_restore(int xc_handle, int io_fd, uint32_t dom, unsigned long nr_pfns, @@ -38,5 +72,289 @@ int xc_hvm_restore(int xc_handle, int io unsigned int console_evtchn, unsigned long *console_mfn, unsigned int pae, unsigned int apic) { - return 0; + DECLAR...
2006 Apr 14
8
[rfc] [patch] 32/64-bit hypercall interface revisited
Last year we had a discussion[1] about how the hypercall ABI unfortunately contains fields that change width between 32- and 64-bit builds. This is a huge problem as we come up on the python management stack for ppc64, since the distributions ship 32-bit python. A 32-bit python/libxc cannot currently manage a 64-bit hypervisor. I had a patch but was unable to test it, and some other things were
2007 Aug 28
6
[PATCH] Make XEN_DOMCTL_destroydomain hypercall continuable.
...linux.co.jp> Signed-off-by: Keir Fraser <keir@xensource.com> diff -r 58d131f1fb35 -r 2c9db26f1d0e tools/libxc/xc_domain.c --- a/tools/libxc/xc_domain.c Fri Aug 24 16:32:56 2007 +0100 +++ b/tools/libxc/xc_domain.c Tue Aug 28 13:06:41 2007 +0900 @@ -55,10 +55,17 @@ int xc_domain_destroy(int xc_handle, int xc_domain_destroy(int xc_handle, uint32_t domid) { + int ret; DECLARE_DOMCTL; domctl.cmd = XEN_DOMCTL_destroydomain; domctl.domain = (domid_t)domid; - return do_domctl(xc_handle, &domctl); + for (;;) { + ret = do_domctl(xc_handle, &am...
2010 Dec 02
1
Making a hypercall in DomU
...rom the Dom0 user-space. I want to invoke this hypercall from DomU user-space. I copied all the /usr/lib/libxen* and /usr/include/xen* (recursively) to the DomU Here''s the code I wrote to invoke hypercall: #include <stdio.h> #include <xenctrl.h> int main(void){ int xc_handle, rc; xc_handle = xc_interface_open(); printf("\n Opened Interface: %d",xc_handle); rc = vb_notify(xc_handle); ---- Is a function implemented in libxc/ which has the hypercall invocation code printf("\n vb_notify returned: %d&q...
2011 Dec 21
2
[PATCH] xenpm: assorted adjustments
..."cc7 : [%20"PRIu64" ms]\n", cxstat->cc3/1000000UL, cxstat->cc6/1000000UL, cxstat->cc7/1000000UL); printf("\n"); @@ -114,7 +114,7 @@ static int get_cxstat_by_cpuid(xc_interf ret = xc_pm_get_max_cx(xc_handle, cpuid, &max_cx_num); if ( ret ) - return errno; + return -errno; if ( !cxstat ) return -EINVAL; @@ -135,15 +135,14 @@ static int get_cxstat_by_cpuid(xc_interf ret = xc_pm_get_cxstat(xc_handle, cpuid, cxstat); if( ret ) { - int temp = err...
2007 Jan 18
13
[PATCH 0/5] dump-core take 2:
The following dump-core patches changes its format into ELF, adds PFN-GMFN table, HVM support, and adds experimental IA64 support. - ELF format Program header and note section are adopted. - HVM domain support To know the memory area to dump, XENMEM_set_memory_map is added. XENMEM_memory_map hypercall is for current domain, so new one is created. and hvm domain builder tell xen its
2008 Mar 07
6
where is the location of definition of "do_xen_version"?
...atches Binary file ./xen/arch/x86/hvm/built_in.o matches ./xen/arch/ia64/linux-xen/entry.S: data8 do_xen_version ./xen/arch/powerpc/powerpc64/hypercall_table.S: .quad do_xen_version Binary file ./dist/install/boot/xen-syms-3.1.0 matches ./tools/libxc/xc_private.c: rc = do_xen_version(xc_handle, cmd, arg); ./tools/libxc/xc_private.h:static inline int do_xen_version(int xc_handle, int cmd, void *dest) but the "do_xen_version" is not in those above. thanks a lots. www.ict.ac.cn 2008-03-07 房海峰 _______________________________________________ Xen-devel mailing list Xen-deve...
2006 Sep 18
1
Re: dumpcore changes -- [Xen-changelog] [xen-unstable] In this patch, the xc_domain_dumpcore_via_callback() in xc_core.c of
...e DUMP_INCREMENT (4 * 1024) > #define round_pgup(_p) (((_p)+(PAGE_SIZE-1))&PAGE_MASK) > + > +/* Callback args for writing to a local dump file. */ > +struct dump_args { > + int fd; > + int incomp_fd; > +}; > > static int > copy_from_domain_page(int xc_handle, > @@ -27,7 +33,7 @@ xc_domain_dumpcore_via_callback(int xc_h > void *args, > dumpcore_rtn_t dump_rtn) > { > - unsigned long nr_pages; > + unsigned long n, nr_pages; > xen_pfn_t *page_array = NULL; &gt...
2006 Sep 29
4
[PATCH 4/6] xen: export NUMA topology in physinfo hcall
...-) Signed-off-by: Ryan Harper <ryanh@us.ibm.com> --- Export NUMA topology in physinfo hcall diff -r 6f3c6fb05af3 tools/libxc/xc_misc.c --- a/tools/libxc/xc_misc.c Mon Sep 11 13:45:23 2006 -0500 +++ b/tools/libxc/xc_misc.c Mon Sep 11 13:45:23 2006 -0500 @@ -39,6 +39,10 @@ int xc_physinfo(int xc_handle, DECLARE_SYSCTL; sysctl.cmd = XEN_SYSCTL_physinfo; + + /* set pointers to caller''s so memcpy doesn''t clobber them */ + sysctl.u.physinfo.memory_chunks = put_info->memory_chunks; + sysctl.u.physinfo.node_to_cpu = put_info->node_to_cpu; if ( (ret =...
2012 Apr 24
1
[PATCH] [resend] xen-access: Check return values and clean up on errors during init
...rc; + + if ( xenaccess == NULL ) + return 0; + + /* Tear down domain xenaccess in Xen */ + if ( xenaccess->mem_event.ring_page ) + munmap(xenaccess->mem_event.ring_page, PAGE_SIZE); + + if ( mem_access_enable ) + { + rc = xc_mem_access_disable(xenaccess->xc_handle, + xenaccess->mem_event.domain_id); + if ( rc != 0 ) + { + ERROR("Error tearing down domain xenaccess in xen"); + } + } + + /* Unbind VIRQ */ + if ( evtchn_bind ) + { + rc = xc_evtchn_unbind(xenaccess-...
2006 Aug 14
0
[PATCH] remove another xc_dom0_op() user
...enmon/xenbaked.c --- a/tools/xenmon/xenbaked.c Mon Aug 14 15:40:36 2006 +0100 +++ b/tools/xenmon/xenbaked.c Mon Aug 14 23:57:43 2006 +0100 @@ -444,14 +444,11 @@ struct t_rec **init_rec_ptrs(struct t_bu */ unsigned int get_num_cpus(void) { - dom0_op_t op; + xc_physinfo_t physinfo; int xc_handle = xc_interface_open(); int ret; - op.cmd = DOM0_PHYSINFO; - op.interface_version = DOM0_INTERFACE_VERSION; - - ret = xc_dom0_op(xc_handle, &op); + ret = xc_physinfo(xc_handle, &physinfo); if ( ret != 0 ) { @@ -460,12 +457,12 @@ unsigned int get_num_cpus(void)...
2004 Oct 18
3
potential bug in "xm atropos" implementation
>From tools/libxc/xc_atropos.c: int xc_atropos_domain_set(int xc_handle, u32 domid, u64 period, u64 slice, u64 latency, int xtratime) which takes 6 arguments >From tools/python/xen/xm/main.py: class ProgAtropos(Prog): <snip> def main(self, args): if len(args) != 5: self.err("%s: Invalid arg...
2007 May 04
0
[PATCH] 3/4 "nemesis" scheduling domains for Xen
...++++++++++++++++++++++++++++ 5 files changed, 294 insertions(+), 9 deletions(-) -- diff -r baff9c7cc4b3 tools/libxc/xc_domain.c --- a/tools/libxc/xc_domain.c Fri May 04 11:23:25 2007 -0400 +++ b/tools/libxc/xc_domain.c Fri May 04 17:35:33 2007 -0400 @@ -108,7 +108,7 @@ int xc_vcpu_setaffinity(int xc_handle, set_xen_guest_handle(domctl.u.vcpuaffinity.cpumap.bitmap, local); domctl.u.vcpuaffinity.cpumap.nr_cpus = sizeof(cpumap) * 8; - + if ( lock_pages(local, sizeof(local)) != 0 ) { PERROR("Could not lock memory for Xen hypercall"); @@ -139,7 +139,7 @@ int xc...
2012 Jul 23
2
[PATCH V2] qemu-xen-traditionnal, Fix dirty logging during migration.
...ogdirty_enable && was_written) { + unsigned long addr = (paddr_index << MCACHE_BUCKET_SHIFT) + + ((unsigned long)buffer) - ((unsigned long)entry->vaddr_base); + if (access_len == 0) + access_len = TARGET_PAGE_SIZE; + xc_hvm_modified_memory(xc_handle, domid, + addr >> TARGET_PAGE_BITS, + ((addr + access_len + TARGET_PAGE_SIZE - 1) >> TARGET_PAGE_BITS) + - (addr >> TARGET_PAGE_BITS)); + } + entry->lock--; if (entry->lock > 0 || pentry == NULL) return; @@ -265,7 +27...
2008 May 24
2
Use of XEN_GUEST_HANDLE
...efs ''__guest_handle_name'' to be a pointer to a data type ''name '' . What is the reason for such abstraction? And how this XEN_GUEST_HANDLE different from ''guest_xc'' field of ''struct xc_dom_image'', which gets initialized with xc_handle. I have serached the net extensively for answers, but unable to get any. So any info or pointers would be highly appriciated. Thanks -Sandesh -- View this message in context: http://www.nabble.com/Use-of-XEN_GUEST_HANDLE-tp17357081p17357081.html Sent from the Xen - Dev mailing list archive at...
2007 Feb 26
2
[PATCH 0 of 2] Parse image elfnotes, write them to xenstore, save and load via image sxpr
Here are two patches that let xm create, save and restore extract and preserve elfnotes read by the domain builder. This is handy for a few things. In particular, I''d like it so that xm can decide whether or not guest domains support fast resume (if save fails, or for checkpointing). _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com
2012 Jan 31
26
[PATCH 00/10] FLASK updates: MSI interrupts, cleanups
This patch set adds XSM security labels to useful debugging output locations, and fixes some assumptions that all interrupts behaved like GSI interrupts (which had useful non-dynamic IDs). It also cleans up the policy build process and adds an example of how to use the user field in the security context. Debug output: [PATCH 01/10] xsm: Add security labels to event-channel dump [PATCH 02/10] xsm:
2011 Nov 27
5
[PATCH] qemu-xen: Intel GPU passthrough, fix OpRegion mapping.
The OpRegion shouldn''t be mapped 1:1 because the address in the host can''t be used in the guest directly. This patch traps read and write access to the opregion of the Intel GPU config space (offset 0xfc). To work correctly this patch needs a change in hvmloader. HVMloader will allocate 2 pages for the OpRegion and write this address on the config space of the Intel GPU. Qemu