From patchwork Mon Apr 14 12:06:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kurz X-Patchwork-Id: 338932 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 ozlabs.org (Postfix) with ESMTPS id CC9DC1400CF for ; Mon, 14 Apr 2014 22:07:01 +1000 (EST) Received: from localhost ([::1]:42697 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZff9-0001la-Jk for incoming@patchwork.ozlabs.org; Mon, 14 Apr 2014 08:06:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZfeb-0001d5-Jz for qemu-devel@nongnu.org; Mon, 14 Apr 2014 08:06:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WZfeR-0007IO-OJ for qemu-devel@nongnu.org; Mon, 14 Apr 2014 08:06:25 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:58781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WZfeR-0007IC-G2 for qemu-devel@nongnu.org; Mon, 14 Apr 2014 08:06:15 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 14 Apr 2014 13:06:14 +0100 Received: from d06dlp03.portsmouth.uk.ibm.com (9.149.20.15) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 14 Apr 2014 13:06:13 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id A6D0D1B0804B for ; Mon, 14 Apr 2014 13:06:14 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s3EC6DMf41877668 for ; Mon, 14 Apr 2014 12:06:13 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s3EC6CpV026055 for ; Mon, 14 Apr 2014 06:06:13 -0600 Received: from smtp.lab.toulouse-stg.fr.ibm.com (srv01.lab.toulouse-stg.fr.ibm.com [9.101.4.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s3EC6Cf7026037; Mon, 14 Apr 2014 06:06:12 -0600 Received: from bahia.local (bahia.lab.toulouse-stg.fr.ibm.com [9.101.4.41]) by smtp.lab.toulouse-stg.fr.ibm.com (Postfix) with ESMTP id D90E9210FFE; Mon, 14 Apr 2014 14:06:11 +0200 (CEST) To: afaerber@suse.de From: Greg Kurz Date: Mon, 14 Apr 2014 14:06:06 +0200 Message-ID: <20140414120540.32507.66401.stgit@bahia.local> In-Reply-To: <20140414112942.32507.38267.stgit@bahia.local> References: <20140414112942.32507.38267.stgit@bahia.local> User-Agent: StGit/0.16 MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14041412-0342-0000-0000-0000086F7C24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 195.75.94.111 Cc: kwolf@redhat.com, peter.maydell@linaro.org, thuth@linux.vnet.ibm.com, mst@redhat.com, marc.zyngier@arm.com, rusty@rustcorp.com.au, agraf@suse.de, qemu-devel@nongnu.org, clg@fr.ibm.com, stefanha@redhat.com, cornelia.huck@de.ibm.com, pbonzini@redhat.com, anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH v7 8/8] virtio-9p: use virtio wrappers to access headers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. virtio-9p-device gets platform independant. Signed-off-by: Greg Kurz --- Changes since v6: - target independant hw/9pfs/Makefile.objs | 3 +-- hw/9pfs/virtio-9p-device.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/Makefile.objs b/hw/9pfs/Makefile.objs index 1e9b595..e71f47b 100644 --- a/hw/9pfs/Makefile.objs +++ b/hw/9pfs/Makefile.objs @@ -5,5 +5,4 @@ common-obj-y += virtio-9p-coth.o cofs.o codir.o cofile.o common-obj-y += coxattr.o virtio-9p-synth.o common-obj-$(CONFIG_OPEN_BY_HANDLE) += virtio-9p-handle.o common-obj-y += virtio-9p-proxy.o - -obj-y += virtio-9p-device.o +common-obj-y += virtio-9p-device.o diff --git a/hw/9pfs/virtio-9p-device.c b/hw/9pfs/virtio-9p-device.c index 15a4983..2572747 100644 --- a/hw/9pfs/virtio-9p-device.c +++ b/hw/9pfs/virtio-9p-device.c @@ -19,6 +19,7 @@ #include "fsdev/qemu-fsdev.h" #include "virtio-9p-xattr.h" #include "virtio-9p-coth.h" +#include "hw/virtio/virtio-access.h" static uint32_t virtio_9p_get_features(VirtIODevice *vdev, uint32_t features) { @@ -34,7 +35,7 @@ static void virtio_9p_get_config(VirtIODevice *vdev, uint8_t *config) len = strlen(s->tag); cfg = g_malloc0(sizeof(struct virtio_9p_config) + len); - stw_raw(&cfg->tag_len, len); + virtio_stw_p(vdev, &cfg->tag_len, len); /* We don't copy the terminating null to config space */ memcpy(cfg->tag, s->tag, len); memcpy(config, cfg, s->config_size);