From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Undocumented KVM_SET_LAPIC ioctl() Date: Wed, 27 Apr 2011 11:26:52 +0300 Message-ID: <20110427082652.GK2265@redhat.com> References: <4DB7C7D6.7000502@redhat.com> <4DB7D1CD.6080204@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Pekka Enberg , KVM General , Ingo Molnar , Cyrill Gorcunov To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62742 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752302Ab1D0I1F (ORCPT ); Wed, 27 Apr 2011 04:27:05 -0400 Content-Disposition: inline In-Reply-To: <4DB7D1CD.6080204@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Apr 27, 2011 at 11:20:29AM +0300, Avi Kivity wrote: > On 04/27/2011 10:53 AM, Pekka Enberg wrote: > >On Wed, Apr 27, 2011 at 10:37 AM, Avi Kivity wrote: > >> KVM_SET_GSI_ROUTING - manipulate the routes between irq lines and the IOAPIC > >> and PIC; also maintain virtual routes for message signalled interrupts (MSI) > > > >Is this mandatory to set up manually for lapic to work or does KVM set > >these up automatically (like it does for most ioctls) to something > >sane? > > The defaults are all sane (including the APIC ID). > But IIRC the only way to reset BSP lapic to its initial state is to call KVM_SET_LAPIC with buffer filled with initial values. The same is true for non-BSP lapics too if they are reset by machine reset (as opposite to by INIT message). -- Gleb.