From: George Dunlap <george.dunlap@eu.citrix.com>
To: Don Slutz <dslutz@verizon.com>, 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>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
Jan Beulich <jbeulich@suse.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH v11 7/9] tools: Add vmware_port support
Date: Wed, 3 Jun 2015 18:06:06 +0100 [thread overview]
Message-ID: <556F33FE.4070700@eu.citrix.com> (raw)
In-Reply-To: <1432309826-6420-8-git-send-email-dslutz@verizon.com>
On 05/22/2015 04:50 PM, Don Slutz wrote:
> This new libxl_domain_create_info field is used to set
> XEN_DOMCTL_CONFIG_VMWARE_PORT_MASK in the xc_domain_configuration_t
> for x86.
>
> In xen it is is_vmware_port_enabled.
>
> If is_vmware_port_enabled then
> enable a limited support of VMware's hyper-call.
>
> VMware's hyper-call is also known as VMware Backdoor I/O Port.
>
> if vmware_port is not specified in the config file, let
> "vmware_hwver != 0" be the default value. This means that only
> vmware_hwver = 7 needs to be specified to enable both features.
>
> vmware_hwver = 7 is special because that is what controls the
> enable of CPUID leaves for VMware (vmware_hwver >= 7).
>
> Note: vmware_port and nestedhvm cannot be specified at the
> same time.
>
> Signed-off-by: Don Slutz <dslutz@verizon.com>
Ian:
So I *think* it may be the case that this patch only depends on patch 5
to apply. I also think that patches 5 and 7 together add another useful
"chunk" of functionality (core vmport functionality for guest OSes).
Patch 5 already has Andy's Reviewed-by (and can have my Ack as well),
and it seemed like previous versions of this patch were close to being
acceptable to you.
So if you wanted to give this a once-over, we could probably apply these
two without much trouble as well.
Then I think this series would also be off your plate. :-)
-George
> ---
> v11:
> Dropped "If non-zero then default VGA to VMware's VGA"
>
> v10:
> If..." at the start of the sentence ...
> Also, why is 7 special?
>
>
> docs/man/xl.cfg.pod.5 | 15 +++++++++++++++
> tools/libxl/libxl.h | 5 +++++
> tools/libxl/libxl_create.c | 9 +++++++++
> tools/libxl/libxl_types.idl | 1 +
> tools/libxl/libxl_x86.c | 2 ++
> tools/libxl/xl_cmdimpl.c | 1 +
> 6 files changed, 33 insertions(+)
>
> diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
> index eaad4bf..00aa78f 100644
> --- a/docs/man/xl.cfg.pod.5
> +++ b/docs/man/xl.cfg.pod.5
> @@ -1354,6 +1354,8 @@ Turns on or off the exposure of VMware cpuid. The number is
> VMware's hardware version number, where 0 is off. A number >= 7
> is needed to enable exposure of VMware cpuid.
>
> +If not zero it changes the default for vmware_port to on.
> +
> The hardware version number (vmware_hwver) come from VMware config files.
>
> =over 4
> @@ -1365,6 +1367,19 @@ For vssd:VirtualSystemType == vmx-07, vmware_hwver = 7.
>
> =back
>
> +=item B<vmware_port=BOOLEAN>
> +
> +Turns on or off the exposure of VMware port. This is known as
> +vmport in QEMU. Also called VMware Backdoor I/O Port. Not all
> +defined VMware backdoor commands are implemented. All of the
> +ones that Linux kernel uses are defined.
> +
> +Defaults to enabled if vmware_hwver is non-zero (i.e. enabled)
> +otherwise defaults to disabled.
> +
> +Note: vmware_port and nestedhvm cannot be specified at the
> +same time.
> +
> =back
>
> =head3 Emulated VGA Graphics Device
> diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h
> index 86164a7..fcce7c3 100644
> --- a/tools/libxl/libxl.h
> +++ b/tools/libxl/libxl.h
> @@ -205,6 +205,11 @@
> #define LIBXL_HAVE_LIBXL_VGA_INTERFACE_TYPE_VMWARE 1
>
> /*
> + * libxl_domain_create_info has the vmware_hwver and vmware_port field.
> + */
> +#define LIBXL_HAVE_CREATEINFO_VMWARE 1
> +
> +/*
> * libxl ABI compatibility
> *
> * The only guarantee which libxl makes regarding ABI compatibility
> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index 895577f..ac05ecc 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -41,6 +41,7 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
> libxl_defbool_setdefault(&c_info->hap, libxl_defbool_val(c_info->pvh));
> }
>
> + libxl_defbool_setdefault(&c_info->vmware_port, c_info->vmware_hwver != 0);
> libxl_defbool_setdefault(&c_info->run_hotplug_scripts, true);
> libxl_defbool_setdefault(&c_info->driver_domain, false);
>
> @@ -917,6 +918,14 @@ static void initiate_domain_create(libxl__egc *egc,
> ret = libxl__domain_build_info_setdefault(gc, &d_config->b_info);
> if (ret) goto error_out;
>
> + if (d_config->c_info.type == LIBXL_DOMAIN_TYPE_HVM &&
> + libxl_defbool_val(d_config->b_info.u.hvm.nested_hvm) &&
> + libxl_defbool_val(d_config->c_info.vmware_port)) {
> + LOG(ERROR,
> + "vmware_port and nestedhvm cannot be enabled simultaneously\n");
> + ret = ERROR_INVAL;
> + goto error_out;
> + }
> if (!sched_params_valid(gc, domid, &d_config->b_info.sched_params)) {
> LOG(ERROR, "Invalid scheduling parameters\n");
> ret = ERROR_INVAL;
> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> index c8a1345..c7af74b 100644
> --- a/tools/libxl/libxl_types.idl
> +++ b/tools/libxl/libxl_types.idl
> @@ -344,6 +344,7 @@ libxl_domain_create_info = Struct("domain_create_info",[
> ("pvh", libxl_defbool),
> ("driver_domain",libxl_defbool),
> ("vmware_hwver", uint64),
> + ("vmware_port", libxl_defbool),
> ], dir=DIR_IN)
>
> libxl_domain_restore_params = Struct("domain_restore_params", [
> diff --git a/tools/libxl/libxl_x86.c b/tools/libxl/libxl_x86.c
> index fd7dafa..404904a 100644
> --- a/tools/libxl/libxl_x86.c
> +++ b/tools/libxl/libxl_x86.c
> @@ -6,6 +6,8 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
> xc_domain_configuration_t *xc_config)
> {
> xc_config->vmware_hwver = d_config->c_info.vmware_hwver;
> + if (libxl_defbool_val(d_config->c_info.vmware_port))
> + xc_config->arch_flags |= XEN_DOMCTL_CONFIG_VMWARE_PORT_MASK;
> return 0;
> }
>
> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> index e79a9d0..b3fe0cd 100644
> --- a/tools/libxl/xl_cmdimpl.c
> +++ b/tools/libxl/xl_cmdimpl.c
> @@ -1230,6 +1230,7 @@ static void parse_config_data(const char *config_source,
> }
>
> xlu_cfg_get_defbool(config, "oos", &c_info->oos, 0);
> + xlu_cfg_get_defbool(config, "vmware_port", &c_info->vmware_port, 0);
>
> if (!xlu_cfg_get_string (config, "pool", &buf, 0))
> xlu_cfg_replace_string(config, "pool", &c_info->pool_name, 0);
>
next prev parent reply other threads:[~2015-06-03 17:06 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
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 [this message]
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=556F33FE.4070700@eu.citrix.com \
--to=george.dunlap@eu.citrix.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=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.