From patchwork Fri Dec 14 16:57:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 10731469 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 142BD924 for ; Fri, 14 Dec 2018 16:58:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 704E72D0A5 for ; Fri, 14 Dec 2018 16:58:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6447B2D1A8; Fri, 14 Dec 2018 16:58:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BD23F2D0A5 for ; Fri, 14 Dec 2018 16:58:48 +0000 (UTC) Received: from localhost ([::1]:34496 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXqnX-0005p2-BT for patchwork-qemu-devel@patchwork.kernel.org; Fri, 14 Dec 2018 11:58:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59396) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gXqm7-0005hQ-OS for qemu-devel@nongnu.org; Fri, 14 Dec 2018 11:57:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gXqm4-0002MS-Tw for qemu-devel@nongnu.org; Fri, 14 Dec 2018 11:57:19 -0500 Received: from mail-eopbgr80118.outbound.protection.outlook.com ([40.107.8.118]:22409 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gXqm4-0001B5-IR for qemu-devel@nongnu.org; Fri, 14 Dec 2018 11:57:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=p3oVtzoNhtOvesTXszUFCX9SbHzUcPc44nJPcxekv5w=; b=DcdNyu70WgqR3hxnWRfLGfxZG7nnSlJJVK5L7vvEVa18SU1fl42OpRAKiQfSTbHFiSBrOEBCHRAoLmW6PtmAv0t2ji8dI4kcXaJIAlOBQOsqQMAKzGgoHxqnvqF1D/Rxw4ezP8n7chDv9Go0ASkmDcV17CX1pqs/3R6iO7vpGoc= Received: from DB8PR08MB4092.eurprd08.prod.outlook.com (20.179.10.210) by DB8PR08MB4010.eurprd08.prod.outlook.com (20.179.9.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1404.22; Fri, 14 Dec 2018 16:57:09 +0000 Received: from DB8PR08MB4092.eurprd08.prod.outlook.com ([fe80::d0e0:ff54:c6fe:1407]) by DB8PR08MB4092.eurprd08.prod.outlook.com ([fe80::d0e0:ff54:c6fe:1407%3]) with mapi id 15.20.1425.021; Fri, 14 Dec 2018 16:57:09 +0000 From: Roman Kagan To: "qemu-devel@nongnu.org" Thread-Topic: [RFC PATCH 4/5] virtio: drop DEFINE_VIRTIO_COMMON_FEATURES Thread-Index: AQHUk84MZwNBPHp0q0+qy1IhnsqV7w== Date: Fri, 14 Dec 2018 16:57:08 +0000 Message-ID: <20181214165657.749-5-rkagan@virtuozzo.com> References: <20181214165657.749-1-rkagan@virtuozzo.com> In-Reply-To: <20181214165657.749-1-rkagan@virtuozzo.com> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [185.231.240.5] x-clientproxiedby: HE1PR0401CA0073.eurprd04.prod.outlook.com (2603:10a6:3:19::41) To DB8PR08MB4092.eurprd08.prod.outlook.com (2603:10a6:10:ab::18) authentication-results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB8PR08MB4010; 20:tc0JmakU99h/UInrvlnZm3+Kpv54KL7yTx65uR8URwW/nNzWD7Jfn3tJ/wpnqG8/byElvaOFutNxcgrIw/E9Nu/KXjpNaWihSwE5GIa72iamkAw3rA8e/19CYvMZKIYqmLLJNfYu0NU4HOid/iomTqO6iEUsAKj1UUTa+LYlckc= x-ms-office365-filtering-correlation-id: 61c5a727-3275-495b-b21c-08d661e52f34 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:DB8PR08MB4010; x-ms-traffictypediagnostic: DB8PR08MB4010: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(3230021)(999002)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231475)(944501520)(52105112)(148016)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:DB8PR08MB4010; BCL:0; PCL:0; RULEID:; SRVR:DB8PR08MB4010; x-forefront-prvs: 08864C38AC x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(376002)(346002)(136003)(39850400004)(366004)(396003)(199004)(189003)(7736002)(486006)(2351001)(71190400001)(305945005)(81166006)(5660300001)(81156014)(36756003)(217873002)(6916009)(102836004)(2501003)(105586002)(6486002)(256004)(26005)(106356001)(446003)(8936002)(6512007)(76176011)(1076002)(316002)(6506007)(14454004)(3846002)(6116002)(54906003)(186003)(99286004)(11346002)(97736004)(8676002)(25786009)(52116002)(53936002)(2906002)(68736007)(4326008)(86362001)(476003)(2616005)(478600001)(5640700003)(71200400001)(386003)(66066001)(6436002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB8PR08MB4010; H:DB8PR08MB4092.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: p/iqDZbYRHThg1srPHHeUPIlQs2iYBCPFo6PGALWyjJcLUfkUd1eqs3OTZ0hcsuoRPvJWwv2YzWsO4aiZPgslaMukJQuEWDdSJTVB3j7SuxhkPAKqmD/KhU8MAqQbZFT4gB1d3AX7S6jYxZELXIwf77GqAys3W6KVVz2BM+H13vb6A+LoZ11hR9Fd0Tqi6zKelj1WHl63ZGP1pXiv0XExxvbpsvB92w1Fp710/iM7Z0z+5/MCl1Osd6mdQ3aSrs4wnptWF6udWVMNhNgAmPkhllLfTf+Kz3KNGlRpV62PXsYIM9aUZ4EmEk/nRbUE3Pq spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 61c5a727-3275-495b-b21c-08d661e52f34 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2018 16:57:08.9391 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB4010 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 40.107.8.118 Subject: [Qemu-devel] [RFC PATCH 4/5] virtio: drop DEFINE_VIRTIO_COMMON_FEATURES 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: Fam Zheng , "Michael S. Tsirkin" , Amit Shah , Markus Armbruster , Paolo Bonzini , =?iso-8859-1?q?Andreas_F=E4rber?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This macro is only used in one place so seems to be unnecessary. Signed-off-by: Roman Kagan --- include/hw/virtio/virtio.h | 12 ------------ hw/virtio/virtio.c | 11 ++++++++++- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 9c1fa07d6d..cea356efed 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -254,18 +254,6 @@ typedef struct virtio_input_conf virtio_input_conf; typedef struct VirtIOSCSIConf VirtIOSCSIConf; typedef struct VirtIORNGConf VirtIORNGConf; -#define DEFINE_VIRTIO_COMMON_FEATURES(_state, _field) \ - DEFINE_PROP_BIT64("indirect_desc", _state, _field, \ - VIRTIO_RING_F_INDIRECT_DESC, true), \ - DEFINE_PROP_BIT64("event_idx", _state, _field, \ - VIRTIO_RING_F_EVENT_IDX, true), \ - DEFINE_PROP_BIT64("notify_on_empty", _state, _field, \ - VIRTIO_F_NOTIFY_ON_EMPTY, true), \ - DEFINE_PROP_BIT64("any_layout", _state, _field, \ - VIRTIO_F_ANY_LAYOUT, true), \ - DEFINE_PROP_BIT64("iommu_platform", _state, _field, \ - VIRTIO_F_IOMMU_PLATFORM, false) - hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n); hwaddr virtio_queue_get_avail_addr(VirtIODevice *vdev, int n); hwaddr virtio_queue_get_used_addr(VirtIODevice *vdev, int n); diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 22bd1ac34e..99d396c516 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2601,7 +2601,16 @@ static void virtio_device_instance_finalize(Object *obj) } static Property virtio_properties[] = { - DEFINE_VIRTIO_COMMON_FEATURES(VirtIODevice, host_features), + DEFINE_PROP_BIT64("indirect_desc", VirtIODevice, host_features, + VIRTIO_RING_F_INDIRECT_DESC, true), + DEFINE_PROP_BIT64("event_idx", VirtIODevice, host_features, + VIRTIO_RING_F_EVENT_IDX, true), + DEFINE_PROP_BIT64("notify_on_empty", VirtIODevice, host_features, + VIRTIO_F_NOTIFY_ON_EMPTY, true), + DEFINE_PROP_BIT64("any_layout", VirtIODevice, host_features, + VIRTIO_F_ANY_LAYOUT, true), + DEFINE_PROP_BIT64("iommu_platform", VirtIODevice, host_features, + VIRTIO_F_IOMMU_PLATFORM, false), DEFINE_PROP_END_OF_LIST(), };