Skip to content

target/s390x/kvm: Simplify the synchronization code

Thomas Huth qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesIn review
  2. v22 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- Don't sync ACRs, CRs and prefix in kvm_arch_put_registers() when using level == KVM_PUT_RUNTIME_STATE
- Use g_assert(can_sync_regs(cs, KVM_SYNC_REQUIRED_REGS)) instead of open-coding it.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirementtarget/s390x/kvm/kvm.c+14 -61 reply
2/2target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix synchronization codetarget/s390x/kvm/kvm.c+24 -821 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchChristian BorntraegerCédric Le Goater
1/2R-b R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] target/s390x/kvm: Simplify the synchronization code

KVM_SYNC_GPRS, KVM_SYNC_ACRS, KVM_SYNC_CRS and KVM_SYNC_PREFIX are available since kernel 3.10. Since we already require at least kernel 3.15 in the s390x KVM code, we can also assume that the KVM_CAP_SYNC_REGS sync code is always possible for these registers, and remove the related checks and fallbacks via KVM_SET_REGS and KVM_GET_REGS.

v3:
- Don't sync ACRs, CRs and prefix in kvm_arch_put_registers() when using level == KVM_PUT_RUNTIME_STATE
- Use g_assert(can_sync_regs(cs, KVM_SYNC_REQUIRED_REGS)) instead of open-coding it.

v2:
- Split the patch from v1 into two patches
- Use a #define KVM_SYNC_REQUIRED_BITS for the required sync bits
- Use memcpy() instead of for-loops for copying the registers

Thomas Huth (2):
target/s390x/kvm: Turn KVM_CAP_SYNC_REGS into a hard requirement target/s390x/kvm: Simplify the GPRs, ACRs, CRs and prefix
synchronization code

 target/s390x/kvm/kvm.c | 124 ++++++++++++-----------------------------
 1 file changed, 37 insertions(+), 87 deletions(-)
Signature · 1 line
2.41.0