Re: [PATCH RFC v2 4/6] KVM: change mark_page_dirty() to handle endian issues explicitly

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

 



On 20.04.2010, at 13:00, Takuya Yoshikawa wrote:

> We are now using generic___set_le_bit() to make dirty bitmaps le.
> Though this works well, we have to replace __set_bit() to appropriate
> uaccess function to move dirty bitmaps to user space. So this patch
> splits generic___set_le_bit() and prepares for that.
> 
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>
> Signed-off-by: Fernando Luis Vazquez Cao <fernando@xxxxxxxxxxxxx>
> ---
> virt/kvm/kvm_main.c |   16 +++++++++++-----
> 1 files changed, 11 insertions(+), 5 deletions(-)
> 
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 6908304..66c4daf 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -1194,6 +1194,15 @@ int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len)
> }
> EXPORT_SYMBOL_GPL(kvm_clear_guest);
> 
> +static int __mark_page_dirty(unsigned long nr,
> +			     unsigned long *dirty_bitmap)
> +{
> +#ifdef __BIG_ENDIAN
> +	nr = nr ^ BITOP_LE_SWIZZLE;

Why an XOR here?

Also is this LE set_bit new? I didn't see it when I did the patch back then :).


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux