Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752881AbdGFXDb (ORCPT ); Thu, 6 Jul 2017 19:03:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58832 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751956AbdGFXDa (ORCPT ); Thu, 6 Jul 2017 19:03:30 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 01E59A4F81 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=bsd@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 01E59A4F81 From: Bandan Das To: kvm@vger.kernel.org Cc: pbonzini@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/3 v2] Expose VMFUNC to the nested hypervisor Date: Thu, 6 Jul 2017 19:03:20 -0400 Message-Id: <20170706230323.29952-1-bsd@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 06 Jul 2017 23:03:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1057 Lines: 28 v2: 1/3: Patch to enable vmfunc on the host but cause a #UD if L1 tries to use it directly. (new) 2/3: Expose vmfunc to the nested hypervisor, but no vm functions are exposed and L0 emulates a vmfunc vmexit to L1. 3/3: Force a vmfunc vmexit when L2 tries to use vmfunc and emulate eptp switching. Unconditionally expose EPTP switching to the L1 hypervisor since L0 fakes eptp switching via a mmu reload. These patches expose eptp switching/vmfunc to the nested hypervisor. vmfunc is enabled in the secondary controls for the host and is exposed to the nested hypervisor. However, if the nested hypervisor decides to use eptp switching, L0 emulates it. v1: https://lkml.org/lkml/2017/6/29/958 Bandan Das (3): KVM: vmx: Enable VMFUNCs KVM: nVMX: Enable VMFUNC for the L1 hypervisor KVM: nVMX: Emulate EPTP switching for the L1 hypervisor arch/x86/include/asm/vmx.h | 9 ++++ arch/x86/kvm/vmx.c | 122 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 129 insertions(+), 2 deletions(-) -- 2.9.4