Add new tests:
- dbregs_dr0_trap_code
- dbregs_dr1_trap_code
- dbregs_dr2_trap_code
- dbregs_dr3_trap_code
This is the final set of tests for trap types that are supposed to be
supported by all amd64 CPUs.
Traps for code (instruction) execution must be set to 1 byte, otherwise
they are undefined. x86 code traps must point to the first byte of an
instruction.
Sponsored by <The NetBSD Foundation>
To test: (with an empty ~/.gnupg)
$ netpgpkeys --import-key /dev/null
Submitted on tech-pkg@ as:
[PATCH 01/11] Do not crash when listing keys without a keyring
Different patch for the same issue.
Replace the following tests:
- dbregs_dr0_trap_variable
- dbregs_dr1_trap_variable
- dbregs_dr2_trap_variable
- dbregs_dr3_trap_variable
With new ones:
- dbregs_dr0_trap_variable_writeonly_byte
- dbregs_dr1_trap_variable_writeonly_byte
- dbregs_dr2_trap_variable_writeonly_byte
- dbregs_dr3_trap_variable_writeonly_byte
- dbregs_dr0_trap_variable_writeonly_2bytes
- dbregs_dr1_trap_variable_writeonly_2bytes
- dbregs_dr2_trap_variable_writeonly_2bytes
- dbregs_dr3_trap_variable_writeonly_2bytes
- dbregs_dr0_trap_variable_writeonly_4bytes
- dbregs_dr1_trap_variable_writeonly_4bytes
- dbregs_dr2_trap_variable_writeonly_4bytes
- dbregs_dr3_trap_variable_writeonly_4bytes
All tests pass with my local implementation of debug registers. Once the
interface will be verified, I will prepare it for commit to HEAD.
Sponsored by <The NetBSD Foundation>
they are commented out. Several other values are common with K7, we could
merge them later.
This family of CPUs has a 12bit event selector, contrary to K7 (8bit). The
thing is, i386's PMC interface takes as argument a uint8_t from userland,
so these counters are not accessible (yet).
i386's own PMC interface (MD). Stop using PERFCTRS and use PMC instead.
While here remove some unused flags, which are wrong on the latest CPUs
anyway.
Currently this code is disabled in HEAD and the dbreg struct has to be
committed first in order to be used. Before enabling it I'm working on
reducing needless differences with FreeBSD and Linux.
Sponsored by <The NetBSD Foundation>
xen kernel builds (I am doing a test build in parallel with this commit,
this shouldn't make things worse ... I will make further changes if
needed after my build finishes.)
Note: I am not currently in a position to test a Xen3 DomU kernel
(let alone Dom0) so I have no way of knowing whether a Xen kernel
with PMC included will actually work correctly or not.
If this results in a system that builds, I'd appreciate it if someone
who can test the Xen3_DOMU kernel could do so.