All of lore.kernel.org
 help / color / mirror / Atom feed
From: stefanha@gmail.com (Stefan Hajnoczi)
To: kernelnewbies@lists.kernelnewbies.org
Subject: [Qemu-devel] [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device
Date: Tue, 6 Oct 2015 09:40:42 +0100	[thread overview]
Message-ID: <20151006084042.GC19089@stefanha-thinkpad> (raw)
In-Reply-To: <1443914889-9619-2-git-send-email-somlo@cmu.edu>

On Sat, Oct 03, 2015 at 07:28:06PM -0400, Gabriel L. Somlo wrote:
> +/* read chunk of given fw_cfg blob (caller responsible for sanity-check) */
> +static inline void fw_cfg_read_blob(u16 key,
> +				    void *buf, loff_t pos, size_t count)
> +{
> +	mutex_lock(&fw_cfg_dev_lock);
> +	iowrite16(fw_cfg_sel_endianness(key), fw_cfg_reg_ctrl);
> +	while (pos-- > 0)
> +		ioread8(fw_cfg_reg_data);
> +	ioread8_rep(fw_cfg_reg_data, buf, count);
> +	mutex_unlock(&fw_cfg_dev_lock);
> +}

Have you had a chance to play with Marc Mari's fw_cfg DMA interface
patches?  They should make this operation much faster.

https://www.mail-archive.com/qemu-devel at nongnu.org/msg325541.html

Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Gabriel L. Somlo" <somlo@cmu.edu>
Cc: gregkh@linuxfoundation.org, paul@pwsan.com, galak@codeaurora.org,
	will.deacon@arm.com, agross@codeaurora.org, mark.rutland@arm.com,
	zajec5@gmail.com, hanjun.guo@linaro.org, catalin.marinas@arm.com,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org,
	peter.maydell@linaro.org, matt.fleming@intel.com, mst@redhat.com,
	jordan.l.justen@intel.com, kernelnewbies@kernelnewbies.org,
	qemu-devel@nongnu.org, leif.lindholm@linaro.org,
	ard.biesheuvel@linaro.org, kraxel@redhat.com,
	pbonzini@redhat.com, lersek@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device
Date: Tue, 6 Oct 2015 09:40:42 +0100	[thread overview]
Message-ID: <20151006084042.GC19089@stefanha-thinkpad> (raw)
In-Reply-To: <1443914889-9619-2-git-send-email-somlo@cmu.edu>

On Sat, Oct 03, 2015 at 07:28:06PM -0400, Gabriel L. Somlo wrote:
> +/* read chunk of given fw_cfg blob (caller responsible for sanity-check) */
> +static inline void fw_cfg_read_blob(u16 key,
> +				    void *buf, loff_t pos, size_t count)
> +{
> +	mutex_lock(&fw_cfg_dev_lock);
> +	iowrite16(fw_cfg_sel_endianness(key), fw_cfg_reg_ctrl);
> +	while (pos-- > 0)
> +		ioread8(fw_cfg_reg_data);
> +	ioread8_rep(fw_cfg_reg_data, buf, count);
> +	mutex_unlock(&fw_cfg_dev_lock);
> +}

Have you had a chance to play with Marc Mari's fw_cfg DMA interface
patches?  They should make this operation much faster.

https://www.mail-archive.com/qemu-devel@nongnu.org/msg325541.html

Stefan

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Gabriel L. Somlo" <somlo@cmu.edu>
Cc: mark.rutland@arm.com, peter.maydell@linaro.org, mst@redhat.com,
	catalin.marinas@arm.com, will.deacon@arm.com,
	qemu-devel@nongnu.org, kraxel@redhat.com,
	linux-api@vger.kernel.org, kernelnewbies@kernelnewbies.org,
	zajec5@gmail.com, lersek@redhat.com, jordan.l.justen@intel.com,
	agross@codeaurora.org, leif.lindholm@linaro.org, paul@pwsan.com,
	matt.fleming@intel.com, ard.biesheuvel@linaro.org,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	hanjun.guo@linaro.org, galak@codeaurora.org, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's fw_cfg device
Date: Tue, 6 Oct 2015 09:40:42 +0100	[thread overview]
Message-ID: <20151006084042.GC19089@stefanha-thinkpad> (raw)
In-Reply-To: <1443914889-9619-2-git-send-email-somlo@cmu.edu>

On Sat, Oct 03, 2015 at 07:28:06PM -0400, Gabriel L. Somlo wrote:
> +/* read chunk of given fw_cfg blob (caller responsible for sanity-check) */
> +static inline void fw_cfg_read_blob(u16 key,
> +				    void *buf, loff_t pos, size_t count)
> +{
> +	mutex_lock(&fw_cfg_dev_lock);
> +	iowrite16(fw_cfg_sel_endianness(key), fw_cfg_reg_ctrl);
> +	while (pos-- > 0)
> +		ioread8(fw_cfg_reg_data);
> +	ioread8_rep(fw_cfg_reg_data, buf, count);
> +	mutex_unlock(&fw_cfg_dev_lock);
> +}

Have you had a chance to play with Marc Mari's fw_cfg DMA interface
patches?  They should make this operation much faster.

https://www.mail-archive.com/qemu-devel@nongnu.org/msg325541.html

Stefan

  parent reply	other threads:[~2015-10-06  8:40 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03 23:28 [PATCH v3 0/4] SysFS driver for QEMU fw_cfg device Gabriel L. Somlo
2015-10-03 23:28 ` [Qemu-devel] " Gabriel L. Somlo
2015-10-03 23:28 ` Gabriel L. Somlo
2015-10-03 23:28 ` Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 1/4] firmware: introduce sysfs driver for QEMU's " Gabriel L. Somlo
2015-10-03 23:28   ` [Qemu-devel] " Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-04  1:34   ` kbuild test robot
2015-10-04  1:34     ` [Qemu-devel] " kbuild test robot
2015-10-04  1:34     ` kbuild test robot
2015-10-06  8:40   ` Stefan Hajnoczi [this message]
2015-10-06  8:40     ` [Qemu-devel] " Stefan Hajnoczi
2015-10-06  8:40     ` Stefan Hajnoczi
2015-10-06 12:53   ` Laszlo Ersek
2015-10-06 12:53     ` [Qemu-devel] " Laszlo Ersek
2015-10-06 12:53     ` Laszlo Ersek
2015-10-06 12:53     ` Laszlo Ersek
2015-10-06 17:54   ` Andy Lutomirski
2015-10-06 17:54     ` [Qemu-devel] " Andy Lutomirski
2015-10-06 17:54     ` Andy Lutomirski
2015-10-06 18:17     ` Gabriel L. Somlo
2015-10-06 18:17       ` [Qemu-devel] " Gabriel L. Somlo
2015-10-06 18:17       ` Gabriel L. Somlo
2015-10-06 18:17       ` Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 2/4] firmware: use acpi to detect QEMU fw_cfg device for sysfs fw_cfg driver Gabriel L. Somlo
2015-10-03 23:28   ` [Qemu-devel] " Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-04  7:54   ` Michael S. Tsirkin
2015-10-04  7:54     ` [Qemu-devel] " Michael S. Tsirkin
2015-10-04  7:54     ` Michael S. Tsirkin
2015-10-04  7:54     ` Michael S. Tsirkin
2015-10-04 20:24     ` Gabriel L. Somlo
2015-10-04 20:24       ` [Qemu-devel] " Gabriel L. Somlo
2015-10-04 20:24       ` Gabriel L. Somlo
2015-10-04 20:24       ` Gabriel L. Somlo
2015-10-04 20:27       ` Gabriel L. Somlo
2015-10-04 20:27         ` [Qemu-devel] " Gabriel L. Somlo
2015-10-04 20:27         ` Gabriel L. Somlo
2015-10-04 20:27         ` Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 3/4] kobject: export kset_find_obj() for module use Gabriel L. Somlo
2015-10-03 23:28   ` [Qemu-devel] " Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-03 23:28 ` [PATCH v3 4/4] firmware: create directory hierarchy for sysfs fw_cfg entries Gabriel L. Somlo
2015-10-03 23:28   ` [Qemu-devel] " Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-03 23:28   ` Gabriel L. Somlo
2015-10-05 10:00 ` [PATCH v3 0/4] SysFS driver for QEMU fw_cfg device Mark Rutland
2015-10-05 10:00   ` [Qemu-devel] " Mark Rutland
2015-10-05 10:00   ` Mark Rutland
2015-10-05 10:00   ` Mark Rutland
2015-10-05 11:48   ` Paolo Bonzini
2015-10-05 11:48     ` [Qemu-devel] " Paolo Bonzini
2015-10-05 11:48     ` Paolo Bonzini
2015-10-05 11:48     ` Paolo Bonzini
2015-10-05 12:23     ` Mark Rutland
2015-10-05 12:23       ` [Qemu-devel] " Mark Rutland
2015-10-05 12:23       ` Mark Rutland
2015-10-05 12:23       ` Mark Rutland
2015-10-05 12:43       ` Gabriel L. Somlo
2015-10-05 12:43         ` [Qemu-devel] " Gabriel L. Somlo
2015-10-05 12:43         ` Gabriel L. Somlo
2015-10-05 12:43         ` Gabriel L. Somlo
2015-10-05 12:56         ` Mark Rutland
2015-10-05 12:56           ` [Qemu-devel] " Mark Rutland
2015-10-05 12:56           ` Mark Rutland
2015-10-05 12:56           ` Mark Rutland
2015-10-05 13:21           ` Gabriel L. Somlo
2015-10-05 13:21             ` [Qemu-devel] " Gabriel L. Somlo
2015-10-05 13:21             ` Gabriel L. Somlo
2015-10-05 13:21             ` Gabriel L. Somlo
2015-10-05 12:40   ` Gabriel L. Somlo
2015-10-05 12:40     ` [Qemu-devel] " Gabriel L. Somlo
2015-10-05 12:40     ` Gabriel L. Somlo
2015-10-05 12:40     ` Gabriel L. Somlo
2015-10-05 12:50     ` Peter Maydell
2015-10-05 12:50       ` [Qemu-devel] " Peter Maydell
2015-10-05 12:50       ` Peter Maydell
2015-10-05 12:50       ` Peter Maydell
2015-10-05 13:13       ` Gabriel L. Somlo
2015-10-05 13:13         ` [Qemu-devel] " Gabriel L. Somlo
2015-10-05 13:13         ` Gabriel L. Somlo
2015-10-05 13:13         ` Gabriel L. Somlo
2015-10-05 13:18       ` Paolo Bonzini
2015-10-05 13:18         ` [Qemu-devel] " Paolo Bonzini
2015-10-05 13:18         ` Paolo Bonzini
2015-10-05 13:18         ` Paolo Bonzini
2015-11-04 20:48         ` Gabriel L. Somlo
2015-11-04 20:48           ` [Qemu-devel] " Gabriel L. Somlo
2015-11-04 20:48           ` Gabriel L. Somlo
2015-11-04 20:48           ` Gabriel L. Somlo
2015-10-05 13:05     ` Mark Rutland
2015-10-05 13:05       ` [Qemu-devel] " Mark Rutland
2015-10-05 13:05       ` Mark Rutland
2015-10-06  7:18       ` Laszlo Ersek
2015-10-06  7:18         ` [Qemu-devel] " Laszlo Ersek
2015-10-06  7:18         ` Laszlo Ersek
2015-10-06  7:18         ` Laszlo Ersek

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=20151006084042.GC19089@stefanha-thinkpad \
    --to=stefanha@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.