From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Standardizing an MSR or other hypercall to get an RNG seed? Date: Thu, 18 Sep 2014 14:58:35 -0400 (EDT) Message-ID: <1969371640.51211843.1411066715223.JavaMail.zimbra@redhat.com> References: <5b9c7dcde3824e49a25f3ee00844b868@BY2PR0301MB0711.namprd03.prod.outlook.com> <541B13B8.1020006@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Andy Lutomirski Cc: Mathew John , Theodore Ts'o , John Starks , kvm list , Gleb Natapov , Niels Ferguson , David Hepkin , Linux Virtualization , "H. Peter Anvin" , Jake Oshins List-Id: virtualization@lists.linuxfoundation.org > > Actually, that MSR address range has been reserved for that purpose, along > > with: > > - CPUID.EAX=1 -> ECX bit 31 (always returns 0 on bare metal) > > - CPUID.EAX=4000_00xxH leaves (i.e. HYPERVISOR CPUID) > > I don't know whether this is documented anywhere, but Linux tries to > detect a hypervisor by searching CPUID leaves 0x400xyz00 for > "KVMKVMKVM\0\0\0", so at least Linux can handle the KVM leaves being > in a somewhat variable location. > > Do we consider this mechanism to work across all hypervisors and > guests? That is, could we put something like "CrossHVPara\0" > somewhere in that range, where each hypervisor would be free to decide > exactly where it ends up? That's also possible, but extending the hypervisor CPUID range beywond 400000FFH is not officially sanctioned by Intel. Xen started doing that in order to expose both Hyper-V and Xen CPUID leaves, and KVM followed the practice. Paolo