diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-03-16 14:11:34 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-03-16 14:11:34 +0000 |
commit | 33c8483360bba3536dc678a94e7f70cb75828066 (patch) | |
tree | 96762b4f3dc117f35580f54b3c7e1d63db0b4f1d /xen/drivers/video | |
parent | 266a06100af5272c956bf7dba719b0b823647a5b (diff) | |
download | xen-33c8483360bba3536dc678a94e7f70cb75828066.tar.gz xen-33c8483360bba3536dc678a94e7f70cb75828066.tar.bz2 xen-33c8483360bba3536dc678a94e7f70cb75828066.zip |
x86: Allow bitop functions to be applied only to fields of at least 4
bytes. Otherwise the 'longword' processor instructions used will
overlap with adjacent fields with unpredictable consequences.
This change requires some code fixup and just a few casts (mainly when
operating on guest-shared fields which cannot be changed, and which by
observation are clearly safe).
Based on ideas from Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/drivers/video')
-rw-r--r-- | xen/drivers/video/vesa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/drivers/video/vesa.c b/xen/drivers/video/vesa.c index d18476421c..e36e358789 100644 --- a/xen/drivers/video/vesa.c +++ b/xen/drivers/video/vesa.c @@ -219,7 +219,7 @@ static void vesa_show_line( ((font->width + 7) >> 3)); for ( b = font->width; b--; ) { - pixel = test_bit(b, bits) ? pixel_on : 0; + pixel = (*bits & (1u<<b)) ? pixel_on : 0; memcpy(ptr, &pixel, bpp); ptr += bpp; } |