Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966254AbdLSNVP (ORCPT ); Tue, 19 Dec 2017 08:21:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42550 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965422AbdLSNVO (ORCPT ); Tue, 19 Dec 2017 08:21:14 -0500 From: Vitaly Kuznetsov To: Paolo Bonzini Cc: kvm@vger.kernel.org, x86@kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley \(EOSG\)" , Mohammed Gamal , Cathy Avery , Bandan Das , Roman Kagan , linux-kernel@vger.kernel.org, devel@linuxdriverproject.org Subject: Re: [PATCH RFC 0/7] KVM: nVMX: enlightened VMCS initial implementation References: <20171218171742.5765-1-vkuznets@redhat.com> Date: Tue, 19 Dec 2017 14:21:07 +0100 In-Reply-To: (Paolo Bonzini's message of "Tue, 19 Dec 2017 13:41:58 +0100") Message-ID: <87po7alupo.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 19 Dec 2017 13:21:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 31 Paolo Bonzini writes: > On 18/12/2017 18:17, Vitaly Kuznetsov wrote: >> The original author of these patches does no longer work at Red Hat, I >> agreed to take this over and send upstream. Here is his original >> description: >> >> "Makes KVM implement the enlightened VMCS feature per Hyper-V TLFS 5.0b. >> I've measured about %5 improvement in cost of a nested VM exit (Hyper-V >> enabled Windows Server 2016 nested in KVM)." > > Can you try reproducing this and see how much a simple CPUID loop costs in: > > * Hyper-V on Hyper-V (with enlightened VMCS, as a proxy for a full > implementation including the clean fields mask) > > * Hyper-V on KVM, with and without enlightened VMCS > > The latest kvm/queue branch already cut a lot of the cost of a nested VM > exit (from ~22000 to ~14000 clock cycles for KVM on KVM), so we could > also see if Hyper-V needs shadowing of more fields. I tested this series before sending out and was able to reproduce said 5% improvement with the feature (but didn't keep record of clock cycles). I'll try doing tests you mentioned on the same hardware and come back with the result. Hopefully I'll manage that before holidays. Thanks, -- Vitaly