Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1653237 > unrolled thread
| Started by | Gioh Kim <gi-oh.kim@profitbricks.com> |
|---|---|
| First post | 2017-05-30 15:30 +0200 |
| Last post | 2017-05-30 18:10 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH] KVM: SVM: ignore type when setting segment registers Gioh Kim <gi-oh.kim@profitbricks.com> - 2017-05-30 15:30 +0200
Re: [PATCH] KVM: SVM: ignore type when setting segment registers Radim Krčmář <rkrcmar@redhat.com> - 2017-05-30 17:10 +0200
Re: [PATCH] KVM: SVM: ignore type when setting segment registers Paolo Bonzini <pbonzini@redhat.com> - 2017-05-30 18:10 +0200
| From | Gioh Kim <gi-oh.kim@profitbricks.com> |
|---|---|
| Date | 2017-05-30 15:30 +0200 |
| Subject | [PATCH] KVM: SVM: ignore type when setting segment registers |
| Message-ID | <tMPnJ-7TL-27@gated-at.bofh.it> |
Commit 19bca6ab75d8 ("KVM: SVM: Fix cross vendor migration issue with
unusable bit") added checking type when setting unusable.
So unusable can be set if present is 0 OR type is 0.
According to the AMD processor manual, long mode ignores the type value
in segment descriptor. And type can be 0 if it is read-only data segment.
Therefore type value is not related to unusable flag.
This patch is based on linux-next v4.12.0-rc3.
Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com>
---
arch/x86/kvm/svm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 183ddb2..a654372 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1807,7 +1807,7 @@ static void svm_get_segment(struct kvm_vcpu *vcpu,
* AMD's VMCB does not have an explicit unusable field, so emulate it
* for cross vendor migration purposes by "not present"
*/
- var->unusable = !var->present || (var->type == 0);
+ var->unusable = !var->present;
switch (seg) {
case VCPU_SREG_TR:
--
2.5.0
[toc] | [next] | [standalone]
| From | Radim Krčmář <rkrcmar@redhat.com> |
|---|---|
| Date | 2017-05-30 17:10 +0200 |
| Message-ID | <tMQWu-wG-27@gated-at.bofh.it> |
| In reply to | #1653237 |
2017-05-30 15:24+0200, Gioh Kim: > This patch is based on linux-next v4.12.0-rc3. (I'd omit this.) > Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com> > --- Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
[toc] | [prev] | [next] | [standalone]
| From | Paolo Bonzini <pbonzini@redhat.com> |
|---|---|
| Date | 2017-05-30 18:10 +0200 |
| Message-ID | <tMRSy-16W-17@gated-at.bofh.it> |
| In reply to | #1653301 |
On 30/05/2017 17:05, Radim Krčmář wrote: > 2017-05-30 15:24+0200, Gioh Kim: >> This patch is based on linux-next v4.12.0-rc3. > > (I'd omit this.) > >> Signed-off-by: Gioh Kim <gi-oh.kim@profitbricks.com> >> --- > > Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Queued, thanks. Paolo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web