Re: [PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-31 Thread Laszlo Ersek
On 10/30/15 16:40, Radim Krčmář wrote: > 2015-10-26 17:32+0100, Paolo Bonzini: >> On 26/10/2015 16:43, Laszlo Ersek wrote: The code would be cleaner if we had a different approach, but this works too and is safer for stable. In case you prefer to leave the rewrite for a future

Re: [PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-30 Thread Radim Krčmář
2015-10-26 17:32+0100, Paolo Bonzini: > On 26/10/2015 16:43, Laszlo Ersek wrote: >>> The code would be cleaner if we had a different approach, but this works >>> too and is safer for stable. In case you prefer to leave the rewrite for >>> a future victim, >> >> It's hard to express how much I

Re: [PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-26 Thread Radim Krčmář
2015-10-23 23:43+0200, Laszlo Ersek: > Commit b10d92a54dac ("KVM: x86: fix RSM into 64-bit protected mode") > reordered the rsm_load_seg_64() and rsm_enter_protected_mode() calls, > relative to each other. The argument that said commit made was correct, > however putting rsm_enter_protected_mode()

Re: [PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-26 Thread Laszlo Ersek
On 10/26/15 16:37, Radim Krčmář wrote: > 2015-10-23 23:43+0200, Laszlo Ersek: >> Commit b10d92a54dac ("KVM: x86: fix RSM into 64-bit protected mode") >> reordered the rsm_load_seg_64() and rsm_enter_protected_mode() calls, >> relative to each other. The argument that said commit made was correct,

Re: [PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-26 Thread Paolo Bonzini
On 26/10/2015 16:43, Laszlo Ersek wrote: > > The code would be cleaner if we had a different approach, but this works > > too and is safer for stable. In case you prefer to leave the rewrite for > > a future victim, > > It's hard to express how much I prefer that. Radim, if you want to have a

[PATCH] KVM: x86: fix RSM into 64-bit protected mode, round 2

2015-10-23 Thread Laszlo Ersek
Commit b10d92a54dac ("KVM: x86: fix RSM into 64-bit protected mode") reordered the rsm_load_seg_64() and rsm_enter_protected_mode() calls, relative to each other. The argument that said commit made was correct, however putting rsm_enter_protected_mode() first whole-sale violated the following

[PATCH] KVM: x86: fix RSM into 64-bit protected mode

2015-10-14 Thread Paolo Bonzini
In order to get into 64-bit protected mode, CS.L must be 0. This is always the case when executing RSM, so it is enough to load the segments after CR0 and CR4. Fixes: 660a5d517aaab9187f93854425c4c63f4a09195c Cc: sta...@vger.kernel.org Signed-off-by: Paolo Bonzini ---