From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id DFFDB2B95 for ; Sun, 22 Apr 2018 17:10:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8B615212A5; Sun, 22 Apr 2018 11:10:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 22 Apr 2018 11:10:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=PnG+u3hgpwnH3M//e RboLrthBEX+bzio3NHiuXHYFEY=; b=ILZ6NNy2nQ2hZd32VzgKkttvhG+++SgtH xg4SWITgMWAQg6W8YXXeo1XhWaqb28F7BW55Cvma0hPrdotoAjTzz2YGwktiTGNQ P2SwsGmyxpeIQhdmGFJDDlgv3+cQQnYBns8+njx0k+M9OoXN8JCxgspON8RNfyfv R18+J2Kl8w+78cjMrz6t2sF+UZYjcbsWmb6DQhzkmDjeSCI5fCuFq4xfEKxqwfZl qDkaprjpcMNNpWeijgpTKLqcm3b7zldsPfGaTIyqd9BEb4Tr+ofnExcHDx/aMY4n NFs+iU5ffXcZQ3YuBVAD2YGKO/w/CiHYCu5f0SJ24sBWcmQUetxmg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=PnG+u3hgpwnH3M//eRboLrthBEX+bzio3NHiuXHYFEY=; b=I0g3gP6l hBhMY109OctP+BIB1/U3VTjR3dbZHQ5QKWj3yvIFkgjNY4iJjPDMTp5CgQCCm88e gA1LbvuEgCtAwmfCy+uK/xTm6VYNBPdYb1taq5hAS8lBf9tennnMX51ubNjb9kqg BPFkum3TFEDVaNZ65eLUKOcE+mZ14k1kHvMYThC6wwWNFROAjckjd0oPXVrx4AAF kocGMhYeuzwzGdDBg5JOW/3RldeiP9EKX+xFIM2+MjrTOtREUDH+T9C/WrAPF/gk ojUBvI7jsmMy6sasOiro8hiBr8xsNO2neQoH7GxOfHMs4XeB9TzoVqS07jbLy3/Z InJktud7/OT32g== X-ME-Sender: Received: from yuanhanliu-NB0.tencent.com (unknown [223.74.148.66]) by mail.messagingengine.com (Postfix) with ESMTPA id 31FEF10253; Sun, 22 Apr 2018 11:10:31 -0400 (EDT) From: Yuanhan Liu To: Tomasz Kulasek Cc: Pawel Wodkowski , Jianfeng Tan , Maxime Coquelin , dpdk stable Date: Sun, 22 Apr 2018 23:08:59 +0800 Message-Id: <20180422150949.17523-9-yliu@fridaylinux.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180422150949.17523-1-yliu@fridaylinux.org> References: <20180422150949.17523-1-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vhost: fix offset while mmaping log base address' has been queued to LTS release 17.11.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: Sun, 22 Apr 2018 15:10:35 -0000 Hi, FYI, your patch has been queued to LTS release 17.11.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 04/29/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 608a0be0c01880f30a5f7902f9a0766457c5db36 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 4ed18fd12..03190d64f 100644 --- a/lib/librte_vhost/vhost_user.c +++ b/lib/librte_vhost/vhost_user.c @@ -954,7 +954,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.11.0