[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of IOMMU page tables

On 14.08.2019 11:39, Paul Durrant wrote:
-----Original Message-----
From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of Paul 
Sent: 12 August 2019 17:26
To: 'Jan Beulich' <jbeulich@xxxxxxxx>
Cc: 'Petre Pircalabu' <ppircalabu@xxxxxxxxxxxxxxx>; 'Stefano Stabellini' 
'Wei Liu' <wl@xxxxxxx>; 'Razvan Cojocaru' <rcojocaru@xxxxxxxxxxxxxxx>; 'Konrad 
Rzeszutek Wilk'
<konrad.wilk@xxxxxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Tim (Xen.org) 
George Dunlap <George.Dunlap@xxxxxxxxxx>; 'Julien Grall' 
<julien.grall@xxxxxxx>; 'Tamas K Lengyel'
<tamas@xxxxxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; 'Alexandru Isaila'
<aisaila@xxxxxxxxxxxxxxx>; 'xen-devel@xxxxxxxxxxxxxxxxxxxx' 
'VolodymyrBabchuk' <Volodymyr_Babchuk@xxxxxxxx>; Roger Pau Monne 
Subject: Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of 
IOMMU page tables

-----Original Message-----

On 30.07.2019 15:44, Paul Durrant wrote:
NOTE: This patch will cause a small amount of extra resource to be used
        to accommodate IOMMU page tables that may never be used, since the
        per-domain IOMMU flag enable flag is currently set to the value
        of the global iommu_enable flag. A subsequent patch will add an
        option to the toolstack to allow it to be turned off if there is
        no intention to assign passthrough hardware to the domain.

In particular if the default of this is going to be "true" (I
didn't look at that patch yet, but the wording above makes me
assume so), in auto-ballooning mode without shared page tables
more memory should imo be ballooned out of Dom0 now. It has
always been a bug that IOMMU page tables weren't accounted for,
but it would become even more prominent then.

Ultimately, once the whole series is applied, then nothing much should change 
for those specifying
passthrough h/w in an xl.cfg. The main difference will be that h/w cannot be 
passed through to a
domain that was not originally created with IOMMU pagetables.
With patches applied up to this point then, yes, every domain will get IOMMU 
page tables. I guess
take a look at the auto-ballooning code and see what needs to be done.

Ok, I've had a look...

I could make a rough calculation in libxl_domain_need_memory() based on the 
domain's max_memkb and an
assumption of a 4 level translation with 512 PTEs per level, or would prefer 
such guestimation to be
overridable using an xl.cfg parameter in a broadly similar way to shadow_memkb?

I think I'm going to say no to this anyway since, as you say, the overhead as 
never been accounted for and having to make assumptions about the IOMMU table 
structure is not very attractive. Given that any issue is going to be transient 
(i.e. until patch #6 is committed) I don't think fixing auto-ballooning ought 
to be in scope for this series.

I'm afraid I disagree: The series extends a pre-existing problem
affecting some guests to all ones (at least by default).


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.