From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: Re: [SeaBIOS] [PATCH RFC] acpi: add ssdt for cpi hotplug Date: Wed, 02 Nov 2011 14:08:05 +0800 Message-ID: <4EB0DE45.1010200@cn.fujitsu.com> References: <20111101191139.GA18317@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: seabios@seabios.org, kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:51108 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750948Ab1KBGG1 (ORCPT ); Wed, 2 Nov 2011 02:06:27 -0400 In-Reply-To: <20111101191139.GA18317@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: At 11/02/2011 03:11 AM, Michael S. Tsirkin Write: > So here's the plan: move all hotplug handling out > to ssdt, this way it'll keep working even with a > user-supplied dsdt. Next step we can patch > this ssdt at runtime. > > There's little point in this change alone, so posting as RFC, > will repost with the patching part when it's ready, > posting now to present opportunity for early feedback. > > Compiled only. Hot plug on PCI bus 0 can not work with this patch. It can works without this patch. I have met the following warning messages when hot removing a PCI device: WARNING: at /builddir/build/BUILD/kernel-2.6.32-195.el6/linux-2.6.32-195.el6.i686/arch/x86/include/asm/dma-mapping.h:154 ___free_dma_mem_cluster+0xe1/0xf0 [sym53c8xx]() (Tainted : G W ---------------- ) Hardware name: Bochs Modules linked in: sym53c8xx scsi_transport_spi autofs4 sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 dm_mirror dm_region_hash dm_log virtio_net i6300esb virtio_balloon 8139too 8139cp mii i2c_piix4 i2c_core sg ext4 mbcache jbd2 virtio_blk sr_mod cdrom sd_mod crc_t10dif virtio_pci virtio_ring virtio pata_acpi ata_generic ata_piix dm_mod [last unloaded: mperf] Pid: 39, comm: kacpi_notify Tainted: G W ---------------- 2.6.32-195.el6.i686 #1 Call Trace: [] ? warn_slowpath_common+0x81/0xc0 [] ? ___free_dma_mem_cluster+0xe1/0xf0 [sym53c8xx] [] ? ___free_dma_mem_cluster+0xe1/0xf0 [sym53c8xx] [] ? warn_slowpath_null+0x1b/0x20 [] ? ___free_dma_mem_cluster+0xe1/0xf0 [sym53c8xx] [] ? __sym_mfree+0xa4/0xf0 [sym53c8xx] [] ? __sym_mfree_dma+0x56/0xd0 [sym53c8xx] [] ? sym_free_resources+0x4f/0x70 [sym53c8xx] [] ? sym_detach+0x97/0xc0 [sym53c8xx] [] ? sym2_remove+0x24/0x50 [sym53c8xx] [] ? pci_device_remove+0x16/0x40 [] ? __device_release_driver+0x4d/0xb0 [] ? device_release_driver+0x1d/0x30 [] ? bus_remove_device+0x7c/0xe0 [] ? device_del+0xdf/0x160 [] ? device_unregister+0x19/0x60 [] ? acpi_os_execute_deferred+0x0/0x23 [] ? pci_stop_bus_device+0x66/0x80 [] ? acpiphp_disable_slot+0x80/0x1a0 [] ? acpi_os_execute_deferred+0x0/0x23 [] ? handle_hotplug_event_func+0xb9/0x180 [] ? up+0xb/0x40 [] ? acpi_os_signal_semaphore+0x1e/0x23 [] ? acpi_ut_release_mutex+0x50/0x53 [] ? acpi_get_data+0x4a/0x58 [] ? acpi_os_execute_deferred+0x0/0x23 [] ? acpi_bus_get_device+0x18/0x2c [] ? acpi_ev_notify_dispatch+0x4c/0x55 [] ? acpi_os_execute_deferred+0x1a/0x23 [] ? worker_thread+0x11b/0x230 [] ? autoremove_wake_function+0x0/0x40 [] ? worker_thread+0x0/0x230 [] ? kthread+0x74/0x80 [] ? kthread+0x0/0x80 [] ? kernel_thread_helper+0x7/0x10 ---[ end trace 1261f0bed0518ca9 ]--- > > Signed-off-by: Michael S. Tsirkin