From: Avi Kivity <avi@qumranet.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH] fix rdmsrl() truncation bug
Date: Tue, 27 Dec 2005 19:04:16 +0200 [thread overview]
Message-ID: <43B17410.40600@qumranet.com> (raw)
rdmsrl() shifts an unsigned long by 32 bits, which on x86_32 results in
the data being discarded. patch fixes that by casting to __u64 before
the shift.
Signed-off-by: Avi Kivity <avi@qumranet.com>
diff -r 829517be689f xen/include/asm-x86/msr.h
--- a/xen/include/asm-x86/msr.h Fri Dec 23 15:42:46 2005
+++ b/xen/include/asm-x86/msr.h Tue Dec 27 19:02:09 2005
@@ -12,7 +12,7 @@
__asm__ __volatile__("rdmsr" \
: "=a" (a__), "=d" (b__) \
: "c" (msr)); \
- val = a__ | (b__<<32); \
+ val = a__ | ((__u64)b__<<32); \
} while(0);
#define wrmsr(msr,val1,val2) \
--
error compiling committee.c: too many arguments to function
reply other threads:[~2005-12-27 17:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43B17410.40600@qumranet.com \
--to=avi@qumranet.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.