From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53]) by dpdk.org (Postfix) with ESMTP id A28AE5F25 for ; Wed, 26 Sep 2018 17:31:14 +0200 (CEST) Received: by mail-ed1-f53.google.com with SMTP id g26-v6so2302710edp.0 for ; Wed, 26 Sep 2018 08:31:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EmGPIvi41WevUa1yhoH/RnxRWfutS5eVTJNrW7xsTO0=; b=cbUgRWs+0p4AFjVrA//Rsy9TB9DF6U8DeJRt9Ik3JpmB6/CzMxqYse/olUaRNPvpiL Z4Ef8rgYIClcJBird5zjeHSOOrMbNXfQ33uO6RnctQ8NEpZbfNsqANyBllO5rsSlb+C5 MS8XBobNnwltDZ9emj94nvAUpgfVyqTMcmZuqOipUQbMgt6p42U/7VbAuicxQthQ0XpV ayrmutro9UQnqzCo+G8jIgbhWngGqxNkQhNwh2ixDbBM7CskJ4G+633GY5yezGvsAPsi wBcgUpTld6vtmm9Xi6YPOsW9Pn4A4KnBQGm3/TIUifR7ARiyq0rDur6P0u6L6JlJSTWI KfbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EmGPIvi41WevUa1yhoH/RnxRWfutS5eVTJNrW7xsTO0=; b=s7UjsVJ+5cagwbjNJXLmE02000s8KG33gz1tn7WiAC4bQ9qAbZn7Nvglyfwptl3WCx N4i7+/iS/bMYr4BcBF4BGJZVtxf7/tpbGeRPphmmfWMK11xrrkON1Qn2DSWruBxXi+Qd v+R3D1Bxge0v2+l22E1kweiDCfuQ8EWRdSNrkLtTTCaUyK6+xlk1rTPue3KCChl7CoJ7 ryuXfx9TxIVj3u8xgH4ACJXYCAY1tBMHsxuhuE9PeHJ01jydeT0/m4N8JwPEJTNnv7Vc ATGREOxGSPo4wY9PqCF5aye56sYu59A75tJKInLu6ytLw0BjAoeLP1wTd5bkWbKgWy7T ZoTA== X-Gm-Message-State: ABuFfojVyqOdjzw9ZhobK6UKrv6SkyoD5SqMMTkBY1O9eOZJaJBpbogh RknpXJgvxV6NdsYPJv+cik+TdpLSlbr7Fs48mMA1+w== X-Google-Smtp-Source: ACcGV60hnTNaeyhuC2RJoWYvyz9UG33yedU68S1dEpfqx5T6RX5xHtpQEDQe2Ey+85xWf28JGXqBJMT6AkG5b21s8qY= X-Received: by 2002:a50:a564:: with SMTP id z33-v6mr10048165edb.166.1537975874218; Wed, 26 Sep 2018 08:31:14 -0700 (PDT) MIME-Version: 1.0 References: <20180926072705.22641-1-maxime.coquelin@redhat.com> <20180926072705.22641-7-maxime.coquelin@redhat.com> In-Reply-To: <20180926072705.22641-7-maxime.coquelin@redhat.com> From: Alejandro Lucero Date: Wed, 26 Sep 2018 16:31:03 +0100 Message-ID: To: Maxime Coquelin Cc: dev , tiwei.bie@intel.com, zhihong.wang@intel.com, jfreimann@redhat.com, dgilbert@redhat.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 06/12] vhost: register new regions with userfaultfd X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2018 15:31:14 -0000 On Wed, Sep 26, 2018 at 8:28 AM Maxime Coquelin wrote: > Signed-off-by: Dr. David Alan Gilbert > Signed-off-by: Maxime Coquelin > --- > lib/librte_vhost/vhost_user.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > > diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c > index d9ef5bca8..cbbfbdf00 100644 > --- a/lib/librte_vhost/vhost_user.c > +++ b/lib/librte_vhost/vhost_user.c > @@ -928,6 +928,28 @@ vhost_user_set_mem_table(struct virtio_net **pdev, > struct VhostUserMsg *pmsg) > mmap_size, > alignment, > mmap_offset); > + > + if (dev->postcopy_listening) { > + struct uffdio_register reg_struct; > + > + reg_struct.range.start = > (uint64_t)(uintptr_t)mmap_addr; > + reg_struct.range.len = mmap_size; > + reg_struct.mode = UFFDIO_REGISTER_MODE_MISSING; > + > + if (ioctl(dev->postcopy_ufd, UFFDIO_REGISTER, > + ®_struct)) { > + RTE_LOG(ERR, VHOST_CONFIG, > + "Failed to register ufd > for region %d: (ufd = %d) %s\n", > + i, dev->postcopy_ufd, > + strerror(errno)); > + continue; > is it not a registration error a serious problem for supporting migration properly? > + } > + RTE_LOG(INFO, VHOST_CONFIG, > + "\t userfaultfd registered for > range : %llx - %llx\n", > + reg_struct.range.start, > + reg_struct.range.start + > + reg_struct.range.len - 1); > + } > } > > for (i = 0; i < dev->nr_vring; i++) { > -- > 2.17.1 > >