From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [Qemu-devel] [PATCH v2 1/2] Minimal RAM API support Date: Tue, 16 Nov 2010 09:08:05 -0600 Message-ID: <4CE29E55.8010902@codemonkey.ws> References: <20101101150701.3927.88854.stgit@s20.home> <20101101151330.3927.32277.stgit@s20.home> <4CE29B44.1070202@codemonkey.ws> <10D1B822-58CC-4E56-88D5-014FA05E9056@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Alex Williamson , chrisw@redhat.com, kvm@vger.kernel.org, mst@redhat.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, ddutile@redhat.com To: Alexander Graf Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:46268 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752263Ab0KPPII (ORCPT ); Tue, 16 Nov 2010 10:08:08 -0500 Received: by qwh6 with SMTP id 6so603494qwh.19 for ; Tue, 16 Nov 2010 07:08:08 -0800 (PST) In-Reply-To: <10D1B822-58CC-4E56-88D5-014FA05E9056@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: 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 >