From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [Qemu-devel] [PATCH RFC] seabios: add OSHP method stub Date: Tue, 14 Feb 2012 16:11:57 +0200 Message-ID: <20120214141157.GA24489@redhat.com> References: <201202141249.09301.paul@codesourcery.com> <20120214133727.GA23647@redhat.com> <201202141348.00060.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, "Kevin O'Connor" , Kevin Wolf , kvm@vger.kernel.org, seabios@seabios.org, Isaku Yamahata , Avi Kivity To: Paul Brook Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38451 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760162Ab2BNOMQ (ORCPT ); Tue, 14 Feb 2012 09:12:16 -0500 Content-Disposition: inline In-Reply-To: <201202141348.00060.paul@codesourcery.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 14, 2012 at 01:47:59PM +0000, Paul Brook wrote: > > > > Now an OS can have a standard driver and use it > > > > to activate hotplug functionality. This is OS hotplug (OSHP). > > > > > > So presumably this will work on targets that don't have ACPI? > > > Assuming a competent guest OS of course. Have you tested this? > > > > This being the qemu side of things? I run Linux > > and verified that it calls OSHP and afterwards, > > runs the native driver and handles hotplug/unplug > > without invoking ACPI at all. > > I mean using your shiny new hotplug PCI-PCI bridge on arm/ppc/mips targets > (i.e anything other than x86 PC). From your description it sounds like it > *should* work. > > > It seems that at least the SHPC driver in linux > > doesn't work if you don't have an acpi table > > with the OSHP method - not many people run with acpi=off > > nowdays, so it's probably just a bug. > > I'll check how hard it is to fix this. > > Targets other than x86 don't have ACPI to start with. > > Paul So #ifdef CONFIG_ACPI #include static inline int get_hp_hw_control_from_firmware(struct pci_dev *dev) { u32 flags = OSC_SHPC_NATIVE_HP_CONTROL; return acpi_get_hp_hw_control_from_firmware(dev, flags); } #else #define get_hp_hw_control_from_firmware(dev) (0) #endif So if you build your guest without acpi, things should work fine. -- MMST