From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daEsn-0000TT-81 for qemu-devel@nongnu.org; Wed, 26 Jul 2017 01:29:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daEsi-0008Ep-CF for qemu-devel@nongnu.org; Wed, 26 Jul 2017 01:29:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57186) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daEsi-0008DK-5p for qemu-devel@nongnu.org; Wed, 26 Jul 2017 01:29:12 -0400 Message-ID: <1501046944.29903.1.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 26 Jul 2017 07:29:04 +0200 In-Reply-To: <4e3f9aad-3528-59b4-1fab-d109cf49632a@redhat.com> References: <1500761743-1669-1-git-send-email-zuban32s@gmail.com> <1500761743-1669-6-git-send-email-zuban32s@gmail.com> <20170723055006-mutt-send-email-mst@kernel.org> <20170723173111-mutt-send-email-mst@kernel.org> <20170725165213-mutt-send-email-mst@kernel.org> <4e3f9aad-3528-59b4-1fab-d109cf49632a@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC PATCH v2 5/6] hw/pci: add bus_reserve property to pcie-root-port List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum , Alexander Bezzubikov , "Michael S. Tsirkin" Cc: Igor Mammedov , ehabkost@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, rth@twiddle.net, seabios@seabios.org Hi, > > Gerd's suggestion was to set min(cap_value, children_found). From > > such=C2=A0 > > point of view 0 can be a valid value. > >=20 >=20 > I am lost now :) > How can we use the capability to reserve "more" buses since > children-found will be always the smaller value? >=20 > I think you should use max(cap_value, children_found) to > ensure you always reserve enough buses for existing children. Was about to point out the same ;) Yes, should be max(reserve-buses, child-buses-found). And reserve- buses is actually a minimum, because the result can't be smaller than reserve-buses. cheers, Gerd