All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Durrant, Paul" <pdurrant@amazon.com>
To: "Durrant, Paul" <pdurrant@amazon.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] [PATCH] domain_create: honour global grant/maptrack frame limits...
Date: Wed, 13 Nov 2019 13:51:48 +0000	[thread overview]
Message-ID: <57a6e3f262da4f258fba7142ebb4d615@EX13D32EUC003.ant.amazon.com> (raw)
In-Reply-To: <20191113134729.1121-1-pdurrant@amazon.com>

Sorry, the Cc list got dropped... I'll re-send.

  Paul

> -----Original Message-----
> From: Paul Durrant <pdurrant@amazon.com>
> Sent: 13 November 2019 13:47
> To: xen-devel@lists.xenproject.org
> Cc: Durrant, Paul <pdurrant@amazon.com>
> Subject: [PATCH] domain_create: honour global grant/maptrack frame
> limits...
> 
> ...when their values are larger than the per-domain configured limits.
> 
> Signed-off-by: Paul Durrant <pdurrant@amazon.com>
> ---
> After mining through commits it is still unclear to me exactly when Xen
> stopped honouring the global values, but I really think this commit should
> be back-ported to stable trees as it was a behavioural change that can
> cause domUs to fail in non-obvious ways.
> ---
>  xen/common/domain.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 611116c7fc..aad6d55b82 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -335,6 +335,7 @@ struct domain *domain_create(domid_t domid,
>      enum { INIT_watchdog = 1u<<1,
>             INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5 };
>      int err, init_status = 0;
> +    unsigned int max_grant_frames, max_maptrack_frames;
> 
>      if ( config && (err = sanitise_domain_config(config)) )
>          return ERR_PTR(err);
> @@ -456,8 +457,17 @@ struct domain *domain_create(domid_t domid,
>              goto fail;
>          init_status |= INIT_evtchn;
> 
> -        if ( (err = grant_table_init(d, config->max_grant_frames,
> -                                     config->max_maptrack_frames)) != 0 )
> +        /*
> +         * Make sure that the configured values don't reduce any
> +         * global command line override.
> +         */
> +        max_grant_frames = max(config->max_grant_frames,
> +                               opt_max_grant_frames);
> +        max_maptrack_frames = max(config->max_maptrack_frames,
> +                                  opt_max_maptrack_frames);
> +
> +        if ( (err = grant_table_init(d, max_grant_frames,
> +                                     max_maptrack_frames)) != 0 )
>              goto fail;
>          init_status |= INIT_gnttab;
> 
> --
> 2.17.1


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

  reply	other threads:[~2019-11-13 13:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 13:47 [Xen-devel] [PATCH] domain_create: honour global grant/maptrack frame limits Paul Durrant
2019-11-13 13:51 ` Durrant, Paul [this message]
2019-11-13 14:05 ` Andrew Cooper
2019-11-13 14:11   ` Durrant, Paul
2019-11-13 13:53 Paul Durrant
2019-11-26 11:30 ` Paul Durrant
2019-11-26 11:37   ` Jürgen Groß
2019-11-26 11:53     ` Durrant, Paul
2019-11-26 11:43   ` Andrew Cooper
2019-11-26 12:31   ` George Dunlap
2019-11-26 13:26     ` Durrant, Paul
2019-11-26 14:04       ` George Dunlap

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=57a6e3f262da4f258fba7142ebb4d615@EX13D32EUC003.ant.amazon.com \
    --to=pdurrant@amazon.com \
    --cc=xen-devel@lists.xenproject.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.