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 1/3] Add vmware_hw to xl.cfg
Date: Tue, 02 Sep 2014 14:24:28 -0400 [thread overview]
Message-ID: <54060B5C.30205@terremark.com> (raw)
In-Reply-To: <54058DC3020000780002FB1D@mail.emea.novell.com>
On 09/02/14 03:28, Jan Beulich wrote:
>>>> On 01.09.14 at 17:33, <dslutz@verizon.com> wrote:
>> If non-zero then
>> Return VMware's cpuid leaves.
>> Not doing the hardcoded IRQ9 on PIIX4 ACPI PM.
>> Force use of VMware's VGA in QEMU.
>>
>> The support of hypervisor cpuid leaves has not been agreed to.
>>
>> MicroSoft Hyper-V (AKA viridian) currently must be at 0x40000000.
>>
>> VMware currently must be at 0x40000000.
>>
>> KVM currently must be at 0x40000000 (from Seabios).
>>
>> Seabios will find xen at 0x40000000, 0x40000100, 0x40000200 ..
>> 0x40010000.
>>
>> http://download.microsoft.com/download/F/B/0/FB0D01A3-8E3A-4F5F-AA59-08C8026D3B8
>> A/requirements-for-implementing-microsoft-hypervisor-interface.docx
>>
>> http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=disp
>> layKC&externalId=1009458
>>
>> http://lwn.net/Articles/301888/
>> Attempted to get this cleaned up.
>>
>> So based on this, I picked the order:
>>
>> 0x40000000 is viridian, vmware or xen
>> 0x40000100 is vmware or xen
>> 0x40000200 is xen
> Is there really a point in enabling both Viridian and VMware extensions
> at the same time?
Not that I know of (and I do not want to say there there is no code
out there that can work with both). Instead of an error or warning
I went with what xen is currently doing and that seabios was happy
to find xen at 0x40000200.
If the consensus is to ignore, or report an error or warning I will go that
way. For now I am not planning on changing.
>> @@ -149,8 +152,11 @@ void pci_setup(void)
>> pci_writew(devfn, 0x20, 0x0000); /* No smb bus IO enable */
>> pci_writew(devfn, 0xd2, 0x0000); /* No smb bus IO enable */
>> pci_writew(devfn, 0x22, 0x0000);
>> - pci_writew(devfn, 0x3c, 0x0009); /* Hardcoded IRQ9 */
>> - pci_writew(devfn, 0x3d, 0x0001);
>> + if ( !vmware_hw )
>> + {
>> + pci_writew(devfn, 0x3c, 0x0009); /* Hardcoded IRQ9 */
>> + pci_writew(devfn, 0x3d, 0x0001);
>> + }
> This needs an explanation (it is merely being mentioned in the
> description).
Ok, how does this comment sound:
/*
* When looking more like VMware, let the guest pick the
* PCI_INTERRUPT_LINE (0x3c) and the PCI_INTERRUPT_PIN(3d)
* instead of them being hardcoded. This allows for example
* lscpci in the guest to match for "PIIX4 ACPI PM" what
* one gets on VMware.
*/
I also plan to add this to the comment message:
The "not doing the hardcoded IRQ9 on PIIX4 ACPI PM" is only one of
many places where VMware's pci config space is different. There are
many that also need this kind of change in QEMU. That part is
outside the scope of this patch.
>> @@ -5692,6 +5695,22 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE_PARAM(void) arg)
>>
>> break;
>> }
>> + case HVM_PARAM_VMWARE_HW:
>> + /*
>> + * This should only ever be set non-zero one time by
>> + * the tools and is read only by the guest.
>> + */
>> + if ( d == current->domain )
>> + {
>> + rc = -EPERM;
>> + break;
>> + }
>> + if ( d->arch.hvm_domain.params[HVM_PARAM_VMWARE_HW] )
>> + {
>> + rc = -EEXIST;
>> + break;
>> + }
>> + break;
> Can you make this similar to Viridian, returning success when setting
> the value to what it already is.
Yes (but that patch is not there yet).
>> --- /dev/null
>> +++ b/xen/arch/x86/hvm/vmware.c
>> @@ -0,0 +1,85 @@
>> +/*
>> + * arch/x86/hvm/vmware.c
>> + *
>> + * Copyright (C) 2012 Verizon Corporation
>> + *
>> + * This file is free software; you can redistribute it and/or modify it
>> + * under the terms of the GNU General Public License Version 2 (GPLv2)
>> + * as published by the Free Software Foundation.
>> + *
>> + * This file 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. <http://www.gnu.org/licenses/>.
>> + */
>> +
>> +#include <xen/sched.h>
>> +#include <xen/version.h>
>> +#include <xen/perfc.h>
>> +#include <xen/hypercall.h>
>> +#include <xen/domain_page.h>
>> +#include <asm/paging.h>
>> +#include <asm/p2m.h>
>> +#include <asm/apic.h>
>> +#include <asm/hvm/support.h>
>> +
>> +#include <public/xen.h>
>> +#include <public/sched.h>
>> +#include <public/hvm/params.h>
>> +
>> +#include <asm/hvm/hvm.h>
>> +#include <asm/hvm/vlapic.h>
>> +#include <asm/hvm/vmware.h>
> Please keep all asm/ includes together. Also, are all above includes
> really needed? The list looks more like having got copied from
> somewhere else - e.g. I can't see a need for xen/perfc.h.
Yes they were copied. Will work out a smaller set.
>> +int cpuid_vmware_leaves(uint32_t idx, uint32_t sub_idx,
>> + uint32_t *eax, uint32_t *ebx,
>> + uint32_t *ecx, uint32_t *edx)
>> +{
> You don't seem to be using sub_idx: Is this a mistake, or are you
> passing the value in just in case of future extensions (in which
> case I'd be slightly in favor of not passing it for now)?
I was just copying cpuid_hypervisor_leaves() and missed that
it was not needed. Will remove.
>> --- a/xen/include/asm-x86/hvm/domain.h
>> +++ b/xen/include/asm-x86/hvm/domain.h
>> @@ -29,6 +29,7 @@
>> #include <asm/hvm/io.h>
>> #include <xen/hvm/iommu.h>
>> #include <asm/hvm/viridian.h>
>> +#include <asm/hvm/vmware.h>
> This being th only change to this file - why?
I was just following how viridian.h is done.
When I had it in just hvm.c, I remember other files not building. This
is no longer the case and so, this file is no longer changed.
-Don Slutz
> Jan
next prev parent reply other threads:[~2014-09-02 18:24 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 [this message]
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
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=54060B5C.30205@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 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).