From patchwork Thu Nov 22 15:58:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Deacon X-Patchwork-Id: 1792821 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 19F63E013C for ; Thu, 22 Nov 2012 23:02:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752845Ab2KVXCA (ORCPT ); Thu, 22 Nov 2012 18:02:00 -0500 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:52264 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752720Ab2KVSah (ORCPT ); Thu, 22 Nov 2012 13:30:37 -0500 Received: from mudshark.cambridge.arm.com (mudshark.cambridge.arm.com [10.1.79.58]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id qAMFwJ53000646; Thu, 22 Nov 2012 15:58:19 GMT Received: by mudshark.cambridge.arm.com (Postfix, from userid 1000) id D7291C2B12; Thu, 22 Nov 2012 15:58:18 +0000 (GMT) From: Will Deacon To: kvm@vger.kernel.org Cc: penberg@kernel.org, marc.zyngier@arm.com, c.dall@virtualopensystems.com, matt@ozlabs.org, peter.maydell@linaro.org, michael@ellerman.id.au, levinsasha928@gmail.com, kvmarm@lists.cs.columbia.edu, Will Deacon Subject: [PATCH v2 3/8] kvm tools: balloon: add dummy set_size_vq implementation Date: Thu, 22 Nov 2012 15:58:12 +0000 Message-Id: <1353599897-15656-4-git-send-email-will.deacon@arm.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1353599897-15656-1-git-send-email-will.deacon@arm.com> References: <1353599897-15656-1-git-send-email-will.deacon@arm.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Commit 5e980d372620 ("kvm tools: virtio: add dummy set_size_vq implementations") added dummy set_size_vq implementations for a number of devices now that they can use virtio MMIO as their transport. Unfortunately, it missed the balloon driver, so this patch adds the same implementation there. Signed-off-by: Will Deacon --- tools/kvm/virtio/balloon.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/kvm/virtio/balloon.c b/tools/kvm/virtio/balloon.c index 3965b24..9edce87 100644 --- a/tools/kvm/virtio/balloon.c +++ b/tools/kvm/virtio/balloon.c @@ -232,6 +232,12 @@ static int get_size_vq(struct kvm *kvm, void *dev, u32 vq) return VIRTIO_BLN_QUEUE_SIZE; } +static int set_size_vq(struct kvm *kvm, void *dev, u32 vq, int size) +{ + /* FIXME: dynamic */ + return size; +} + struct virtio_ops bln_dev_virtio_ops = (struct virtio_ops) { .get_config = get_config, .get_host_features = get_host_features, @@ -240,6 +246,7 @@ struct virtio_ops bln_dev_virtio_ops = (struct virtio_ops) { .notify_vq = notify_vq, .get_pfn_vq = get_pfn_vq, .get_size_vq = get_size_vq, + .set_size_vq = set_size_vq, }; int virtio_bln__init(struct kvm *kvm)