Am 01.12.2016 um 13:38 schrieb Christian Borntraeger:
On 12/01/2016 01:28 PM, David Hildenbrand wrote:
Am 28.11.2016 um 10:06 schrieb Christian Borntraeger:
Right now we save the host access registers in kvm_arch_vcpu_load
and load them in kvm_arch_vcpu_put. Vice versa for the guest access
registers. On schedule this means, that we load/save access registers
multiple times.
Wasn't the main point about this to also protect from scheduling
another VCPU (maybe even from another VM)? (which in return would have
its own set of access registers and therefore would now use the wrong
set of access registers)
The thing is that the scheduler already loads and save old/new registers
(see arch/s390/include/asm/switch_to.h), so the new process will get
its correct registers. The only difference is that we store in
prev->thread.acrs[0] now the guest registers of prev instead of the host
registers of prev. But the host registers have been taken care of by KVM.
Cool, thanks for the explanation. So this makes very much sense.
--
David
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html