From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: how to debug unhandled vm exit: 0x11? Date: Mon, 11 Oct 2010 16:27:55 +0200 Message-ID: <4CB31EEB.7000306@redhat.com> References: <4C4DB46F.3070509@redhat.com> <1280167113.15451.15.camel@geektop> <4C4EAF44.9040002@redhat.com> <4CA2FAEC.6040800@redhat.com> <4CA5F045.4010308@redhat.com> <4CB2AEF8.4010003@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ewheeler , kvm@vger.kernel.org To: Neo Jia Return-path: Received: from mx1.redhat.com ([209.132.183.28]:41364 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754713Ab0JKO2D (ORCPT ); Mon, 11 Oct 2010 10:28:03 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 10/11/2010 08:49 AM, Neo Jia wrote: > On Sun, Oct 10, 2010 at 11:30 PM, Avi Kivity wrote: > > On 10/11/2010 07:46 AM, Neo Jia wrote: > >> > >> BTW, I have a question about saving FPU, especially those XMM > >> registers. I don't see an explicit save FPU after exiting guest due to > >> an exception (MMIO writes). The only thing I saw about fpu operation > >> is fpu restore right before loading guest. > >> > >> Is there anything I missed here? > > > > kvm_put_guest_fpu. > > I found that function and it will be called by vcpu_put eventually > inside kvm_arch_vcpu_ioctl_run, but kvm_mmu_page_fault is called much > earlier than that inside kvm exit exception handler. so, the fxsave > data for the guest image might not be saved at that moment, when I am > going to emulate this instruction? Just call it when you want to be sure it is in memory. -- error compiling committee.c: too many arguments to function