From mboxrd@z Thu Jan 1 00:00:00 1970 From: palutke.ralph@gmx.de Subject: how to check for already existing hypervisor? Date: Thu, 21 Jun 2012 01:00:54 +0200 Message-ID: <20120620230054.GA8864@mean_maschine.fritz.box> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Hi guys, let me shortly introduce myself. I'm a student and recently work on my bachelor thesis. My goal is to write a little hypervisor. I'm not quite sure if this is the right mailing list, but i guess you'll gonna tell me. i have two quick questions: 1. before i can use the vmxon instruction i do have to set vmxe flag in cr4 register. but what if some hypervisor is already running? is there a way to check if one is running?? 2. before i set the vmxe bit in cr4, i check if it is already enabled. i do this while my module gets loaded. but i observed a strange thing. sometimes the vmxe bit seems to be set while the other time it isn't. do you have any explanation for that behaviour? do i have to check if the bit is set before actually setting it? I've looked at a few hypervisor projects and it seems that no one does it. my primary thought was, if the bit is set a hypervisor is running, but i don't think that's true anymore. so do i need the check? greetings