xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Don Slutz <don.slutz@gmail.com>
To: Paul Durrant <Paul.Durrant@citrix.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: Thu, 3 Dec 2015 19:23:27 -0500	[thread overview]
Message-ID: <5660DCFF.5050301@Gmail.com> (raw)
In-Reply-To: <9AAE0902D5BC7E449B7C8E4E778ABCD02F69F705@AMSPEX01CL01.citrite.net>

On 12/01/15 06:28, Paul Durrant wrote:
>> -----Original Message-----
>> From: xen-devel-bounces@lists.xen.org [mailto:xen-devel-
>> bounces@lists.xen.org] On Behalf Of Don Slutz
>> Sent: 28 November 2015 21:45
>> To: xen-devel@lists.xen.org
>> Cc: Jun Nakajima; Wei Liu; Kevin Tian; Keir (Xen.org); Ian Campbell; George
>> Dunlap; Andrew Cooper; Stefano Stabellini; Eddie Dong; Don Slutz; Don Slutz;
>> Tim (Xen.org); Aravind Gopalakrishnan; Jan Beulich; Suravee Suthikulpanit;
>> Boris Ostrovsky; Ian Jackson
>> Subject: [Xen-devel] [PATCH v13 7/8] Add IOREQ_TYPE_VMWARE_PORT
>>
>> From: Don Slutz <dslutz@verizon.com>
>>
...
>>
>>          /* Verify the emulation request has been correctly re-issued */
>> -        if ( (p.type != is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO) ||
>> +        if ( (p.type != (is_mmio ? IOREQ_TYPE_COPY : is_vmware ?
>> IOREQ_TYPE_VMWARE_PORT : IOREQ_TYPE_PIO)) ||
> 
> is_vmware already incorporated !is_mmio so there's a redundant
> check in that expression. The extra test also makes it look
> pretty ugly... probably better re-factored into an if
> statement.
>

Ok, Will add a variable, that is set via an if statement.  Thinking about:

      case STATE_IORESP_READY:
+    {
+        uint8_t calc_type = p.type;
+
+        if ( is_vmware )
+            calc_type = IOREQ_TYPE_VMWARE_PORT;
+
         vio->io_req.state = STATE_IOREQ_NONE;
         p = vio->io_req;

         /* Verify the emulation request has been correctly re-issued */
-        if ( (p.type != is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO) ||
+        if ( (p.type != calc_type) ||




>>               (p.addr != addr) ||
>>               (p.size != size) ||
>>               (p.count != reps) ||
...
>> +
>> +            p.type = IOREQ_TYPE_VMWARE_PORT;
>> +            vio->io_req.type = IOREQ_TYPE_VMWARE_PORT;
> 
> This could be done in a single statement.
> 

Ok.

 p.type = vio->io_req.type = IOREQ_TYPE_VMWARE_PORT;

or

 vio->io_req.type = p.type = IOREQ_TYPE_VMWARE_PORT;

is clearer to you?

>> +            s = hvm_select_ioreq_server(curr->domain, &p);
...
>>
>>      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:

+        /* 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.

   -Don Slutz

>   Paul
> 

  reply	other threads:[~2015-12-04  0:23 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 [this message]
2015-12-04  8:59       ` Paul Durrant
2015-12-04 21:31         ` Don Slutz
2015-12-07 13:36           ` Paul Durrant
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=5660DCFF.5050301@Gmail.com \
    --to=don.slutz@gmail.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=Paul.Durrant@citrix.com \
    --cc=Stefano.Stabellini@citrix.com \
    --cc=boris.ostrovsky@oracle.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 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).