From patchwork Thu Feb 20 18:13:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 25087 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f72.google.com (mail-pa0-f72.google.com [209.85.220.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 69748203C6 for ; Thu, 20 Feb 2014 18:14:52 +0000 (UTC) Received: by mail-pa0-f72.google.com with SMTP id rd3sf5770110pab.11 for ; Thu, 20 Feb 2014 10:14:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list:content-type; bh=MpyUZjssOTKtInAM3RvnX/uQRxIbk5SqaBQqShbGQY4=; b=XZQImkpykvSmOK15MX1IsrK+PIS94YebxpnumbDEMr0jXOdpKxqupSYuuBb67PKOZq qscXOYSOVBZB6PvswqDnrnlU8Ti7MtLtV98O3r3ps07gtjZFHZUJXS/yXhGGZnpMlM4N 3i1qNS1Zcqv8oNDOYR0NLT3S7JUU+ZOTXLsy9zMc2By47E670PgeNRXlivUlPa+W9m5T FzBP4kPRUf8/UzuK3ILSZC43TmpqEZUgvKU0emo9mdFdaTTIwQzHot6c2UmVhCTaypsz LhLlz3vIqA/+/1sNiXGByJZIo1PUGGJz0Vugz27lR8YGsVy/XfFuqyND6noNX5lSi7Ob 8MvA== X-Gm-Message-State: ALoCoQmIcZ3hDpkkqEtNqTcam5H/DEABduuQ0McxiDh4tHlz6nR5/AuSNRZe3j7YwKk5R89WJFVb X-Received: by 10.66.137.8 with SMTP id qe8mr1323283pab.46.1392920091548; Thu, 20 Feb 2014 10:14:51 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.105.230 with SMTP id c93ls617360qgf.35.gmail; Thu, 20 Feb 2014 10:14:51 -0800 (PST) X-Received: by 10.220.48.194 with SMTP id s2mr1755690vcf.43.1392920091317; Thu, 20 Feb 2014 10:14:51 -0800 (PST) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ke3si1787751veb.141.2014.02.20.10.14.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 10:14:51 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id im17so2251429vcb.33 for ; Thu, 20 Feb 2014 10:14:51 -0800 (PST) X-Received: by 10.52.61.168 with SMTP id q8mr1545619vdr.40.1392920091239; Thu, 20 Feb 2014 10:14:51 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp78786vcz; Thu, 20 Feb 2014 10:14:50 -0800 (PST) X-Received: by 10.14.104.201 with SMTP id i49mr3324569eeg.61.1392920090238; Thu, 20 Feb 2014 10:14:50 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id f4si10384506eet.149.2014.02.20.10.14.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 20 Feb 2014 10:14:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:40090 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGY92-0004e0-G1 for patch@linaro.org; Thu, 20 Feb 2014 13:14:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46320) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGY7w-0003OK-Ta for qemu-devel@nongnu.org; Thu, 20 Feb 2014 13:13:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGY7r-0008I6-Ls for qemu-devel@nongnu.org; Thu, 20 Feb 2014 13:13:40 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:16336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGY7r-0008Hz-I9 for qemu-devel@nongnu.org; Thu, 20 Feb 2014 13:13:35 -0500 X-IronPort-AV: E=Sophos;i="4.97,513,1389744000"; d="scan'208";a="102728301" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 20 Feb 2014 18:13:35 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Thu, 20 Feb 2014 13:13:34 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WGY7l-0006dM-8N; Thu, 20 Feb 2014 18:13:29 +0000 From: Stefano Stabellini To: Date: Thu, 20 Feb 2014 18:13:21 +0000 Message-ID: <1392920002-18522-1-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.63 Cc: peter.maydell@linaro.org, olaf@aepfle.de, xen-devel@lists.xensource.com, Stefano Stabellini , qemu-devel@nongnu.org, Anthony.Perard@citrix.com, pbonzini@redhat.com Subject: [Qemu-devel] [PULL 1/2] Call pci_piix3_xen_ide_unplug from unplug_disks X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.174 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Stefano Stabellini Acked-by: Paolo Bonzini --- hw/ide/piix.c | 3 +-- hw/xen/xen_platform.c | 3 ++- include/hw/ide.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 0eda301..40757eb 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -167,7 +167,7 @@ static int pci_piix_ide_initfn(PCIDevice *dev) return 0; } -static int pci_piix3_xen_ide_unplug(DeviceState *dev) +int pci_piix3_xen_ide_unplug(DeviceState *dev) { PCIIDEState *pci_ide; DriveInfo *di; @@ -266,7 +266,6 @@ static void piix3_ide_xen_class_init(ObjectClass *klass, void *data) k->device_id = PCI_DEVICE_ID_INTEL_82371SB_1; k->class_id = PCI_CLASS_STORAGE_IDE; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); - dc->unplug = pci_piix3_xen_ide_unplug; } static const TypeInfo piix3_ide_xen_info = { diff --git a/hw/xen/xen_platform.c b/hw/xen/xen_platform.c index 70875e4..1d9d0e9 100644 --- a/hw/xen/xen_platform.c +++ b/hw/xen/xen_platform.c @@ -27,6 +27,7 @@ #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/ide.h" #include "hw/pci/pci.h" #include "hw/irq.h" #include "hw/xen/xen_common.h" @@ -110,7 +111,7 @@ static void unplug_disks(PCIBus *b, PCIDevice *d, void *o) if (pci_get_word(d->config + PCI_CLASS_DEVICE) == PCI_CLASS_STORAGE_IDE && strcmp(d->name, "xen-pci-passthrough") != 0) { - qdev_unplug(DEVICE(d), NULL); + pci_piix3_xen_ide_unplug(DEVICE(d)); } } diff --git a/include/hw/ide.h b/include/hw/ide.h index 507e6d3..bc8bd32 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -17,6 +17,7 @@ void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table, PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); +int pci_piix3_xen_ide_unplug(DeviceState *dev); void vt82c686b_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); /* ide-mmio.c */