From patchwork Tue Dec 5 21:26:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= X-Patchwork-Id: 10093809 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CA56160348 for ; Tue, 5 Dec 2017 21:26:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BA59628923 for ; Tue, 5 Dec 2017 21:26:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AF27928932; Tue, 5 Dec 2017 21:26:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=2.0 tests=BAYES_00,HK_RANDOM_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6822E28923 for ; Tue, 5 Dec 2017 21:26:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbdLEV0p (ORCPT ); Tue, 5 Dec 2017 16:26:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37860 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751208AbdLEV0n (ORCPT ); Tue, 5 Dec 2017 16:26:43 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E44E7EA88; Tue, 5 Dec 2017 21:26:43 +0000 (UTC) Received: from flask (ovpn-204-21.brq.redhat.com [10.40.204.21]) by smtp.corp.redhat.com (Postfix) with SMTP id 59D4E19156; Tue, 5 Dec 2017 21:26:41 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Tue, 05 Dec 2017 22:26:40 +0100 Date: Tue, 5 Dec 2017 22:26:40 +0100 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Jim Mattson Cc: kvm@vger.kernel.org, P J P Subject: Re: [PATCH 2/2] KVM: VMX: Use just one page for I/O permission bitmaps Message-ID: <20171205212639.GD20099@flask> References: <20171201182110.7143-1-jmattson@google.com> <20171201182110.7143-2-jmattson@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171201182110.7143-2-jmattson@google.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 05 Dec 2017 21:26:43 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 2017-12-01 10:21-0800, Jim Mattson: > Since we no longer allow any I/O ports to be passed through to the guest, > we can use the same page for I/O bitmap A and I/O bitmap B. I think we can disable the feature and save the second page as well: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index e25c55ea2eb7..80859a7cdf6d 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3624,7 +3624,7 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf) #endif CPU_BASED_CR3_LOAD_EXITING | CPU_BASED_CR3_STORE_EXITING | - CPU_BASED_USE_IO_BITMAPS | + CPU_BASED_UNCOND_IO_EXITING | CPU_BASED_MOV_DR_EXITING | CPU_BASED_USE_TSC_OFFSETING | CPU_BASED_INVLPG_EXITING |