From: Don Slutz <dslutz@verizon.com>
To: 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>,
Jun Nakajima <jun.nakajima@intel.com>,
Eddie Dong <eddie.dong@intel.com>,
Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
George Dunlap <George.Dunlap@eu.citrix.com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
Jan Beulich <jbeulich@suse.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v10 05/10] xen: Add vmware_port support
Date: Wed, 20 May 2015 13:42:48 -0400 [thread overview]
Message-ID: <555CC798.20608@one.verizon.com> (raw)
In-Reply-To: <555B9BD3.7020301@citrix.com>
On 05/19/15 16:23, Andrew Cooper wrote:
> On 15/05/15 00:34, Don Slutz wrote:
>> This includes adding is_vmware_port_enabled
>>
>> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
>> index bc3d3a5..153048a 100644
>> --- a/xen/arch/x86/domain.c
>> +++ b/xen/arch/x86/domain.c
>> @@ -519,7 +519,11 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags,
>> (domcr_flags & DOMCRF_hap);
>> d->arch.hvm_domain.mem_sharing_enabled = 0;
>> if ( config )
>> + {
>> d->arch.hvm_domain.vmware_hwver = config->vmware_hwver;
>> + d->arch.hvm_domain.is_vmware_port_enabled =
>> + !!(config->arch_flags & XEN_DOMCTL_CONFIG_VMWARE_PORT_MASK);
>> + }
>
> This hunk is also subject to my rebase request from patch 2.
>
Yes, will re-base.
>>
>> d->arch.s3_integrity = !!(domcr_flags & DOMCRF_s3_integrity);
>>
>> +static int vmport_ioport(int dir, uint32_t port, uint32_t bytes, uint32_t *val)
>> +{
>> + struct cpu_user_regs *regs = guest_cpu_user_regs();
>> +
>> + /*
>> + * While VMware expects only 32-bit in, they do support using
>> + * other sizes and out. However they do require only the 1 port
>> + * and the correct value in eax. Since some of the data
>> + * returned in eax is smaller the 32 bits and/or you only need
>> + * the other registers the dir and bytes do not need any
>> + * checking. The caller will handle the bytes, and dir is
>> + * handled below for eax.
>> + */
>> + if ( port == BDOOR_PORT && regs->_eax == BDOOR_MAGIC )
>> + {
>> + uint32_t new_eax = ~0u;
>> + uint64_t value;
>> + struct vcpu *curr = current;
>> + struct domain *currd = curr->domain;
>> +
>> + ASSERT(is_hvm_domain(currd));
>
> You will not be getting here for a non HVM domain, but there is nothing
> anti PVH here. I would drop the assert.
>
Ok, will drop.
>> + /*
>> + * VMware changes the other (non eax) registers ignoring dir
>> + * (IN vs OUT). It also changes only the 32-bit part
>> + * leaving the high 32-bits unchanged, unlike what one would
>> + * expect to happen.
>> + */
>> + switch ( regs->_ecx & 0xffff )
>> + {
>> + case BDOOR_CMD_GETMHZ:
>> + new_eax = currd->arch.tsc_khz / 1000;
>> + break;
>
> Newlines after break statements please.
>
Will add.
>> + case BDOOR_CMD_GETVERSION:
>> + /* MAGIC */
>> + regs->_ebx = BDOOR_MAGIC;
...
>
> Otherwise, Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> I
> have not paid any attention to the implementation of the backdoor port
> handler, but everything else seems ok.
>
Thanks.
-Don Slutz
> ~Andrew
>
next prev parent reply other threads:[~2015-05-20 17:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-14 23:34 [PATCH v10 00/10] Xen VMware tools support Don Slutz
2015-05-14 23:34 ` [PATCH v10 01/10] tools: Add vga=vmware Don Slutz
2015-05-14 23:42 ` Andrew Cooper
2015-05-14 23:55 ` Don Slutz
2015-05-15 8:49 ` Ian Campbell
2015-05-20 17:40 ` Don Slutz
2015-05-20 22:52 ` Andrew Cooper
2015-05-14 23:34 ` [PATCH v10 02/10] xen: Add support for VMware cpuid leaves Don Slutz
2015-05-19 20:02 ` Andrew Cooper
2015-05-20 8:03 ` Julien Grall
2015-05-20 18:14 ` Don Slutz
2015-05-20 17:48 ` Don Slutz
2015-05-14 23:34 ` [PATCH v10 03/10] tools: Add vmware_hwver support Don Slutz
2015-05-14 23:34 ` [PATCH v10 04/10] vmware: Add VMware provided include file Don Slutz
2015-05-14 23:34 ` [PATCH v10 05/10] xen: Add vmware_port support Don Slutz
2015-05-19 20:23 ` Andrew Cooper
2015-05-20 17:42 ` Don Slutz [this message]
2015-05-14 23:34 ` [PATCH v10 06/10] xen: Add ring 3 " Don Slutz
2015-05-14 23:34 ` [PATCH v10 07/10] tools: Add " Don Slutz
2015-05-14 23:34 ` [PATCH v10 08/10] Add IOREQ_TYPE_VMWARE_PORT Don Slutz
2015-05-14 23:34 ` [PATCH v10 09/10] Add xentrace to vmware_port Don Slutz
2015-05-14 23:34 ` [PATCH v10 10/10] test_x86_emulator.c: Add tests for #GP usage 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=555CC798.20608@one.verizon.com \
--to=dslutz@verizon.com \
--cc=Aravind.Gopalakrishnan@amd.com \
--cc=George.Dunlap@eu.citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=eddie.dong@intel.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.