From: Anthony PERARD <anthony.perard@citrix.com>
To: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: xen-devel@lists.xenproject.org,
Andrew Cooper <Andrew.Cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
Paul Durrant <pdurrant@gmail.com>
Subject: Re: [Xen-devel] [XEN PATCH for-4.13 v3 05/10] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl
Date: Mon, 14 Oct 2019 17:50:26 +0100 [thread overview]
Message-ID: <20191014165026.GC5743@perard.uk.xensource.com> (raw)
In-Reply-To: <20191011165549.21639-2-ian.jackson@eu.citrix.com>
On Fri, Oct 11, 2019 at 05:55:44PM +0100, Ian Jackson wrote:
> For callers which call libxl_domain_need_memory, and request an old
> pre-4.13 libxl API, and which leave one of these memkb settings unset,
> we take special measures to preserve the old behaviour.
>
> This means that they don't get the additional iommu memory and are at
> risk of the domain running out of memory as a result of f89f555827a6
> "remove late (on-demand) construction of IOMMU page tables". But this
> is no worse than the state just after f89f555827a6, which already
> broke such callers in that way. This is perhaps justifiable because
> of the API stability warning next to libxl_domain_need_memory.
There's probably something else that is needed to be done for user of
the pre-4.13 API. If they call libxl_domain_need_memory_0x041200, there
is nothing that set iommu_memkb, so the default value stays at -1 and
libxl_domain_need_memory_0x041200 returns a value that is lower that
"target_memkb + shadow_memkb". Then, when libxl create the domain, it
still keep iommu_memkb==-1, because the old API as been used.
I tried to have xl call the 4.12 API and create a guest without
passthrough, and QEMU crashed (assert() failure).
So maybe libxl__domain_build_info_setdefault() should also set a value
to iommu_memkb as it does for shadow_memkb? At least, set iommu_memkb=0
if still the default.
iommu_memkb is new in 4.13, user of the pre-4.13 API will not set it.
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-10-14 16:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 16:55 [Xen-devel] [XEN PATCH for-4.13 v3 00/10] libxl memkb & pt defaulting Ian Jackson
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 05/10] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl Ian Jackson
2019-10-14 12:45 ` Anthony PERARD
2019-10-14 16:50 ` Anthony PERARD [this message]
2019-10-14 16:53 ` Ian Jackson
2019-10-14 17:00 ` Ian Jackson
2019-10-15 10:37 ` Anthony PERARD
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 06/10] libxl: Remove/deprecate libxl_get_required_*_memory from the API Ian Jackson
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 07/10] libxl: create: setdefault: Make libxl_physinfo info[1] Ian Jackson
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 08/10] libxl: create: setdefault: Move physinfo into config_setdefault Ian Jackson
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 09/10] libxl: Move domain_create_info_setdefault earlier Ian Jackson
2019-10-14 12:53 ` Anthony PERARD
2019-10-11 16:55 ` [Xen-devel] [XEN PATCH for-4.13 v3 10/10] libxl/xl: Overhaul passthrough setting logic Ian Jackson
2019-10-14 16:05 ` Anthony PERARD
2019-10-14 16:10 ` Ian Jackson
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=20191014165026.GC5743@perard.uk.xensource.com \
--to=anthony.perard@citrix.com \
--cc=Andrew.Cooper3@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=pdurrant@gmail.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.