xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Paul Durrant <paul.durrant@citrix.com>
Cc: Keir Fraser <keir@xen.org>,
	xen-devel@lists.xen.org, Ian Jackson <ian.jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	StefanoStabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH v2 1/3] x86/viridian: Re-purpose the HVM parameter to be a feature mask
Date: Mon, 04 Aug 2014 16:13:24 +0100	[thread overview]
Message-ID: <53DFBF34020000780002920A@mail.emea.novell.com> (raw)
In-Reply-To: <53DF9D9F.40209@citrix.com>

>>> On 04.08.14 at 16:50, <andrew.cooper3@citrix.com> wrote:
> On 04/08/14 14:50, Jan Beulich wrote:
>>>>> On 04.08.14 at 15:31, <andrew.cooper3@citrix.com> wrote:
>>> On 04/08/14 14:12, Paul Durrant wrote:
>>>> --- a/xen/arch/x86/hvm/hvm.c
>>>> +++ b/xen/arch/x86/hvm/hvm.c
>>>> @@ -5533,8 +5533,22 @@ long do_hvm_op(unsigned long op, 
>>> XEN_GUEST_HANDLE_PARAM(void) arg)
>>>>                      rc = -EINVAL;
>>>>                  break;
>>>>              case HVM_PARAM_VIRIDIAN:
>>>> -                if ( a.value > 1 )
>>>> -                    rc = -EINVAL;
>>>> +                /* This should only ever be set once by the tools and read by the guest. */
>>>> +                rc = -EPERM;
>>>> +                if ( curr_d == d )
>>>> +                    break;
>>>> +
>>>> +                rc = -EPERM;
>>>> +                if ( d->arch.hvm_domain.params[a.index] &&
>>>> +                     a.value != d->arch.hvm_domain.params[a.index] )
>>>> +                    break;
>>> Setting it twice should be an error, even if it is set to the same value
>>> again.
>> I specifically asked for it to be done this way, such that redundant
>> calls wouldn't needlessly fail. Remember that we're altering an
>> existing interface, and hence should be careful about breaking
>> existing callers.
> 
> The only valid users are domain builder parts of the toolstack, which
> necessarily needs to be in sync with Xen.  All current in-tree callers
> are ok.  While in general I would agree, we are already changing the
> interface quite substantially.  A stricter interface is easier to
> augment later if the need arises, and here I feel there is sufficient
> change to warrant doing the interface properly rather than leaving this
> quirk around forevermore.

Let me put it that way: I'd prefer this to be done as asked for earlier,
but I also wouldn't veto it being done the way you want it.

Jan

  reply	other threads:[~2014-08-04 15:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 13:12 [PATCH v2 0/3] x86/viridian improvements Paul Durrant
2014-08-04 13:12 ` [PATCH v2 1/3] x86/viridian: Re-purpose the HVM parameter to be a feature mask Paul Durrant
2014-08-04 13:31   ` Andrew Cooper
2014-08-04 13:50     ` Jan Beulich
2014-08-04 14:50       ` Andrew Cooper
2014-08-04 15:13         ` Jan Beulich [this message]
2014-08-04 17:19     ` Paul Durrant
2014-08-04 13:45   ` Jan Beulich
2014-08-04 13:12 ` [PATCH v2 2/3] x86/viridian: Note that logging is under control of the guest Paul Durrant
2014-08-04 13:38   ` Andrew Cooper
2014-08-04 13:45     ` Paul Durrant
2014-08-04 13:12 ` [PATCH v2 3/3] x86/viridian: Add partition time reference counter MSR support Paul Durrant
2014-08-04 14:01   ` Jan Beulich
2014-08-04 14:12     ` Paul Durrant
2014-08-04 14:47       ` Paul Durrant
2014-08-04 15:11         ` Paul Durrant
2014-08-04 15:15           ` Jan Beulich
2014-08-04 15:23             ` Paul Durrant

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=53DFBF34020000780002920A@mail.emea.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=keir@xen.org \
    --cc=paul.durrant@citrix.com \
    --cc=stefano.stabellini@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).