From nobody Sat Nov 23 22:23:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1730754414; cv=none; d=zohomail.com; s=zohoarc; b=b5qfWj1s+YEFa629TVJUigZwj/ZFEbGBnvXfSRTm/7I9iTDJO64+G06dFeyGPQB3Avba3q/RxwgUIVzxtbRQej+/KRjJPkyDtCDUk0jGSlsE3f4xZHBAswvgsd0BaqzSMpUkudlcWH0ILs6Vuzp46vQEQe9cnnw39N176lS+udU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730754414; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=YX/D7B50whaD5dkmLdDqxAFvN13ZgCrMqMz4OxLbYGE=; b=HEiRBSbATHUmpZ1wmwtyMXnvYIjc5DUsPLUSD1mEpUvOha66Sm5x8N6/qHBw8/n/GAZ2CwZuJUouoJH7mYN2FDqklnNoqRlQn2CYYUW7/RgNL+5v8UmTW0QmzCvxWXbfj2igJKcYtec9KB6tvm22l975tgjzbsxV0Tp8ezeU3ok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 173075441440054.96996677203606; Mon, 4 Nov 2024 13:06:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t84GZ-0003Hz-EY; Mon, 04 Nov 2024 16:05:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t84GX-0003Hk-Hu for qemu-devel@nongnu.org; Mon, 04 Nov 2024 16:05:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t84GV-0005FZ-0P for qemu-devel@nongnu.org; Mon, 04 Nov 2024 16:05:37 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-151-jUoSB_MbMG6abDFILJwilg-1; Mon, 04 Nov 2024 16:05:33 -0500 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4315afcae6cso27413185e9.0 for ; Mon, 04 Nov 2024 13:05:31 -0800 (PST) Received: from redhat.com ([2.52.14.134]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4327d5bf4fdsm163457735e9.17.2024.11.04.13.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Nov 2024 13:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730754334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YX/D7B50whaD5dkmLdDqxAFvN13ZgCrMqMz4OxLbYGE=; b=Svqh8MSXJfXH6XrB02lF5NCJ7QK7L+ItsPa64bEbLiJNjgjVSBfG9Yq0oZRr8Wy+ewHX/D mgIeTrWgsj3hOso0xSdBv4Mom+LT8Kax3U9+wXl5wsJ3UU+9fTzsPuhYTeu2+akgh7i4Io Fuhr4Z1h4Hv/DYlGUr+pf46XWcr7U2Q= X-MC-Unique: jUoSB_MbMG6abDFILJwilg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730754329; x=1731359129; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=YX/D7B50whaD5dkmLdDqxAFvN13ZgCrMqMz4OxLbYGE=; b=QXYRwmnRB72dmM/MV12wL5jwkccOYosyIkSBoWvsvTnQrJyYpMn7J7gO3je4Kmrlj0 FSlMevu071XVo1qGXhM5gFEoiVsJ5tiyls3pspJSn2oXrMJhBMRJbWnE63cUWjT/DIin BBNxTpNR76O8ElMdQrlxO4RhyyY7lligltdZzE+PdRhPisFvjG+jFJHwKDZEeFl51sAb GKk7HdjD/vCDgy+WDH1cSXpt5FuS45T2HSOP+SUtG1CvffDp9YJtlnIv1pTEPr+PkplJ kxwJstL03u/Ir0mgCmMY84O+qMUn47S4oVlbYoHUcQ50Sm8iStKf9ySJYMcuS5TbLHOu +0zA== X-Gm-Message-State: AOJu0YzhFrXp3d/myo7vNKgArvbdqTzL2CT5USdFomwtFAXLt/V/FvWs 95OP9YtInKUtc9I//roybjkbqFv7T+3XN9o715/oQYCCnapvM+RJelMr3jv6sgF+Dgad+s3buLe zDpZjtYlmAYluE3Nl4/qiCQ7H1cunkpW7xZYcKMxQEIXodp5S7KOuEsTlZHhy4WE3DgvLEVuUV+ lm1wF+Vt60daxiSR8GIkxkERs15xOrPA== X-Received: by 2002:a05:600c:1c16:b0:42c:baf1:4c7 with SMTP id 5b1f17b1804b1-43282fd045cmr108612785e9.4.1730754329342; Mon, 04 Nov 2024 13:05:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IFVy4H4cIYuDxC4yObC8bmA6ST6u2cVOuLmDa+7YZCS+pUfLWUQIbxbW6tOyqZto3q23IifpA== X-Received: by 2002:a05:600c:1c16:b0:42c:baf1:4c7 with SMTP id 5b1f17b1804b1-43282fd045cmr108612495e9.4.1730754328849; Mon, 04 Nov 2024 13:05:28 -0800 (PST) Date: Mon, 4 Nov 2024 16:05:25 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Mattias Nissler , Peter Xu , Paolo Bonzini , David Hildenbrand , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , Marcel Apfelbaum Subject: [PULL 01/65] softmmu: Expand comments describing max_bounce_buffer_size Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.34, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1730754414933116600 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Mattias Nissler Clarify how the parameter gets configured and how it is used when servicing DMA mapping requests targeting indirect memory regions. Signed-off-by: Mattias Nissler Message-Id: <20240910213512.843130-1-mnissler@rivosinc.com> Acked-by: Peter Xu Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/exec/memory.h | 9 ++++++++- include/hw/pci/pci_device.h | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index e5e865d1a9..9458e2801d 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -1104,7 +1104,14 @@ struct AddressSpace { QTAILQ_HEAD(, MemoryListener) listeners; QTAILQ_ENTRY(AddressSpace) address_spaces_link; =20 - /* Maximum DMA bounce buffer size used for indirect memory map request= s */ + /* + * Maximum DMA bounce buffer size used for indirect memory map request= s. + * This limits the total size of bounce buffer allocations made for + * DMA requests to indirect memory regions within this AddressSpace. D= MA + * requests that exceed the limit (e.g. due to overly large requested = size + * or concurrent DMA requests having claimed too much buffer space) wi= ll be + * rejected and left to the caller to handle. + */ size_t max_bounce_buffer_size; /* Total size of bounce buffers currently allocated, atomically access= ed */ size_t bounce_buffer_size; diff --git a/include/hw/pci/pci_device.h b/include/hw/pci/pci_device.h index 91df40f989..8eaf0d58bb 100644 --- a/include/hw/pci/pci_device.h +++ b/include/hw/pci/pci_device.h @@ -168,7 +168,11 @@ struct PCIDevice { char *failover_pair_id; uint32_t acpi_index; =20 - /* Maximum DMA bounce buffer size used for indirect memory map request= s */ + /* + * Indirect DMA region bounce buffer size as configured for the device= . This + * is a configuration parameter that is reflected into bus_master_as w= hen + * realizing the device. + */ uint32_t max_bounce_buffer_size; }; =20 --=20 MST