Skip to content

arm/kvm: use kvm_{get,set}_one_reg

Cornelia Huck kvm qemu-arm qemu-devel 2 versions – Applied

Status from this message: I've applied patches 1 and 2 to target-arm.next.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 6 repliesApplied
  2. v12 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- fix buglets (thanks Gavin)
- add patch 3 on top

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/3arm/kvm: convert to kvm_set_one_regtarget/arm/kvm.c target/arm/kvm64.c+21 -581 reply
2/3arm/kvm: convert to kvm_get_one_regtarget/arm/kvm.c target/arm/kvm64.c+18 -541 reply
3/3arm/kvm: convert to read_sys_reg64target/arm/kvm64.c+1 -53 replies

Reviews trailers per patch

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

PatchGavin ShanPhilippe Mathieu-Daudé
1/3R-b R-b
2/3R-b R-b
3/3R-b

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

Read the v2 thread

Cover letter [PATCH v2 0/3] arm/kvm: use kvm_{get,set}_one_reg

I sent this cleanup first... in mid-July (ugh). But better late than never, I guess.

From v1:
- fix buglets (thanks Gavin)
- add patch 3 on top

The kvm_{get,set}_one_reg functions have been around for a very long time, and using them instead of open-coding the ioctl invocations saves lines of code, and gives us a tracepoint as well. They cannot be used by invocations of the ioctl not acting on a CPUState, but that still leaves a lot of conversions in the target/arm code.

target/mips and target/ppc also have some potential for conversions, but as I cannot test either (and they are both in 'Odd fixes' anyway), I left them alone.

Survives some testing on a Mt. Snow.

Cornelia Huck (3):
arm/kvm: convert to kvm_set_one_reg
arm/kvm: convert to kvm_get_one_reg
arm/kvm: convert to read_sys_reg64

 target/arm/kvm.c   |  28 +++-------
 target/arm/kvm64.c | 129 ++++++++++++---------------------------------
 2 files changed, 40 insertions(+), 117 deletions(-)
Signature · 1 line
2.41.0