Skip to content

remove tss_descr, replace with a function

Paolo Bonzini kvm 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/24 patches 0 repliesNew
  2. v2 posting 1/22 patches 9 repliesSuperseded
  3. v12 patches 4 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86: cleanup handling of 16-byte GDT descriptorslib/x86/desc.h x86/svm_tests.c x86/vmware_backdoors.c+12 -120 replies
2/4x86: fix call to set_gdt_entrylib/x86/desc.c+1 -10 replies
3/4unify field names and definitions for GDT descriptorslib/x86/desc.c lib/x86/desc.h x86/taskswitch.c+29 -190 replies
4/4replace tss_descr global with a functionlib/x86/desc.c lib/x86/desc.h x86/cstart64.S +4 more+53 -530 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 kvm-unit-tests 0/4] remove tss_descr, replace with a function

tss_descr is declared as a struct descriptor_table_ptr but it is actualy pointing to an _entry_ in the GDT. Also it is different per CPU, but tss_descr does not recognize that. Fix both by reusing the code (already present e.g. in the vmware_backdoors test) that extracts the base from the GDT entry; and also provide a helper to retrieve the limit, which is needed in vmx.c.

Patch 1 adjusts the structs for GDT descriptors, so that the same code works for both 32-bit and 64-bit.

Paolo

v1->v2: correctly handle segment descriptors
remove duplication between struct definitions

v2->v3: improve handling of 16-byte GDT descriptors
rename limit bitfield to limit2 retrieve guest TR limit from the GDT new patch 2 adds another cleanup

Paolo Bonzini (4):
x86: cleanup handling of 16-byte GDT descriptors
x86: fix call to set_gdt_entry
unify field names and definitions for GDT descriptors replace tss_descr global with a function

 lib/x86/desc.c         | 52 ++++++++++++++++++++++++++++++++----------
 lib/x86/desc.h         | 23 ++++++++++---------
 x86/cstart64.S         |  1 -
 x86/svm_tests.c        | 15 +++---------
 x86/taskswitch.c       |  2 +-
 x86/vmware_backdoors.c | 22 +++++-------------
 x86/vmx.c              |  9 ++++----
 7 files changed, 67 insertions(+), 57 deletions(-)
Signature · 1 line
2.27.0