From: Paul Durrant <xadimgnik@gmail.com>
To: "'Julien Grall'" <julien@xen.org>, <xen-devel@lists.xenproject.org>
Cc: "'Paul Durrant'" <pdurrant@amazon.com>,
"'Ian Jackson'" <iwj@xenproject.org>, "'Wei Liu'" <wl@xen.org>,
"'Andrew Cooper'" <andrew.cooper3@citrix.com>,
"'George Dunlap'" <george.dunlap@citrix.com>,
"'Jan Beulich'" <jbeulich@suse.com>,
"'Stefano Stabellini'" <sstabellini@kernel.org>,
"'Anthony PERARD'" <anthony.perard@citrix.com>,
"'Volodymyr Babchuk'" <Volodymyr_Babchuk@epam.com>,
"'Roger Pau Monné'" <roger.pau@citrix.com>
Subject: RE: [PATCH 3/5] libxl / iommu / domctl: introduce XEN_DOMCTL_IOMMU_SET_ALLOCATION...
Date: Mon, 19 Oct 2020 08:30:55 +0100 [thread overview]
Message-ID: <002c01d6a5e9$c8a778f0$59f66ad0$@xen.org> (raw)
In-Reply-To: <471c9800-2ff0-d180-0840-e29dee4d3b4f@xen.org>
> -----Original Message-----
> From: Julien Grall <julien@xen.org>
> Sent: 16 October 2020 16:55
> To: Paul Durrant <paul@xen.org>; xen-devel@lists.xenproject.org
> Cc: Paul Durrant <pdurrant@amazon.com>; Ian Jackson <iwj@xenproject.org>; Wei Liu <wl@xen.org>; Andrew
> Cooper <andrew.cooper3@citrix.com>; George Dunlap <george.dunlap@citrix.com>; Jan Beulich
> <jbeulich@suse.com>; Stefano Stabellini <sstabellini@kernel.org>; Anthony PERARD
> <anthony.perard@citrix.com>; Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>; Roger Pau Monné
> <roger.pau@citrix.com>
> Subject: Re: [PATCH 3/5] libxl / iommu / domctl: introduce XEN_DOMCTL_IOMMU_SET_ALLOCATION...
>
> Hi Paul,
>
> On 05/10/2020 10:49, Paul Durrant wrote:
> > From: Paul Durrant <pdurrant@amazon.com>
> >
> > ... sub-operation of XEN_DOMCTL_iommu_ctl.
> >
> > This patch adds a new sub-operation into the domctl. The code in iommu_ctl()
> > is extended to call a new arch-specific iommu_set_allocation() function which
> > will be called with the IOMMU page-table overhead (in 4k pages) in response
>
> Why 4KB? Wouldn't it be better to use the hypervisor page size instead?
>
I think I'll follow the shadow/hap code more closely and just pass a value in MB, then any issue with page size is left inside Xen.
> > diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
> > index 75e855625a..6402678838 100644
> > --- a/xen/include/public/domctl.h
> > +++ b/xen/include/public/domctl.h
> > @@ -1138,8 +1138,16 @@ struct xen_domctl_vuart_op {
> >
> > #define XEN_DOMCTL_IOMMU_INVALID 0
> >
> > +#define XEN_DOMCTL_IOMMU_SET_ALLOCATION 1
> > +struct xen_domctl_iommu_set_allocation {
> > + uint32_t nr_pages;
>
> Shouldn't this be a 64-bit value?
If I pass the value in MB then 32-bits will cover it, I think. I do need to add padding though.
Paul
>
> Cheers,
>
> --
> Julien Grall
next prev parent reply other threads:[~2020-10-19 7:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 9:49 [PATCH 0/5] iommu page-table memory pool Paul Durrant
2020-10-05 9:49 ` [PATCH 1/5] libxl: remove separate calculation of IOMMU memory overhead Paul Durrant
2020-10-08 13:07 ` Wei Liu
2020-10-05 9:49 ` [PATCH 2/5] iommu / domctl: introduce XEN_DOMCTL_iommu_ctl Paul Durrant
2020-10-16 15:47 ` Julien Grall
2020-10-19 7:23 ` Paul Durrant
2020-10-19 7:29 ` Jan Beulich
2020-10-19 7:32 ` Paul Durrant
2020-10-20 17:17 ` Julien Grall
2020-10-05 9:49 ` [PATCH 3/5] libxl / iommu / domctl: introduce XEN_DOMCTL_IOMMU_SET_ALLOCATION Paul Durrant
2020-10-08 13:08 ` Wei Liu
2020-10-16 15:54 ` Julien Grall
2020-10-19 7:30 ` Paul Durrant [this message]
2020-10-30 16:45 ` Jan Beulich
2020-10-05 9:49 ` [PATCH 4/5] iommu: set 'hap_pt_share' and 'need_sync' flags earlier in iommu_domain_init() Paul Durrant
2020-10-16 16:07 ` Julien Grall
2020-10-30 16:11 ` Jan Beulich
2020-10-05 9:49 ` [PATCH 5/5] x86 / iommu: create a dedicated pool of page-table pages Paul Durrant
2020-10-30 16:43 ` Jan Beulich
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='002c01d6a5e9$c8a778f0$59f66ad0$@xen.org' \
--to=xadimgnik@gmail.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=iwj@xenproject.org \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=paul@xen.org \
--cc=pdurrant@amazon.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).