From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57563 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PIN8j-0005fu-Sq for qemu-devel@nongnu.org; Tue, 16 Nov 2010 10:08:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PIN8i-0007zz-Cq for qemu-devel@nongnu.org; Tue, 16 Nov 2010 10:08:09 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:61586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PIN8i-0007zl-Ah for qemu-devel@nongnu.org; Tue, 16 Nov 2010 10:08:08 -0500 Received: by qwi2 with SMTP id 2so17990qwi.4 for ; Tue, 16 Nov 2010 07:08:08 -0800 (PST) Message-ID: <4CE29E55.8010902@codemonkey.ws> Date: Tue, 16 Nov 2010 09:08:05 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2 1/2] Minimal RAM API support References: <20101101150701.3927.88854.stgit@s20.home> <20101101151330.3927.32277.stgit@s20.home> <4CE29B44.1070202@codemonkey.ws> <10D1B822-58CC-4E56-88D5-014FA05E9056@suse.de> In-Reply-To: <10D1B822-58CC-4E56-88D5-014FA05E9056@suse.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: chrisw@redhat.com, kvm@vger.kernel.org, mst@redhat.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, Alex Williamson , ddutile@redhat.com On 11/16/2010 09:02 AM, Alexander Graf wrote: >>> +static QemuRamSlot *qemu_ram_find_slot(target_phys_addr_t start_addr, >>> + ram_addr_t size) >>> +{ >>> + QemuRamSlot *slot; >>> + >>> + QLIST_FOREACH(slot,&ram_slots.slots, next) { >>> + if (slot->start_addr == start_addr&& slot->size == size) { >>> + return slot; >>> + } >>> + >>> + if (ranges_overlap(start_addr, size, slot->start_addr, slot->size)) { >>> + abort(); >>> >>> >> Should display a message before aborting. >> > Why not use hw_error? > Another good suggestion. Regards, Anthony Liguori > Alex-- > 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 >