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/4] x86/domctl: Implement XEN_DOMCTL_{get, set}_vcpu_msrs
Date: Fri, 6 Jun 2014 16:28:40 +0100 [thread overview]
Message-ID: <5391DE28.1030409@citrix.com> (raw)
In-Reply-To: <5391F5C10200007800018C55@mail.emea.novell.com>
On 06/06/14 16:09, Jan Beulich wrote:
>>
>> Having tried to implement these improvements, I hit problems so would
>> like to decide upon an interface before hacking futher.
>>
>> Currently behaviour for get:
>> * Null guest handle returns msr_count set to maximum number of msrs Xen
>> might write
>> * msr_count < max_msrs fails with -ENOBUFS
>> * if msrs are written, msr_count reflects the number written (likely
>> less than max_msrs)
>>
>> Current behaviour for set:
>> * msr_count > max_msrs fails with -EINVAL
>> * problems with individual msrs fail with -EINVAL
>>
>> Suggestions:
>> * for get, msr_count < max_msrs should perform a partial write,
>> returning -ENOBUFS if Xen needs to write more than msr_count msrs.
>>
>> This reduces the amount of code added to xc_domain_save() to fail
>> migrations actually using PV msrs. I am not too concerned about this
>> code, as it will be rm'd in the migration-v2 series which implements PV
>> MSR migration properly. I am a little bit hesitant about supporting
>> partial writes, although I suppose it is plausible to want to know "how
>> many MSRs is the vcpu currently using", and doing that with a single
>> hypercall is preferable to requiring two.
> Yes. I didn't see above what problem you found with this.
Not a problem purse, just a concern.
>
>> * for set, in the case of a bad msr, identify it back to the caller to
>> aid with debugging.
>>
>> This is useful to help debugging, but needs disambiguating against the
>> other cases which fail with -EINVAL, including the paths which would
>> fail before having a chance to set msr_count to the index of the bad
>> msr. Therefore, msr_count *can't* be overloaded for this purpose.
> Actually it can - the caller will know the number it put there, and if it's
> unchanged then the failure was not associated with a particular array
> entry (all possible values on error would be smaller than the value
> originally there).
Ah yes - quite correct. That make the set-side debugging trivial.
I will see about making these alterations.
~Andrew
next prev parent reply other threads:[~2014-06-06 15:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 17:26 [PATCH 0/4] Fixes to several domctls for migration Andrew Cooper
2014-06-04 17:26 ` [PATCH 1/4] x86/domctl: Implement XEN_DOMCTL_{get, set}_vcpu_msrs Andrew Cooper
2014-06-05 12:46 ` Jan Beulich
2014-06-05 13:01 ` Andrew Cooper
2014-06-05 13:33 ` Jan Beulich
2014-06-06 14:53 ` Andrew Cooper
2014-06-06 15:09 ` Jan Beulich
2014-06-06 15:28 ` Andrew Cooper [this message]
2014-06-04 17:26 ` [PATCH 2/4] tools/libxc: Use an explicit check for PV MSRs in xc_domain_save() Andrew Cooper
2014-06-05 13:41 ` Jan Beulich
2014-06-05 15:52 ` Ian Campbell
2014-06-05 15:57 ` Andrew Cooper
2014-06-06 9:15 ` Ian Campbell
2014-06-06 9:44 ` Andrew Cooper
2014-06-06 9:48 ` Ian Campbell
2014-06-04 17:26 ` [PATCH 3/4] x86/domctl: Remove PV MSR parts of XEN_DOMCTL_[gs]et_ext_vcpucontext Andrew Cooper
2014-06-05 7:52 ` Frediano Ziglio
2014-06-05 9:25 ` Andrew Cooper
2014-06-04 17:26 ` [PATCH 4/4] x86/domctl: Two functional fixes to XEN_DOMCTL_[gs]etvcpuextstate Andrew Cooper
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=5391DE28.1030409@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.