devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marc Marí" <markmb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org,
	seabios-VcxPKcuBGKdAfugRpC6u6w@public.gmane.org
Cc: Drew <drjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Stefan Hajnoczi"
	<stefanha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Kevin O'Connor" <kevin-BG7uPxbsK//k1uMJSBkQmQ@public.gmane.org>,
	"Gerd Hoffmann" <kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Laszlo <lersek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"Arnd Bergmann" <arnd-r2nGTMty4D4@public.gmane.org>,
	"Rob Herring"
	<rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"Alexander Graf" <agraf-l3A5Bk7waGM@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"Marc Marí" <markmb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: QEMU fw_cfg DMA interface
Date: Thu,  1 Oct 2015 14:14:37 +0200	[thread overview]
Message-ID: <1443701677-13629-1-git-send-email-markmb@redhat.com> (raw)

Implementation of the FW CFG DMA interface.

When running a Linux guest on top of QEMU, using the -kernel options, this
is the timing improvement for x86:

QEMU commit b2312c6 and SeaBIOS commit 423542e
QEMU startup time: .080
BIOS startup time: .060
Kernel setup time: .586
Total time: .726

QEMU with this patch series and SeaBIOS with this patch series
QEMU startup time: .080
BIOS startup time: .039
Kernel setup time: .005
Total time: .126

QEMU startup time is the time between the start and the first kvm_entry.
BIOS startup time is the time between the first kvm_entry and the start of
function do_boot, in SeaBIOS.
Kernel setup time is the time between the start of the function do_boot in
SeaBIOS and the jump to the Linux kernel.

As you can see, both the BIOS (because of ACPI tables and other configurations)
and the Linux kernel boot (because of the copy to memory) are greatly
improved with this new interface.

Also, this new interface is an addon to the old interface. Both interfaces
are compatible and interchangeable.

Changes from v1:
 - Take into account order of fields in the FWCfgDmaAccess structure
 - Check and change endianness of FWCfgDmaAccess fields
 - Change order of fields in the FWCfgDmaAccess structure
 - Add FW_CFG_DMA_CTL_SKIP feature for control field
 - Split FW_CFG_SIZE in QEMU
 - Make FW_CFG_ID a bitmap of features
 - Add 64 bit address support for the transfer. Trigger when writing the low
   address, and address is 0 by default and at the end of each transfer.
 - Align ports and addresses.
 - Preserve old fw_cfg_comb_valid behaviour in QEMU
 - Update documentation to reflect all these changes

Changes from v2:
 - Make IOports fw_cfg DMA region a different IO region.
 - Reuse everything for MMIO and IOport DMA regions
 - Make transfer status only based on control field
 - Use DMA helpers instead of direct map/unmap
 - Change ARM fw_cfg DMA address space
 - Change Linux boot process to match linuxboot.S
 - Add select capabilities in the FWCfgDmaAccess struct
 - Update documentation to reflect all these changes

Changes from v3:
 - Set properly fw_cfg DMA fields in ARM
 - Set fw_cfg DMA boot process properly (by Laszlo Ersek)
 - Add signature to fw_cfg DMA address field (by Kevin O'Connor)
 - Minor nitpicks
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2015-10-01 12:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-01 12:14 Marc Marí [this message]
     [not found] ` <1443701677-13629-1-git-send-email-markmb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-01 12:15   ` [PATCH v4] QEMU fw_cfg DMA interface documentation Marc Marí
     [not found]     ` <1443701732-13696-1-git-send-email-markmb-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-05  8:20       ` Stefan Hajnoczi
2015-10-05 10:06         ` Marc Marí
2015-10-05 10:11           ` Stefan Hajnoczi
2015-10-01 16:03 ` [Qemu-devel] QEMU fw_cfg DMA interface Eric Blake
     [not found]   ` <560D5945.5050700-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-01 16:11     ` Eric Blake
2015-10-01 16:19       ` Laszlo Ersek
2015-10-01 16:17     ` Laszlo Ersek
     [not found]       ` <560D5C7E.8080900-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-10-01 16:21         ` Eric Blake
2015-10-01 16:34           ` Laszlo Ersek
  -- strict thread matches above, loose matches on Subject: below --
2015-09-18  8:58 Marc Marí
2015-08-31  9:08 Marc Marí

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1443701677-13629-1-git-send-email-markmb@redhat.com \
    --to=markmb-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=agraf-l3A5Bk7waGM@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=drjones-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=kevin-BG7uPxbsK//k1uMJSBkQmQ@public.gmane.org \
    --cc=kraxel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=lersek-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org \
    --cc=rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=seabios-VcxPKcuBGKdAfugRpC6u6w@public.gmane.org \
    --cc=stefanha-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).