On Sat, Oct 27, 2018 at 10:41:56PM +0800, lijiang wrote: > Actually, the value of 'sme_me_mask' is 0x800000000000 when SME is > enabled, otherwise it is 0. That is to say, if the bit 47 is set, the > bit number is also 0x800000000000 (1 << 47UL); Yes, and you can simply copy the mask into your variable and export that. Thinking about it more, though, it might be better if you instead export a smaller value - not an u64 - and construct the mask in userspace. I.e., a u8 which should be enough for your current purposes. I say current because if it turns out we need to export more SME-related info to userspace, exporting an u64 and then OR-ing in more information in it would allow that. u8 not so much. So doing something like: [ misc ][ enc bit ][ other misc SME info ] 0000_0000_0000_0000_1000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000 63 59 55 51 47 43 39 35 31 27 23 19 15 11 7 3 would allow for exporting that additional info. Especially if we want to use VMCOREINFO for more than kexec things. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- _______________________________________________ kexec mailing list kexec@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/kexec