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: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	"Tim (Xen.org)" <tim@xen.org>,
	George Dunlap <George.Dunlap@citrix.com>,
	Julien Grall <julien.grall@arm.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Ian Jackson <Ian.Jackson@citrix.com>
Subject: Re: [PATCH v14 06/11] x86/hvm/ioreq: add a new mappable resource type...
Date: Thu, 14 Dec 2017 13:46:58 +0000	[thread overview]
Message-ID: <ab0607de6810490fb0c94ee0ed48b55c@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <5A328EB40200007800197573@prv-mh.provo.novell.com>

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: 14 December 2017 13:46
> To: Paul Durrant <Paul.Durrant@citrix.com>
> Cc: Julien Grall <julien.grall@arm.com>; Andrew Cooper
> <Andrew.Cooper3@citrix.com>; George Dunlap
> <George.Dunlap@citrix.com>; Ian Jackson <Ian.Jackson@citrix.com>; Wei Liu
> <wei.liu2@citrix.com>; Stefano Stabellini <sstabellini@kernel.org>; xen-
> devel@lists.xenproject.org; Tim (Xen.org) <tim@xen.org>
> Subject: Re: [PATCH v14 06/11] x86/hvm/ioreq: add a new mappable
> resource type...
> 
> >>> On 14.12.17 at 10:51, <Paul.Durrant@citrix.com> wrote:
> >> From: Paul Durrant [mailto:paul.durrant@citrix.com]
> >> Sent: 28 November 2017 15:09
> >> +static int hvm_alloc_ioreq_mfn(struct hvm_ioreq_server *s, bool buf)
> >> +{
> >> +    struct domain *currd = current->domain;
> >> +    struct hvm_ioreq_page *iorp = buf ? &s->bufioreq : &s->ioreq;
> >> +
> >> +    if ( iorp->page )
> >> +    {
> >> +        /*
> >> +         * If a guest frame has already been mapped (which may happen
> >> +         * on demand if hvm_get_ioreq_server_info() is called), then
> >> +         * allocating a page is not permitted.
> >> +         */
> >> +        if ( !gfn_eq(iorp->gfn, INVALID_GFN) )
> >> +            return -EPERM;
> >> +
> >> +        return 0;
> >> +    }
> >> +
> >> +    /*
> >> +     * Allocated IOREQ server pages are assigned to the emulating
> >> +     * domain, not the target domain. This is because the emulator is
> >> +     * likely to be destroyed after the target domain has been torn
> >> +     * down, and we must use MEMF_no_refcount otherwise page
> allocation
> >> +     * could fail if the emulating domain has already reached its
> >> +     * maximum allocation.
> >> +     */
> >> +    iorp->page = alloc_domheap_page(currd, MEMF_no_refcount);
> >
> > This is no longer going to work as it is predicated on my original
> > modification to HYPERVISOR_mmu_update (which allowed a PV domain to
> map a
> > foreign MFN from a domain over which it had privilege as if the MFN was
> > local). Because that mechanism was decided against, this code needs to
> change
> > to use the target domain of the ioreq server rather than the calling domain.
> > I will verfy this modification and submit v15 of the series.
> >
> > Jan, are you ok for me to keep your R-b?
> 
> This is all pretty fragile - better drop it and I'll then take a look
> once you've sent the new version.

Ok. Will do.

  Paul

> 
> Jan


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

  reply	other threads:[~2017-12-14 13:47 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28 15:08 [PATCH v14 00/11] x86: guest resource mapping Paul Durrant
2017-11-28 15:08 ` [PATCH v14 01/11] x86/hvm/ioreq: maintain an array of ioreq servers rather than a list Paul Durrant
2017-11-28 15:08 ` [PATCH v14 02/11] x86/hvm/ioreq: simplify code and use consistent naming Paul Durrant
2017-11-28 15:08 ` [PATCH v14 03/11] x86/hvm/ioreq: use gfn_t in struct hvm_ioreq_page Paul Durrant
2017-11-28 15:08 ` [PATCH v14 04/11] x86/hvm/ioreq: defer mapping gfns until they are actually requsted Paul Durrant
2017-12-06 21:49   ` Chao Gao
2017-12-07  8:38     ` Paul Durrant
2017-11-28 15:08 ` [PATCH v14 05/11] x86/mm: add HYPERVISOR_memory_op to acquire guest resources Paul Durrant
2017-11-28 18:50   ` Daniel De Graaf
2017-11-28 15:08 ` [PATCH v14 06/11] x86/hvm/ioreq: add a new mappable resource type Paul Durrant
2017-12-14  9:51   ` Paul Durrant
2017-12-14  9:52     ` Paul Durrant
2017-12-14 10:31     ` Paul Durrant
2017-12-14 13:46     ` Jan Beulich
2017-12-14 13:46       ` Paul Durrant [this message]
2017-11-28 15:08 ` [PATCH v14 07/11] x86/mm: add an extra command to HYPERVISOR_mmu_update Paul Durrant
2017-12-12 13:25   ` Jan Beulich
2017-12-12 13:52     ` Andrew Cooper
2017-12-12 14:38       ` Jan Beulich
2017-12-13 12:06         ` Paul Durrant
2017-12-13 14:35           ` Jan Beulich
2017-12-13 14:49             ` Paul Durrant
2017-12-13 15:24               ` Jan Beulich
2017-12-13 17:03                 ` Paul Durrant
2017-12-14 13:50                   ` Jan Beulich
2017-12-12 14:54     ` Paul Durrant
2017-11-28 15:08 ` [PATCH v14 08/11] tools/libxenforeignmemory: add support for resource mapping Paul Durrant
2017-11-28 15:08 ` [PATCH v14 09/11] tools/libxenforeignmemory: reduce xenforeignmemory_restrict code footprint Paul Durrant
2017-11-28 15:08 ` [PATCH v14 10/11] common: add a new mappable resource type: XENMEM_resource_grant_table Paul Durrant
2017-11-28 15:08 ` [PATCH v14 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=ab0607de6810490fb0c94ee0ed48b55c@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=julien.grall@arm.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).