From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jim Mattson Subject: [PATCH v2 0/3] Reduce the size of the vmcs_field_to_offset_table Date: Fri, 22 Dec 2017 12:09:04 -0800 Message-ID: <20171222200907.97331-1-jmattson@google.com> References: <20171221204623.164581-1-jmattson@google.com> Cc: Jim Mattson To: kvm@vger.kernel.org, Paolo Bonzini Return-path: Received: from mail-io0-f196.google.com ([209.85.223.196]:46651 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755940AbdLVUJz (ORCPT ); Fri, 22 Dec 2017 15:09:55 -0500 Received: by mail-io0-f196.google.com with SMTP id x129so25705934iod.13 for ; Fri, 22 Dec 2017 12:09:55 -0800 (PST) In-Reply-To: <20171221204623.164581-1-jmattson@google.com> Sender: kvm-owner@vger.kernel.org List-ID: The vmcs_field_to_offset_table is quite sparse, with its size determined by the highest VMCS field encoding (0x6c16 for HOST_RIP). To support multiple VMCS12 formats, we will need multiple vmcs_field_to_offset_tables, and it would be a shame to replicate this sparse table. Patches 1 and 2 are no longer necessary for v2, but I'm going to leave them in the patch set, because I still think they are worthwhile. Jim Mattson (3): kvm: vmx: Introduce VMCS12_MAX_FIELD_INDEX kvm: vmx: Change vmcs_field_type to vmcs_field_width kvm: vmx: Reduce size of vmcs_field_to_offset_table arch/x86/kvm/vmx.c | 86 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 49 insertions(+), 37 deletions(-) -- 2.15.1.620.gb9897f4670-goog