lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] x86/vmware: Add a header file for hypercall definitions
On Mon, Aug 19, 2019 at 12:28:05AM +0200, Thomas Hellström (VMware) wrote:
> Unfortunately we can't use it, because it's unconditionally set on AMD even
> if the VMware hypervisor
> doesn't support it (by version or by configuration).

AMD sets it because they don't support VMCALL. Nothing stops us from
making that conditional depending on what the hypervisor can/supports.
I'm thinking it would be even cleaner if we use those two flags:

X86_FEATURE_VMMCALL
X86_FEATURE_VMCALL

to denote hw support for either one or the other instruction and switch
accordingly. Just like KVM does.

In your case, the HV would set the preferred flag in
arch/x86/kernel/cpu/vmware.c - just like the others do in their
respective CPU init files - and the alternatives code would switch to it
when it runs.

Or is there more? :)

Thx.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

\
 
 \ /
  Last update: 2019-08-19 08:25    [W:0.055 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site