From: "Jan Beulich" Subject: Re: [PATCH v2 1/2] xen: x86: copy back tsc info, not pointer to tsc info in domctl Date: Tue, 26 May 2015 13:25:31 +0100 Message-ID: <5564825B020000780007DE48@mail.emea.novell.com> References: <1432638888-12258-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1432638888-12258-1-git-send-email-ian.campbell@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 26.05.15 at 13:14, wrote: > --- a/xen/arch/x86/domctl.c > +++ b/xen/arch/x86/domctl.c > @@ -856,13 +856,16 @@ long arch_do_domctl( > ret = -EINVAL; > else > { > + xen_guest_tsc_info_t info = { 0 }; > + > domain_pause(d); > - tsc_get_info(d, &domctl->u.tsc_info.info.tsc_mode, > - &domctl->u.tsc_info.info.elapsed_nsec, > - &domctl->u.tsc_info.info.gtsc_khz, > - &domctl->u.tsc_info.info.incarnation); > + tsc_get_info(d, &info.tsc_mode, > + &info.elapsed_nsec, > + &info.gtsc_khz, > + &info.incarnation); > domain_unpause(d); > - copyback = 1; > + if ( copy_to_guest(domctl->u.tsc_info.out_info, &info, 1) ) > + ret = -EFAULT; > } > break; > I have to admit that I don't see the point of this change when patch 2 basically undoes it all. Jan