Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752070AbdLKFiE (ORCPT ); Mon, 11 Dec 2017 00:38:04 -0500 Received: from mail-ot0-f193.google.com ([74.125.82.193]:40646 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbdLKFiC (ORCPT ); Mon, 11 Dec 2017 00:38:02 -0500 X-Google-Smtp-Source: AGs4zMYlltmalXY7At4knkgrwTOnKVl96NoNXVk0R3ycq2REK4342ARGAloMCbfRIyO44z6kuApsmw== Subject: Re: [PATCH] KVM: VMX: drop I/O permission bitmaps To: Jim Mattson Cc: kvm list , LKML , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Paolo Bonzini , David Hildenbrand References: <1512728546-4365-1-git-send-email-quan.xu0@gmail.com> From: Quan Xu Message-ID: <4dfe07e2-e70d-0074-af17-9d27e73cc115@gmail.com> Date: Mon, 11 Dec 2017 13:37:55 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1530 Lines: 45 On 2017/12/09 01:31, Jim Mattson wrote: > On Fri, Dec 8, 2017 at 2:22 AM, Quan Xu wrote: >> From: Quan Xu >> >> Since KVM removes the only I/O port 0x80 bypass on Intel hosts, >> clear CPU_BASED_USE_IO_BITMAPS and set CPU_BASED_UNCOND_IO_EXITING >> bit. Then these I/O permission bitmaps are not used at all, so >> drop I/O permission bitmaps. >> >> Signed-off-by: Jim Mattson >> Signed-off-by: Radim Krčmář >> Signed-off-by: Quan Xu >> --- >> arch/x86/kvm/vmx.c | 17 +---------------- >> 1 files changed, 1 insertions(+), 16 deletions(-) >> >> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c >> index 2fd9a8c..3e4f760 100644 >> --- a/arch/x86/kvm/vmx.c >> +++ b/arch/x86/kvm/vmx.c >> @@ -771,8 +771,6 @@ enum segment_cache_field { >> FIELD(HOST_FS_SELECTOR, host_fs_selector), >> FIELD(HOST_GS_SELECTOR, host_gs_selector), >> FIELD(HOST_TR_SELECTOR, host_tr_selector), >> - FIELD64(IO_BITMAP_A, io_bitmap_a), >> - FIELD64(IO_BITMAP_B, io_bitmap_b), > These two lines should stay. Jim, could you explain why these two lines should stay? IIUC, the main concern is from  nested virtualization, which still uses io_bitmap_a/io_bitmap_b.. if so, we really need to further clean up these code, as CPU_BASED_USE_IO_BITMAPS is clear, and CPU_BASED_UNCOND_IO_EXITING is set for both L0/L2. after new patches which I mentioned in this thread. right? Alibaba Cloud Quan