All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: andrew.cooper3@citrix.com, xen-devel@lists.xen.org
Subject: Re: [PATCH v2 1/2] xen: x86: copy back tsc info, not pointer to tsc info in domctl
Date: Tue, 26 May 2015 14:48:15 +0100	[thread overview]
Message-ID: <1432648095.14664.122.camel@citrix.com> (raw)
In-Reply-To: <55648D28020000780007DEBF@mail.emea.novell.com>

On Tue, 2015-05-26 at 14:11 +0100, Jan Beulich wrote:
> >>> On 26.05.15 at 14:56, <ian.campbell@citrix.com> wrote:
> > On Tue, 2015-05-26 at 13:25 +0100, Jan Beulich wrote:
> >> >>> On 26.05.15 at 13:14, <ian.campbell@citrix.com> 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.
> > 
> > I thought so at first but the restructuring in the second patch was
> > large enough that I didn't want to mix it in with an actual functional
> > change. Plus the second patch does more than undo it, it removes "info."
> > from the domctl access.
> 
> Hmm, yeah. I guess in that case the fix (patch 1) could have been
> to drop out_info, and the cleanup (patch 2) to eliminate struct
> xen_guest_tsc_info. But anyway, feel free to commit as is, taking
> this as an ack for patch 2 even in its current shape.

Done, thanks.

      reply	other threads:[~2015-05-26 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 11:14 [PATCH v2 1/2] xen: x86: copy back tsc info, not pointer to tsc info in domctl Ian Campbell
2015-05-26 12:25 ` Jan Beulich
2015-05-26 12:56   ` Ian Campbell
2015-05-26 13:11     ` Jan Beulich
2015-05-26 13:48       ` Ian Campbell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432648095.14664.122.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.