All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Paul Durrant <paul.durrant@citrix.com>, xen-devel@lists.xenproject.org
Cc: "Petre Pircalabu" <ppircalabu@bitdefender.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>,
	"Razvan Cojocaru" <rcojocaru@bitdefender.com>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"George Dunlap" <George.Dunlap@eu.citrix.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Tim Deegan" <tim@xen.org>,
	"Tamas K Lengyel" <tamas@tklengyel.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Alexandru Isaila" <aisaila@bitdefender.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH v8 4/6] remove late (on-demand) construction of IOMMU page tables
Date: Thu, 5 Sep 2019 21:21:28 +0100	[thread overview]
Message-ID: <32f4990a-5806-04b8-9bbe-6bdb232bf8e9@arm.com> (raw)
In-Reply-To: <20190902145014.36442-5-paul.durrant@citrix.com>

Hi,

On 9/2/19 3:50 PM, Paul Durrant wrote:
> diff --git a/tools/libxl/libxl_mem.c b/tools/libxl/libxl_mem.c
> index 448a2af8fd..fd6f33312e 100644
> --- a/tools/libxl/libxl_mem.c
> +++ b/tools/libxl/libxl_mem.c
> @@ -461,15 +461,17 @@ int libxl_domain_need_memory(libxl_ctx *ctx,
>       if (rc) goto out;
>   
>       *need_memkb = b_info->target_memkb;
> +    *need_memkb += b_info->shadow_memkb + b_info->iommu_memkb;

AFAICT, iommu_memkb will be non-0 even when the IOMMU share the 
page-table with the CPUs. If so, why is this required for that case?

> +
>       switch (b_info->type) {
>       case LIBXL_DOMAIN_TYPE_PVH:
>       case LIBXL_DOMAIN_TYPE_HVM:
> -        *need_memkb += b_info->shadow_memkb + LIBXL_HVM_EXTRA_MEMORY;
> +        *need_memkb += LIBXL_HVM_EXTRA_MEMORY;
>           if (libxl_defbool_val(b_info->device_model_stubdomain))
>               *need_memkb += 32 * 1024;
>           break;
>       case LIBXL_DOMAIN_TYPE_PV:
> -        *need_memkb += b_info->shadow_memkb + LIBXL_PV_EXTRA_MEMORY;
> +        *need_memkb += LIBXL_PV_EXTRA_MEMORY;
>           break;
>       default:
>           rc = ERROR_INVAL;
> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index b61399ce36..d94b7453cb 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -486,6 +486,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
>       ("target_memkb",    MemKB),
>       ("video_memkb",     MemKB),
>       ("shadow_memkb",    MemKB),
> +    ("iommu_memkb",     MemKB),

I think you want a corresponding LIBXL_HAVE in libxl.h to tell external 
toolstack whether the field exist.

>       ("rtc_timeoffset",  uint32),
>       ("exec_ssidref",    uint32),
>       ("exec_ssid_label", string),

Cheers,

-- 
Julien Grall

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

  parent reply	other threads:[~2019-09-05 20:22 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 14:50 [Xen-devel] [PATCH v8 0/6] add per-domain IOMMU control Paul Durrant
2019-09-02 14:50 ` [Xen-devel] [PATCH v8 1/6] x86/domain: remove the 'oos_off' flag Paul Durrant
2019-09-02 15:08   ` Jan Beulich
2019-09-05 20:08     ` Julien Grall
2019-09-03  7:23   ` Tim Deegan
2019-09-02 14:50 ` [Xen-devel] [PATCH v8 2/6] domain: introduce XEN_DOMCTL_CDF_iommu flag Paul Durrant
2019-09-03 12:47   ` Christian Lindig
2019-09-05 19:28   ` Julien Grall
2019-09-06 10:54     ` Paul Durrant
2019-09-05 20:05   ` Julien Grall
2019-09-06  7:50     ` Paul Durrant
2019-09-02 14:50 ` [Xen-devel] [PATCH v8 3/6] use is_iommu_enabled() where appropriate Paul Durrant
2019-09-05 19:31   ` Julien Grall
2019-09-02 14:50 ` [Xen-devel] [PATCH v8 4/6] remove late (on-demand) construction of IOMMU page tables Paul Durrant
2019-09-05 14:30   ` Jan Beulich
2019-09-05 14:34     ` Paul Durrant
2019-09-05 20:21   ` Julien Grall [this message]
2019-09-06  7:56     ` Paul Durrant
2019-09-02 14:50 ` [Xen-devel] [PATCH v8 5/6] iommu: tidy up iommu_use_hap_pt() and need_iommu_pt_sync() macros Paul Durrant
2019-09-05 19:38   ` Julien Grall
2019-09-06  7:59     ` Paul Durrant
2019-09-06  8:48       ` Julien Grall
2019-09-02 14:50 ` [Xen-devel] [PATCH v8 6/6] introduce a 'passthrough' configuration option to xl.cfg Paul Durrant
2019-09-05 19:59   ` Julien Grall
2019-09-06  8:01     ` Paul Durrant
2019-09-05 20:28   ` Julien Grall
2019-09-06  8:08     ` Paul Durrant
2019-09-06  9:06       ` Julien Grall
2019-09-06  9:26         ` 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=32f4990a-5806-04b8-9bbe-6bdb232bf8e9@arm.com \
    --to=julien.grall@arm.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=aisaila@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=paul.durrant@citrix.com \
    --cc=ppircalabu@bitdefender.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tamas@tklengyel.com \
    --cc=tim@xen.org \
    --cc=wl@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.