qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	patches@linaro.org, qemu-devel@nongnu.org,
	Anthony Liguori <anthony@codemonkey.ws>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 0/9] Remove legacy unaligned bswap functions
Date: Mon, 9 Sep 2013 14:54:40 +0300	[thread overview]
Message-ID: <20130909115440.GA31742@redhat.com> (raw)
In-Reply-To: <1377442777-11066-1-git-send-email-peter.maydell@linaro.org>

On Sun, Aug 25, 2013 at 03:59:28PM +0100, Peter Maydell wrote:
> The bswap.h header includes a set of "legacy unaligned functions"
> that (since commit c732a52d3 at the beginning of this year) are
> just wrappers for underlying {ld,st}<type> functions. The legacy
> functions aren't used in many places, so just replace all their
> uses with uses of the new-style {ld,st} functions; this lets us
> remove the legacy wrappers altogether.

I have a question on this: what happens if an unaligned
address is supplied?
In particular, if the address is supplied by the guest?

Esp the pci wrappers have many callers - were they all
audited?
I tried checking but there are many callers, will take
a while.

> Since we know the {ld,st}* routines are definitely functions,
> we can in the process remove some casts which were left over
> from when the legacy unaligned functions were previously macros.
> 
> The patchset is divided up by function being removed, rather
> than by which device/subsystem is being fixed; I think this way
> round is easier to review since you only have to keep one
> substitution in your head when reading a patch.
> 
> Peter Maydell (9):
>   bswap.h: Remove cpu_to_le16wu()
>   bswap.h: Remove cpu_to_le32wu()
>   bswap.h: Remove le16_to_cpupu()
>   bswap.h: Remove le32_to_cpupu()
>   bswap.h: Remove be32_to_cpupu()
>   bswap.h: Remove cpu_to_be16wu()
>   bswap.h: Remove cpu_to_be32wu()
>   bswap.h: Remove cpu_to_be64wu()
>   bswap.h: Remove cpu_to_32wu()
> 
>  block/qcow2-cluster.c     |    2 +-
>  hw/acpi/core.c            |    3 +--
>  hw/block/cdrom.c          |   10 +++++-----
>  hw/display/vga_template.h |   14 ++++++++------
>  hw/ide/atapi.c            |   16 +++++++--------
>  hw/net/e1000.c            |   22 +++++++++------------
>  hw/net/ne2000.c           |    4 ++--
>  hw/pci/pcie_aer.c         |    4 ++--
>  include/hw/pci/pci.h      |    8 ++++----
>  include/qemu/bswap.h      |   47 ---------------------------------------------
>  10 files changed, 40 insertions(+), 90 deletions(-)
> 
> -- 
> 1.7.9.5

  parent reply	other threads:[~2013-09-09 11:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25 14:59 [Qemu-devel] [PATCH 0/9] Remove legacy unaligned bswap functions Peter Maydell
2013-08-25 14:59 ` [Qemu-devel] [PATCH 1/9] bswap.h: Remove cpu_to_le16wu() Peter Maydell
2013-08-25 14:59 ` [Qemu-devel] [PATCH 2/9] bswap.h: Remove cpu_to_le32wu() Peter Maydell
2013-08-26  9:02   ` Stefan Hajnoczi
2013-08-25 14:59 ` [Qemu-devel] [PATCH 3/9] bswap.h: Remove le16_to_cpupu() Peter Maydell
2013-08-25 14:59 ` [Qemu-devel] [PATCH 4/9] bswap.h: Remove le32_to_cpupu() Peter Maydell
2013-08-26  9:04   ` Stefan Hajnoczi
2013-08-25 14:59 ` [Qemu-devel] [PATCH 5/9] bswap.h: Remove be32_to_cpupu() Peter Maydell
2013-08-26  9:05   ` Stefan Hajnoczi
2013-08-25 14:59 ` [Qemu-devel] [PATCH 6/9] bswap.h: Remove cpu_to_be16wu() Peter Maydell
2013-08-26  9:07   ` Stefan Hajnoczi
2013-08-25 14:59 ` [Qemu-devel] [PATCH 7/9] bswap.h: Remove cpu_to_be32wu() Peter Maydell
2013-08-26  9:08   ` Stefan Hajnoczi
2013-08-25 14:59 ` [Qemu-devel] [PATCH 8/9] bswap.h: Remove cpu_to_be64wu() Peter Maydell
2013-08-26  9:09   ` Stefan Hajnoczi
2013-08-25 14:59 ` [Qemu-devel] [PATCH 9/9] bswap.h: Remove cpu_to_32wu() Peter Maydell
2013-08-26 14:06 ` [Qemu-devel] [PATCH 0/9] Remove legacy unaligned bswap functions Richard Henderson
2013-09-09 10:38 ` Peter Maydell
2013-10-15 13:36   ` Peter Maydell
2013-10-16 19:09     ` Michael S. Tsirkin
2013-09-09 11:54 ` Michael S. Tsirkin [this message]
2013-09-09 12:17   ` Peter Maydell
2013-10-15 14:38 ` Michael S. Tsirkin

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=20130909115440.GA31742@redhat.com \
    --to=mst@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@redhat.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    /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).