From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: Ian Campbell <Ian.Campbell@eu.citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Keir Fraser <keir@xen.org>, Tim Deegan <tim@xen.org>
Subject: Re: [PATCH] domctl: don't truncate XEN_DOMCTL_max_mem requests
Date: Wed, 22 Apr 2015 13:03:01 +0100 [thread overview]
Message-ID: <55378DF5.7020001@citrix.com> (raw)
In-Reply-To: <5537A8700200007800074B0B@mail.emea.novell.com>
[-- Attachment #1.1: Type: text/plain, Size: 1249 bytes --]
On 22/04/15 12:56, Jan Beulich wrote:
> Instead saturate the value if the input can't be represented in the
> respective struct domain field.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Do I take it you have a 16TB guest to hand?
>
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -944,7 +944,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe
>
> case XEN_DOMCTL_max_mem:
> {
> - unsigned long new_max = op->u.max_mem.max_memkb >> (PAGE_SHIFT - 10);
> + uint64_t new_max = op->u.max_mem.max_memkb >> (PAGE_SHIFT - 10);
>
> spin_lock(&d->page_alloc_lock);
> /*
> @@ -952,7 +952,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xe
> * that the domain will now be allowed to "ratchet" down to new_max. In
> * the meantime, while tot > max, all new allocations are disallowed.
> */
> - d->max_pages = new_max;
> + d->max_pages = min(new_max, (uint64_t)(typeof(d->max_pages))-1);
> spin_unlock(&d->page_alloc_lock);
> break;
> }
>
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
[-- Attachment #1.2: Type: text/html, Size: 2185 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-04-22 12:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-22 11:56 [PATCH] domctl: don't truncate XEN_DOMCTL_max_mem requests Jan Beulich
2015-04-22 12:03 ` Andrew Cooper [this message]
2015-04-22 12:08 ` Jan Beulich
2015-05-04 7:49 ` Ping: " Jan Beulich
2015-05-04 14:14 ` Tim Deegan
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=55378DF5.7020001@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=tim@xen.org \
--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.