On Mon, Oct 11, 2010 at 7:27 AM, Avi Kivity <avi@xxxxxxxxxx> wrote: > On 10/11/2010 08:49 AM, Neo Jia wrote: >> >> On Sun, Oct 10, 2010 at 11:30 PM, Avi Kivity<avi@xxxxxxxxxx> 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. that helps and looks like my implementation is working. As I am debugging with kvm-88 version still, I need to integrate back to HEAD and add unit test. after that I will send out a patch for review. Thanks, Neo > > -- > error compiling committee.c: too many arguments to function > > -- I would remember that if researchers were not ambitious probably today we haven't the technology we are using! -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html