MSR index is 32bit not 64bit. All other MSR indexes are defined without the ULL suffix. Otherwise, you will get [hjl@gnu-5 tmp]$ cat foo.c typedef unsigned long long u64; int is_disabled(void) { u64 vm_cr; do { unsigned long l__,h__; __asm__ __volatile__("rdmsr" : "=a" (l__), "=d" (h__) : "c" (0xc0010114ULL)); vm_cr = l__; vm_cr |= ((u64)h__<<32); } while(0); if (vm_cr & (1 << 4)) return 1; return 0; } [hjl@gnu-5 tmp]$ gcc -m32 -S foo.c foo.c: In function â_disabledâfoo.c:7: error: impossible register constraint in âmâoo.c:12: confused by earlier errors, bailing out [hjl@gnu-5 tmp]$ on 32bit. This patch removes the ULL suffix in SVM MSR indexes.
Created attachment 158219 [details] A patch to remove ULL in SVM MSR indexes
(In reply to comment #1) > Created an attachment (id=158219) [edit] > A patch to remove ULL in SVM MSR indexes Patch is in 1.3240, thanks for testing.