From: oritw@il.ibm.com Subject: Nested VMX support - kernel v1 Date: Wed, 2 Sep 2009 18:38:30 +0300 Message-ID: <1251905916-2834-1-git-send-email-oritw@il.ibm.com> Cc: oritw@il.ibm.com, benami@il.ibm.com, muli@il.ibm.com, abelg@il.ibm.com, aliguori@us.ibm.com, mmday@us.ibm.com To: kvm@vger.kernel.org Return-path: Received: from mtagate7.de.ibm.com ([195.212.17.167]:36326 "EHLO mtagate7.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752619AbZIBPig (ORCPT ); Wed, 2 Sep 2009 11:38:36 -0400 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.1/8.13.1) with ESMTP id n82FcbSw012091 for ; Wed, 2 Sep 2009 15:38:37 GMT Received: from d12av01.megacenter.de.ibm.com (d12av01.megacenter.de.ibm.com [9.149.165.212]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n82FcbO02727994 for ; Wed, 2 Sep 2009 17:38:37 +0200 Received: from d12av01.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av01.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n82FcbIr007829 for ; Wed, 2 Sep 2009 17:38:37 +0200 Sender: kvm-owner@vger.kernel.org List-ID: The following patches implement nested VMX support. The patches enable a guest to use the VMX APIs in order to run its own nested guest (i.e., enable running other hypervisors which use VMX under KVM). The current patches support running Linux under a nested KVM using shadow page table (with bypass_guest_pf disabled). SMP support was fixed. Reworking EPT support to mesh cleanly with the current shadow paging design per Avi's comments is a work-in-progress. The current patches only support a single nested hypervisor, which can only run a single guest (multiple guests are work in progress). Only 64-bit nested hypervisors are supported. Additional patches for running Windows under nested KVM, and Linux under nested VMware server(!), are currently running in the lab. We are in the process of forward-porting those patches to -tip. This patches were written by: Orit Wasserman, oritw@il.ibm.com Ben-Ami Yassor, benami@il.ibm.com Abel Gordon, abelg@il.ibm.com Muli Ben-Yehuda, muli@il.ibm.com With contributions by: Anthony Liguori, aliguori@us.ibm.com Mike Day, mmday@us.ibm.com This work was inspired by the nested SVM support by Alexander Graf and Joerg Roedel. Changes since v1: SMP support. Split into 6 smaller patches. Use nested_vmx structure for nested parameters. Use Array for shadow VMCS offsets.