From: Julien Grall <julien.grall@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
Tiejun Chen <tiejun.chen@intel.com>,
xen-devel@lists.xen.org
Cc: Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
Ian Campbell <Ian.Campbell@eu.citrix.com>,
Yang Z Zhang <yang.z.zhang@intel.com>
Subject: Re: [PATCH v12] introduce XENMEM_reserved_device_memory_map
Date: Wed, 22 Jul 2015 13:17:04 +0100 [thread overview]
Message-ID: <55AF89C0.20909@citrix.com> (raw)
In-Reply-To: <55AF8F9B0200007800093F69@prv-mh.provo.novell.com>
Hi Jan,
On 22/07/15 11:42, Jan Beulich wrote:
> This is a prerequisite for punching holes into HVM and PVH guests' P2M
> to allow passing through devices that are associated with (on VT-d)
> RMRRs.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
> Acked-by: Kevin Tian <kevin.tian@intel.com>
> ---
> v12: Restore changes as much as possible to my original version, fixing
> a few issues that got introduced after handing it over. Unionize
> new public memop interface structure to allow for non-PCI to be
> supported later on. Check flags to have all currently undefined
> flags clear. Refine adjustments to xen/pci.h.
[..]
> +struct xen_reserved_device_memory_map {
> +#define XENMEM_RDM_ALL 1 /* Request all regions (ignore dev union). */
> + /* IN */
> + uint32_t flags;
> + union {
> + struct physdev_pci_device pci;
> + } dev;
The size of physdev_pci_device is 4 bytes. So the maximum size of the
union would be 4 bytes as we can't change the layout of the hypercall
(IIRC, memory hypercall should be stable).
Let's say we want to add support for device describe in the device tree.
The only way to find a device is a path, so it means that we at least
need a size field and a XEN_GUEST_HANDLE for the path.
That won't fit in the union and we won't even be able to specify a
XEN_GUEST_HANDLE to point to another structure.
Would it be possible to either make sure that the union is at least the
size of a XEN_GUEST_HANDLE and/or move the union at the end of the
structure?
> + /*
> + * IN/OUT
> + *
> + * Gets set to the required number of entries when too low,
> + * signaled by error code -ERANGE.
> + */
> + unsigned int nr_entries;
> + /* OUT */
> + XEN_GUEST_HANDLE(xen_reserved_device_memory_t) buffer;
> +};
> +typedef struct xen_reserved_device_memory_map xen_reserved_device_memory_map_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_reserved_device_memory_map_t);
> +
> +/* Next available subop number is 28 */
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-07-22 12:17 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 1:29 [v11][PATCH 00/16] Fix RMRR Tiejun Chen
2015-07-22 1:29 ` [v11][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map Tiejun Chen
2015-07-22 9:32 ` Jan Beulich
2015-07-22 10:42 ` [PATCH v12] " Jan Beulich
2015-07-22 12:17 ` Julien Grall [this message]
2015-07-22 12:28 ` Jan Beulich
2015-07-22 12:52 ` Ian Campbell
2015-07-22 13:14 ` Jan Beulich
2015-07-22 13:19 ` Ian Campbell
2015-07-22 12:55 ` Chen, Tiejun
2015-07-22 13:03 ` Jan Beulich
2015-07-22 13:20 ` Chen, Tiejun
2015-07-22 13:28 ` Jan Beulich
2015-07-22 13:46 ` Ian Campbell
2015-07-22 14:22 ` [PATCH v12a] " Jan Beulich
2015-07-22 1:29 ` [v11][PATCH 02/16] xen/vtd: create RMRR mapping Tiejun Chen
2015-07-22 1:29 ` [v11][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy Tiejun Chen
2015-07-22 1:29 ` [v11][PATCH 04/16] xen: enable XENMEM_memory_map in hvm Tiejun Chen
2015-07-22 1:29 ` [v11][PATCH 05/16] hvmloader: get guest memory map into memory_map[] Tiejun Chen
2015-07-22 1:29 ` [v11][PATCH 06/16] hvmloader/pci: Try to avoid placing BARs in RMRRs Tiejun Chen
2015-07-22 8:43 ` Jan Beulich
2015-07-22 13:00 ` Jan Beulich
2015-07-22 1:29 ` [v11][PATCH 07/16] hvmloader/e820: construct guest e820 table Tiejun Chen
2015-07-22 1:29 ` [v11][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map Tiejun Chen
2015-07-22 1:30 ` [v11][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy Tiejun Chen
2015-07-22 13:06 ` Ian Jackson
2015-07-22 15:01 ` Wei Liu
2015-07-22 1:30 ` [v11][PATCH 10/16] tools: introduce some new parameters to set rdm policy Tiejun Chen
2015-07-22 1:30 ` [v11][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Tiejun Chen
2015-07-22 8:28 ` Jan Beulich
2015-07-22 8:52 ` Chen, Tiejun
2015-07-22 10:12 ` Jan Beulich
2015-07-22 10:54 ` George Dunlap
2015-07-22 10:04 ` Ian Jackson
2015-07-22 16:05 ` Jan Beulich
2015-07-22 13:24 ` Ian Jackson
2015-07-22 13:33 ` Chen, Tiejun
2015-07-22 14:04 ` Ian Jackson
2015-07-22 15:00 ` Chen, Tiejun
2015-07-22 15:09 ` Chen, Tiejun
2015-07-22 15:09 ` Ian Jackson
2015-07-22 15:21 ` Chen, Tiejun
2015-07-22 1:30 ` [v11][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary Tiejun Chen
2015-07-22 1:30 ` [v11][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest Tiejun Chen
2015-07-22 1:30 ` [v11][PATCH 14/16] xen/vtd: enable USB device assignment Tiejun Chen
2015-07-22 1:30 ` [v11][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr Tiejun Chen
2015-07-22 1:30 ` [v11][PATCH 16/16] tools: parse to enable new rdm policy parameters Tiejun Chen
2015-07-22 14:09 ` Ian Jackson
2015-07-22 14:40 ` Wei Liu
2015-07-22 12:38 ` [v11][PATCH 00/16] Fix RMRR Wei Liu
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=55AF89C0.20909@citrix.com \
--to=julien.grall@citrix.com \
--cc=Ian.Campbell@eu.citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=kevin.tian@intel.com \
--cc=tiejun.chen@intel.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
--cc=yang.z.zhang@intel.com \
/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.