From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40791) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USNLI-0002Km-0j for qemu-devel@nongnu.org; Wed, 17 Apr 2013 04:03:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USNLE-0006Gs-G6 for qemu-devel@nongnu.org; Wed, 17 Apr 2013 04:03:47 -0400 Received: from mail1.bemta14.messagelabs.com ([193.109.254.112]:36693) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USNLE-0006GN-5w for qemu-devel@nongnu.org; Wed, 17 Apr 2013 04:03:44 -0400 From: "Moese, Michael" Date: Wed, 17 Apr 2013 08:02:27 +0000 Message-ID: <2DF74D4E746FF14C8697D5041AAE72D56A01D3BF@MEN-EX2.intra.men.de> Content-Language: de-DE Content-Type: multipart/alternative; boundary="_000_2DF74D4E746FF14C8697D5041AAE72D56A01D3BFMENEX2intramend_" MIME-Version: 1.0 Subject: [Qemu-devel] Qemu Unix-Signals List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" --_000_2DF74D4E746FF14C8697D5041AAE72D56A01D3BFMENEX2intramend_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello QEMU developers, After doing some search in the list archives and the web as well as greping= the (hower quite old - version 0.10.5 ) sources, I think I need to consult you for some hints. I know my version is quite ou= tdated, but I need this one for it's SystemC-integration done by GreenSocs. Now, to my question: does QEMU use all the available signals, or are there = just signal handlers installed for each signal? Is there any unused signal I could use? Below some explanation of what I try to do: I think when I need to deliver IRQ's from another unix process to QEMU, the= re is no better solution than sending a signal, but correct me if I'm wrong. I already have a working, simulated PCI-Device= (written in SystemC) which can send interrupts to my virtual machine - both are running inside the same unix process, and = now I want to add another SystemC-simulation in another process doing the real hardware simulation. Thank you for reading my question, maybe you can help me or point me to whe= re to find what I need? Michael --_000_2DF74D4E746FF14C8697D5041AAE72D56A01D3BFMENEX2intramend_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hello QEMU developers,

After doing some search in the = list archives and the web as well as greping the (hower quite old - version= 0.10.5 ) sources,

I think I need to consult you f= or some hints. I know my version is quite outdated, but I need this one for= it’s

SystemC-integration done by Gre= enSocs.

 

Now, to my question: does QEMU = use all the available signals, or are there just signal handlers installed = for each signal?
Is there any unused signal I could use?

 

 

Below some explanation of what = I try to do:

 

I think when I need to deliver = IRQ’s from another unix process to QEMU, there is no better solution = than sending a signal,

but correct me if I’m wro= ng. I already have a working, simulated PCI-Device (written in SystemC)&nbs= p; which can send interrupts
to my virtual machine – both are running inside the same unix process= , and now I want to add another

SystemC-simulation in another p= rocess doing the real hardware simulation.

 

Thank you for reading my questi= on, maybe you can help me or point me to where to find what I need?

 

Michael

 

--_000_2DF74D4E746FF14C8697D5041AAE72D56A01D3BFMENEX2intramend_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USOEr-0007CS-6I for qemu-devel@nongnu.org; Wed, 17 Apr 2013 05:01:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USOEm-0002NR-3A for qemu-devel@nongnu.org; Wed, 17 Apr 2013 05:01:12 -0400 Received: from mail-lb0-f180.google.com ([209.85.217.180]:47324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USOEl-0002N7-TE for qemu-devel@nongnu.org; Wed, 17 Apr 2013 05:01:08 -0400 Received: by mail-lb0-f180.google.com with SMTP id t11so1391886lbi.11 for ; Wed, 17 Apr 2013 02:01:06 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <2DF74D4E746FF14C8697D5041AAE72D56A01D3BF@MEN-EX2.intra.men.de> References: <2DF74D4E746FF14C8697D5041AAE72D56A01D3BF@MEN-EX2.intra.men.de> From: Peter Maydell Date: Wed, 17 Apr 2013 10:00:45 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Qemu Unix-Signals List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Moese, Michael" Cc: "qemu-devel@nongnu.org" On 17 April 2013 09:02, Moese, Michael wrote: > Hello QEMU developers, > > After doing some search in the list archives and the web as well as grepi= ng > the (hower quite old - version 0.10.5 ) sources, This is really ancient in QEMU terms, and how the internals work has changed enormously since then. > I think I need to consult you for some hints. I know my version is quite > outdated, but I need this one for it=E2=80=99s SystemC-integration done b= y GreenSocs. I think your best bet is to ask GreenSocs if you need support for this codebase. thanks -- PMM From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:32986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USOYh-0008Np-Eq for qemu-devel@nongnu.org; Wed, 17 Apr 2013 05:21:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USOYe-0001Fn-Rq for qemu-devel@nongnu.org; Wed, 17 Apr 2013 05:21:43 -0400 Received: from mail1.bemta5.messagelabs.com ([195.245.231.143]:11911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USOYe-0001FR-It for qemu-devel@nongnu.org; Wed, 17 Apr 2013 05:21:40 -0400 From: "Moese, Michael" Date: Wed, 17 Apr 2013 09:21:38 +0000 Message-ID: <2DF74D4E746FF14C8697D5041AAE72D56A01D74E@MEN-EX2.intra.men.de> References: <2DF74D4E746FF14C8697D5041AAE72D56A01D3BF@MEN-EX2.intra.men.de> In-Reply-To: Content-Language: de-DE Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Subject: Re: [Qemu-devel] Qemu Unix-Signals List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu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G5vdyBidXQgdG8gc29tZSBv dGhlciBkZXZlbG9wZXIgZm9yIGhhcmR3YXJlLXNvZnR3YXJlLQ0KY28tc2ltdWxhdGlvbi4NCg0K VGhhbmsgeW91LA0KTWljaGFlbA0KDQo= From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USS2d-0007Yd-N9 for qemu-devel@nongnu.org; Wed, 17 Apr 2013 09:04:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USS2c-0007NB-0y for qemu-devel@nongnu.org; Wed, 17 Apr 2013 09:04:51 -0400 Received: from cantor2.suse.de ([195.135.220.15]:55323 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USS2b-0007LW-Qo for qemu-devel@nongnu.org; Wed, 17 Apr 2013 09:04:49 -0400 Message-ID: <516E9DF0.7010708@suse.de> Date: Wed, 17 Apr 2013 15:04:48 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <2DF74D4E746FF14C8697D5041AAE72D56A01D3BF@MEN-EX2.intra.men.de> <2DF74D4E746FF14C8697D5041AAE72D56A01D74E@MEN-EX2.intra.men.de> In-Reply-To: <2DF74D4E746FF14C8697D5041AAE72D56A01D74E@MEN-EX2.intra.men.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Qemu Unix-Signals List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Moese, Michael" Cc: Paolo Bonzini , "qemu-devel@nongnu.org" , "Edgar E. Iglesias" Hi, Am 17.04.2013 11:21, schrieb Moese, Michael: >> I think your best bet is to ask GreenSocs if you need support for this= codebase. >=20 > I think you'd be right when you point me to GreenSocs, but.. they don't= seem to support all this anymore. >=20 >=20 >> This is really ancient in QEMU terms, and how the internals work has c= hanged enormously since then. >=20 > Given I'd port their work over to a current QEMU source tree, would it = be save then to use a signal, like SIGUSR2? > I cannot find any use of these signals in the (old) sources, but I want= to be sure not to add unwanted side effects > when I just change the signal handler in my initialization code. > The differences seem to be only in some files of the sources, maybe I c= an port this stuff over to the current version,=20 > as this might be useful not only to me for my thesis right now but to s= ome other developer for hardware-software- > co-simulation. If you were to rebase onto the latest git version, you could as of yesterday use the qtest protocol interface outside of qtest to inject IRQs, IIUC. :-) Do note that either SIGUSR1 or SIGUSR2 is in use for timers or something (and our Wiki page on debugging listed the wrong one last time I ran into it ;)). Regards, Andreas P.S. x.y.5 would be a development version, so there's no telling what exactly it did. --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USVpj-0004tm-7a for qemu-devel@nongnu.org; Wed, 17 Apr 2013 13:07:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USVpi-0007CY-0y for qemu-devel@nongnu.org; Wed, 17 Apr 2013 13:07:47 -0400 Received: from mail-ea0-x22f.google.com ([2a00:1450:4013:c01::22f]:43990) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USVph-0007C7-QS for qemu-devel@nongnu.org; Wed, 17 Apr 2013 13:07:45 -0400 Received: by mail-ea0-f175.google.com with SMTP id r16so841259ead.20 for ; Wed, 17 Apr 2013 10:07:44 -0700 (PDT) Date: Wed, 17 Apr 2013 19:07:39 +0200 From: "Edgar E. Iglesias" Message-ID: <20130417170739.GB4915@smtp.vpn> References: <2DF74D4E746FF14C8697D5041AAE72D56A01D3BF@MEN-EX2.intra.men.de> <2DF74D4E746FF14C8697D5041AAE72D56A01D74E@MEN-EX2.intra.men.de> <516E9DF0.7010708@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <516E9DF0.7010708@suse.de> Subject: Re: [Qemu-devel] Qemu Unix-Signals List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Paolo Bonzini , Peter Crosthwaite , "qemu-devel@nongnu.org" , "Moese, Michael" On Wed, Apr 17, 2013 at 03:04:48PM +0200, Andreas Färber wrote: > Hi, > > Am 17.04.2013 11:21, schrieb Moese, Michael: > >> I think your best bet is to ask GreenSocs if you need support for this codebase. > > > > I think you'd be right when you point me to GreenSocs, but.. they don't seem to support all this anymore. > > > > > >> This is really ancient in QEMU terms, and how the internals work has changed enormously since then. > > > > Given I'd port their work over to a current QEMU source tree, would it be save then to use a signal, like SIGUSR2? > > I cannot find any use of these signals in the (old) sources, but I want to be sure not to add unwanted side effects > > when I just change the signal handler in my initialization code. > > The differences seem to be only in some files of the sources, maybe I can port this stuff over to the current version, > > as this might be useful not only to me for my thesis right now but to some other developer for hardware-software- > > co-simulation. > Hi, > If you were to rebase onto the latest git version, you could as of > yesterday use the qtest protocol interface outside of qtest to inject > IRQs, IIUC. :-) My understanding is that you can only monitor IRQ state over qtest, not directly control it. It would be nice to add support for it though. I don't think signals are a good approach. You'd need to pass some data along with the signal (low/high and irq nr/id) so it's probably better to do it on top of some kind of data passing protocol. Some years ago I hacked on a binary remote bus protocol (RBUS) allowing remote devices to be attached to QEMU machines. I was using it at AXIS to connect multiple QEMU instances for modeling heterogenous CPU arch SOCs and as a test port (like QTest). Later, Petalogix and Peter Crosthwaite (I think) used a modified version of it to do co-simulation of QEMU with remote devices running on FPGAs. I havent rebased it for years though and I also dont think rbus was good enough. But I am interested to do something like that again. I guess it can be viewed as a binary qtest protocol on steroids. Best regards, Edgar