From owner-soc-status@freebsd.org Wed Jul 1 11:49:08 2015 Return-Path: Delivered-To: soc-status@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2724898DD23 for ; Wed, 1 Jul 2015 11:49:08 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B48171663 for ; Wed, 1 Jul 2015 11:49:07 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by wguu7 with SMTP id u7so34469241wgu.3 for ; Wed, 01 Jul 2015 04:49:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=RuuAxhZIsTJ/Uc0Q5KOYGnyMJ8JVIpDGMbgJndJkJ+E=; b=vuP4Dx/RW0P6ValaOGk2/5CeunkNDGMurmv8IyKmrvdjM1Nkcp52xBuHxGcKgVDJAw PeeHLUMlSXfS79DC8zzTaWMq/+Pzw3wCFFITlIsIhgup+uzP8wfOpnGM4IxIiQkPi9BX x+o7jpckVRQX1inSRQG9dM+eG8H2rZ/Fr32laYlMG/YcjpKK2C6TcfJGilgvjYsQH8Xo Mdt/CFoiwhJwRi547YH8emCiCQw3ZwB+hpj4qpH2o9akvgF1/wzGQe9za3MKE1xy1b2f AoqmEDRRHvCpinX+8OOU/niYdOMEe+LqTIovq5ajG/opddozn+FAkAhM1JlaH0DqYhPo E0eg== MIME-Version: 1.0 X-Received: by 10.195.11.168 with SMTP id ej8mr48591223wjd.150.1435751346178; Wed, 01 Jul 2015 04:49:06 -0700 (PDT) Received: by 10.28.21.134 with HTTP; Wed, 1 Jul 2015 04:49:06 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jul 2015 14:49:06 +0300 Message-ID: Subject: Re: [GSOC] bhyve port on ARM - weekly status report From: Mihai Carabas To: soc-status@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jul 2015 11:49:08 -0000 Hi everyone, Sorry for the late weekly status report. > Further I've written an initialization code for HYP mode, installing a > stub handler for HYP exception for platforms that have support for this. > The stub handler permits changing the exception vectors. Later, when the > vmm module will be loaded, the handler will be replaced by a fully fledged > one which will take care of VM context switch and various exceptions. [2] > > In the last week I copied the vmm code from amd64 platform and I stripped it down to only basic operations (vmm init/cleanup, vminit/cleanup and vmrun). I've written some code for mapping operation [1] (PL-2 stage1 and PL1 stage-2 - combined) for LPAE format (this is the only format supported in HYP-mode). Unfortunatelly the FreeBSD pmap code doesn't support LPAE format and I couldn't integrate memory management in the PMAP infrastructure (like it is currently in amd64 - this will be handled after this basic implementation because is an entire project that needs to be tackled). I've also been writing the low-level initialization code for the hypervisor to replace the stub code installed at boot time. Right now we are able to insert the vmm-arm.ko module which performs all the necesary initialization (installs the new exception vector, activates the MMU). When we remove the vmm-arm module the stub exception vector is reinstalled and the MMU deactivated, bringing the host to the initial state. Thank you, Mihai [1] https://svnweb.freebsd.org/socsvn/soc2015/mihai/bhyve-on-arm-head/sys/arm/vmm/mmu.c?view=markup