All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Don Slutz <don.slutz@gmail.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Kevin Tian <kevin.tian@intel.com>,
	"Keir (Xen.org)" <keir@xen.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Eddie Dong <eddie.dong@intel.com>,
	George Dunlap <George.Dunlap@citrix.com>,
	Don Slutz <dslutz@verizon.com>, "Tim (Xen.org)" <tim@xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	Stefano Stabellini <Stefano.Stabellini@citrix.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Ian Jackson <Ian.Jackson@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v13 7/8] Add IOREQ_TYPE_VMWARE_PORT
Date: Mon, 7 Dec 2015 13:36:29 +0000	[thread overview]
Message-ID: <9AAE0902D5BC7E449B7C8E4E778ABCD02F6B43E6@AMSPEX01CL03.citrite.net> (raw)
In-Reply-To: <56620645.3090707@Gmail.com>

> -----Original Message-----
[snip]
> >>>>
> >>>>      if ( rc )
> >>>> -        hvm_unmap_ioreq_page(s, 0);
> >>>> +    {
> >>>> +        hvm_unmap_ioreq_page(s, IOREQ_PAGE_TYPE_IOREQ);
> >>>> +        return rc;
> >>>> +    }
> >>>> +
> >>>> +    rc = hvm_map_ioreq_page(s, IOREQ_PAGE_TYPE_VMPORT,
> >>>> vmport_ioreq_pfn);
> >>>
> >>> Is every ioreq server going to have one of these? It doesn't look
> >>> like it, so should you not have validity check on the pfn?
> >>>
> >>
> >>
> >> Currently the default is that all ioreq servers get the mapping:
> >>
> >
> > That's probably a bit wasteful. It should probably be
> > selectable in the create HVM op.
> 
> Since the most common case is QEMU and it can use it since upstream
> version 2.2.0, the waste is real small.  If a non-QEMU ioreq server does
> not want it, it add 0 overhead. 

It's not 0 overhead if an extra magic page is used for each ioreq server is it?

> The only case I know of (which is PVH
> related to PVH) is if QEMU is not running and you add a non-QEMU ioreq
> server that does not use it, you get 1 page + page table entries.
> 
> While the following exists:
> 
> #define HVM_IOREQSRV_BUFIOREQ_OFF    0
> #define HVM_IOREQSRV_BUFIOREQ_LEGACY 1
> /*
>  * Use this when read_pointer gets updated atomically and
>  * the pointer pair gets read atomically:
>  */
> #define HVM_IOREQSRV_BUFIOREQ_ATOMIC 2
>     uint8_t handle_bufioreq; /* IN - should server handle buffered ioreqs */
> 
> I see no tests that use these.  Also adding vmport enable/disable to
> handle_bufioreq is much more of a hack then I expect to pass a code
> review.
> 
> Does not look simple to add a new additional argument, but that could
> just be my lack of understanding in the area.

It doesn't look that bad. The bufioreq flag has now expanded from 1 bit to 2 bits, but you could rename 'handle_bufioreq' to 'flags' or somesuch and then use bit 3 to indicate whether or not the vmport ioreq page should be allocated.

> 
> > I don't know whether you'd
> > even need it there in the default server since I guess the QEMU
> > end of things post-dates the use of the HVM op (rather than the
> > old param).
> >
> 
> Not sure how to parse "post-dates".  Here is some tables about this that
> I know about:
> 
> 
> xen     Supports                handle_bufioreq
>          create_ioreq_server
> 4.5     yes                     0 or !0
> 4.6     yes                     0 or !0
> 4.7     yes                     0 or !0
> 
> Upstream vmport         is_default atomic
>  QEMU     support
> 
> 2.2.x    yes            yes        n/a
> 2.3.x    yes            no         no
> 2.4.x    yes            no         no
> 2.5.x    yes            no         yes
> 
> Xen      vmport         is_default atomic
>  QEMU     support
> 
> 4.5.x    no             yes        n/a
> 4.6.x    yes            no         yes
> 4.7.x    yes            no         yes
> 
> With just a "xen only" build, you will not get a QEMU that is a default
> ioreq server.  However it looks possible to mix Xen and QEMU and get
> this case.
> 

What I meant was that I believe that the vmport ioreq page will only be used by a qemu that also make use of the create_ioreq_server hmvop, so you don't have to care about making it work with older QEMU. It looks like 2.2.x may prove me wrong though in which case it should be present in the default ioreq server but still optional for all others.

  Paul

> So unless I hear otherwise, I will not be making a change here.
> 
> >> +        /* VMware port */
> >> +        if ( i == HVMOP_IO_RANGE_VMWARE_PORT &&
> >> +            s->domain->arch.hvm_domain.is_vmware_port_enabled )
> >> +            rc = rangeset_add_range(s->range[i], 1, 1);
> >>
> >>
> >>
> >> but you are right that a check on is_vmware_port_enabled should be
> >> added.  Will do.
> >
> > Cool. Thanks,
> >
> >   Paul
> >
> >>
> >>    -Don Slutz
> >>
> >>>   Paul
> >>>

  reply	other threads:[~2015-12-07 13:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-28 21:44 [PATCH v13 0/8] Xen VMware tools support Don Slutz
2015-11-28 21:44 ` [PATCH v13 1/8] tools: Add vga=vmware Don Slutz
2016-01-27 16:55   ` Konrad Rzeszutek Wilk
2015-11-28 21:44 ` [PATCH v13 2/8] xen: Add support for VMware cpuid leaves Don Slutz
2015-12-16 10:28   ` Jan Beulich
2015-12-20 17:48     ` Don Slutz
2015-11-28 21:45 ` [PATCH v13 3/8] tools: Add vmware_hwver support Don Slutz
2015-11-28 21:45 ` [PATCH v13 4/8] vmware: Add VMware provided include file Don Slutz
2015-11-28 21:45 ` [PATCH v13 5/8] xen: Add vmware_port support Don Slutz
2015-12-16 15:12   ` Jan Beulich
2015-12-20 18:15     ` Don Slutz
2015-11-28 21:45 ` [PATCH v13 6/8] tools: " Don Slutz
2015-11-28 21:45 ` [PATCH v13 7/8] Add IOREQ_TYPE_VMWARE_PORT Don Slutz
2015-12-01 11:28   ` Paul Durrant
2015-12-04  0:23     ` Don Slutz
2015-12-04  8:59       ` Paul Durrant
2015-12-04 21:31         ` Don Slutz
2015-12-07 13:36           ` Paul Durrant [this message]
2015-12-14 12:39             ` Don Slutz
2015-12-21 14:10   ` Jan Beulich
2016-01-10 19:42     ` Don Slutz
2016-01-11 13:50       ` Jan Beulich
2015-11-28 21:45 ` [PATCH v13 8/8] Add xentrace to vmware_port Don Slutz
2016-03-04 21:50 ` ping Re: [PATCH v13 0/8] Xen VMware tools support Konrad Rzeszutek Wilk

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=9AAE0902D5BC7E449B7C8E4E778ABCD02F6B43E6@AMSPEX01CL03.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=George.Dunlap@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@citrix.com \
    --cc=Stefano.Stabellini@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=don.slutz@gmail.com \
    --cc=dslutz@verizon.com \
    --cc=eddie.dong@intel.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 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.