From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] kvm-userspace: x86: Support for breakpoints in ROM code Date: Tue, 17 Mar 2009 10:44:41 +0100 Message-ID: <49BF7109.5000207@siemens.com> References: <49BE9EF7.7010005@siemens.com> <49BEA02A.1070909@siemens.com> <49BF6E75.1070802@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Avi Kivity Return-path: Received: from lizzard.sbs.de ([194.138.37.39]:20909 "EHLO lizzard.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755953AbZCQJpk (ORCPT ); Tue, 17 Mar 2009 05:45:40 -0400 In-Reply-To: <49BF6E75.1070802@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Jan Kiszka wrote: >> Jan Kiszka wrote: >> >>> Align qemu-kvm-x86 with upstream kvm support /wrt software breakpoint >>> support in ROM code. >>> >> >> Hmm, this might not be needed as kvm-userspace is not protecting its >> ROM. That's why I didn't pushed this so far. However, aligning isn't >> bad. But dropping this duplication would be better... >> > > Aligning is a good thing (and duplication can be fixed in upstream and > merged here). But maybe cpu_memory_rw_debug() should use > cpu_physical_memory_write_rom() to write, instead of this hack? This is not a hack (it shouldn't have been merged upstream otherwise): cpu_physical_memory_write_rom() takes system-wide physical addresses while kvm_patch_opcode_byte() works with per-CPU linear addresses. And IMHO, the duplication needs to be fixed here by switching to upstream's kvm layer - at some point in the future. As a first step, we may have to look in making them compatible so that you can use the both layers at the same time. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux