Received: by 10.223.185.116 with SMTP id b49csp6296584wrg; Wed, 28 Feb 2018 07:09:28 -0800 (PST) X-Google-Smtp-Source: AH8x227tw9/XSgqObtGTFx2TH/K25fvla4W+AzOnkHN6Fm5RJRp7gtt7Q8NED/3dDtWj6MSmm0ZJ X-Received: by 2002:a17:902:a705:: with SMTP id w5-v6mr17916179plq.299.1519830568804; Wed, 28 Feb 2018 07:09:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519830568; cv=none; d=google.com; s=arc-20160816; b=A/EUwgeA7rFmNnIXxj+d93ConrYV3CEzOs3Pr5KnUPyBT7UHL3pvOS5brr4ad990rb TkPF2yKTwkTRuSfALzo4W9+70qriZGAsxJYtUxFz9qFk6OdWf3GkFs/DuSh9WvEwq9eb fXyROX1hCOJtbF2OTw/8ipadHO6dCHUhPCWtTixjnWRMk32VM8yDQwi2tQwAiopdfaLs LgKnEEzLmo8pIUewpPi2ia4FnKhlD/GPYVUzPBdIKyvhRTUEkf9uC37YVeV2dfJPG6rb yaz5qHp8vFj1hJAfX5FigKaX0nrlbNDs8K53hexIZJMUXFizGjB7w/uhq4wuHAQnMzSo VR5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:arc-authentication-results; bh=diKPd+UsQJSIUfydSb4Lr8YlskwfnyvBz28snuFsO8o=; b=iacyGpiq4TN7XtykjPDhHr03S6EXkroPKYMmZ3gVdZ0Xcm8T4ROhzxHrFyUVwBTAww xYh7AJF/zMC+QYUNPGEhFpeVNlcprAePS9s8SyEr+UMm9ViVtJD+jfe1Ru6JCiXruNEI efvr2iM5gUPATsljpy0VwH4JMSqjOzoL5RXEHna2wNjVF1kTMna7SVzd4CVoNyhLXpE2 XO4Z7pLQAZiqmYz0Jh2E5EHK71NPcjDHiQy4yehbCa8VynVoqi3FTqspKFaq9IqZdDra kWt6dyZiVoGuQZo3gDoHA1EmIEWNPwwqF2eldLdQD4g6fYIkjOfSaRvRep4JfZIKRHNf AkZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v1-v6si1390397plb.281.2018.02.28.07.09.11; Wed, 28 Feb 2018 07:09:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbeB1PGV (ORCPT + 99 others); Wed, 28 Feb 2018 10:06:21 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:37806 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752250AbeB1PGT (ORCPT ); Wed, 28 Feb 2018 10:06:19 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 120544040073; Wed, 28 Feb 2018 15:06:18 +0000 (UTC) Received: from localhost (ovpn-112-57.ams2.redhat.com [10.36.112.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id A41A3202699A; Wed, 28 Feb 2018 15:06:16 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: linux-kernel@vger.kernel.org Cc: arnd@arndb.de, bhe@redhat.com, slp@redhat.com, mst@redhat.com, somlo@cmu.edu, xiaolong.ye@intel.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v16 00/11] fw_cfg: add DMA operations & etc/vmcoreinfo support Date: Wed, 28 Feb 2018 16:06:04 +0100 Message-Id: <20180228150615.17317-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 28 Feb 2018 15:06:18 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Wed, 28 Feb 2018 15:06:18 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'marcandre.lureau@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series adds DMA operations support to the qemu fw_cfg kernel module and populates "etc/vmcoreinfo" with vmcoreinfo location details (entry added since qemu 2.11 with -device vmcoreinfo). v16: - patch reordering - commit message updates - rename fw_cfg.h -> qemu_fw_cfg.h - fix warning when CONFIG_CRASH_CORE=n without RFC DMA read patch applied - use a function pointer rather than a dma hint to read_blob() v15: - fix fw_cfg.h uapi header #include - use BSD license for fw_cfg.h uapi header - move the uapi defines/structs for DMA & vmcoreinfo in the corresponding patch - use cpu_relax() instead of usleep_range(50, 100); - replace do { } while(true) by for (;;) - fix the rmb() call location - add a preliminary patch to handle error from fw_cfg_write_blob() - rewrite fw_cfg_sel_endianness() to wrap iowrite() calls v14: - add "fw_cfg: add a public uapi header" - fix sparse warnings & don't introduce new warnings - add memory barriers to force IO ordering - split fw_cfg_read_blob() in fw_cfg_read_blob_io() and fw_cfg_read_blob_dma() - add error handling to fw_cfg_read_blob() callers - minor stylistic changes v13: - reorder patch series, introduce DMA write before DMA read - do some measurements of DMA read speed-ups v12: - fix virt_to_phys(NULL) panic with CONFIG_DEBUG_VIRTUAL=y - do not use DMA read, except for kmalloc() memory we allocated ourself (only fw_cfg_register_dir_entries() so far) v11: - add #include in last patch, fixing kbuild .config test Marc-André Lureau (11): fw_cfg: fix sparse warnings in fw_cfg_sel_endianness() fw_cfg: fix sparse warnings with fw_cfg_file fw_cfg: fix sparse warning reading FW_CFG_ID fw_cfg: fix sparse warnings around FW_CFG_FILE_DIR read fw_cfg: remove inline from fw_cfg_read_blob() fw_cfg: handle fw_cfg_read_blob() error fw_cfg: add a public uapi header fw_cfg: add DMA register crash: export paddr_vmcoreinfo_note() fw_cfg: write vmcoreinfo details RFC: fw_cfg: do DMA read operation MAINTAINERS | 1 + drivers/firmware/qemu_fw_cfg.c | 339 +++++++++++++++++++++++++++++++-------- include/uapi/linux/qemu_fw_cfg.h | 97 +++++++++++ kernel/crash_core.c | 1 + 4 files changed, 374 insertions(+), 64 deletions(-) create mode 100644 include/uapi/linux/qemu_fw_cfg.h -- 2.16.1.73.g5832b7e9f2