All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	peter.maydell@linaro.org,
	Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	qemu-devel@nongnu.org, Anthony Liguori <aliguori@us.ibm.com>
Subject: Re: [Qemu-devel] [RFC PATCH v1 2/4] bitops: Add UInt32StateInfo and helper functions
Date: Tue, 5 Mar 2013 16:32:52 +0200	[thread overview]
Message-ID: <20130305143252.GF2256@redhat.com> (raw)
In-Reply-To: <5135FE69.4040104@redhat.com>

On Tue, Mar 05, 2013 at 03:17:13PM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> >>>> We also need uint8_t, uint16_t and uint64_t versions for some devices.
> >>>> Perhaps it would be better to implement a uint64_t device which can be
> >>>> used with shorter widths or even stronger connection with memory API.
> >>>
> >>> Why not uint8_t for everyone?
> >>
> >> That would be simple, but then modeling for example 32 bit registers
> >> gets clumsy.
> > 
> > The way we do this in pci is support wrappers for word/long accesses.
> > This is a nice way to do endian-ness conversion anyway, I guess.
> > If people are interested, it shouldn't be hard to generalize the pci code...
> 
> > At least with PCI, guest can perform a long access and host word access
> > to the same register, so width is not a register property.
> 
> Thanks, but I'm not interested.
> 
> Memory API handles this just fine for me, and there is zero reason to
> care about how the guests accesses the registers (unless the hardware
> you are emulating behaves strange enough that you have to care to get it
> right).
> 
> cheers,
>   Gerd

If the intended audience uses the memory API, then it's not needed.
pci config is not going through a memory API ATM though
I think it might be possible to make it do this by creating a separate
config address space per device.

-- 
MST

  reply	other threads:[~2013-03-05 14:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-03  6:13 [Qemu-devel] [RFC PATCH v1 0/4] Data Driven device registers & Zynq DEVCFG Peter Crosthwaite
2013-03-03  6:13 ` [Qemu-devel] [RFC PATCH v1 1/4] qemu-log: Allow checking of the current mask Peter Crosthwaite
2013-03-03 10:32   ` Peter Maydell
2013-03-03  6:13 ` [Qemu-devel] [RFC PATCH v1 2/4] bitops: Add UInt32StateInfo and helper functions Peter Crosthwaite
2013-03-03  9:01   ` Blue Swirl
2013-03-04  1:37     ` Peter Crosthwaite
2013-03-04  7:28       ` Gerd Hoffmann
2013-03-04 20:44       ` Blue Swirl
2013-03-04  9:44     ` Michael S. Tsirkin
2013-03-04 20:52       ` Blue Swirl
2013-03-05 13:34         ` Michael S. Tsirkin
2013-03-05 14:17           ` Gerd Hoffmann
2013-03-05 14:32             ` Michael S. Tsirkin [this message]
2013-03-07  2:00               ` Peter Crosthwaite
2013-03-07  2:26                 ` Peter Maydell
2013-03-09  9:41                   ` Blue Swirl
2013-03-04  6:55   ` Gerd Hoffmann
2013-03-04  7:20     ` Peter Crosthwaite
2013-03-04  7:30       ` Gerd Hoffmann
2013-03-03  6:13 ` [Qemu-devel] [RFC PATCH v1 3/4] xilinx_zynq: devcfg device model Peter Crosthwaite
2013-03-03  6:13 ` [Qemu-devel] [RFC PATCH v1 4/4] zynq: added devcfg to machine model Peter Crosthwaite

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=20130305143252.GF2256@redhat.com \
    --to=mst@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kraxel@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.