From patchwork Tue Aug 18 12:12:26 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 42326 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7ICCoso029279 for ; Tue, 18 Aug 2009 12:12:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758813AbZHRMMp (ORCPT ); Tue, 18 Aug 2009 08:12:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758807AbZHRMMp (ORCPT ); Tue, 18 Aug 2009 08:12:45 -0400 Received: from mx2.redhat.com ([66.187.237.31]:36202 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758662AbZHRMMo (ORCPT ); Tue, 18 Aug 2009 08:12:44 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7ICCU33006884; Tue, 18 Aug 2009 08:12:30 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7ICCS6U020995; Tue, 18 Aug 2009 08:12:28 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7ICCRlR021993; Tue, 18 Aug 2009 08:12:27 -0400 Received: from balrog.qumranet.com (dhcp-1-27.tlv.redhat.com [10.35.1.27]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 9BFC8250AD6; Tue, 18 Aug 2009 15:12:26 +0300 (IDT) Message-ID: <4A8A9AAA.7050305@redhat.com> Date: Tue, 18 Aug 2009 15:12:26 +0300 From: Avi Kivity User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3 MIME-Version: 1.0 To: Stephane Bakhos CC: Andre Przywara , thomas.besser@kit.edu, kvm@vger.kernel.org Subject: Re: Live migration stops working... (SEGFAULT) References: <1250536345-31917-1-git-send-email-andre.przywara@amd.com> In-Reply-To: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 08/18/2009 11:11 AM, Stephane Bakhos wrote: > > I've tried the patch and it did not help, however I could only have it > on the receiver of the migration. Would it need to be installed on the > one sending the data ? > > The guest kernel and userland are 32bits, the host's are 64 bits. > > I do not see any message about a faulting init. It needs to be on both. However try this better patch (attached, needs to be on both hosts). diff --git a/kvm/kernel/x86/svm.c b/kvm/kernel/x86/svm.c index e158a2f..6df3cea 100644 --- a/kvm/kernel/x86/svm.c +++ b/kvm/kernel/x86/svm.c @@ -101,9 +101,6 @@ struct vcpu_svm { unsigned long vmcb_pa; struct svm_cpu_data *svm_data; uint64_t asid_generation; - uint64_t sysenter_cs; - uint64_t sysenter_esp; - uint64_t sysenter_eip; u64 next_rip; @@ -2087,13 +2084,13 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) break; #endif case MSR_IA32_SYSENTER_CS: - *data = svm->sysenter_cs; + *data = svm->vmcb->save.sysenter_cs; break; case MSR_IA32_SYSENTER_EIP: - *data = svm->sysenter_eip; + *data = svm->vmcb->save.sysenter_eip; break; case MSR_IA32_SYSENTER_ESP: - *data = svm->sysenter_esp; + *data = svm->vmcb->save.sysenter_esp; break; /* Nobody will change the following 5 values in the VMCB so we can safely return them on rdmsr. They will always be 0 @@ -2176,13 +2173,13 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data) break; #endif case MSR_IA32_SYSENTER_CS: - svm->sysenter_cs = data; + svm->vmcb->save.sysenter_cs = data; break; case MSR_IA32_SYSENTER_EIP: - svm->sysenter_eip = data; + svm->vmcb->save.sysenter_eip = data; break; case MSR_IA32_SYSENTER_ESP: - svm->sysenter_esp = data; + svm->vmcb->save.sysenter_esp = data; break; case MSR_IA32_DEBUGCTLMSR: if (!svm_has(SVM_FEATURE_LBRV)) {