xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'Jan Beulich' <jbeulich@suse.com>
Cc: "sstabellini@kernel.org" <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH v11 10/11] common: add a new mappable resource type: XENMEM_resource_grant_table
Date: Tue, 17 Oct 2017 08:30:13 +0000	[thread overview]
Message-ID: <7964d2e654fe4685a0e9457f9818e53d@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <59E5A6700200007800108946@prv-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:jbeulich@suse.com]
> Sent: 17 October 2017 07:43
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>; Wei Liu
> <wei.liu2@citrix.com>; George Dunlap <George.Dunlap@citrix.com>; Ian
> Jackson <Ian.Jackson@citrix.com>; sstabellini@kernel.org; xen-
> devel@lists.xenproject.org; konrad.wilk@oracle.com; Tim (Xen.org)
> <tim@xen.org>
> Subject: Re: [PATCH v11 10/11] common: add a new mappable resource
> type: XENMEM_resource_grant_table
> 
> >>> Paul Durrant <paul.durrant@citrix.com> 10/12/17 6:28 PM >>>
> >@@ -1608,7 +1608,8 @@ fault:
> >}
> >
> >static int
> >-gnttab_populate_status_frames(struct domain *d, struct grant_table *gt,
> >+gnttab_populate_status_frames(struct domain *d,
> >+                              struct grant_table *gt,
> >unsigned int req_nr_frames)
> 
> What is this change about?
> 

It must have crept in accidentally. I'll get rid of it.

> >+int gnttab_get_grant_frame(struct domain *d, unsigned long idx,
> >+                           mfn_t *mfn)
> >+{
> >+    struct grant_table *gt = d->grant_table;
> >+    int rc;
> >+
> >+    /* write lock required as version may change and/or table may grow */
> >+    grant_write_lock(gt);
> >+
> >+    rc = (gt->gt_version == 2 &&
> >+          idx > XENMAPIDX_grant_table_status) ?
> 
> I don't understand this check - why does XENMAPIDX_grant_table_status
> matter here at all? Same in gnttab_get_status_frame() then.
> 

Well, the current legal range of grant table frames for v2 is 0 - (1 << XENMAPIDX_grant_table_status) whereas it appears that for v1 there is no limit. As for status frames, they are a v2-only concept but I agree that the range check there is wrong.

  Paul

> Jan


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

  reply	other threads:[~2017-10-17  8:30 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 16:25 [PATCH v11 00/11] x86: guest resource mapping Paul Durrant
2017-10-12 16:25 ` [PATCH v11 01/11] x86/hvm/ioreq: maintain an array of ioreq servers rather than a list Paul Durrant
2017-10-12 16:25 ` [PATCH v11 02/11] x86/hvm/ioreq: simplify code and use consistent naming Paul Durrant
2017-10-12 16:25 ` [PATCH v11 03/11] x86/hvm/ioreq: use gfn_t in struct hvm_ioreq_page Paul Durrant
2017-10-12 16:25 ` [PATCH v11 04/11] x86/hvm/ioreq: defer mapping gfns until they are actually requsted Paul Durrant
2017-10-12 16:25 ` [PATCH v11 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources Paul Durrant
2017-10-16 13:53   ` Jan Beulich
2017-10-16 14:07     ` Paul Durrant
2017-10-16 14:23       ` Jan Beulich
2017-10-17 12:28     ` Paul Durrant
2017-10-17 12:52       ` Jan Beulich
2017-10-17 12:53         ` Paul Durrant
2017-10-12 16:25 ` [PATCH v11 06/11] x86/hvm/ioreq: add a new mappable resource type Paul Durrant
2017-10-16 14:07   ` Jan Beulich
2017-10-16 14:17     ` Paul Durrant
2017-10-16 15:52       ` Jan Beulich
2017-10-12 16:25 ` [PATCH v11 07/11] x86/mm: add an extra command to HYPERVISOR_mmu_update Paul Durrant
2017-10-12 16:26 ` [PATCH v11 08/11] tools/libxenforeignmemory: add support for resource mapping Paul Durrant
2017-10-12 16:26 ` [PATCH v11 09/11] tools/libxenforeignmemory: reduce xenforeignmemory_restrict code footprint Paul Durrant
2017-10-12 16:26 ` [PATCH v11 10/11] common: add a new mappable resource type: XENMEM_resource_grant_table Paul Durrant
2017-10-17  6:42   ` Jan Beulich
2017-10-17  8:30     ` Paul Durrant [this message]
2017-10-17  9:06       ` Jan Beulich
2017-10-17  9:08         ` Paul Durrant
2017-10-12 16:26 ` [PATCH v11 11/11] tools/libxenctrl: use new xenforeignmemory API to seed grant table 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=7964d2e654fe4685a0e9457f9818e53d@AMSPEX02CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.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 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).