All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <don.slutz@gmail.com>
To: George Dunlap <george.dunlap@eu.citrix.com>,
	Don Slutz <dslutz@verizon.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Cc: Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	Eddie Dong <eddie.dong@intel.com>, Tim Deegan <tim@xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v11 6/9] xen: Add ring 3 vmware_port support
Date: Thu, 04 Jun 2015 12:17:24 -0400	[thread overview]
Message-ID: <55707A14.9080801@Gmail.com> (raw)
In-Reply-To: <55705D45.6040300@eu.citrix.com>

On 06/04/15 10:14, George Dunlap wrote:
> On 06/04/2015 01:37 PM, Don Slutz wrote:
>> On 06/03/15 12:58, George Dunlap wrote:
>>> On 06/03/2015 05:41 PM, Don Slutz wrote:
>>>> On 06/03/15 12:23, George Dunlap wrote:
>>>>> On 06/03/2015 04:58 PM, Andrew Cooper wrote:
>>>>>> On 03/06/15 16:26, George Dunlap wrote:
>>>>>>> On 05/22/2015 04:50 PM, Don Slutz wrote:
>>>>>>>> Summary is that VMware treats "in (%dx),%eax" (or "out %eax,(%dx)")
>>>>>>>> to port 0x5658 specially.  Note: since many operations return data
>>>>>>>> in EAX, "in (%dx),%eax" is the one to use.  The other lengths like
>>>>>>>> "in (%dx),%al" will still do things, only AL part of EAX will be
>>>>>>>> changed.  For "out %eax,(%dx)" of all lengths, EAX will remain
>>>>>>>> unchanged.


>>> (As an aside, I think my description does a better job of alerting a
>>> reviewer to what's going on in this patch -- you might consider stealing
>>> part of it if you end up re-submitting this one.)
>>>
>>
>> I would be happy to "steal" the description part.  I normally give
>> credit to the author in the "what has changed".  I could also add to the
>> commit message:
>>
>>
>> George Dunlap summarized this change as:
>>
>> VMWare allows ring3 to access the magic port regardless of whether the
>> guest OS has enabled access to that IO port or not.
>>
>> In order to emulate this, we need to:
>> * Trap to Xen on #GPs rather than just letting the hardware handle it
>> * Emulate all instructions which cause a #GP, just to see if they might
>>   be an IO instruction accessing the magic port.
>> * If it is an IO instruction, and it's accessing the magic port, then we
>>   skip the ioport access checks (which will cause the instruction to
>>   execute as though it had been given access).
>> * Under all other circumstances (we hope) the emulator in Xen will do
>>   exactly what the hardware just did, and deliver a #GP to the guest.
>>
>> In an attempt to make this more safe, emulation ops that write (such as
>> write and cmpxchg) are replaced with stubs which always return an error.
> 
> I would take the "(we hope)" out, since that's really part of the second
> half (me doubting whether such a patch is wise).  Not a good idea to
> doubt whether a patch is a good idea in the commit message. :-)
> 
> If you feel like credit is necessary, I'd just put at the bottom
> somewhere in parentheses something like this:
> 
> (h/t to George Dunlap for the patch summary.)
> 

Ok.  Thanks,

   -Don Slutz


>  -George
> 

  reply	other threads:[~2015-06-04 16:17 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 15:50 [PATCH v11 0/9] Xen VMware tools support Don Slutz
2015-05-22 15:50 ` [PATCH v11 1/9] tools: Add vga=vmware Don Slutz
2015-05-22 15:50 ` [PATCH v11 2/9] xen: Add support for VMware cpuid leaves Don Slutz
2015-05-22 15:50 ` [PATCH v11 3/9] tools: Add vmware_hwver support Don Slutz
2015-06-03 14:53   ` George Dunlap
2015-06-04 15:15     ` Ian Campbell
2015-06-04 15:46       ` Don Slutz
2015-06-04 15:17   ` Ian Campbell
2015-06-04 15:59     ` Don Slutz
2015-05-22 15:50 ` [PATCH v11 4/9] vmware: Add VMware provided include file Don Slutz
2015-05-22 15:50 ` [PATCH v11 5/9] xen: Add vmware_port support Don Slutz
2015-06-05  9:52   ` Jan Beulich
2015-06-05 13:18     ` Don Slutz
2015-05-22 15:50 ` [PATCH v11 6/9] xen: Add ring 3 " Don Slutz
2015-06-03 15:26   ` George Dunlap
2015-06-03 15:58     ` Andrew Cooper
2015-06-03 16:23       ` George Dunlap
2015-06-03 16:40         ` Andrew Cooper
2015-06-03 17:00           ` George Dunlap
2015-06-03 16:41         ` Don Slutz
2015-06-03 16:58           ` George Dunlap
2015-06-04 12:37             ` Don Slutz
2015-06-04 14:14               ` George Dunlap
2015-06-04 16:17                 ` Don Slutz [this message]
2015-06-03 16:36       ` Don Slutz
2015-06-03 16:50         ` George Dunlap
2015-06-05  9:31           ` Jan Beulich
2015-06-05 10:54             ` Ian Campbell
2015-06-11 22:10               ` Don Slutz
2015-06-12  6:25                 ` Jan Beulich
2015-06-12 12:52                   ` Don Slutz
2015-06-23 16:14   ` Jan Beulich
2015-06-26 14:54     ` Don Slutz
2015-05-22 15:50 ` [PATCH v11 7/9] tools: Add " Don Slutz
2015-06-03 17:06   ` George Dunlap
2015-06-04 15:49     ` Ian Campbell
2015-06-04 16:09       ` Don Slutz
2015-06-04 15:20   ` Ian Campbell
2015-05-22 15:50 ` [PATCH v11 8/9] Add IOREQ_TYPE_VMWARE_PORT Don Slutz
2015-06-03 17:09   ` George Dunlap
2015-06-04 11:28     ` Don Slutz
2015-06-05  9:35       ` Jan Beulich
2015-06-05 10:03         ` Paul Durrant
2015-06-08 10:05       ` George Dunlap
2015-06-11 21:51         ` Don Slutz
2015-05-22 15:50 ` [PATCH v11 9/9] Add xentrace to vmware_port Don Slutz
2015-06-04 11:20   ` George Dunlap
2015-06-04 12:31     ` Don Slutz

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=55707A14.9080801@Gmail.com \
    --to=don.slutz@gmail.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dslutz@verizon.com \
    --cc=eddie.dong@intel.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jun.nakajima@intel.com \
    --cc=keir@xen.org \
    --cc=kevin.tian@intel.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --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.