From: Don Slutz <don.slutz@gmail.com>
To: xen-devel@lists.xen.org
Cc: Jun Nakajima <jun.nakajima@intel.com>,
Wei Liu <wei.liu2@citrix.com>, Kevin Tian <kevin.tian@intel.com>,
Keir Fraser <keir@xen.org>,
Ian Campbell <ian.campbell@citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Eddie Dong <eddie.dong@intel.com>,
Don Slutz <don.slutz@gmail.com>, Don Slutz <dslutz@verizon.com>,
Tim Deegan <tim@xen.org>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
Jan Beulich <jbeulich@suse.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Ian Jackson <ian.jackson@eu.citrix.com>
Subject: [PATCH v13 3/8] tools: Add vmware_hwver support
Date: Sat, 28 Nov 2015 16:45:00 -0500 [thread overview]
Message-ID: <1448747105-19966-4-git-send-email-Don.Slutz@Gmail.com> (raw)
In-Reply-To: <1448747105-19966-1-git-send-email-Don.Slutz@Gmail.com>
From: Don Slutz <dslutz@verizon.com>
This is used to set xen_arch_domainconfig vmware_hw. It is set to
the emulated VMware virtual hardware version.
Currently 0, 3-4, 6-11 are good values. However the code only
checks for == 0, != 0, or < 7.
Signed-off-by: Don Slutz <dslutz@verizon.com>
CC: Don Slutz <don.slutz@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v13:
Added: Acked-by: Ian Campbell
v12:
I'm not sure this hunk has anything to do with this patch, nor
what the semantic difference between the old and new text is
supposed to be.
Dropped comment change.
v11:
Dropped "If non-zero then default VGA to VMware's VGA"
v10:
LIBXL_HAVE_LIBXL_VGA_INTERFACE_TYPE_VMWARE &
LIBXL_HAVE_BUILDINFO_HVM_VMWARE_HWVER are arriving together
a single umbrella could be used.
Since I split the LIBXL_VGA_INTERFACE_TYPE_VMWARE into
it's own patch, this is not longer true.
But I did use 1 for the 2 c_info changes.
Please use GCSPRINTF.
Remove vga=vmware from here.
v9:
I assumed that s/vmware_hw/vmware_hwver/ is not a big enough
change to drop the Reviewed-by. Did a minor edit to the
commit message to add 7 to the list of values checked.
v7:
Default handling of hvm.vga.kind bad.
Fixed.
Default of vmware_port should be based on vmware_hw.
Done.
v5:
Anything looking for Xen according to the Xen cpuid instructions...
Adjusted doc to new wording.
docs/man/xl.cfg.pod.5 | 17 +++++++++++++++++
tools/libxl/libxl_create.c | 4 +++-
tools/libxl/libxl_types.idl | 1 +
tools/libxl/libxl_x86.c | 3 +--
tools/libxl/xl_cmdimpl.c | 2 ++
5 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5
index 9a5744d..088ea00 100644
--- a/docs/man/xl.cfg.pod.5
+++ b/docs/man/xl.cfg.pod.5
@@ -1506,6 +1506,23 @@ The viridian option can be specified as a boolean. A value of true (1)
is equivalent to the list [ "defaults" ], and a value of false (0) is
equivalent to an empty list.
+=item B<vmware_hwver=NUMBER>
+
+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.
+
+The hardware version number (vmware_hwver) comes from VMware config files.
+
+=over 4
+
+In a .vmx it is virtualHW.version
+
+In a .ovf it is part of the value of vssd:VirtualSystemType.
+For vssd:VirtualSystemType == vmx-07, vmware_hwver = 7.
+
+=back
+
=back
=head3 Emulated VGA Graphics Device
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 8770486..291c569 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -423,7 +423,7 @@ int libxl__domain_build(libxl__gc *gc,
vments[4] = "start_time";
vments[5] = GCSPRINTF("%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
- localents = libxl__calloc(gc, 9, sizeof(char *));
+ localents = libxl__calloc(gc, 11, sizeof(char *));
i = 0;
localents[i++] = "platform/acpi";
localents[i++] = libxl_defbool_val(info->u.hvm.acpi) ? "1" : "0";
@@ -431,6 +431,8 @@ int libxl__domain_build(libxl__gc *gc,
localents[i++] = libxl_defbool_val(info->u.hvm.acpi_s3) ? "1" : "0";
localents[i++] = "platform/acpi_s4";
localents[i++] = libxl_defbool_val(info->u.hvm.acpi_s4) ? "1" : "0";
+ localents[i++] = "platform/vmware_hwver";
+ localents[i++] = GCSPRINTF("%"PRId64, d_config->c_info.vmware_hwver);
if (info->u.hvm.mmio_hole_memkb) {
uint64_t max_ram_below_4g =
(1ULL << 32) - (info->u.hvm.mmio_hole_memkb << 10);
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 4f46594..4c4bb8c 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -372,6 +372,7 @@ libxl_domain_create_info = Struct("domain_create_info",[
("run_hotplug_scripts",libxl_defbool),
("pvh", libxl_defbool),
("driver_domain",libxl_defbool),
+ ("vmware_hwver", uint64),
], 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 51a10b8..03e717d 100644
--- a/tools/libxl/libxl_x86.c
+++ b/tools/libxl/libxl_x86.c
@@ -12,8 +12,7 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
else
xc_config->emulation_flags = 0;
- /* Note: will be changed in next patch (tools: Add ...). */
- xc_config->vmware_hwver = 0;
+ xc_config->vmware_hwver = d_config->c_info.vmware_hwver;
return 0;
}
diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index 93d5295..abd776e 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -1485,6 +1485,8 @@ static void parse_config_data(const char *config_source,
b_info->cmdline = parse_cmdline(config);
xlu_cfg_get_defbool(config, "driver_domain", &c_info->driver_domain, 0);
+ if (!xlu_cfg_get_long(config, "vmware_hwver", &l, 1))
+ c_info->vmware_hwver = l;
switch(b_info->type) {
case LIBXL_DOMAIN_TYPE_HVM:
--
1.8.3.1
next prev parent reply other threads:[~2015-11-28 21:45 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 ` Don Slutz [this message]
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
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=1448747105-19966-4-git-send-email-Don.Slutz@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=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).