The
x86_msr_xcall() function provides a x86-specific IPI handler suitable for use with the
xcall(9) interface. It can be used to ensure that a given MSR call is executed on all processors. The prototype follows the
xcfunc_t function pointer type and the opaque
arg1 pointer is casted to the following structure:
struct msr_rw_info {
int msr_read;
int msr_type;
uint64_t msr_value;
uint64_t msr_mask;
};
This structure must be filled prior to the call. Two fields are compulsory:
msr_type is used as the address of the MSR and
msr_value is the value to be written. If
msr_read is not zero,
x86_msr_xcall() will first read from
msr_type and then clear the mask specified in
msr_mask before the write operation.