All of lore.kernel.org
 help / color / mirror / Atom feed
From: Don Slutz <dslutz@verizon.com>
To: Jan Beulich <JBeulich@suse.com>, Don Slutz <dslutz@verizon.com>
Cc: Tim Deegan <tim@xen.org>, 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>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org, Eddie Dong <eddie.dong@intel.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v2 2/3] vmport: Add VMware provided include files.
Date: Wed, 03 Sep 2014 08:38:28 -0400	[thread overview]
Message-ID: <54070BC4.3030706@terremark.com> (raw)
In-Reply-To: <5406E4A50200007800030124@mail.emea.novell.com>


On 09/03/14 03:51, Jan Beulich wrote:
>>>> On 02.09.14 at 20:46, <dslutz@verizon.com> wrote:
>> On 09/02/14 03:34, Jan Beulich wrote:
>>>>>> On 01.09.14 at 17:33, <dslutz@verizon.com> wrote:
>>>> These 2 files: backdoor_def.h and guest_msg_def.h come 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
>>>>      vmhgfs/guest_msg_def.h
>>>>
>>>> and are unchanged.
>>> Okay, I can the value in keeping them as is even if they're in
>>> conflict with some of our coding style rules. But ...
>>>
>>>> --- /dev/null
>>>> +++ b/xen/arch/x86/hvm/vmport/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_
>>> ... these guards have the (theoretical at this point) risk of clashing
>>> (apart from violating the C standard's naming rules) and ...
>>>
>> Yes. That is why I had the comment:
>>
>>
>> /* Note: VMPORT_PORT and VMPORT_MAGIC is also defined as BDOOR_PORT
>> * and BDOOR_MAGIC in backdoor_def.h Defined in vmport.h also.
>> */
>>
>> because I did not want the reset of xen to be including this file.
> I can't connect your response to my comment.

Reading it a again, I agree.  s/reset/rest/ helps a little.  Hope this
is better:


I put these files in the new vmware directory in order to prevent other
parts of xen from attempting to use these include files.  This is a work
around for any possible issue with them.  In v2 I had defined in a different
file the 2 numbers that are used else where.  It now looks like in v3 I
can fix this by having all uses contained in this new directory.

>> If I have found the right "C standard's naming rule", this file is not
>> alone in violating it:
> Yes, that's the one. And no, bad examples elsewhere aren't an
> excuse to introduce more bad code.

Fine with me.  I was also attempting to understand how it would need
to change.

>>>> +#define INCLUDE_ALLOW_MODULE
>>>> +#define INCLUDE_ALLOW_USERLEVEL
>>>> +#define INCLUDE_ALLOW_VMMEXT
>>>> +#define INCLUDE_ALLOW_VMCORE
>>>> +#define INCLUDE_ALLOW_VMKERNEL
>>>> +#include "includeCheck.h"
>>> ... the patch is obviously incomplete without this header, the name
>>> of which is certainly not in line with our way of naming files.
>> Yes. And an empty file of that name is added in the next patch.
> Question is - why not here (to make the set self consistent)?

I see no reason not to.  So I have added it here.

>> So I am getting the feeling is that it would be better to have a patch
>> adjusting these include files to better fit in xen, and then move them
>> out of the new xen/arch/x86/hvm/vmware directory.
> Not sure what makes you think so - as said earlier on, I can see
> the value of having the file mostly (if not entirely) identical to
> what is coming from VMware. That way, eventual future updates
> are going to be easier. All we need to avoid are eventual future
> naming clashes. Of course, if the headers are so badly written
> that the majority of their defines has a risk of clashing, then of
> course it might indeed be preferable to redo them in Xen style.

You are the 2nd person to point out issues with these files.  So I guess
I was jumping the gun in saying to change them and move them.  In any
case if I was to do the smallest change to make them better that would
be a 2nd patch.

Thinking more about it, it makes more sense to leave them in the vmware
directory.

     -Don Slutz


> Jan
>

  reply	other threads:[~2014-09-03 12:38 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 [this message]
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
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=54070BC4.3030706@terremark.com \
    --to=dslutz@verizon.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=JBeulich@suse.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=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.