Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753758AbdLUMuj (ORCPT ); Thu, 21 Dec 2017 07:50:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44388 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752311AbdLUMuf (ORCPT ); Thu, 21 Dec 2017 07:50:35 -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> <87po7alupo.fsf@vitty.brq.redhat.com> Date: Thu, 21 Dec 2017 13:50:26 +0100 In-Reply-To: <87po7alupo.fsf@vitty.brq.redhat.com> (Vitaly Kuznetsov's message of "Tue, 19 Dec 2017 14:21:07 +0100") Message-ID: <87vah0w8h9.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.26]); Thu, 21 Dec 2017 12:50:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1590 Lines: 43 Vitaly Kuznetsov writes: > 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. I'm back with (somewhat frustrating) results (E5-2603): 1) Windows on Hyper-V (no nesting): 1350 cycles 2) Windows on Hyper-V on Hyper-V: 8600 3) Windows on KVM (no nesting): 1150 cycles 4) Windows on Hyper-V on KVM (no enlightened VMCS): 18200 5) Windows on Hyper-V on KVM (enlightened VMCS): 17100 -- Vitaly