From: Paolo Bonzini Subject: Re: [PATCH RFC 01/39] KVM: x86: fix Xen hypercall page msr handling Date: Fri, 22 Feb 2019 13:51:23 +0100 Message-ID: <44b102eb-ea74-7f19-3f4a-41dfc298d372@redhat.com> References: <20190220201609.28290-1-joao.m.martins@oracle.com> <20190220201609.28290-2-joao.m.martins@oracle.com> <20190222013008.GG7224@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Ankur Arora , Boris Ostrovsky , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org To: Sean Christopherson , Joao Martins Return-path: In-Reply-To: <20190222013008.GG7224@linux.intel.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 22/02/19 02:30, Sean Christopherson wrote: > if (kvm_advertise_kvm()) { > if () > return ...; > } else if (kvm_advertise_hyperv()) { > if () > return ...; > } else if (kvm_advertise_xen()) { > if () > return ...; > } > > > > Obviously assumes KVM only advertises itself as one hypervisor, and so > the ordering is arbitrary. No, KVM can advertise as both KVM and Hyper-V. CPUID 0x40000000 is used for Hyper-V, while 0x40000100 is used for KVM. The MSRs do not conflict. Paolo