All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Ian Campbell <Ian.Campbell@citrix.com>, Don Slutz <dslutz@verizon.com>
Cc: Kevin Tian <kevin.tian@intel.com>, Keir Fraser <keir@xen.org>,
	Eddie Dong <eddie.dong@intel.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	xen-devel@lists.xen.org, Jan Beulich <jbeulich@suse.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v2 3/3] Add limited support of VMware's hyper-call
Date: Tue, 09 Sep 2014 13:31:19 -0400	[thread overview]
Message-ID: <540F3967.5060001@terremark.com> (raw)
In-Reply-To: <1410255363.8217.62.camel@kazak.uk.xensource.com>

On 09/09/14 05:36, Ian Campbell wrote:
> On Mon, 2014-09-08 at 12:57 -0400, Don Slutz wrote:
>>>> Also this instruction is allowed to be used from ring 3.  To
>>>> support this the vmexit for GP needs to be enabled.
>>> Isn't that quite costly?
>> Yes.  But since that is how VMware does it, I need to do the same slow
>> thing.
> Sounds from other subthreads like there might be other better ways? It's
> hard to believe that vmware is really trapping every #GP.

I have not found a better way.  The simplest statement I have come
up with is that this is not a pass thru of the VMware device.  Or the
statement (in AMD land): Generate an IOIO #VMEXIT not a GP
#VMWEXIT for ioport <x> (or all ports).

And yes this sounds bad, until you think about how many GP #VMEXIT
are done.  For both Linux and Windows this is a small number (< 10).

Any others would be application ones.

I am working on making the GP #VMEXIT optional.


>>>> The support included is enough to allow VMware tools to install in a
>>>> HVM domU and provide guestinfo support.  guestinfo support is
>>>> provide by what is known as VMware RPC support.  This guestinfo
>>>> support is provided via libxc.  libxl support has not be written.
>>> I suppose this isn't a true RPC, since there isn't any actual running
>>> code on the remote side? (alternatively if you have added some sort of
>>> daemon backend to libxc then we need to talk ;-))
>> Nope, it is not a true RPC.  However that is the way VMware's
>> documentation talks about it.  However it is a very slow speed
>> way of passing data into or out of a domU.  At some point it
>> does make sense to consider how libxl might change to take
>> advantage of this, but I am sure that this is not happening for 4.5.
>>
>> This was why I provided the optional unit test code as an example
>> of the use of the libxc changes.
> So is the libxc code as proposed today actually used for anything?

Yes.  2 main areas:

1) Clean shutdown of windows guests with VMware tools installed.
      (acpi poweroff does not work if logged off).
2) set root's password and hostname at 1st boot of a template
     (done by VMware guestinfo).  Note: this could have been done with
     xenstore (XenBus?) but was not since we also use the VMware
     mouse support (not for 4.5, planned for 4.6 needs QEMU support).


>>>> +int xc_set_vmport_guest_info(xc_interface *handle,
>>>> +                             domid_t dom,
>>>> +                             unsigned int key_len,
>>>> +                             char *key,
>>>> +                             unsigned int val_len,
>>>> +                             char *val)
>>> Can key and val have embedded NULs?
>>>
>>> (another way of asking if we can treat one or both as a null terminated
>>> string)
>> I have not seen any embedded NULs for guest info, but the way they
>> are tansfered do include embedded NULs.  And so it is all coded to
>> handle strings with embedded NULs.
> OK.
>
>>>> +int xc_get_vmport_guest_info(xc_interface *handle,
>>>> +                             domid_t dom,
>>>> +                             unsigned int key_len,
>>>> +                             char *key,
>>>> +                             unsigned int val_max,
>>>> +                             unsigned int *val_len,
>>>> +                             char *val)
>>>> +int xc_fetch_vmport_guest_info(xc_interface *handle,
>>>> +                               domid_t dom,
>>>> +                               unsigned int idx,
>>>> +                               unsigned int key_max,
>>>> +                               unsigned int *key_len,
>>>> +                               char *key,
>>>> +                               unsigned int val_max,
>>>> +                               unsigned int *val_len,
>>>> +                               char *val)
>>> How do get and fetch differ? I can see how they differ in code terms,
>>> but I'm not sure why and what the differences imply.
>> get does just the specified key.  fetch is used to get all key value pairs.
>> It might helpp to look at v3 #15 which uses fetch vs v3 #14 which uses
>> get in the unit test code.
> Perhaps get and either get_all or fetch_all would be clearer names?

I will go with fetch_all.

     -Don Slutz

> Ian.
>
>

  reply	other threads:[~2014-09-09 17:31 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 15:33 [PATCH v2 0/3] Xen VMware tools support Don Slutz
2014-09-01 15:33 ` [PATCH v2 1/3] Add vmware_hw to xl.cfg Don Slutz
2014-09-02  7:28   ` Jan Beulich
2014-09-02 18:24     ` Don Slutz
2014-09-03  7:45       ` Jan Beulich
2014-09-03 10:59         ` Don Slutz
2014-09-03 12:33           ` Jan Beulich
2014-09-03 12:51             ` Don Slutz
2014-09-08 13:21           ` Ian Campbell
2014-09-08 13:47             ` Don Slutz
2014-09-08 13:55               ` Ian Campbell
2014-09-08 13:20         ` Ian Campbell
2014-09-08 13:56           ` Don Slutz
2014-09-08 14:07             ` Andrew Cooper
2014-09-08 18:39               ` Don Slutz
2014-09-08 22:11               ` Don Slutz
2014-09-08 23:34                 ` Andrew Cooper
2014-09-08 14:21             ` Jan Beulich
2014-09-08 15:16               ` Boris Ostrovsky
2014-09-08 15:27                 ` Jan Beulich
2014-09-08 22:41                   ` Don Slutz
2014-09-08 13:17   ` Ian Campbell
2014-09-08 13:27     ` Andrew Cooper
2014-09-08 13:41       ` Ian Campbell
2014-09-08 14:18         ` Don Slutz
2014-09-08 19:16     ` Don Slutz
2014-09-09  9:39       ` Ian Campbell
2014-09-09 17:02         ` Don Slutz
2014-09-10  9:30           ` Ian Campbell
2014-09-10 17:44             ` Don Slutz
2014-09-12 12:25             ` Slutz, Donald Christopher
2014-09-08 22:14     ` Don Slutz
2014-09-01 15:33 ` [PATCH v2 2/3] vmport: Add VMware provided include files Don Slutz
2014-09-02  7:34   ` Jan Beulich
2014-09-02 18:46     ` Don Slutz
2014-09-03  7:51       ` Jan Beulich
2014-09-03 12:38         ` Don Slutz
2014-09-01 15:33 ` [PATCH v2 3/3] Add limited support of VMware's hyper-call Don Slutz
2014-09-02  8:16   ` Jan Beulich
2014-09-03  0:55     ` Don Slutz
2014-09-03  8:25       ` Jan Beulich
2014-09-03 18:28         ` Don Slutz
2014-09-08 13:35   ` Ian Campbell
2014-09-08 16:57     ` Don Slutz
2014-09-09  9:36       ` Ian Campbell
2014-09-09 17:31         ` Don Slutz [this message]
2014-09-09 19:22           ` Boris Ostrovsky
2014-09-10  9:32           ` Ian Campbell
2014-09-10 17:25             ` Don Slutz
2014-09-01 16:10 ` [PATCH v2 0/3] Xen VMware tools support Jan Beulich
2014-09-01 18:14   ` Don Slutz
2014-09-08 13:03 ` Ian Campbell
2014-09-08 13:18   ` Don Slutz
2014-09-08 13:42     ` Ian Campbell

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=540F3967.5060001@terremark.com \
    --to=dslutz@verizon.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eddie.dong@intel.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.