From nobody Thu May 2 12:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516401331779990.9986007339884; Fri, 19 Jan 2018 14:35:31 -0800 (PST) Received: from localhost ([::1]:49938 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfFz-0001TU-20 for importer@patchew.org; Fri, 19 Jan 2018 17:35:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfCf-0007jw-Rd for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecfCe-0005IH-0J for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45082) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecfCd-0005FN-Qh for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:03 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 079D913D17; Fri, 19 Jan 2018 22:32:03 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-231.bos.redhat.com [10.18.17.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6595E64443; Fri, 19 Jan 2018 22:32:02 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 17:31:56 -0500 Message-Id: <20180119223159.29890-2-jsnow@redhat.com> In-Reply-To: <20180119223159.29890-1-jsnow@redhat.com> References: <20180119223159.29890-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 19 Jan 2018 22:32:03 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/4] ide: pass IDEState to trim AIO callback X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Anton Nefedov , jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Anton Nefedov It will be needed to handle invalid requests Signed-off-by: Anton Nefedov Message-id: 1512735034-35327-2-git-send-email-anton.nefedov@virtuozzo.com Signed-off-by: John Snow --- hw/ide/core.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 1ea5812b7e..875f7b442d 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -382,7 +382,7 @@ static void ide_set_signature(IDEState *s) =20 typedef struct TrimAIOCB { BlockAIOCB common; - BlockBackend *blk; + IDEState *s; QEMUBH *bh; int ret; QEMUIOVector *qiov; @@ -425,6 +425,8 @@ static void ide_trim_bh_cb(void *opaque) static void ide_issue_trim_cb(void *opaque, int ret) { TrimAIOCB *iocb =3D opaque; + IDEState *s =3D iocb->s; + if (ret >=3D 0) { while (iocb->j < iocb->qiov->niov) { int j =3D iocb->j; @@ -442,7 +444,7 @@ static void ide_issue_trim_cb(void *opaque, int ret) } =20 /* Got an entry! Submit and exit. */ - iocb->aiocb =3D blk_aio_pdiscard(iocb->blk, + iocb->aiocb =3D blk_aio_pdiscard(s->blk, sector << BDRV_SECTOR_BITS, count << BDRV_SECTOR_BITS, ide_issue_trim_cb, opaque); @@ -466,11 +468,11 @@ BlockAIOCB *ide_issue_trim( int64_t offset, QEMUIOVector *qiov, BlockCompletionFunc *cb, void *cb_opaque, void *opaque) { - BlockBackend *blk =3D opaque; + IDEState *s =3D opaque; TrimAIOCB *iocb; =20 - iocb =3D blk_aio_get(&trim_aiocb_info, blk, cb, cb_opaque); - iocb->blk =3D blk; + iocb =3D blk_aio_get(&trim_aiocb_info, s->blk, cb, cb_opaque); + iocb->s =3D s; iocb->bh =3D qemu_bh_new(ide_trim_bh_cb, iocb); iocb->ret =3D 0; iocb->qiov =3D qiov; @@ -900,7 +902,7 @@ static void ide_dma_cb(void *opaque, int ret) case IDE_DMA_TRIM: s->bus->dma->aiocb =3D dma_blk_io(blk_get_aio_context(s->blk), &s->sg, offset, BDRV_SECTOR_SIZE, - ide_issue_trim, s->blk, ide_dma_cb= , s, + ide_issue_trim, s, ide_dma_cb, s, DMA_DIRECTION_TO_DEVICE); break; default: --=20 2.14.3 From nobody Thu May 2 12:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516401573485882.982382063853; Fri, 19 Jan 2018 14:39:33 -0800 (PST) Received: from localhost ([::1]:50138 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfJm-0004T7-KO for importer@patchew.org; Fri, 19 Jan 2018 17:39:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfCf-0007jy-ST for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecfCe-0005Kt-N1 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49690) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecfCe-0005I3-HW for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:04 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ADD981A4085; Fri, 19 Jan 2018 22:32:03 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-231.bos.redhat.com [10.18.17.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 291BA81213; Fri, 19 Jan 2018 22:32:03 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 17:31:57 -0500 Message-Id: <20180119223159.29890-3-jsnow@redhat.com> In-Reply-To: <20180119223159.29890-1-jsnow@redhat.com> References: <20180119223159.29890-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 19 Jan 2018 22:32:03 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/4] ide: move ide_sect_range_ok() up X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Anton Nefedov , jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Anton Nefedov to use it without a forward declaration in the commit to follow Signed-off-by: Anton Nefedov Message-id: 1512735034-35327-3-git-send-email-anton.nefedov@virtuozzo.com Signed-off-by: John Snow --- hw/ide/core.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 875f7b442d..27226bfd51 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -380,6 +380,18 @@ static void ide_set_signature(IDEState *s) } } =20 +static bool ide_sect_range_ok(IDEState *s, + uint64_t sector, uint64_t nb_sectors) +{ + uint64_t total_sectors; + + blk_get_geometry(s->blk, &total_sectors); + if (sector > total_sectors || nb_sectors > total_sectors - sector) { + return false; + } + return true; +} + typedef struct TrimAIOCB { BlockAIOCB common; IDEState *s; @@ -603,18 +615,6 @@ static void ide_rw_error(IDEState *s) { ide_set_irq(s->bus); } =20 -static bool ide_sect_range_ok(IDEState *s, - uint64_t sector, uint64_t nb_sectors) -{ - uint64_t total_sectors; - - blk_get_geometry(s->blk, &total_sectors); - if (sector > total_sectors || nb_sectors > total_sectors - sector) { - return false; - } - return true; -} - static void ide_buffered_readv_cb(void *opaque, int ret) { IDEBufferedRequest *req =3D opaque; --=20 2.14.3 From nobody Thu May 2 12:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 151640145320152.409030075250485; Fri, 19 Jan 2018 14:37:33 -0800 (PST) Received: from localhost ([::1]:50082 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfHu-00033b-2k for importer@patchew.org; Fri, 19 Jan 2018 17:37:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfCg-0007kP-DK for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecfCf-0005NC-9i for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34526) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecfCf-0005KS-4e for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:05 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 58FE3C050049; Fri, 19 Jan 2018 22:32:04 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-231.bos.redhat.com [10.18.17.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC31081213; Fri, 19 Jan 2018 22:32:03 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 17:31:58 -0500 Message-Id: <20180119223159.29890-4-jsnow@redhat.com> In-Reply-To: <20180119223159.29890-1-jsnow@redhat.com> References: <20180119223159.29890-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 19 Jan 2018 22:32:04 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/4] ide: abort TRIM operation for invalid range X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Anton Nefedov , jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Anton Nefedov ATA8-ACS3, 7.9 DATA SET MANAGEMENT - 06h, DMA 7.9.5 Error Outputs If the Trim bit is set to one and: a) the device detects an invalid LBA Range Entry; or b) count is greater than IDENTIFY DEVICE data word 105 (see 7.16.7.55), then the device shall return command aborted. A device may trim one or more LBA Range Entries before it returns command aborted. See table 209. This check is not in the common ide_dma_cb() as the range for TRIM is harder to reach: it is not in LBA/count registers and the buffer has to be parsed first. Signed-off-by: Anton Nefedov Message-id: 1512735034-35327-4-git-send-email-anton.nefedov@virtuozzo.com Signed-off-by: John Snow --- hw/ide/core.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 27226bfd51..5be72d41dc 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -400,6 +400,7 @@ typedef struct TrimAIOCB { QEMUIOVector *qiov; BlockAIOCB *aiocb; int i, j; + bool is_invalid; } TrimAIOCB; =20 static void trim_aio_cancel(BlockAIOCB *acb) @@ -427,8 +428,11 @@ static void ide_trim_bh_cb(void *opaque) { TrimAIOCB *iocb =3D opaque; =20 - iocb->common.cb(iocb->common.opaque, iocb->ret); - + if (iocb->is_invalid) { + ide_dma_error(iocb->s); + } else { + iocb->common.cb(iocb->common.opaque, iocb->ret); + } qemu_bh_delete(iocb->bh); iocb->bh =3D NULL; qemu_aio_unref(iocb); @@ -455,6 +459,11 @@ static void ide_issue_trim_cb(void *opaque, int ret) continue; } =20 + if (!ide_sect_range_ok(s, sector, count)) { + iocb->is_invalid =3D true; + goto done; + } + /* Got an entry! Submit and exit. */ iocb->aiocb =3D blk_aio_pdiscard(s->blk, sector << BDRV_SECTOR_BITS, @@ -470,6 +479,7 @@ static void ide_issue_trim_cb(void *opaque, int ret) iocb->ret =3D ret; } =20 +done: iocb->aiocb =3D NULL; if (iocb->bh) { qemu_bh_schedule(iocb->bh); @@ -490,6 +500,7 @@ BlockAIOCB *ide_issue_trim( iocb->qiov =3D qiov; iocb->i =3D -1; iocb->j =3D 0; + iocb->is_invalid =3D false; ide_issue_trim_cb(iocb, 0); return &iocb->common; } --=20 2.14.3 From nobody Thu May 2 12:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1516401573132630.6364758128394; Fri, 19 Jan 2018 14:39:33 -0800 (PST) Received: from localhost ([::1]:50135 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfJi-0004R2-GW for importer@patchew.org; Fri, 19 Jan 2018 17:39:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ecfCg-0007kv-U6 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ecfCg-0005QQ-40 for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58560) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ecfCf-0005NU-UZ for qemu-devel@nongnu.org; Fri, 19 Jan 2018 17:32:06 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F2626C17; Fri, 19 Jan 2018 22:32:05 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-231.bos.redhat.com [10.18.17.231]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B56981210; Fri, 19 Jan 2018 22:32:04 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Fri, 19 Jan 2018 17:31:59 -0500 Message-Id: <20180119223159.29890-5-jsnow@redhat.com> In-Reply-To: <20180119223159.29890-1-jsnow@redhat.com> References: <20180119223159.29890-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 19 Jan 2018 22:32:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 4/4] hw/ide: Remove duplicated definitions from ahci_internal.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, Thomas Huth , jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The same definitions can also be found in include/hw/ide/ahci.h so let's remove these #defines from ahci_internal.h. Signed-off-by: Thomas Huth Message-id: 1512457825-3847-1-git-send-email-thuth@redhat.com [Maintainer edit: publicize object names, privatize object macros.] Signed-off-by: John Snow --- hw/ide/ahci_internal.h | 4 ---- include/hw/ide/ahci.h | 6 ------ 2 files changed, 10 deletions(-) diff --git a/hw/ide/ahci_internal.h b/hw/ide/ahci_internal.h index ce2e818c8c..8c755d4ca1 100644 --- a/hw/ide/ahci_internal.h +++ b/hw/ide/ahci_internal.h @@ -311,8 +311,6 @@ struct AHCIPCIState { AHCIState ahci; }; =20 -#define TYPE_ICH9_AHCI "ich9-ahci" - #define ICH_AHCI(obj) \ OBJECT_CHECK(AHCIPCIState, (obj), TYPE_ICH9_AHCI) =20 @@ -375,10 +373,8 @@ void ahci_uninit(AHCIState *s); =20 void ahci_reset(AHCIState *s); =20 -#define TYPE_SYSBUS_AHCI "sysbus-ahci" #define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_= AHCI) =20 -#define TYPE_ALLWINNER_AHCI "allwinner-ahci" #define ALLWINNER_AHCI(obj) OBJECT_CHECK(AllwinnerAHCIState, (obj), \ TYPE_ALLWINNER_AHCI) =20 diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 5a06537e6b..b7bb2b02d6 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -54,14 +54,10 @@ typedef struct AHCIPCIState AHCIPCIState; =20 #define TYPE_ICH9_AHCI "ich9-ahci" =20 -#define ICH_AHCI(obj) \ - OBJECT_CHECK(AHCIPCIState, (obj), TYPE_ICH9_AHCI) - int32_t ahci_get_num_ports(PCIDevice *dev); void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd); =20 #define TYPE_SYSBUS_AHCI "sysbus-ahci" -#define SYSBUS_AHCI(obj) OBJECT_CHECK(SysbusAHCIState, (obj), TYPE_SYSBUS_= AHCI) =20 typedef struct SysbusAHCIState { /*< private >*/ @@ -73,8 +69,6 @@ typedef struct SysbusAHCIState { } SysbusAHCIState; =20 #define TYPE_ALLWINNER_AHCI "allwinner-ahci" -#define ALLWINNER_AHCI(obj) OBJECT_CHECK(AllwinnerAHCIState, (obj), \ - TYPE_ALLWINNER_AHCI) =20 #define ALLWINNER_AHCI_MMIO_OFF 0x80 #define ALLWINNER_AHCI_MMIO_SIZE 0x80 --=20 2.14.3