From patchwork Wed Oct 23 13:35:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3088901 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BCE729F2B8 for ; Wed, 23 Oct 2013 14:00:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2E31203AF for ; Wed, 23 Oct 2013 14:00:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0D32620415 for ; Wed, 23 Oct 2013 14:00:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208Ab3JWOAQ (ORCPT ); Wed, 23 Oct 2013 10:00:16 -0400 Received: from ip-77-221-165-120.dsl.twang.net ([77.221.165.120]:44471 "EHLO hsia.quadriga.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750992Ab3JWOAP (ORCPT ); Wed, 23 Oct 2013 10:00:15 -0400 X-Greylist: delayed 1502 seconds by postgrey-1.27 at vger.kernel.org; Wed, 23 Oct 2013 10:00:15 EDT Received: from [192.168.63.17] (helo=mchn199C.mchp.siemens.de) by hsia.quadriga.com with esmtp (Exim 4.80.1) (envelope-from ) id 1VYyaZ-0006Mp-UP; Wed, 23 Oct 2013 14:35:08 +0100 Message-ID: <5267D085.3020403@siemens.com> Date: Wed, 23 Oct 2013 14:35:01 +0100 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Paolo Bonzini , Gleb Natapov CC: kvm Subject: [PATCH] KVM: nVMX: Report 2MB EPT pages as supported Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As long as the hardware provides us 2MB EPT pages, we can also expose them to the guest because our shadow EPT code already supports this feature. Signed-off-by: Jan Kiszka --- arch/x86/kvm/vmx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 06fd762..feef3a1 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2261,7 +2261,8 @@ static __init void nested_vmx_setup_ctls_msrs(void) /* nested EPT: emulate EPT also to L1 */ nested_vmx_secondary_ctls_high |= SECONDARY_EXEC_ENABLE_EPT; nested_vmx_ept_caps = VMX_EPT_PAGE_WALK_4_BIT | - VMX_EPTP_WB_BIT | VMX_EPT_INVEPT_BIT; + VMX_EPTP_WB_BIT | VMX_EPT_2MB_PAGE_BIT | + VMX_EPT_INVEPT_BIT; nested_vmx_ept_caps &= vmx_capability.ept; /* * Since invept is completely emulated we support both global