]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
KVM: SVM: ignore type when setting segment registers
authorGioh Kim <gi-oh.kim@profitbricks.com>
Tue, 30 May 2017 13:24:45 +0000 (15:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 May 2017 15:17:22 +0000 (17:17 +0200)
commit8eae9570d1d3887487be0b355d12656b46fac226
tree0f93aa49ad7072dca4540278688bbb420c44e708
parentcbf712792b6e61317b93dd56dd5c0784363c9ac9
KVM: SVM: ignore type when setting segment registers

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>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c