- Subject: Re: [RFC][PATCH resend 8/12] asm-generic: bitops: introduce le bit offset macro
- From: Arnd Bergmann <arnd@xxxxxxxx>
- Date: Tue, 4 May 2010 17:03:00 +0200
- Cc: avi@xxxxxxxxxx, mtosatti@xxxxxxxxxx, agraf@xxxxxxx, yoshikawa.takuya@xxxxxxxxxxxxx, fernando@xxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, kvm-ppc@xxxxxxxxxxxxxxx, kvm-ia64@xxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, hpa@xxxxxxxxx, x86@xxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, paulus@xxxxxxxxx, linuxppc-dev@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
- In-reply-to: <20100504220500.7695cd66.takuya.yoshikawa@xxxxxxxxx>
- References: <20100504215645.6448af8f.takuya.yoshikawa@xxxxxxxxx> <20100504220500.7695cd66.takuya.yoshikawa@xxxxxxxxx>
- User-agent: KMail/1.12.2 (Linux/2.6.31-19-generic; KDE/4.3.2; x86_64; ; )
On Tuesday 04 May 2010, Takuya Yoshikawa wrote:
>
> Although we can use *_le_bit() helpers to treat bitmaps le arranged,
> having le bit offset calculation as a seperate macro gives us more freedom.
>
> For example, KVM has le arranged dirty bitmaps for VGA, live-migration
> and they are used in user space too. To avoid bitmap copies between kernel
> and user space, we want to update the bitmaps in user space directly.
> To achive this, le bit offset with *_user() functions help us a lot.
>
> So let us use the le bit offset calculation part by defining it as a new
> macro: generic_le_bit_offset() .
Does this work correctly if your user space is 32 bits (i.e. unsigned long
is different size in user space and kernel) in both big- and little-endian
systems?
I'm not sure about all the details, but I think you cannot in general share
bitmaps between user space and kernel because of this.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Home]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Video Projectors]
[PDAs]
[Free Online Dating]
[Hacking TiVo]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Big List of Linux Books]
[16.7MP]