search for: copy_from_guest

Displaying 20 results from an estimated 29 matches for "copy_from_guest".

2013 May 01
8
[PATCH 0/2] runstate_memory_area on ARM
Hi all, this patch series introduces support for runstate_memory_area on ARM. The first patch moves VCPUOP_register_runstate_memory_area to common code, while the second one add VCPUOP_register_runstate_memory_area to the whilelist of vcpu_op hypercalls supported on ARM and properly updates the runstate_memory_area during vcpu context switch. Stefano Stabellini (2): xen: move
2013 Oct 16
4
[PATCH 1/7] xen: vNUMA support for PV guests
...d->vnuma.vnode_to_pnode == NULL ) + { + ret = -ENOMEM; + goto err_dom; + } + + d->vnuma.nr_vnodes = nr_vnodes; + if ( !guest_handle_is_null(op->u.vnuma.vdistance) ) + if ( unlikely(copy_from_guest(d->vnuma.vdistance, + op->u.vnuma.vdistance, + dist_size)) ) + goto err_dom; + + if ( !guest_handle_is_null(op->u.vnuma.vnuma_memblks) ) + if ( unlikely(copy_from_guest(d->vnum...
2012 Sep 20
17
[PATCH 0/4] Add V4V to Xen (v6)
...d insertv - Merge send and sendv - Turn all the lock prerequisite from comment to ASSERT() - Make use or write_atomic instead of volatile pointers - Merge v4v_memcpy_to_guest_ring and v4v_memcpy_to_guest_ring_from_guest - Introduce copy_from_guest_maybe that can take a void * and a handle as src address. - Replace 6 arguments hypercalls with 5 arguments hypercalls. v2 changes: - Cleanup plugin header - Include basic access control - Use guest_handle_for_field Jan Beulich (1): xen: Introdu...
2011 Dec 24
3
mapping virtual address to corresponding shadow page in xen
hi, How can I get corresponding shadowed page number of a virtual address in vm? -- Best Regards, Mohamad Rezaei
2013 Sep 12
23
More Coverity-reported issues.
Another bundle of issues from Coverity triage. The first one is in x86/mm, and looks scarier than it is. The others are all in xen/drivers and AFAICT are pretty minor. Cheers, Tim.
2008 Mar 20
0
[RFC/PATCH 07/15] kvm-s390: interrupt subsystem, cpu timer, waitpsw
...vcpu->stat.deliver_emergency_signal++; + rc = put_guest_u16(vcpu, __LC_EXT_INT_CODE, 0x1201); + if (rc == -EFAULT) + exception = 1; + + rc = copy_to_guest(vcpu, __LC_EXT_OLD_PSW, + &vcpu->arch.sie_block->gpsw, sizeof(psw_t)); + if (rc == -EFAULT) + exception = 1; + + rc = copy_from_guest(vcpu, &vcpu->arch.sie_block->gpsw, + __LC_EXT_NEW_PSW, sizeof(psw_t)); + if (rc == -EFAULT) + exception = 1; + break; + + case KVM_S390_INT_SERVICE: + VCPU_EVENT(vcpu, 4, "interrupt: sclp parm:%x", + inti->ext.ext_params); + vcpu->stat.deliver_service_signal++...
2009 Jan 09
5
[PATCH] Enable PCI passthrough with stub domain.
....c Wed Jan 07 11:25:00 2009 +0000 +++ b/xen/common/domctl.c Thu Jan 08 18:58:36 2009 +0900 @@ -193,14 +193,49 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc long ret = 0; struct xen_domctl curop, *op = &curop; - if ( !IS_PRIV(current->domain) ) - return -EPERM; - if ( copy_from_guest(op, u_domctl, 1) ) return -EFAULT; if ( op->interface_version != XEN_DOMCTL_INTERFACE_VERSION ) return -EACCES; + + switch ( op->cmd ) + { + case XEN_DOMCTL_pin_mem_cacheattr: + case XEN_DOMCTL_memory_mapping: + case XEN_DOMCTL_ioport_mapping: + case...
2008 Mar 20
0
[RFC/PATCH 09/15] kvm-s390: interprocessor communication via sigp
...u16 cpu_addr, u32 address, + u64 *reg) +{ + struct float_interrupt *fi = &vcpu->kvm->arch.float_int; + struct local_interrupt *li; + struct interrupt_info *inti; + int rc; + u8 tmp; + + /* make sure that the new value is valid memory */ + address = address & 0x7fffe000u; + if ((copy_from_guest(vcpu, &tmp, + (u64) (address + vcpu->kvm->arch.guest_origin) , 1)) || + (copy_from_guest(vcpu, &tmp, (u64) (address + + vcpu->kvm->arch.guest_origin + PAGE_SIZE), 1))) { + *reg |= SIGP_STAT_INVALID_PARAMETER; + return 1; /* invalid parameter */ + } + + inti = kzalloc(siz...
2012 Nov 15
1
[RFC/PATCH v4] XENMEM_claim_pages (subop of existing) hypercall
...; spin_unlock(&d->page_alloc_lock); @@ -685,6 +685,37 @@ long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE_PARAM(void) arg) break; } + case XENMEM_claim_pages: + if ( !(IS_PRIV(current->domain)) ) + return -EPERM; + + if ( copy_from_guest(&reservation, arg, 1) ) + return -EFAULT; + + if ( !(guest_handle_is_null(reservation.extent_start)) ) + return -EINVAL; + + if ( reservation.extent_order != 0 ) + return -EINVAL; + + rc = rcu_lock_target_domain_by_id(reservation.domid, &amp...
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
2013 Dec 06
36
[V6 PATCH 0/7]: PVH dom0....
Hi, V6: The only change from V5 is in patch #6: - changed comment to reflect autoxlate - removed a redundant ASSERT - reworked logic a bit so that get_page_from_gfn() is called with NULL for p2m type as before. arm has ASSERT wanting it to be NULL. Tim: patch 4 needs your approval. Daniel: patch 5 needs your approval. These patches implement PVH dom0. Patches 1 and 2
2012 Aug 10
18
[PATCH v2 0/5] ARM hypercall ABI: 64 bit ready
Hi all, this patch series makes the necessary changes to make sure that the current ARM hypercall ABI can be used as-is on 64 bit ARM platforms: - it defines xen_ulong_t as uint64_t on ARM; - it introduces a new macro to handle guest pointers, called XEN_GUEST_HANDLE_PARAM (that has size 4 bytes on aarch and is going to have size 8 bytes on aarch64); - it replaces all the occurrences of
2008 Mar 20
34
[RFC/PATCH 00/15] kvm on big iron
This patch series introduces a backend for kvm to run on IBM System z machines that uses the mainframe's sie virtualization capability. This work runs 64bit guests on z800/z890/z900/z990/z9/z10 class machines with a 64bit linux host. Userspace will follow once we're done brushing it over. The patch queue consists of the following patches, which can be applied in sequence on top of kvm.git
2008 Mar 20
34
[RFC/PATCH 00/15] kvm on big iron
This patch series introduces a backend for kvm to run on IBM System z machines that uses the mainframe's sie virtualization capability. This work runs 64bit guests on z800/z890/z900/z990/z9/z10 class machines with a 64bit linux host. Userspace will follow once we're done brushing it over. The patch queue consists of the following patches, which can be applied in sequence on top of kvm.git
2007 Mar 27
0
[PATCH] make all performance counter per-cpu
...========================================== --- 2007-03-19.orig/xen/arch/x86/mm.c 2007-03-27 10:31:15.000000000 +0200 +++ 2007-03-19/xen/arch/x86/mm.c 2007-03-27 10:32:56.000000000 +0200 @@ -1969,6 +1969,8 @@ int do_mmuext_op( if ( unlikely(!guest_handle_is_null(pdone)) ) (void)copy_from_guest(&done, pdone, 1); } + else + perfc_incr(calls_to_mmuext_op); if ( unlikely(!guest_handle_okay(uops, count)) ) { @@ -2223,6 +2225,8 @@ int do_mmuext_op( UNLOCK_BIGLOCK(d); + perfc_add(num_mmuext_ops, i); + out: /* Add incremental work we have done to...
2013 Oct 08
3
Re: [PATCH v4 1/9] xen/arm: Implement hvm save and restore
...struct hvm_domain_context c = { .size = domctl->u.hvmcontext.size }; >> + >> + ret = -ENOMEM; >> + if ( (c.data = xmalloc_bytes(c.size)) == NULL ) >> + goto sethvmcontext_out; >> + >> + ret = -EFAULT; >> + if ( copy_from_guest(c.data, domctl->u.hvmcontext.buffer, c.size) != 0 ) >> + goto sethvmcontext_out; >> + >> + domain_pause(d); >> + ret = hvm_load(d, &c); >> + domain_unpause(d); >> + >> + sethvmcontext_out: >> + if ( c.d...
2008 Sep 26
2
RE: [Xen-changelog] [xen-unstable] x86: Properly synchronise updates to pirq-to-vector mapping.
...rch.irq_lock, flags); + spin_unlock(&d->evtchn_lock); rcu_unlock_domain(d); @@ -416,7 +421,6 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H case PHYSDEVOP_alloc_irq_vector: { struct physdev_irq irq_op; - unsigned long flags; ret = -EFAULT; if ( copy_from_guest(&irq_op, arg, 1) != 0 ) @@ -437,9 +441,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H irq_op.vector = assign_irq_vector(irq); - spin_lock_irqsave(&dom0->arch.irq_lock, flags); + spin_lock(&dom0->evtchn_lock); ret = map_domain_pirq(dom0, irq_op.irq,...
2013 Jun 26
24
Re: [XenARM] XEN tools for ARM with Virtualization Extensions
(moving to xen-devel, xen-arm is for the older PV ARM port) On Tue, 2013-06-25 at 23:59 +0000, Eric Trudeau wrote: > Hi, I am trying to build the XEN tools for our port of XEN to our > Cortex A15-based platform. > > I am using the repo at git://xenbits.xenproject.org/xen.git to > cross-compile the tools into our rootfs. Which branch/changeset are you using? I've heard that
2013 Mar 21
27
[PATCH 0/4] xen/arm: guest SMP support
Hi all, this small patch series implement guest SMP support for ARM, using the ARM PSCI interface for secondary cpu bringup. Stefano Stabellini (4): xen/arm: basic PSCI support, implement cpu_on xen/arm: support for guest SGI xen/arm: support vcpu_op hypercalls xen: move VCPUOP_register_vcpu_info to common code xen/arch/arm/domain.c | 66 ++++++++++++++++++++++++
2008 Mar 20
1
[RFC/PATCH 05/15] kvm-s390: s390 arch backend for the kvm kernel module
...prefix; + + if (guestdest + n > memsize) + return -EFAULT; + + if (guestdest + n < guestdest) + return -EFAULT; + + guestdest += origin; + + return copy_to_user((void __user *) guestdest, from, n); +slowpath: + return __copy_to_guest_slow(vcpu, guestdest, from, n); +} + +static inline int __copy_from_guest_slow(struct kvm_vcpu *vcpu, void *to, + u64 guestsrc, unsigned long n) +{ + int rc; + unsigned long i; + u8 *data = to; + + for (i = 0; i < n; i++) { + rc = get_guest_u8(vcpu, guestsrc++, data++); + if (rc < 0) + return rc; + } + return 0; +} + +static inline int copy_from_guest(stru...