Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753651AbdGJIyH (ORCPT ); Mon, 10 Jul 2017 04:54:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57828 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753374AbdGJIyF (ORCPT ); Mon, 10 Jul 2017 04:54:05 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0A43780C1D Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=david@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0A43780C1D Subject: Re: [PATCH 1/3 v2] KVM: vmx: Enable VMFUNCs To: Bandan Das , kvm@vger.kernel.org Cc: pbonzini@redhat.com, linux-kernel@vger.kernel.org References: <20170706230323.29952-1-bsd@redhat.com> <20170706230323.29952-2-bsd@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <71bb73d6-c64c-3fee-ea7d-4fa0f2d4682e@redhat.com> Date: Mon, 10 Jul 2017 10:54:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: <20170706230323.29952-2-bsd@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 10 Jul 2017 08:54:05 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 988 Lines: 35 > /* > * The exit handlers return 1 if the exit was handled fully and guest execution > * may resume. Otherwise they set the kvm_run parameter to indicate what needs > @@ -7790,6 +7806,7 @@ static int (*const kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = { > [EXIT_REASON_XSAVES] = handle_xsaves, > [EXIT_REASON_XRSTORS] = handle_xrstors, > [EXIT_REASON_PML_FULL] = handle_pml_full, > + [EXIT_REASON_VMFUNC] = handle_vmfunc, > [EXIT_REASON_PREEMPTION_TIMER] = handle_preemption_timer, > }; > > @@ -8111,6 +8128,9 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) > case EXIT_REASON_PML_FULL: > /* We emulate PML support to L1. */ > return false; > + case EXIT_REASON_VMFUNC: > + /* VM functions are emulated through L2->L0 vmexits. */ > + return false; This would fit better into the second patch. > default: > return true; > } > Looks good to me. -- Thanks, David