From patchwork Sat Jun 18 17:49:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 893582 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5IHnRmZ018490 for ; Sat, 18 Jun 2011 17:49:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751861Ab1FRRtX (ORCPT ); Sat, 18 Jun 2011 13:49:23 -0400 Received: from e23smtp06.au.ibm.com ([202.81.31.148]:44070 "EHLO e23smtp06.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751795Ab1FRRtV (ORCPT ); Sat, 18 Jun 2011 13:49:21 -0400 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [202.81.31.245]) by e23smtp06.au.ibm.com (8.14.4/8.13.1) with ESMTP id p5IHmbpD018098 for ; Sun, 19 Jun 2011 03:48:37 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p5IHnCO1712872 for ; Sun, 19 Jun 2011 03:49:12 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p5IHnCnN028445 for ; Sun, 19 Jun 2011 03:49:12 +1000 Received: from skywalker.in.ibm.com ([9.77.201.141]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id p5IHnAre028441; Sun, 19 Jun 2011 03:49:11 +1000 From: "Aneesh Kumar K.V" To: penberg@kernel.org Cc: kvm@vger.kernel.org, "Aneesh Kumar K.V" Subject: [PATCH 1/5] tools/kvm/9p: Use the same #define as the kernel Date: Sat, 18 Jun 2011 23:19:04 +0530 Message-Id: <1308419348-31934-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 18 Jun 2011 17:49:27 +0000 (UTC) Signed-off-by: Aneesh Kumar K.V --- tools/kvm/virtio/9p.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/kvm/virtio/9p.c b/tools/kvm/virtio/9p.c index 1545995..209760b 100644 --- a/tools/kvm/virtio/9p.c +++ b/tools/kvm/virtio/9p.c @@ -20,7 +20,7 @@ #include #define NUM_VIRT_QUEUES 1 -#define VIRTIO_P9_QUEUE_SIZE 128 +#define VIRTQUEUE_NUM 128 #define VIRTIO_P9_DEFAULT_TAG "kvm_9p" #define VIRTIO_P9_HDR_LEN (sizeof(u32)+sizeof(u8)+sizeof(u16)) #define VIRTIO_P9_MAX_FID 128 @@ -114,7 +114,7 @@ static bool virtio_p9_pci_io_in(struct ioport *ioport, struct kvm *kvm, ioport__write32(data, p9dev->vqs[p9dev->queue_selector].pfn); break; case VIRTIO_PCI_QUEUE_NUM: - ioport__write16(data, VIRTIO_P9_QUEUE_SIZE); + ioport__write16(data, VIRTQUEUE_NUM); break; case VIRTIO_PCI_STATUS: ioport__write8(data, p9dev->status); @@ -573,7 +573,7 @@ static bool virtio_p9_do_io_request(struct kvm *kvm, struct p9_dev_job *job) p9_handler *handler; struct virt_queue *vq; struct p9_dev *p9dev; - struct iovec iov[VIRTIO_P9_QUEUE_SIZE]; + struct iovec iov[VIRTQUEUE_NUM]; vq = job->vq; p9dev = job->p9dev; @@ -629,7 +629,7 @@ static bool virtio_p9_pci_io_out(struct ioport *ioport, struct kvm *kvm, queue->pfn = ioport__read32(data); p = guest_pfn_to_host(kvm, queue->pfn); - vring_init(&queue->vring, VIRTIO_P9_QUEUE_SIZE, p, + vring_init(&queue->vring, VIRTQUEUE_NUM, p, VIRTIO_PCI_VRING_ALIGN); *job = (struct p9_dev_job) {