From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 4/4] KVM: Rework of guest debug state writing Date: Thu, 04 Feb 2010 20:21:08 +0100 Message-ID: <4B6B1E24.2090505@siemens.com> References: <372238c800e0d57815f472502fdf78e53463bbb6.1265232579.git.jan.kiszka@siemens.com> <20100203234929.GA11012@amt.cnet> <4B6A15EE.4050501@web.de> <20100204130038.GA15671@amt.cnet> <4B6AE1E6.9040805@siemens.com> <4B6AEAB8.3030509@siemens.com> <20100204180555.GA3861@amt.cnet> <4B6B179A.3080704@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , "qemu-devel@nongnu.org" , Avi Kivity , "kvm@vger.kernel.org" To: Marcelo Tosatti Return-path: Received: from david.siemens.de ([192.35.17.14]:24470 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932227Ab0BDTVr (ORCPT ); Thu, 4 Feb 2010 14:21:47 -0500 In-Reply-To: <4B6B179A.3080704@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > Marcelo Tosatti wrote: >> With kvm-autotest the failure is not sporadic (and the above commit >> applied): with KVM_SET_GUEST_DEBUG in arch_put_regs all migration >> tests fail, without, all of them succeed. >> >> So env->kvm_guest_debug has been zeroed by cpu_x86_init, which means >> the writeback via KVM_SET_GUEST_DEBUG does almost nothing. It does >> get_rflags and set_rflags in the kernel. > > Hmm, it also copies debug regs around... BTW, where do we save/restore > dr0..7 between kernel and user space? > > But that should not be a problem, both shadow as well as effective regs > should be properly initialized, specifically for a newly created VCPU. Could you retry after pushing SET_GUEST_DEBUG at the end of kvm_arch_put_registers? Maybe it is no good idea to run get/set_rflags without having the sregs properly initialized. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux