Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753358AbcKHWNA (ORCPT ); Tue, 8 Nov 2016 17:13:00 -0500 Received: from mail-qt0-f171.google.com ([209.85.216.171]:35821 "EHLO mail-qt0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbcKHWM4 (ORCPT ); Tue, 8 Nov 2016 17:12:56 -0500 MIME-Version: 1.0 In-Reply-To: <20161108183956.4521-8-khuey@kylehuey.com> References: <20161108183956.4521-1-khuey@kylehuey.com> <20161108183956.4521-8-khuey@kylehuey.com> From: David Matlack Date: Tue, 8 Nov 2016 14:12:24 -0800 Message-ID: Subject: Re: [PATCH v10 7/7] KVM: x86: virtualize cpuid faulting To: Kyle Huey Cc: "Robert O'Callahan" , Thomas Gleixner , Andy Lutomirski , Ingo Molnar , "H. Peter Anvin" , X86 ML , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Jeff Dike , Richard Weinberger , Alexander Viro , Shuah Khan , Dave Hansen , Borislav Petkov , Peter Zijlstra , Boris Ostrovsky , Len Brown , "Rafael J. Wysocki" , Dmitry Safonov , "linux-kernel@vger.kernel.org" , user-mode-linux-devel@lists.sourceforge.net, user-mode-linux-user@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, kvm list Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 537 Lines: 12 On Tue, Nov 8, 2016 at 10:39 AM, Kyle Huey wrote: > Hardware support for faulting on the cpuid instruction is not required to > emulate it, because cpuid triggers a VM exit anyways. KVM handles the relevant > MSRs (MSR_PLATFORM_INFO and MSR_MISC_FEATURES_ENABLE) and upon a > cpuid-induced VM exit checks the cpuid faulting state and the CPL. > kvm_require_cpl is even kind enough to inject the GP fault for us. > > Signed-off-by: Kyle Huey Reviewed-by: David Matlack (v10)