qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] arm/kvm: use kvm_{get,set}_one_reg
@ 2023-10-10 14:24 Cornelia Huck
  2023-10-10 14:24 ` [PATCH v2 1/3] arm/kvm: convert to kvm_set_one_reg Cornelia Huck
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Cornelia Huck @ 2023-10-10 14:24 UTC (permalink / raw)
  To: Peter Maydell, Paolo Bonzini
  Cc: Gavin Shan, qemu-arm, qemu-devel, kvm, Cornelia Huck

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(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-10-17 15:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-10 14:24 [PATCH v2 0/3] arm/kvm: use kvm_{get,set}_one_reg Cornelia Huck
2023-10-10 14:24 ` [PATCH v2 1/3] arm/kvm: convert to kvm_set_one_reg Cornelia Huck
2023-10-11  2:44   ` Philippe Mathieu-Daudé
2023-10-10 14:24 ` [PATCH v2 2/3] arm/kvm: convert to kvm_get_one_reg Cornelia Huck
2023-10-11  2:44   ` Philippe Mathieu-Daudé
2023-10-10 14:24 ` [PATCH v2 3/3] arm/kvm: convert to read_sys_reg64 Cornelia Huck
2023-10-11  0:02   ` Gavin Shan
2023-10-17 12:09   ` Peter Maydell
2023-10-17 15:28     ` Cornelia Huck
2023-10-17 12:15 ` [PATCH v2 0/3] arm/kvm: use kvm_{get,set}_one_reg Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).