All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <Ian.Jackson@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Xen-devel <xen-devel@lists.xen.org>
Subject: Re: [PATCH v2 3/5] xen/domain: Stricter configuration checking
Date: Tue, 13 Nov 2018 09:56:55 -0700	[thread overview]
Message-ID: <5BEB025702000078001FB92F@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <f6a5ba12-ca24-213d-71e6-fa0982c689d9@citrix.com>

>>> On 13.11.18 at 15:39, <andrew.cooper3@citrix.com> wrote:
> On 13/11/2018 14:36, Wei Liu wrote:
>> On Tue, Nov 13, 2018 at 07:14:24AM -0700, Jan Beulich wrote:
>>>>>> On 12.11.18 at 17:16, <andrew.cooper3@citrix.com> wrote:
>>>> Currently, a number of options passed for domain creation are ignored, or have
>>>> implicit fallback behaviour.  This is bad for forwards compatibility, and for
>>>> end users to be certain that they got the configuration they asked for.
>>>>
>>>> With this change:
>>>>  * ARM now strictly requires that XEN_DOMCTL_CDF_hap is passed.  Previously,
>>>>    only XEN_DOMCTL_CDF_hvm_guest was checked.
>>>>  * For x86, requesting HAP without HVM is now prohibited, as the combination
>>>>    makes no sense.
>>>>  * For x86, requesting HAP on a non-HAP capable system will fail, rather than
>>>>    silently fall back to Shadow.
>>>>
>>>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>>>> ---
>>>> CC: Jan Beulich <JBeulich@suse.com>
>>>> CC: Wei Liu <wei.liu2@citrix.com>
>>>> CC: Stefano Stabellini <sstabellini@kernel.org>
>>>> CC: Julien Grall <julien.grall@arm.com>
>>>> CC: Ian Jackson <Ian.Jackson@citrix.com>
>>>> CC: Wei Liu <wei.liu2@citrix.com>
>>>>
>>>> Semi RFC because this may cause a user-visible change in behaviour.  However,
>>>> if the user has gone to the effort of specifying hap=1, silently falling back
>>>> to shadow is unexpected, and IMO, a bug.
>>> My view on this to a fair part depends on whether the tool stack
>>> would guard us from actually getting into such a situation in the
>>> hypervisor. Getting an unspecific -EINVAL back without further
>>> help towards diagnosis by the tool stack would make such a
>>> change undesirable imo.
>> If you want toolstack to tell you what goes wrong, this sanitisation
>> function should be shared with the toolstack, and presumably with some
>> if __XEN_TOOLS__ trickeries to return / print out the culprit.
> 
> Some bits of logic could be shared like that, but some can't.
> 
> As a different idea, could we hand back an up-to-128 byte string in the
> failure case?  There is space for that in the domctl.u because we've got
> no other error information we need to propagate backwards.

I like the idea in general; I'm not entirely sure if this will scale with future
additions, as the caller might legitimately expect an explanatory string to
come back in all cases. (Of course absence of an explanation could be
signaled via an empty string.)

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-11-13 16:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 16:16 [PATCH v2 0/5] xen/domain: Allocate d->vcpu[] earlier during domain construction Andrew Cooper
2018-11-12 16:16 ` [PATCH v2 1/5] xen/domain: Introduce a new sanitise_domain_config() helper Andrew Cooper
2018-11-13 14:03   ` Jan Beulich
2018-11-14 18:49   ` Julien Grall
2018-11-12 16:16 ` [PATCH v2 2/5] xen/domain: Introduce a new arch_sanitise_domain_config() helper Andrew Cooper
2018-11-12 16:16 ` [PATCH v2 3/5] xen/domain: Stricter configuration checking Andrew Cooper
2018-11-13 14:14   ` Jan Beulich
2018-11-13 14:36     ` Wei Liu
2018-11-13 14:39       ` Andrew Cooper
2018-11-13 14:49         ` Wei Liu
2018-11-13 16:56         ` Jan Beulich [this message]
2018-11-13 15:07     ` Andrew Cooper
2018-11-13 16:54       ` Jan Beulich
2018-11-14 17:44   ` [PATCH v3 3/5] xen/domain: Move guest type checks into the arch_sanitise_domain_config() path Andrew Cooper
2018-11-14 18:52     ` Julien Grall
     [not found]     ` <013C0C6C020000F58E2C01CD@prv1-mh.provo.novell.com>
2018-11-15 10:51       ` Jan Beulich
2018-11-14 18:51   ` [PATCH v2 3/5] xen/domain: Stricter configuration checking Julien Grall
2018-11-12 16:16 ` [PATCH v2 4/5] xen/domain: Allocate d->vcpu[] earlier during domain_create() Andrew Cooper
2018-11-13 14:17   ` Jan Beulich
2018-11-14 18:20   ` [PATCH v3 " Andrew Cooper
2018-11-14 18:59   ` [PATCH v2 " Julien Grall
2018-11-14 19:04     ` Andrew Cooper
2018-11-14 19:36       ` [PATCH v4 " Andrew Cooper
2018-11-14 19:37         ` Julien Grall
2018-11-14 19:38           ` Andrew Cooper
2018-11-14 19:48             ` [PATCH v5 " Andrew Cooper
2018-11-14 19:50               ` Julien Grall
2018-11-12 16:16 ` [PATCH v2 5/5] Revert "xen/arm: vgic-v3: Delay the initialization of the domain information" 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=5BEB025702000078001FB92F@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=wei.liu2@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.