Received: by 10.223.185.116 with SMTP id b49csp941554wrg; Fri, 16 Feb 2018 09:37:31 -0800 (PST) X-Google-Smtp-Source: AH8x226/dTbw46/Bifk6BGSNMwnBRrH5pl1cX7IxYsCQfdIQ2gswC9OxTz7FS3rgZlXXWkiYvq9+ X-Received: by 10.99.96.200 with SMTP id u191mr5772662pgb.252.1518802651251; Fri, 16 Feb 2018 09:37:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518802651; cv=none; d=google.com; s=arc-20160816; b=OuS7lixe6RrdSYVCqlalGUAh2tyZ479JcetsVLF9RYMV4d8cDj3tnxc4/eADFyvFHM j693oGIQ4uourk8aphHFGZElzl7bRat7vi3tF4t73I3xfV3fRb6byAYThso4WgZJLmGJ 7Tu/FDag6Bml/30RemRK/9DHDYFZS7oFE19G9nc9Eog+/DW4NbzYmjpc8GTNKc5KcRRU g+CJ3bor6yvR/GEzL2cYvPwfhNzrQwTYWfF/xRG1LMmWUXc/QV8PXzIPL6UyxK0nRA5E XPelZhm2za1Ka3OgklS6xQKh3rDrLyjRdwHndNLOsrzGzvWKr3sK470ICveyKCdgO3S1 M1Cw== 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=seFPbDLESSb53nglgjkEhg9FGnQ3CoYXP1t2hqrLrTA=; b=M3ngV0x0AE/3xN+hPGRAqmMzyol7F4EX6pRjXAvp1tbJ/u3TTH5LKSA6nEYt5wbOZ1 0MpNVqXr+oRelS70DjaMU96/fXU9lH+IvqUlTtfHSfDvVV9wptgaUw1DphQfYNWkyM49 llA4m6eD+SwpFeDKCOL0J+mfaxzJUbrnedzujgPWXL/C56gSteyjcXV0LtQIdi/iVzxU opimrC4AMvk/D2esoVkDlLRaWEEBpFEFWFVsugma6TLAswUEpvra1ZpLfhvsw4Znrdu7 x4fH+e0mXsD4MxPKTSvhQsEI6THEqwvQZdpb83vbyRaShzMtCV2g88udP5379jSbzVDE 24DA== 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 88-v6si153431plc.131.2018.02.16.09.37.16; Fri, 16 Feb 2018 09:37:31 -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 S1756054AbeBOVdV (ORCPT + 99 others); Thu, 15 Feb 2018 16:33:21 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46214 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752533AbeBOVdT (ORCPT ); Thu, 15 Feb 2018 16:33:19 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7C0BF40FB646; Thu, 15 Feb 2018 21:33:19 +0000 (UTC) Received: from localhost (ovpn-112-19.ams2.redhat.com [10.36.112.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4886BFFD3A; Thu, 15 Feb 2018 21:33:13 +0000 (UTC) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: linux-kernel@vger.kernel.org Cc: slp@redhat.com, bhe@redhat.com, mst@redhat.com, somlo@cmu.edu, xiaolong.ye@intel.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [PATCH v15 00/11] fw_cfg: add DMA operations & etc/vmcoreinfo support Date: Thu, 15 Feb 2018 22:33:01 +0100 Message-Id: <20180215213312.29234-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.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 15 Feb 2018 21:33:19 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 15 Feb 2018 21:33:19 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.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). 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): crash: export paddr_vmcoreinfo_note() fw_cfg: add a public uapi header 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 DMA register fw_cfg: write vmcoreinfo details RFC: fw_cfg: do DMA read operation MAINTAINERS | 1 + drivers/firmware/qemu_fw_cfg.c | 334 +++++++++++++++++++++++++++++++++-------- include/uapi/linux/fw_cfg.h | 97 ++++++++++++ kernel/crash_core.c | 1 + 4 files changed, 369 insertions(+), 64 deletions(-) create mode 100644 include/uapi/linux/fw_cfg.h -- 2.16.1.73.g5832b7e9f2