From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: GET_SUPPORTED_CPUID and irqchip (was Re: kvm_pv_unhalt and kernel_irqchip=off) Date: Mon, 15 Aug 2016 20:32:37 +0200 Message-ID: <20160815183236.GC12385@potion> References: <20160810182704.GE5627@thinpad.lan.raisama.net> <20160810190412.GA8001@potion> <20160812183742.GM5627@thinpad.lan.raisama.net> <20160813124303.GA20960@potion> <20160815130346.GP5627@thinpad.lan.raisama.net> <20160815175059.GA12532@potion> <20160815180023.GR5627@thinpad.lan.raisama.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Marcelo Tosatti , Paolo Bonzini , peterx@redhat.com, Andrew Jones , kvm@vger.kernel.org To: Eduardo Habkost Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43182 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752713AbcHOScl (ORCPT ); Mon, 15 Aug 2016 14:32:41 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A18794E333 for ; Mon, 15 Aug 2016 18:32:40 +0000 (UTC) Content-Disposition: inline In-Reply-To: <20160815180023.GR5627@thinpad.lan.raisama.net> Sender: kvm-owner@vger.kernel.org List-ID: 2016-08-15 15:00-0300, Eduardo Habkost: > On Mon, Aug 15, 2016 at 07:50:59PM +0200, Radim Krčmář wrote: > [...] >> +static void kvm_clear_invalid_cpuid(struct kvm_vcpu *vcpu) >> +{ >> + struct kvm *kvm = vcpu->kvm; >> + struct kvm_cpuid_entry2 *best; >> + >> + if (!kvm->clear_invalid_cpuid) >> + return; >> + >> + best = kvm_find_cpuid_entry(vcpu, 1, 0); >> + if (best && !lapic_in_kernel(vcpu)) >> + best->ecx &= ~F(X2APIC); > > Isn't it possible to implement x2apic support in userspace APIC > using the current KVM interfaces? No, MSR accesses never get to userspace. We'll probably implement it in the future as there already has been a proposal for unhandled MSRs.