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

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.

In a more general sense, having worked on the migration code, I was
considering that it would be a *very* good thing to move all of this
logic into the toolstack, with Xen interacting with a pristine set of
up-to-latest-interface state.  This would reduce the amount of Xen code
doing input sanitisation/manipulation, and moves all of the backwards
compatibility cruft into a safer context to run.

One frequently requested feature of XenServer (which has a number of
large obstacles, but is sane in principle) is the ability to migrate
backwards.  The usecase is for this is being able to undo a half-upgrade
which has gone very wrong.  With all the compatibility code in the
toolstack rather than Xen, this would be feasible to implement.

~Andrew

  reply	other threads:[~2014-08-04 14:50 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 [this message]
2014-08-04 15:13         ` Jan Beulich
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=53DF9D9F.40209@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.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 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.