From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49224) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5bHu-0001ow-BT for Qemu-devel@nongnu.org; Thu, 18 Jun 2015 10:59:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5bHr-0002Oq-5E for Qemu-devel@nongnu.org; Thu, 18 Jun 2015 10:59:30 -0400 Received: from mail-yk0-f175.google.com ([209.85.160.175]:33942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5bHr-0002Ok-18 for Qemu-devel@nongnu.org; Thu, 18 Jun 2015 10:59:27 -0400 Received: by ykfl8 with SMTP id l8so68249339ykf.1 for ; Thu, 18 Jun 2015 07:59:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <5915E793-8982-4B5E-84C3-3565ACBF91A9@livius.net> From: Peter Maydell Date: Thu, 18 Jun 2015 15:59:06 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] How to trigger faults for missing peripherals? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liviu Ionescu Cc: QEMU Developers On 18 June 2015 at 15:30, Liviu Ionescu wrote: > >> On 18 Jun 2015, at 13:21, Peter Maydell wrote: >> >> ... "do_unassigned_access" is the QOM CPUClass hook for this, > > this hook seems associated with the "Trying to execute code outside > RAM or ROM at 0x" error, which is a bit different, I want to catch > read/write accesses, not execute accesses. read/write accesses call the hook via the code path: unassigned_mem_{read,write}() -> cpu_unassigned_access() (though this is part of the design issue I mentioned -- it means the hook gets called for *anything* that touches an unassigned address, even if it was the DMA controller and not the CPU at all. The hook calls need to be hoisted out of those functions and up to a higher level in the call tree.) -- PMM