From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Keir Fraser <keir@xen.org>, Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH 1/2] x86/domctl: cleanup
Date: Mon, 13 Apr 2015 16:22:36 +0100 [thread overview]
Message-ID: <552BDF3C.2010007@citrix.com> (raw)
In-Reply-To: <552BEE88020000780007185B@mail.emea.novell.com>
On 13/04/15 15:27, Jan Beulich wrote:
> >>> On 01.04.15 at 17:31, <andrew.cooper3@citrix.com> wrote:
>> case XEN_DOMCTL_gettscinfo:
>> - {
>> - xen_guest_tsc_info_t info;
>> -
>> - ret = -EINVAL;
>> - if ( d == current->domain ) /* no domain_pause() */
>> - break;
>> -
>> - domain_pause(d);
>> - tsc_get_info(d, &info.tsc_mode,
>> - &info.elapsed_nsec,
>> - &info.gtsc_khz,
>> - &info.incarnation);
>> - if ( copy_to_guest(domctl->u.tsc_info.out_info, &info, 1) )
>> - ret = -EFAULT;
>> + if ( d == currd ) /* no domain_pause() */
>> + ret = -EINVAL;
>> else
>> - ret = 0;
>> - domain_unpause(d);
>> - }
>> - break;
>> + {
>> + xen_guest_tsc_info_t info;
>> +
>> + domain_pause(d);
>> + tsc_get_info(d, &info.tsc_mode,
>> + &info.elapsed_nsec,
>> + &info.gtsc_khz,
>> + &info.incarnation);
>> + domain_unpause(d);
>> + copyback = 1;
> If you want to use "copyback" here, you need to pass pointers into
> domctl->u.tsc_info.out_info to tsc_get_info().
Oops - completely correct.
I shall spin a v2.
~Andrew
next prev parent reply other threads:[~2015-04-13 15:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-01 15:31 [PATCH 0/2] Post-XSA-127 cleanup Andrew Cooper
2015-04-01 15:31 ` [PATCH 1/2] x86/domctl: cleanup Andrew Cooper
2015-04-01 20:13 ` Konrad Rzeszutek Wilk
2015-04-13 14:27 ` Jan Beulich
2015-04-13 15:22 ` Andrew Cooper [this message]
2015-04-13 15:49 ` [PATCH v2 " Andrew Cooper
2015-04-01 15:31 ` [PATCH 2/2] x86/domctl: Don't allow a toolstack domain to pause itself Andrew Cooper
2015-04-01 20:14 ` Konrad Rzeszutek Wilk
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=552BDF3C.2010007@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--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.