From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v2 1/4] KVM: x86: INIT and reset sequences are different Date: Tue, 07 Apr 2015 15:23:59 +0200 Message-ID: <5523DA6F.1050905@redhat.com> References: <1427933438-12782-1-git-send-email-namit@cs.technion.ac.il> <1427933438-12782-2-git-send-email-namit@cs.technion.ac.il> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: kvm@vger.kernel.org To: Bandan Das , Nadav Amit Return-path: Received: from mx1.redhat.com ([209.132.183.28]:43871 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756115AbbDGNYE (ORCPT ); Tue, 7 Apr 2015 09:24:04 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 02/04/2015 04:17, Bandan Das wrote: >> > x86 architecture defines differences between the reset and INIT sequences. >> > INIT does not initialize the FPU (including MMX, XMM, YMM, etc.), TSC, PMU, >> > MSRs (in general), MTRRs machine-check, APIC ID, APIC arbitration ID and BSP. >> > >> > EFER is supposed NOT to be reset according to the SDM, but leaving the LMA and >> > LME untouched causes failed VM-entry. Therefore we reset EFER (although it is >> > unclear whether the rest of EFER bits should be reset). > Thanks! This was actually in my todo list. #INIT and #RESET are actually separate pins > on the processor. So, shouldn't we differentiate between the two too by having > (*vcpu_init) and (*vcpu_reset) separate ? I think a bool argument is good enough. QEMU has different functions, and init ends up doing save/reset/restore which is pretty ugly. Paolo