qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v1 2/4] bitops: Add UInt32StateInfo and help


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [RFC PATCH v1 2/4] bitops: Add UInt32StateInfo and helper functions
Date: Tue, 05 Mar 2013 15:17:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130216 Thunderbird/17.0.3

  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]