From patchwork Thu Sep 17 17:53:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 48319 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 n8HHsF6S002561 for ; Thu, 17 Sep 2009 17:54:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755233AbZIQRyK (ORCPT ); Thu, 17 Sep 2009 13:54:10 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754840AbZIQRyJ (ORCPT ); Thu, 17 Sep 2009 13:54:09 -0400 Received: from goliath.siemens.de ([192.35.17.28]:16262 "EHLO goliath.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbZIQRyI (ORCPT ); Thu, 17 Sep 2009 13:54:08 -0400 Received: from mail3.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n8HHrwRP030074; Thu, 17 Sep 2009 19:53:58 +0200 Received: from [139.25.109.167] (mchn012c.mchp.siemens.de [139.25.109.167] (may be forged)) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id n8HHrv2U028802; Thu, 17 Sep 2009 19:53:58 +0200 Message-ID: <4AB277B5.5000105@siemens.com> Date: Thu, 17 Sep 2009 19:53:57 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti CC: kvm-devel Subject: [PATCH] qemu-kvm: Fix guest single-stepping Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Hopefully the last regression of 4c0960c0: KVM_SET_GUEST_DEBUG requires properly synchronized guest registers (on x86: eflags) on entry. Signed-off-by: Jan Kiszka --- qemu-kvm.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/qemu-kvm.c b/qemu-kvm.c index 78eeb6f..569397e 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -2282,6 +2282,10 @@ static void kvm_invoke_set_guest_debug(void *data) { struct kvm_set_guest_debug_data *dbg_data = data; + if (cpu_single_env->kvm_cpu_state.regs_modified) { + kvm_arch_put_registers(cpu_single_env); + cpu_single_env->kvm_cpu_state.regs_modified = 0; + } dbg_data->err = kvm_set_guest_debug(cpu_single_env->kvm_cpu_state.vcpu_ctx, &dbg_data->dbg);