[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen: lift hypercall_cancel_continuation to sched.h
>>> On 14.08.17 at 17:46, <wei.liu2@xxxxxxxxxx> wrote: > --- a/xen/arch/x86/x86_64/compat/mm.c > +++ b/xen/arch/x86/x86_64/compat/mm.c > @@ -53,6 +53,7 @@ int compat_arch_memory_op(unsigned long cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > compat_pfn_t mfn; > unsigned int i; > int rc = 0; > + struct vcpu *curr = current; > > switch ( cmd ) > { > @@ -124,7 +125,7 @@ int compat_arch_memory_op(unsigned long cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > if ( __copy_to_guest(arg, &cmp, 1) ) > { > if ( rc == __HYPERVISOR_memory_op ) > - hypercall_cancel_continuation(); > + hypercall_cancel_continuation(curr); > rc = -EFAULT; > } > > @@ -133,7 +134,7 @@ int compat_arch_memory_op(unsigned long cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > > case XENMEM_machphys_mapping: > { > - struct domain *d = current->domain; > + struct domain *d = curr->domain; > struct compat_machphys_mapping mapping = { > .v_start = MACH2PHYS_COMPAT_VIRT_START(d), > .v_end = MACH2PHYS_COMPAT_VIRT_END, I don't think the local variable is really useful here - it's two entirely distinct and uncommon paths which need it, yet you calculate unconditionally now. With the variable dropped Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |