qemu-discuss
[Top][All Lists]
Advanced

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

Re: using bit-field to define a qom register


From: Peter Maydell
Subject: Re: using bit-field to define a qom register
Date: Sat, 10 Jul 2021 16:19:56 +0100

On Sat, 10 Jul 2021 at 03:02, Hiroko Shimizu <hiroko07168@gmail.com> wrote:
> Anyway, if you access the second bit, does the read/write function
> offset value become 1 bit automatically?

If you mean the MemoryRegionOps read and write functions, those
work only with byte offsets, because the guest CPU cannot make
accesses to individual bits, only to bytes (for some devices,
it may only be able to access word at a time). You have to write
your read and write functions to do whatever the hardware would
do for those byte or word accesses.

-- PMM



reply via email to

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