From owner-freebsd-hackers@freebsd.org Fri Aug 17 08:44:51 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D291F1086EEF for ; Fri, 17 Aug 2018 08:44:51 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 59ADD72BA3; Fri, 17 Aug 2018 08:44:51 +0000 (UTC) (envelope-from pratiy0100@gmail.com) Received: by mail-ed1-f49.google.com with SMTP id j21-v6so4101677edp.10; Fri, 17 Aug 2018 01:44:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=s7SnbU97Obriy8+bKhhaOcTmICSNm0/UyKkTP3IikPk=; b=PpGK53+eF4U96NKlFEu35VFOjOjWXeutVDK+A4wWJr2W2rZg3j0jDJaOMmcAnbscSc Np+2otOteCbPD6b2H0/EjqAVsJuN77k5IITiNDz3Q+33BR7LL+OS8WR2TqF2EA1UOLxq X0ZDsgTBNBUUZ3id+gzU+Hci7CUWett+fCTnahLAZk40ovWJjscWXOONUPKCcxUuUNtQ gsUSlneKIUdF94IfPFqsfBsJzxucdZzSZsn5oHqLsBvz2aAmxCL3NWEl7g53pd+qtgoR EIq3eGlTtSkzfqLv1uTBP0V/3lLvBA6UiAPIxjGQV6RfAbXSoXzVmPNn6bwANjaVnUrY OkrQ== X-Gm-Message-State: AOUpUlHcm6M6/IODWh9PZYnV3jgzPQr7tKkz8PsIbyemYr32VfNLMP0o MkmeZ88BIp7sBFZn6ppMWZCnJso3i0s= X-Google-Smtp-Source: AA+uWPzLLJn8mBcG+bJT8gxvyAjul5EO/GI0ItI+3sWrRgWLTNRRAkDjhauwOibWSVMzoe2vZ+umvw== X-Received: by 2002:a50:f9cb:: with SMTP id a11-v6mr40772470edq.26.1534492342045; Fri, 17 Aug 2018 00:52:22 -0700 (PDT) Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com. [209.85.208.53]) by smtp.gmail.com with ESMTPSA id a15-v6sm2655340edd.47.2018.08.17.00.52.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Aug 2018 00:52:21 -0700 (PDT) Received: by mail-ed1-f53.google.com with SMTP id o8-v6so4026400edt.13; Fri, 17 Aug 2018 00:52:21 -0700 (PDT) X-Received: by 2002:a50:a9e2:: with SMTP id n89-v6mr40954810edc.158.1534492341532; Fri, 17 Aug 2018 00:52:21 -0700 (PDT) MIME-Version: 1.0 From: Pratyush Yadav Date: Fri, 17 Aug 2018 13:21:45 +0530 X-Gmail-Original-Message-ID: Message-ID: Subject: bus_dma(9): Is it allowed to load an already-loaded map? To: freebsd-hackers@freebsd.org Cc: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2018 08:44:52 -0000 Hi, I am writing an implementation of the bus_dma(9) interface for use with the Xen drivers, and I have a question: Is it allowed to load a dma map with an active mapping? The bus_dma(9) man page says: map A DMA map without a currently active mapping But, looking at the busdma_bounce (sys/x86/x86/busdma_bounce.c) code, it has no checks against this. On the contrary, it seems to support loading already-loaded maps. Maybe the interface allowed it earlier but removed support later. Or maybe it did not allow this earlier, and now it does, but the man page is just not updated. Can someone familiar with the details of the busdma system confirm? -- Regards, Pratyush Yadav