> What exactly are you trying to do > with your new signal ? I am implementing PEBS (Intel's Precise-Event Based Sampling) virtualization, so that I can sample guest OS from host machine using Linux Perf. The PEBS device is configured from host's user space as perf event. I am registering a perf-event using "perf_event_open" in kvm_cpu_exec:
+++ accel/kvm/kvm-all.c 2018-08-07 11:01:05.326280431 -0500 @@ -1903,6 +1904,12 @@ qemu_mutex_unlock_iothread(); cpu_exec_start(cpu); + /* Probir: vcpu thread starting. Should call the tool thread handler*/ + kvm__VCPU_start(); // calling perf_event_open "kvm__VCPU_start" calling perf_event_open and a signal handler "generic_dev_signal_handler" is set via sigaction: // Set a signal handler for SIGUSR1 struct sigaction sa; sa.sa_sigaction = generic_dev_signal_handler; sa.sa_mask = block_mask_dev; sa.sa_flags = SA_SIGINFO | SA_RESTART | SA_NODEFER | SA_ONSTACK; I am expecting to perform some task in "generic_dev_signal_handler" at PEBS event when the VCPU is halted. This task can be reading/writing hardware registers at that event point. How can I achieve this in Qemu environment? Regards, Probir