From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 507C8FFA for ; Mon, 30 Apr 2018 16:07:22 +0200 (CEST) Received: by mail-wm0-f66.google.com with SMTP id a8so13402430wmg.5 for ; Mon, 30 Apr 2018 07:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iTkdxONMzxwnLPH7UG2ibj1JEOH0hvcq0sGiTs9feWs=; b=jfwpl4c4wR79hM07B9iCSiemMBjyUlpV+/DWHU7VQm/28IAnQjIeO1yWH1G8s63zd4 CpMStuhuND657L72tStD11xfIwLc1slWvq5/8DpcjmWyB6CcWqsgbIUF2ItCLRV/wYUq aOlHhuXTaS5AqQok7vKQVCxmMBwnq389q6QvmPIbZAw/gWp8ts6NNL2CS1ZBoE+ci0Rz 3AXIlz7WXIXwNtlZF24cSgXu+qfTbg+smwa70vT8+LT7kLzmEcYo20dzmfcIv+utpdnq kTpSkHVLuzF1OfTFd6zAYHOmYQeI9V7LSoPf72t4lc0V1DEd9S1cV8Yh1VHp0NThcGuR vE+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=iTkdxONMzxwnLPH7UG2ibj1JEOH0hvcq0sGiTs9feWs=; b=sLzmFHHotvgOYb9fSM9kezyXjjODO0lI3g2+82KienCcxIZoLc9Mw2Vkz1Fc4w+HJ4 QbkZpwq8+DnEQZeBGNGtcYzS486Q/fKuqrKTTSxUwGHbnn+ptuIzyGWll8vG8qyWz81Z Ju7WxmkfTYF8Lb/Gllpau/D/zU2ca+heahv20kpLgXO1dG0OvBM4bIQi3cuRuOyawuCd +WjaLJ0D6UXIMiiFPK+4BlzubOyFM3KbRjtXb36ngfRvCekRcRlewBfswj7DNtZrl0Gx hWE9ySURSUNl/LoOUyQX/DH7eeQ9dXfpGgNmxkKJbvKQb6jftG+b/WlcmH5ZmEEeVoVM 3W9w== X-Gm-Message-State: ALQs6tD5Fa0wtm1rDHkPY00oDfMqRmfYIR9GYFGF20vDrfUbaN5cTIrP IQ8xaBvsUOeYtNF3G/D3GJM= X-Google-Smtp-Source: AB8JxZqZiUetoYUUWyDPB24lIk+3ntfJg9kJ7fKBJXJYsfxSo9+cOsts/5xOpjUof013hXg8cf7hMg== X-Received: by 10.28.87.198 with SMTP id l189mr5296730wmb.161.1525097242037; Mon, 30 Apr 2018 07:07:22 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id u36-v6sm11670504wrf.87.2018.04.30.07.07.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:07:21 -0700 (PDT) From: luca.boccassi@gmail.com To: Tomasz Kulasek Cc: Pawel Wodkowski , Jianfeng Tan , Maxime Coquelin , dpdk stable Date: Mon, 30 Apr 2018 15:03:14 +0100 Message-Id: <20180430140606.4615-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'vhost: fix offset while mmaping log base address' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:07:22 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 8ef3e47a9b325f099353e162742b07c5e58e449e Mon Sep 17 00:00:00 2001 From: Tomasz Kulasek Date: Thu, 8 Feb 2018 17:59:00 +0100 Subject: [PATCH] vhost: fix offset while mmaping log base address [ upstream commit fbc4d248b198db7f720fe31a47050a406632cc7a ] QEMU always set offset to 0 but for sanity we should take the offset into account. Fixes: 54f9e32305d4 ("vhost: handle dirty pages logging request") Signed-off-by: Pawel Wodkowski Signed-off-by: Tomasz Kulasek Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c index dc282cb9f..8e5ba87c2 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -1004,7 +1004,7 @@ vhost_user_set_log_base(struct virtio_net *dev, struct VhostUserMsg *msg) * mmap from 0 to workaround a hugepage mmap bug: mmap will * fail when offset is not page size aligned. */ - addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + addr = mmap(0, size + off, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); close(fd); if (addr == MAP_FAILED) { RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n"); -- 2.14.2