From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60409 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PS4Wl-0001RY-Op for qemu-devel@nongnu.org; Mon, 13 Dec 2010 04:17:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PS4Wd-0001Al-3N for qemu-devel@nongnu.org; Mon, 13 Dec 2010 04:17:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:30407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PS4Wc-0001AM-PN for qemu-devel@nongnu.org; Mon, 13 Dec 2010 04:16:55 -0500 Date: Mon, 13 Dec 2010 11:16:51 +0200 From: Gleb Natapov Message-ID: <20101213091651.GB15610@redhat.com> References: <20101208170858.GA10056@amt.cnet> <4D032AB2.6080201@redhat.com> <20101213000017.GA8265@amt.cnet> <4D05DC35.8030009@redhat.com> <20101213084932.GZ15610@redhat.com> <4D05DEF3.60608@redhat.com> <20101213090359.GA15610@redhat.com> <4D05E30E.20309@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D05E30E.20309@redhat.com> Subject: [Qemu-devel] Re: [SeaBIOS] seabios: acpi: add _RMV control method for PCI devices List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Marcelo Tosatti , seabios@seabios.org, qemu-devel@nongnu.org On Mon, Dec 13, 2010 at 11:10:38AM +0200, Avi Kivity wrote: > On 12/13/2010 11:03 AM, Gleb Natapov wrote: > >> We could also deprecate the old port and use fwcfg for everything > >> (try fwcfg, fall back to ae00). > >> > >fwcfg designed to be simple for easy use by firmware. It has two port > >one for index another for value, so its use is racy in multi-threaded SMP > >environment. DSDT code is executed in such environment. There is lock > >facility in AML, but why complicate things. > > I prefer to remove complexity from interfaces and have it in the > implementation instead. I prefer whatever is simpler :) simpler == less bugs. And it is not like we discuss new interface here. You want to deprecate existing interface in favor of something that was not designed to handle the task. > > >> >> We could do this in two ways: by adding a fwcfg client to the DSDT, > >> >> or by copying the information to system memory, and referencing > >> >> system memory from the DSDT. > >> >> > >> >This is even worse. It requires some fixed address to be shared between > >> >DSDT and Seabios (or alternatively Seabios will have to generate this > >> >part of DSDT dynamically). > >> > > >> > >> Could easily be something in the F segment. > >> > >Yes, but then we will have two magic values (fwcfg index + address > >in F segment) instead of one (address of pci hot-plug controller). > > The F segment address is internal to SeaBIOS; it isn't an external > interface. > Depends on how you define external interface. It can be considered as interface between OSPM and firmware. Next time layout of F segment changes in SeaBIOS will you remember fixing DSDT too? -- Gleb.