[Bug 207068] hwpmc wrap around/sign extension

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Feb 10 21:57:56 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207068

--- Comment #6 from joss.upton at yahoo.com ---
(In reply to joss.upton from comment #5)
Actually, the best test might be to do this:

uint64_t num;

num = rdmsr(0xc1);
printf("init: %lx\n", num);
wrmsr(0xc1, 0x80000000);
num = rdmsr(0xc1);
printf("after e31: %lx\n", num);

When I do this:

init: 0
after e31: ffff80000000

This behavior is correct according to the Intel manual, but causes issues with
negative increments if you race it long enough.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-amd64 mailing list