From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58059) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuLb1-0003xr-CK for qemu-devel@nongnu.org; Thu, 05 Nov 2015 09:33:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZuLax-0001h0-9h for qemu-devel@nongnu.org; Thu, 05 Nov 2015 09:32:59 -0500 Received: from relay-05.andrew.cmu.edu ([128.2.157.12]:52826 helo=relay.andrew.cmu.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZuLax-0001gU-4V for qemu-devel@nongnu.org; Thu, 05 Nov 2015 09:32:55 -0500 From: "Gabriel L. Somlo" Date: Thu, 5 Nov 2015 09:32:46 -0500 Message-Id: <1446733972-1602-1-git-send-email-somlo@cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v5 0/6] fw_cfg: spec update, misc. cleanup, optimize read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, jordan.l.justen@intel.com, armbru@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, markmb@redhat.com, lersek@redhat.com New since v4: - Patch 5: Protect against (undefined) left-shifting a uint64_t by 64 bits - Patches 4 & 5: Reworked comment and commit blurb wording Laszlo, thanks again for the thorough review (and the "C master class") :) Regards, --Gabriel >New since v3: > > - Patches 1..3 unchanged > > - Inserted new patch at position #4: avoid calculating an entry > pointer for the current item when s->cur_entry is FW_CFG_INVALID > > - Patch 5 (formerly #4) now has the generic read method correctly > shift-left (adding 0 padding on the right) in the event that the > current item payload is exhausted in the course of a multi-byte > read operation (Laszlo, thanks again for catching that!) > > - Patch 6 (formerly #5) is a rebased version of its former self, > but with no actual significant modifications. > >>New since v2: >> >> - Patches 1-3: updated to address Laszlo's suggestions for better >> and more accurate change descriptions in commit logs, comments, >> etc. >> >> - Patch 4: Per Laszlo's recommendation, this has been split into >> two separate components for improved legibility: >> >> - Patch 4/5: Introduces the new generic read method, and >> replaces the existing MMIO logic >> >> - Patch 5/5: Replaces the IOPort read logic, and cleans >> up the remaining unused bits of code. >> >>>This series' main purpose is to update (and simplify) the specified >>>read callback behavior. An earlier standalone patch to move qemu function >>>call API documentation into fw_cfg.h should logically be part of the series. >>> >>>Here's the summary of what each patch does: >>> >>> - Patch 1/4 is an updated version of the standalone v1 patch >>> I sent out earlier; it moves all the qemu-internal host-side >>> function call api documentation out of docs/specs/fw_cfg.txt, >>> and into the fw_cfg.h header file, next to the prototype of >>> each documented api function. >>> >>> - Patch 2/4 modifies the specified behavior of read callbacks >>> (from being invoked once per byte read, to being invoked once, >>> before ANY data is read, specifically once each time an item >>> is selected). >>> >>> - Patch 3/4 additionally removes the now-redundant offset argument >>> from the read callback prototype. >>> >>> - Finally, 4/4 consolidates (non-DMA) reads, minimizing the number >>> of times redundant sanity checks are performed, particularly for >>> wide (> byte) sized reads. Gabriel L. Somlo (6): fw_cfg: move internal function call docs to header file fw_cfg: amend callback behavior spec to once per select fw_cfg: remove offset argument from callback prototype fw_cfg: avoid calculating invalid current entry pointer fw_cfg: add generic non-DMA read method fw_cfg: replace ioport data read with generic method docs/specs/fw_cfg.txt | 85 +----------------------------- hw/arm/virt-acpi-build.c | 2 +- hw/i386/acpi-build.c | 2 +- hw/nvram/fw_cfg.c | 75 +++++++++++++-------------- include/hw/nvram/fw_cfg.h | 128 +++++++++++++++++++++++++++++++++++++++++++++- trace-events | 2 +- 6 files changed, 166 insertions(+), 128 deletions(-) -- 2.4.3