On 28/09/2017 17:17, David Hildenbrand wrote: >> >> Originally implemented upstream for the S390, the x86 differences >> follow: >> - the capability can be enabled/disabled >> - the register sets to be copied out out to kvm_run are selectable >> by userspace > Why is this necessary? Why not simply store everything? And mark via > kvm_valid_regs which fields are actually valid? Storing everything would probably be pretty expensive. I'm not sure which MSRs you'd want to store explicitly (e.g. efer is already parts of sregs) though---Bjorn what are you using? I'm also not sure about the debug_regs... I like the patch, but I would like to understand more how it's used (all I can guess is that it's related to emulation in userspace). I would also like to have a testcase for kvm-unit-tests api/ in order to commit it. Paolo > Also, I wonder if user space could simply modify (reduce) > vcpu->run->kvm_valid_regs to achieve the same behavior (when storing in > the kernel, simply check if the valid bit is set). >