Received: from eggs.gnu.org ([2001:4830:134:3::10]:54722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUdpx-0000XC-1G for qemu-devel@nongnu.org; Sun, 08 Mar 2015 12:13:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUdpq-0004Pu-Gk for qemu-devel@nongnu.org; Sun, 08 Mar 2015 12:13:52 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:33686) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUdpq-0004Pg-DI for qemu-devel@nongnu.org; Sun, 08 Mar 2015 12:13:46 -0400 Received: by qgef51 with SMTP id f51so23424357qge.0 for ; Sun, 08 Mar 2015 09:13:45 -0700 (PDT) Date: Sun, 8 Mar 2015 12:13:40 -0400 From: Kevin O'Connor Message-ID: <20150308161340.GA11259@morn.localdomain> References: <1425813387-31231-1-git-send-email-marcel@redhat.com> <1425813387-31231-14-git-send-email-marcel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1425813387-31231-14-git-send-email-marcel@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 for-2.3 13/25] hw/acpi: remove from root bus 0 the crs resources used by other busses. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: seabios@seabios.org, kraxel@redhat.com, mst@redhat.com, quintela@redhat.com, qemu-devel@nongnu.org, agraf@suse.de, alex.williamson@redhat.com, qemu-ppc@nongnu.org, hare@suse.de, imammedo@redhat.com, amit.shah@redhat.com, pbonzini@redhat.com, leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net On Sun, Mar 08, 2015 at 01:16:15PM +0200, Marcel Apfelbaum wrote: > If multiple root busses are used, root bus 0 cannot use all the > pci holes ranges. Remove the IO/mem ranges used by the other > primary busses. [...] > - aml_append(crs, > - aml_word_io(aml_min_fixed, aml_max_fixed, > - aml_pos_decode, aml_entire_range, > - 0x0000, 0x0D00, 0xFFFF, 0x0000, 0xF300)); > + > + /* prepare PCI IO ranges */ > + range.base = 0x0D00; > + range.limit = 0xFFFF; > + if (QLIST_EMPTY(&io_ranges)) { > + aml_append(crs, > + aml_word_io(aml_min_fixed, aml_max_fixed, > + aml_pos_decode, aml_entire_range, > + 0x0000, range.base, range.limit, > + 0x0000, range.limit - range.base + 1)); > + } else { > + QLIST_FOREACH(entry, &io_ranges, entry) { > + if (range.base < entry->base) { > + aml_append(crs, > + aml_word_io(aml_min_fixed, aml_max_fixed, > + aml_pos_decode, aml_entire_range, > + 0x0000, range.base, entry->base - 1, > + 0x0000, entry->base - range.base)); > + } > + range.base = entry->limit + 1; > + if (!QLIST_NEXT(entry, entry)) { > + aml_append(crs, > + aml_word_io(aml_min_fixed, aml_max_fixed, > + aml_pos_decode, aml_entire_range, > + 0x0000, range.base, range.limit, > + 0x0000, range.limit - range.base + 1)); > + } > + } > + } If I read this correctly, it looks like a machine with two root buses and 20 devices, each with one memory range and one io range, would end up with 40 CRS ranges (ie, a CRS range for every resource). It also looks like this furthers the requirement that the guest firmware assign the PCI resources prior to QEMU being able to generate the ACPI tables. Am I correct? If so, that doesn't sound ideal. -Kevin