From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [SeaBIOS] [SeaBIOS PATCH 2/2] hotplug: Add device per func in ACPI DSDT tables Date: Mon, 19 Sep 2011 22:08:30 +0300 Message-ID: <20110919190830.GB9062@redhat.com> References: <20110919065338.22802.48911.stgit@t> <20110919095733.GO21417@redhat.com> <20110919100257.GE4501@redhat.com> <20110919162725.GA8337@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Gleb Natapov , Amos Kong , seabios@seabios.org, kvm@vger.kernel.org, jasowang@redhat.com, alex williamson To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:35579 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756451Ab1ISTHe (ORCPT ); Mon, 19 Sep 2011 15:07:34 -0400 Content-Disposition: inline In-Reply-To: <20110919162725.GA8337@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Sep 19, 2011 at 01:27:25PM -0300, Marcelo Tosatti wrote: > On Mon, Sep 19, 2011 at 01:02:59PM +0300, Michael S. Tsirkin wrote: > > On Mon, Sep 19, 2011 at 12:57:33PM +0300, Gleb Natapov wrote: > > > On Mon, Sep 19, 2011 at 03:27:38AM -0400, Amos Kong wrote: > > > > > > > > Only func 0 is registered to guest driver (we can > > > > only found func 0 in slot->funcs list of driver), > > > > the other functions could not be cleaned when > > > > hot-removing the whole slot. This patch adds > > > > device per function in ACPI DSDT tables. > > > > > > > You can't unplug a single function. Guest surely knows that. > > > > Looking at guest code, it's clear that > > at least a Linux guest doesn't know that. > > acpiphp_disable_slot function appears to eject all functions. Yes but the siblings list seems to be populated from the ACPI tables, but by probing PCI functions. So we need to, at a minimum, have Device tables for all functions. > > > > Have tested with linux/winxp/win7, hot-adding/hot-remving, > > > > single/multiple function device, they are all fine. > > > > > > Does not work for me (FC12 guest). As mentioned previously, Linux driver > looks for function 0 when injection request is seen (see enable_device > function in acpiphp_glue.c). What exactly are you trying to do? ATM the idea is to add all functions, add function 0 as the last one. > > > What was not fine before? > > > > > > Have you looked at real HW that supports PCI hot plug DSDT? Does it > > > looks the same? > > > > I recall I saw some examples like this on the net. > > > > > > > > new acpi-dst.hex(332K): > > > > http://amos-kong.rhcloud.com/pub/acpi-dsdt.hex > > > > > > > > Signed-off-by: Amos Kong