From patchwork Fri Aug 19 13:39:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Kagan X-Patchwork-Id: 9290503 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A42616077B for ; Fri, 19 Aug 2016 16:11:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95891294B1 for ; Fri, 19 Aug 2016 16:11:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88CA6294D2; Fri, 19 Aug 2016 16:11:24 +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=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 B9035294B1 for ; Fri, 19 Aug 2016 16:11:22 +0000 (UTC) Received: from localhost ([::1]:58024 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bamO8-0007di-RX for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Aug 2016 12:11:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bamNo-0007cT-FG for qemu-devel@nongnu.org; Fri, 19 Aug 2016 12:11:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bamNh-0005xR-QI for qemu-devel@nongnu.org; Fri, 19 Aug 2016 12:10:59 -0400 Received: from mail-db5eur01on0117.outbound.protection.outlook.com ([104.47.2.117]:45622 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bamNe-0005wD-GQ for qemu-devel@nongnu.org; Fri, 19 Aug 2016 12:10:53 -0400 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; bh=Z3I05P4nrtVk+TeR90EmYRi/OgUivMMKW/vaFRi0l6Y=; b=crs3+FcN0P9lEZ0ymKptaKwUz23d2SxT+A7jH4StjuVcrQ+HZdTcEK04gt5Vcl0BxjN0KVfxUEHGs1Q0EZOUGHi/RZWBvTbu+nEjmSpWuu5XEYT42sbBKzNOg0fDQuV7yA61PdqulsMLF2agbqGZNyx50yv3DX4T7pnKmsvoxWs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=rkagan@virtuozzo.com; Received: from rkaganb.sw.ru (195.214.232.10) by DB6PR0802MB2469.eurprd08.prod.outlook.com (10.172.251.17) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.549.15; Fri, 19 Aug 2016 13:39:44 +0000 From: Roman Kagan To: Date: Fri, 19 Aug 2016 16:39:24 +0300 Message-ID: <1471613966-7267-6-git-send-email-rkagan@virtuozzo.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1471613966-7267-1-git-send-email-rkagan@virtuozzo.com> References: <1471613966-7267-1-git-send-email-rkagan@virtuozzo.com> MIME-Version: 1.0 X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: AM4PR01CA0021.eurprd01.prod.exchangelabs.com (10.164.74.159) To DB6PR0802MB2469.eurprd08.prod.outlook.com (10.172.251.17) X-MS-Office365-Filtering-Correlation-Id: 8c8733d0-813a-4e04-4dd6-08d3c8364805 X-Microsoft-Exchange-Diagnostics: 1;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QBq9DWvcL1a9ge1Eo0KaI=; 4:sPNZvbBGgVirATwAWKY6NDSgSFIcuAZEuOJGGVC4sdV8GzPmgFXBW1/wq+xy/pMflrH9xYwQr1nrBZ4nixCfinG8Uq3nwvmNqe1KuoHBJNEh12RozYPQmQj+UiRglYAb23BWHmLL70wmxp9fsW6p2PM2lvPCyeVm/ZUHjcHBx1fVFxzCRSqcF6dx3dPryWVXOea0eUKP67kSlWB6wWcazeoacJEGxFG7C8lh9iGLoM7RngFJ0JVBGo868C1fj44Pm8wm8uWvOGRB/26VQWiAgV00Grix+g/yQcexF5qjGnOlGyUbQ5b6Bp3ltfeAv2wCH9Dn8/J/h8mwbnFFDQXBbxm3uXrNr0AwZBcEBW9uQ/ZSkil0uorMOX+hrPKQWY5BkvF+wv81hOck4oIvlSeGFK5mExQRo5Nul6ldRV/dRT8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6043046)(6042046); SRVR:DB6PR0802MB2469; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0802MB2469; X-Forefront-PRVS: 0039C6E5C5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(33646002)(229853001)(305945005)(7736002)(81156014)(92566002)(8676002)(81166006)(7846002)(48376002)(105586002)(47776003)(66066001)(50466002)(101416001)(2906002)(4326007)(586003)(36756003)(2351001)(106356001)(86362001)(50986999)(76176999)(3846002)(6116002)(77096005)(5003940100001)(19580395003)(69596002)(19580405001)(97736004)(189998001)(68736007)(2950100001)(53416004)(110136002)(42186005)(50226002); DIR:OUT; SFP:1102; SCL:1; SRVR:DB6PR0802MB2469; H:rkaganb.sw.ru; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts)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uRUvmvlULxye81jw4Yg3BltTCethv7EHO5ZWPb8ctYLuLnF/D39HgC3NTc+L0GxsVpKsA2F6JyUC6Ru0dr5/vnfHrALf+5iRMc7uVaHmwsrwgHjFwg68LtJ+bU8/jI4JGODxvzXyRVWUkUIfrHeXJoEoXNIoWx3GSCyiqutefq8ir4zgAkNP1a SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0802MB2469; 20:Fq/xPYPg+SqK5Zp1UMfWdg4dQkSXWjba5ZXwfas3A3m9TAVduRpIT5OJ+b7GXU/YAZ5x7Q8zJy74Z5F5YbKvSOFYdfrxKO4SuvrJbnl8kQzpGkku1WnEFukv8pB//jImGA4QfXS1Lrl9tssbXG7YPZFRxmfF5GMCLYWXjukmmcw= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Aug 2016 13:39:44.4972 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2469 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.2.117 Subject: [Qemu-devel] [PATCH v2 5/6] virtio-balloon: drop ->stats_vq_offset 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: "Denis V. Lunev" , Ladi Prosek , Roman Kagan , Stefan Hajnoczi , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP As we don't write anything to guest on stats virtqueue we should pass len=0 to virtqueue_push(). This makes ->stats_vq_offset unnecessary, so drop it. Signed-off-by: Roman Kagan Cc: "Michael S. Tsirkin" Cc: Ladi Prosek Cc: Stefan Hajnoczi --- hw/virtio/virtio-balloon.c | 3 +-- include/hw/virtio/virtio-balloon.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index f00ad8e..056ae49 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -92,7 +92,7 @@ static void balloon_stats_push_elem(VirtIOBalloon *s) { VirtIODevice *vdev = VIRTIO_DEVICE(s); - virtqueue_push(s->svq, s->stats_vq_elem, s->stats_vq_offset); + virtqueue_push(s->svq, s->stats_vq_elem, 0); virtio_notify(vdev, s->svq); g_free(s->stats_vq_elem); s->stats_vq_elem = NULL; @@ -283,7 +283,6 @@ static void virtio_balloon_receive_stats(VirtIODevice *vdev, VirtQueue *vq) if (tag < VIRTIO_BALLOON_S_NR) s->stats[tag] = val; } - s->stats_vq_offset = offset; if (qemu_gettimeofday(&tv) < 0) { fprintf(stderr, "warning: %s: failed to get time of day\n", __func__); diff --git a/include/hw/virtio/virtio-balloon.h b/include/hw/virtio/virtio-balloon.h index d72ff7f..91b0138 100644 --- a/include/hw/virtio/virtio-balloon.h +++ b/include/hw/virtio/virtio-balloon.h @@ -38,7 +38,6 @@ typedef struct VirtIOBalloon { uint32_t actual; uint64_t stats[VIRTIO_BALLOON_S_NR]; VirtQueueElement *stats_vq_elem; - size_t stats_vq_offset; QEMUTimer *stats_timer; int64_t stats_last_update; int64_t stats_poll_interval;