From: "Michael S. Tsirkin" Subject: Re: [PATCH] slow_map: minor improvements to ROM BAR handling Date: Wed, 23 Dec 2009 11:15:24 +0200 Message-ID: <20091223091524.GB3192@redhat.com> References: <20091222111044.GA16000@redhat.com> <4B30B603.8080707@suse.de> <20091222124311.GD16165@redhat.com> <4B30CAF2.4040409@suse.de> <20091222151911.GC18541@redhat.com> <4B30E470.2030001@redhat.com> <4B30E4BB.8000507@suse.de> <20091222152806.GA18676@redhat.com> <4B30E783.7080903@suse.de> <4B30E82A.5030702@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Alexander Graf , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:49197 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbZLWJSO (ORCPT ); Wed, 23 Dec 2009 04:18:14 -0500 Content-Disposition: inline In-Reply-To: <4B30E82A.5030702@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 22, 2009 at 05:39:22PM +0200, Avi Kivity wrote: > On 12/22/2009 05:36 PM, Alexander Graf wrote: >> >>> Is there a way to trap this and fprintf something? >>> >> I don't think so. KVM will just trap on execution outside of RAM and >> either fail badly or throw something bad into the guest. MMIO access >> works by analyzing the instruction that accesses the MMIO address. That >> just doesn't work when we don't have an instruction to analyze. >> > > We could certainly extend emulate.c to fetch instruction bytes from > userspace. It uses ->read_std() now, so we'd need to switch to > ->read_emulated() and add appropriate buffering. You mean run with KVM, and TCG will kick in when there's an instruction we can't support natively? > -- > error compiling committee.c: too many arguments to function