All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@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>,
	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 v9 04/13] vmware: Add VMware provided include file.
Date: Tue, 17 Feb 2015 10:03:40 +0000	[thread overview]
Message-ID: <54E311FC.4040509@citrix.com> (raw)
In-Reply-To: <1424127915-27004-5-git-send-email-dslutz@verizon.com>

On 16/02/15 23:05, Don Slutz wrote:
> This file: backdoor_def.h comes from:
>
> http://packages.vmware.com/tools/esx/3.5latest/rhel4/SRPMS/index.html
>  open-vm-tools-kmod-7.4.8-396269.423167.src.rpm
>   open-vm-tools-kmod-7.4.8.tar.gz
>    vmhgfs/backdoor_def.h
>
> and is unchanged.
>
> Added the badly named include file includeCheck.h also.  It only has
> a comment and is provided so that backdoor_def.h can be used without
> change.
>
> Signed-off-by: Don Slutz <dslutz@verizon.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

> ---
> v9:
>     Either the description is wrong, or the patch is stale.
>       stale commit message -- fixed.
>     I'd say a file with a single comment line in it would suffice.
>       Done.
>
>
>  xen/arch/x86/hvm/vmware/backdoor_def.h | 167 +++++++++++++++++++++++++++++++++
>  xen/arch/x86/hvm/vmware/includeCheck.h |   1 +
>  2 files changed, 168 insertions(+)
>  create mode 100644 xen/arch/x86/hvm/vmware/backdoor_def.h
>  create mode 100644 xen/arch/x86/hvm/vmware/includeCheck.h
>
> diff --git a/xen/arch/x86/hvm/vmware/backdoor_def.h b/xen/arch/x86/hvm/vmware/backdoor_def.h
> new file mode 100644
> index 0000000..e76795f
> --- /dev/null
> +++ b/xen/arch/x86/hvm/vmware/backdoor_def.h
> @@ -0,0 +1,167 @@
> +/* **********************************************************
> + * Copyright 1998 VMware, Inc.  All rights reserved. 
> + * **********************************************************
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms of the GNU General Public License as published by the
> + * Free Software Foundation version 2 and no later version.
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
> + * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
> + * for more details.
> + *
> + * You should have received a copy of the GNU General Public License along
> + * with this program; if not, write to the Free Software Foundation, Inc.,
> + * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
> + */
> +
> +/*
> + * backdoor_def.h --
> + *
> + * This contains backdoor defines that can be included from
> + * an assembly language file.
> + */
> +
> +
> +
> +#ifndef _BACKDOOR_DEF_H_
> +#define _BACKDOOR_DEF_H_
> +
> +#define INCLUDE_ALLOW_MODULE
> +#define INCLUDE_ALLOW_USERLEVEL
> +#define INCLUDE_ALLOW_VMMEXT
> +#define INCLUDE_ALLOW_VMCORE
> +#define INCLUDE_ALLOW_VMKERNEL
> +#include "includeCheck.h"
> +
> +/*
> + * If you want to add a new low-level backdoor call for a guest userland
> + * application, please consider using the GuestRpc mechanism instead. --hpreg
> + */
> +
> +#define BDOOR_MAGIC 0x564D5868
> +
> +/* Low-bandwidth backdoor port. --hpreg */
> +
> +#define BDOOR_PORT 0x5658
> +
> +#define BDOOR_CMD_GETMHZ      		   1
> +/*
> + * BDOOR_CMD_APMFUNCTION is used by:
> + *
> + * o The FrobOS code, which instead should either program the virtual chipset
> + *   (like the new BIOS code does, matthias offered to implement that), or not
> + *   use any VM-specific code (which requires that we correctly implement
> + *   "power off on CLI HLT" for SMP VMs, boris offered to implement that)
> + *
> + * o The old BIOS code, which will soon be jettisoned
> + *
> + *  --hpreg
> + */
> +#define BDOOR_CMD_APMFUNCTION 		   2
> +#define BDOOR_CMD_GETDISKGEO  		   3
> +#define BDOOR_CMD_GETPTRLOCATION	      4
> +#define BDOOR_CMD_SETPTRLOCATION	      5
> +#define BDOOR_CMD_GETSELLENGTH		   6
> +#define BDOOR_CMD_GETNEXTPIECE		   7
> +#define BDOOR_CMD_SETSELLENGTH		   8
> +#define BDOOR_CMD_SETNEXTPIECE		   9
> +#define BDOOR_CMD_GETVERSION		      10
> +#define BDOOR_CMD_GETDEVICELISTELEMENT	11
> +#define BDOOR_CMD_TOGGLEDEVICE		   12
> +#define BDOOR_CMD_GETGUIOPTIONS		   13
> +#define BDOOR_CMD_SETGUIOPTIONS		   14
> +#define BDOOR_CMD_GETSCREENSIZE		   15
> +#define BDOOR_CMD_MONITOR_CONTROL       16
> +#define BDOOR_CMD_GETHWVERSION          17
> +#define BDOOR_CMD_OSNOTFOUND            18
> +#define BDOOR_CMD_GETUUID               19
> +#define BDOOR_CMD_GETMEMSIZE            20
> +#define BDOOR_CMD_HOSTCOPY              21 /* Devel only */
> +/* BDOOR_CMD_GETOS2INTCURSOR, 22, is very old and defunct. Reuse. */
> +#define BDOOR_CMD_GETTIME               23 /* Deprecated. Use GETTIMEFULL. */
> +#define BDOOR_CMD_STOPCATCHUP           24
> +#define BDOOR_CMD_PUTCHR	        25 /* Devel only */
> +#define BDOOR_CMD_ENABLE_MSG	        26 /* Devel only */
> +#define BDOOR_CMD_GOTO_TCL	        27 /* Devel only */
> +#define BDOOR_CMD_INITPCIOPROM		28
> +#define BDOOR_CMD_INT13			29
> +#define BDOOR_CMD_MESSAGE               30
> +#define BDOOR_CMD_RSVD0                 31
> +#define BDOOR_CMD_RSVD1                 32
> +#define BDOOR_CMD_RSVD2                 33
> +#define BDOOR_CMD_ISACPIDISABLED	34
> +#define BDOOR_CMD_TOE			35 /* Not in use */
> +/* BDOOR_CMD_INITLSIOPROM, 36, was merged with 28. Reuse. */
> +#define BDOOR_CMD_PATCH_SMBIOS_STRUCTS  37
> +#define BDOOR_CMD_MAPMEM                38 /* Devel only */
> +#define BDOOR_CMD_ABSPOINTER_DATA	39
> +#define BDOOR_CMD_ABSPOINTER_STATUS	40
> +#define BDOOR_CMD_ABSPOINTER_COMMAND	41
> +#define BDOOR_CMD_TIMER_SPONGE          42
> +#define BDOOR_CMD_PATCH_ACPI_TABLES	43
> +/* Catch-all to allow synchronous tests */
> +#define BDOOR_CMD_DEVEL_FAKEHARDWARE	44 /* Debug only - needed in beta */
> +#define BDOOR_CMD_GETHZ      		45
> +#define BDOOR_CMD_GETTIMEFULL           46
> +#define BDOOR_CMD_STATELOGGER           47
> +#define BDOOR_CMD_CHECKFORCEBIOSSETUP	48
> +#define BDOOR_CMD_LAZYTIMEREMULATION    49
> +#define BDOOR_CMD_BIOSBBS               50
> +#define BDOOR_CMD_MAX                   51
> +
> +/* 
> + * IMPORTANT NOTE: When modifying the behavior of an existing backdoor command,
> + * you must adhere to the semantics expected by the oldest Tools who use that
> + * command. Specifically, do not alter the way in which the command modifies 
> + * the registers. Otherwise backwards compatibility will suffer.
> + */
> +
> +/* High-bandwidth backdoor port. --hpreg */
> +
> +#define BDOORHB_PORT 0x5659
> +
> +#define BDOORHB_CMD_MESSAGE 0
> +#define BDOORHB_CMD_MAX 1
> +
> +/*
> + * There is another backdoor which allows access to certain TSC-related
> + * values using otherwise illegal PMC indices when the pseudo_perfctr
> + * control flag is set.
> + */
> +
> +#define BDOOR_PMC_HW_TSC      0x10000
> +#define BDOOR_PMC_REAL_NS     0x10001
> +#define BDOOR_PMC_APPARENT_NS 0x10002
> +
> +#define IS_BDOOR_PMC(index)  (((index) | 3) == 0x10003)
> +#define BDOOR_CMD(ecx)       ((ecx) & 0xffff)
> +
> +
> +#ifdef VMM
> +/*
> + *----------------------------------------------------------------------
> + *
> + * Backdoor_CmdRequiresFullyValidVCPU --
> + *
> + *    A few backdoor commands require the full VCPU to be valid
> + *    (including GDTR, IDTR, TR and LDTR). The rest get read/write
> + *    access to GPRs and read access to Segment registers (selectors).
> + *
> + * Result:
> + *    True iff VECX contains a command that require the full VCPU to
> + *    be valid.
> + *
> + *----------------------------------------------------------------------
> + */
> +static INLINE Bool
> +Backdoor_CmdRequiresFullyValidVCPU(unsigned cmd)
> +{
> +   return cmd == BDOOR_CMD_RSVD0 ||
> +          cmd == BDOOR_CMD_RSVD1 ||
> +          cmd == BDOOR_CMD_RSVD2;
> +}
> +#endif
> +
> +#endif
> diff --git a/xen/arch/x86/hvm/vmware/includeCheck.h b/xen/arch/x86/hvm/vmware/includeCheck.h
> new file mode 100644
> index 0000000..3b63fa4
> --- /dev/null
> +++ b/xen/arch/x86/hvm/vmware/includeCheck.h
> @@ -0,0 +1 @@
> +/* Nothing here.  Just to use backdoor_def.h without change. */

  reply	other threads:[~2015-02-17 10:03 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 23:05 [PATCH v9 00/13] Xen VMware tools support Don Slutz
2015-02-16 23:05 ` [PATCH v9 01/13] hvm: Move MAX_INST_LEN into x86_emulate.h Don Slutz
2015-02-17  9:52   ` Andrew Cooper
2015-02-17 21:31     ` Don Slutz
2015-03-03 14:02   ` George Dunlap
2015-03-03 14:08     ` Andrew Cooper
2015-03-03 14:09       ` George Dunlap
2015-02-16 23:05 ` [PATCH v9 02/13] xen: Add support for VMware cpuid leaves Don Slutz
2015-02-17 10:02   ` Andrew Cooper
2015-02-17 15:57     ` Jan Beulich
2015-02-17 15:59       ` Andrew Cooper
2015-02-16 23:05 ` [PATCH v9 03/13] tools: Add vmware_hwver support Don Slutz
2015-03-03 14:14   ` Ian Campbell
2015-02-16 23:05 ` [PATCH v9 04/13] vmware: Add VMware provided include file Don Slutz
2015-02-17 10:03   ` Andrew Cooper [this message]
2015-02-16 23:05 ` [PATCH v9 05/13] xen: Add vmware_port support Don Slutz
2015-02-17 10:30   ` Andrew Cooper
2015-02-18  2:18     ` Don Slutz
2015-02-23 15:05   ` Jan Beulich
2015-02-23 16:03     ` Don Slutz
2015-02-23 16:28       ` Jan Beulich
2015-02-16 23:05 ` [PATCH v9 06/13] xen: Add ring 3 " Don Slutz
2015-02-17 14:38   ` Andrew Cooper
2015-02-18 17:03     ` Don Slutz
2015-02-18 18:19       ` Andrew Cooper
2015-02-21 13:36         ` Don Slutz
2015-02-21 15:40           ` Andrew Cooper
2015-02-21 16:06             ` Don Slutz
2015-02-23 15:12   ` Jan Beulich
2015-02-23 17:11     ` Don Slutz
2015-02-24  8:34       ` Jan Beulich
2015-02-24 17:14         ` Don Slutz
2015-02-25  8:39           ` Jan Beulich
2015-02-16 23:05 ` [PATCH v9 07/13] tools: Add " Don Slutz
2015-03-03 14:23   ` Ian Campbell
2015-05-14 23:10     ` Don Slutz
2015-02-16 23:05 ` [PATCH v9 08/13] Add IOREQ_TYPE_VMWARE_PORT Don Slutz
2015-02-17 10:08   ` Paul Durrant
2015-02-18  2:44     ` Don Slutz
2015-02-24 15:34   ` Jan Beulich
2015-02-25 20:20     ` Don Slutz
2015-02-26  8:07       ` Jan Beulich
2015-02-26 11:49         ` Paul Durrant
2015-02-26 14:55           ` Don Slutz
2015-02-26 15:00             ` Paul Durrant
2015-02-26 15:10             ` Jan Beulich
2015-02-26 19:52         ` Don Slutz
2015-02-27  7:48           ` Jan Beulich
2015-03-03 14:25   ` Ian Campbell
2015-02-16 23:05 ` [PATCH v9 09/13] Add xentrace to vmware_port Don Slutz
2015-02-17 13:45   ` Andrew Cooper
2015-02-17 18:22     ` Don Slutz
2015-02-23 16:57   ` Jan Beulich
2015-02-23 19:13     ` Don Slutz
2015-02-24  7:19       ` Jan Beulich
2015-03-03 14:27   ` Ian Campbell
2015-02-16 23:05 ` [PATCH v9 10/13] test_x86_emulator.c: Add typedef for boot_t Don Slutz
2015-02-17 14:44   ` Andrew Cooper
2015-02-17 22:46     ` Don Slutz
2015-02-16 23:05 ` [PATCH v9 11/13] test_x86_emulator.c: Add emacs block Don Slutz
2015-02-17 14:52   ` Andrew Cooper
2015-03-03 14:28     ` Ian Campbell
2015-03-03 14:31       ` Andrew Cooper
2015-02-16 23:05 ` [PATCH v9 12/13] test_x86_emulator.c: Add tests for #GP usage Don Slutz
2015-02-24 15:38   ` Jan Beulich
2015-02-24 18:29     ` Don Slutz
2015-02-25  8:30       ` Jan Beulich
2015-02-25 13:27         ` Don Slutz
2015-02-16 23:05 ` [OPTIONAL][PATCH v9 13/13] Add xen-hvm-param Don Slutz
2015-02-17 14:11   ` Andrew Cooper
2015-02-18  2:51     ` 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=54E311FC.4040509@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=George.Dunlap@eu.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.