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

Re: [PATCH v4 59/65] accel: Always register AccelOpsClass::get_virtual_clock() handler



On 7/2/25 11:53 AM, Philippe Mathieu-Daudé wrote:
In order to dispatch over AccelOpsClass::get_virtual_clock(),
we need it always defined, not calling a hidden handler under
the hood. Make AccelOpsClass::get_virtual_clock() mandatory.
Register the default cpus_kick_thread() for each accelerator.

Signed-off-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>
---
  include/system/accel-ops.h        | 2 ++
  accel/hvf/hvf-accel-ops.c         | 1 +
  accel/kvm/kvm-accel-ops.c         | 1 +
  accel/tcg/tcg-accel-ops.c         | 2 ++
  accel/xen/xen-all.c               | 1 +
  system/cpus.c                     | 7 ++++---
  target/i386/nvmm/nvmm-accel-ops.c | 1 +
  target/i386/whpx/whpx-accel-ops.c | 1 +
  8 files changed, 13 insertions(+), 3 deletions(-)

Seeing the pattern in last 3 commits, I have a question regarding QOM.
Is that possible to get a constructor called for parent type (TYPE_ACCEL_OPS), where all default values would be set, and so every child class (specialized accelerator) would just need to override the field they want with their own method?

It would be more easy than explicitely setting default values in all sub classes, but maybe QOM design is limited to that.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.