From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 3704C5A6F for ; Mon, 10 Aug 2015 15:41:21 +0200 (CEST) Received: by wibhh20 with SMTP id hh20so151344364wib.0 for ; Mon, 10 Aug 2015 06:41:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=SavpDZIDpsp1AqctbRmqA39RFHm3iJFtv9aaDnPY59E=; b=ATzcu3FkTcMdv698xs5jOjNu+5HnzfP/wu2WEqSJsPPZ2B5KjZnFXMSVqSkWrBP88s dBGRLSmi0crI5ygVorJouOE1Yun1WJxTNPv1XrEt2z+KynPtKIMu+SLwLltN4tW1vmeJ IWq1ztBQg+uzEoaPiFNIB3mUauMkppRGUtxBPizNxLGAGSS/oiLYodGRMhhwdjc/7f12 QCmFuSUCwMcuhz7j5urFcROs0DIlKrKfjXu0Vx1KnAf/Op6XwQOHL5bZInXNrS5wtiSC Z5Y103g5pBf+l3jQc1JcLVpjxvFumBdwbPpX2uqdQ/VcOVrgCWq5qM6FrPl1CtTD+cQR aKag== X-Gm-Message-State: ALoCoQksKfDCoRIImqveoCUW1GQ5EyiUMLgbevPwBHpbxPpsPdXl+4lvZe51/rhD9JZCoXSEYkzr X-Received: by 10.180.103.69 with SMTP id fu5mr23058751wib.95.1439214081074; Mon, 10 Aug 2015 06:41:21 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id r6sm13873857wiy.13.2015.08.10.06.41.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 06:41:20 -0700 (PDT) From: Thomas Monjalon To: Sergio Gonzalez Monroy Date: Mon, 10 Aug 2015 15:40:07 +0200 Message-ID: <5563961.nNkN52hQJs@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: <1438961253-4011-2-git-send-email-sergio.gonzalez.monroy@intel.com> References: <1438961253-4011-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1438961253-4011-2-git-send-email-sergio.gonzalez.monroy@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 2/2] mem: fix freeing an IVSHMEM memzone X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 13:41:21 -0000 2015-08-07 16:27, Sergio Gonzalez Monroy: > There is no sync between host and guest to allow removal of memzones, > and freeing them result in undefined behavior. > > In the guest, we identify IVSHMEM memsegs/memzones by having > ioremap_addr != 0. In the host, nothing is done to the memzone, meaning > ioremap_addr == 0. > > As a solution, mark memzones being added to IVSHMEM in the host, by > setting ioremap_addr, then return an error whenever we try to free an > IVSHMEM memzone. > > Fixes: ff909fe21f0 ("mem: introduce memzone freeing") > > Signed-off-by: Sergio Gonzalez Monroy Series applied, thanks