qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RFC PATCH 00/19] accel: Introduce AccelvCPUState opaque structure


From: Philippe Mathieu-Daudé
Subject: [RFC PATCH 00/19] accel: Introduce AccelvCPUState opaque structure
Date: Wed, 3 Mar 2021 19:22:00 +0100

Hi,

This series introduces the 'AccelvCPUState' which is forward
declared opaque in "cpu.h", then each accelerator define it.

The opaque CPUState::accel_vcpu pointer is shared by all
accelerators (not a problem because there can be at most
one accelerator per vCPU).

Series is organized as:
- preliminary trivial cleanups
- introduce AccelvCPUState
- move WHPX fields (build-tested)
- move HAX fields (not tested)
- move KVM fields (build-tested)
- move HVF fields (not tested)

For now vcpu_dirty is still shared in CPUState.

Sending as RFC to see if it is worthwhile.

Regards,

Phil.

Philippe Mathieu-Daudé (19):
  target/i386/hvf: Use boolean value for vcpu_dirty
  target/s390x/kvm: Simplify debug code
  target/s390x/kvm: Reduce deref by declaring 'struct kvm_run' on stack
  cpu: Croup accelerator-specific fields altogether
  cpu: Introduce AccelvCPUState opaque structure
  accel/whpx: Add typedef for 'struct whpx_vcpu'
  accel/whpx: Rename struct whpx_vcpu -> AccelvCPUState
  accel/whpx: Use 'accel_vcpu' generic pointer
  accel/hax: Add typedef for 'struct hax_vcpu_state'
  accel/hax: Use 'accel_vcpu' generic pointer
  accel/kvm: Introduce kvm_vcpu_state() helper
  accel/kvm: Use kvm_vcpu_state() when possible
  accel/kvm: Declare and allocate AccelvCPUState struct
  accel/kvm: Move the 'kvm_fd' field to AccelvCPUState
  accel/kvm: Move the 'kvm_state' field to AccelvCPUState
  accel/kvm: Move the 'kvm_run' field to AccelvCPUState
  accel/hvf: Reduce deref by declaring 'hv_vcpuid_t hvf_fd' on stack
  accel/hvf: Declare and allocate AccelvCPUState struct
  accel/hvf: Move the 'hvf_fd' field to AccelvCPUState

 include/hw/core/cpu.h         |  17 +--
 include/sysemu/kvm.h          |   2 +
 include/sysemu/kvm_int.h      |   9 ++
 target/i386/hax/hax-i386.h    |  10 +-
 target/i386/hvf/hvf-i386.h    |   4 +
 target/i386/hvf/vmx.h         |  28 +++--
 accel/kvm/kvm-all.c           |  44 ++++---
 hw/s390x/pv.c                 |   3 +-
 target/arm/kvm.c              |   2 +-
 target/arm/kvm64.c            |  12 +-
 target/i386/cpu.c             |   4 +-
 target/i386/hax/hax-all.c     |  22 ++--
 target/i386/hax/hax-posix.c   |   4 +-
 target/i386/hax/hax-windows.c |   4 +-
 target/i386/hvf/hvf.c         | 118 +++++++++---------
 target/i386/hvf/x86.c         |  28 ++---
 target/i386/hvf/x86_descr.c   |  32 +++--
 target/i386/hvf/x86_emu.c     |  62 +++++-----
 target/i386/hvf/x86_mmu.c     |   4 +-
 target/i386/hvf/x86_task.c    |  14 ++-
 target/i386/hvf/x86hvf.c      | 227 +++++++++++++++++-----------------
 target/i386/kvm/kvm.c         |  36 +++---
 target/i386/whpx/whpx-all.c   |  34 ++---
 target/ppc/kvm.c              |  16 +--
 target/s390x/kvm.c            | 148 +++++++++++-----------
 25 files changed, 466 insertions(+), 418 deletions(-)

-- 
2.26.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]