[Top][All Lists]

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

Re: [Qemu-discuss] Handling signal of Qemu thread

From: Probir Roy
Subject: Re: [Qemu-discuss] Handling signal of Qemu thread
Date: Mon, 20 Aug 2018 10:07:16 -0500

> 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

+++ accel/kvm/kvm-all.c    2018-08-07 11:01:05.326280431 -0500
   @@ -1903,6 +1904,12 @@

+    /* 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


reply via email to

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