From patchwork Tue May 24 15:40:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 575739 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:c603:0:0:0:0 with SMTP id jv3csp2417384mab; Tue, 24 May 2022 08:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycDI0A4imfXg19pp8r+8uk8qZ6jS5/22LBsZPyArsqfbWHBVm5uRhqil4sQUfs3uYRUvzp X-Received: by 2002:a0c:e7c7:0:b0:461:e559:18d0 with SMTP id c7-20020a0ce7c7000000b00461e55918d0mr22029960qvo.2.1653407564082; Tue, 24 May 2022 08:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653407564; cv=none; d=google.com; s=arc-20160816; b=mcANVbKBXYr7+YFzhYfPJzL2A3XGD33BM38+EuTvw1kTYBBeYaw8k8orB/Q5g8MxNd ZvIH2Jjpy8y3p6jzVohNHt5GO9S4daDgMCRXAGLemVIs3Bwax5veoUKYWnuT5CUYk123 igoX52v5BWDXBex5zJiiDfw4hDgSc4SAzWkMOwI5cP9ZGhHi0HtItVTBA4b42akKSGxi aRwvZNofStEQvVKYMLXdqMB5otJIO/lxmarjPw0vMnTbqN5Fv5Pvu/hpp5N9EzIkj+Oi pr8XRtW13FrTf7xAFYKPgZqmDNj33NrKuP2sz5fxO1QwXRwinX6EkKiW+ucch80wwKcz mylQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vBtL52cUVXRCn2Iw8uz2+J2VOEbS3hV9Ib2rQvMqV9g=; b=Uec+BBxPKayJhSeyPv8gXYqGwimW/CarQVoYAK3IPGAXzp6bIM5HKuVEDXFJHP5Xm+ fTLgs2Ar7MoCSBMEvz8bildoW/1aOotMOTMJ3fQYHWj72wNzYWcCGyteRUdKGH8Z2+Z9 tl07QKHM2pE3wzrZwjZh5SXE6t9r6W3JFsGMlhY3iYrFQyXMiJWAwie2Vg4LF09Sl3lz Ig/oYhqcAjDBUasx79UPy1zEygiLkXMV1DP7wLT8Lrv12jCyB8xgvJUKanl8wrUIi9QM gt8OQogYz1ff8z5/ykSZN704wnjeKvI6AFpelDbQ7fAqwa7ecj3vRmEjFOZLGJtJ2M1A MvYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FB+WsbPW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d14-20020ac85d8e000000b002ebd7a977dbsi4681836qtx.310.2022.05.24.08.52.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 May 2022 08:52:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FB+WsbPW; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ntWpu-0000Ju-Lg for patch@linaro.org; Tue, 24 May 2022 11:52:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ntWej-00042Z-QC for qemu-devel@nongnu.org; Tue, 24 May 2022 11:41:09 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:37841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ntWec-0005Lz-LR for qemu-devel@nongnu.org; Tue, 24 May 2022 11:41:09 -0400 Received: by mail-wr1-x436.google.com with SMTP id t6so26286248wra.4 for ; Tue, 24 May 2022 08:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vBtL52cUVXRCn2Iw8uz2+J2VOEbS3hV9Ib2rQvMqV9g=; b=FB+WsbPWMMXudRzX/nrHkt/8nRUQMXPRKwDKsm7ykE8csKKpJ/kuARHxSrgXx08dz5 RWNXbVpeVgNVivIVfWCV20b/ioGObn+PpBuY7UJWIANpX0Qe2tPAQlaZ9p6usidh3OhC pHbcUYy7/G9UY6FhD2L+mOZV5gcXjbZSd88S3p2vACVayEP1m+zypJjdlJtIlAs5dd8R 18z+Ot/es6sS8pyT6YS6ZkDoV2hmZtQxt2GcEpRfmj2vdrw8MlFa1uyhPsmPsHTBXuRf qAY+eFT5TQCyXKX2m7V9vLE+2yL4WOPKgRi6QNWcirJ2oayg/P0iEGEal3aEv0EKcno8 0Clg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vBtL52cUVXRCn2Iw8uz2+J2VOEbS3hV9Ib2rQvMqV9g=; b=uhapn9sEDSjVdKxSVb8Jy4cEnJG5ha8LOnNGkAckc6OWG2IAl0pKaAc/pm/Le9Muhu /BjANOHCxByaXh99yB/RRYl40qFAV9UX6WhoaSpvV7Gc+2oLq9vPF4Eern3eupkKzPCJ SMq+lbxiQk8aVnf4kubvMMAiwYzQ8H1Bpw8eIknrO8MyjIPTQt1LGV1krhTJJicbM2/G 9OFPZTqkrPm2bdKKZD0kGZVdRpPgnc5uI3WCylKZHeiJQV71WiHFcwD8XW4Hd/kwcUEk 8PtPGkw63a1RfCKBQl8cGYfCGjoiQXeuAjJXNtjWoDVcsWH2vKf+s2E89Po/l6CAJnKL pJGg== X-Gm-Message-State: AOAM532wgON9nCNadGDjkTgsIo7PBAhcm4ePkFdT9dAivEeN9duy7KO6 PE/F1RwMjraFpmLsEp4UQeaqdA== X-Received: by 2002:a5d:648e:0:b0:20f:d9b6:a35f with SMTP id o14-20020a5d648e000000b0020fd9b6a35fmr9739650wri.333.1653406861281; Tue, 24 May 2022 08:41:01 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z16-20020adfbbd0000000b0020cfed0bb7fsm13081406wrg.53.2022.05.24.08.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 May 2022 08:40:57 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7EB501FFB8; Tue, 24 May 2022 16:40:56 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: slp@redhat.com, mst@redhat.com, marcandre.lureau@redhat.com, stefanha@redhat.com, mathieu.poirier@linaro.org, viresh.kumar@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Raphael Norwitz Subject: [PATCH v2 01/15] contrib/vhost-user-blk: fix 32 bit build and enable Date: Tue, 24 May 2022 16:40:42 +0100 Message-Id: <20220524154056.2896913-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220524154056.2896913-1-alex.bennee@linaro.org> References: <20220524154056.2896913-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We were not building the vhost-user-blk server due to 32 bit compilation problems. The problem was due to format string types so fix that and then enable the build. Tweak the rule to follow the same rules as other vhost-user daemons. Signed-off-by: Alex Bennée Message-Id: <20220321153037.3622127-12-alex.bennee@linaro.org> Reviewed-by: Stefan Hajnoczi Reviewed-by: Raphael Norwitz --- meson.build | 2 +- contrib/vhost-user-blk/vhost-user-blk.c | 6 +++--- contrib/vhost-user-blk/meson.build | 3 +-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 9ebc00f032..a33ed52b7a 100644 --- a/meson.build +++ b/meson.build @@ -1489,7 +1489,7 @@ have_vhost_user_blk_server = get_option('vhost_user_blk_server') \ error_message: 'vhost_user_blk_server requires linux') \ .require(have_vhost_user, error_message: 'vhost_user_blk_server requires vhost-user support') \ - .disable_auto_if(not have_system) \ + .disable_auto_if(not have_tools and not have_system) \ .allowed() if get_option('fuse').disabled() and get_option('fuse_lseek').enabled() diff --git a/contrib/vhost-user-blk/vhost-user-blk.c b/contrib/vhost-user-blk/vhost-user-blk.c index cd4a5d7335..9cb78ca1d0 100644 --- a/contrib/vhost-user-blk/vhost-user-blk.c +++ b/contrib/vhost-user-blk/vhost-user-blk.c @@ -146,7 +146,7 @@ vub_readv(VubReq *req, struct iovec *iov, uint32_t iovcnt) req->size = vub_iov_size(iov, iovcnt); rc = preadv(vdev_blk->blk_fd, iov, iovcnt, req->sector_num * 512); if (rc < 0) { - fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n", + fprintf(stderr, "%s, Sector %"PRIu64", Size %zu failed with %s\n", vdev_blk->blk_name, req->sector_num, req->size, strerror(errno)); return -1; @@ -169,7 +169,7 @@ vub_writev(VubReq *req, struct iovec *iov, uint32_t iovcnt) req->size = vub_iov_size(iov, iovcnt); rc = pwritev(vdev_blk->blk_fd, iov, iovcnt, req->sector_num * 512); if (rc < 0) { - fprintf(stderr, "%s, Sector %"PRIu64", Size %lu failed with %s\n", + fprintf(stderr, "%s, Sector %"PRIu64", Size %zu failed with %s\n", vdev_blk->blk_name, req->sector_num, req->size, strerror(errno)); return -1; @@ -188,7 +188,7 @@ vub_discard_write_zeroes(VubReq *req, struct iovec *iov, uint32_t iovcnt, size = vub_iov_size(iov, iovcnt); if (size != sizeof(*desc)) { - fprintf(stderr, "Invalid size %ld, expect %ld\n", size, sizeof(*desc)); + fprintf(stderr, "Invalid size %zd, expect %zd\n", size, sizeof(*desc)); return -1; } buf = g_new0(char, size); diff --git a/contrib/vhost-user-blk/meson.build b/contrib/vhost-user-blk/meson.build index 601ea15ef5..dcb9e2ffcd 100644 --- a/contrib/vhost-user-blk/meson.build +++ b/contrib/vhost-user-blk/meson.build @@ -1,5 +1,4 @@ -# FIXME: broken on 32-bit architectures executable('vhost-user-blk', files('vhost-user-blk.c'), dependencies: [qemuutil, vhost_user], - build_by_default: false, + build_by_default: targetos == 'linux', install: false)