Skip to contentSkip to conversation

QEMU/PCI shutdown event

Qemu-devel Clemens Kolbitsch 2 participants 8 messages May 28, 2007 – May 30, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines
Quoted 10 lines

hi everyone!
i'm programming a pci-device that includes some threads & socket-connections (that allow remote debugging of my device).

however, i want to cleanly shutdown all threads and sockets when qemu exits... is there an easy way of getting informed of a qemu shutdown?

(something similar to pci_device_init...)

Quoted 8 lines
Quoted 3 lines

thanks!!

You can use qemu_register_reset handler.
Note that it get's called when the guests exits but not if you just quit the monitor.

hm... since i'm really tearing down qemu quite often (sigint) that's not really a solutions for me, but thanks!! If nothing else works, i'll give it a try :-)

any other ideas?

#2 lore raw

[Qemu-devel] Adding multiple files to qemu Makefile ... a pain

In reply to a message not in the archive

hi!
sorry that I'm posting for such a dumb thing, but I'm going crazy....

Up until now, I had a single file added to the qemu/hw folder. after adding

VL_OBJS += myfile.o

everything compiled without problems.

but now my project grew too large and i wanted to split everything into multiple header- and source-files (all inside qemu/hw).

Now, I've been sitting here for hours trying to get everything working, without success (obviously, otherwise I wouldn't be asking ;-) )

What adoptions do I have to make to Makefile(.target) to add new header&source files (best would be if I could add a seperate folder inside qemu/hw/)

thanks and sorry for such a basic-gcc/makefile question :-( greets!!

#3 lore raw

[Qemu-devel] Accepting socket connections in qemu (not the client... the emulator)

In reply to a message not in the archive

hi!
my virtual device inside qemu (a pci device) is listening for socket-(tcp)-connections.

however, accept() always fails (code works fine if not executed inside the qemu-process)... now i'm wondering if qemu interferes somehow...

is that possible?

frustrated.... *gg*

#4 lore raw

[Qemu-devel] Re: Accepting socket connections in qemu (not the client... the emulator)

Quoted 9 lines · Clemens Kolbitsch

hi!
my virtual device inside qemu (a pci device) is listening for socket-(tcp)-connections.

however, accept() always fails (code works fine if not executed inside the qemu-process)... now i'm wondering if qemu interferes somehow...

is that possible?

frustrated.... *gg*

ok.... i found an answer to it.

obviously, qemu has to handle interrupt-signals (e.g. from its client-os). this interrupts accepting connections.

very bad for me, but at least a logical reason :-/

#5 lore raw

Re: [Qemu-devel] Re: Accepting socket connections in qemu (not the client... the emulator)

Hi,

Quoted 10 lines · Clemens Kolbitsch
Quoted 8 lines · Clemens Kolbitsch

my virtual device inside qemu (a pci device) is listening for socket-(tcp)-connections.

however, accept() always fails (code works fine if not executed inside the qemu-process)... now i'm wondering if qemu interferes somehow...

is that possible?

Quoted 8 lines
Quoted 2 lines

frustrated.... *gg*

ok.... i found an answer to it.

obviously, qemu has to handle interrupt-signals (e.g. from its client-os). this interrupts accepting connections.

very bad for me, but at least a logical reason :-/

I guess that you use the Slirp device. This device is masqueraded to the outside, so unless you use something different, like VLAN or TAP, you can only make it work using a tunnel.

Hth,
Dscho

#6 lore raw

Re: [Qemu-devel] Re: Accepting socket connections in qemu (not the client... the emulator)

Quoted 17 lines · Johannes Schindelin

Hi,

Quoted 12 lines · Clemens Kolbitsch
Quoted 9 lines · Clemens Kolbitsch

my virtual device inside qemu (a pci device) is listening for socket-(tcp)-connections.

however, accept() always fails (code works fine if not executed inside the qemu-process)... now i'm wondering if qemu interferes somehow...

is that possible?

frustrated.... *gg*

Quoted 10 lines
Quoted 6 lines

ok.... i found an answer to it.

obviously, qemu has to handle interrupt-signals (e.g. from its client-os). this interrupts accepting connections.

very bad for me, but at least a logical reason :-/

I guess that you use the Slirp device. This device is masqueraded to the outside, so unless you use something different, like VLAN or TAP, you can only make it work using a tunnel.

no... i think you misunderstand...

I'm trying to accept a socket inside the qemu-emulation-process. not inside the simulated operating system.

#7 lore raw

Re: [Qemu-devel] Re: Accepting socket connections in qemu (not the client... the emulator)

Hi,

Quoted 33 lines · Clemens Kolbitsch
Quoted 24 lines · Johannes Schindelin

Hi,

Quoted 19 lines · Clemens Kolbitsch
Quoted 11 lines · Clemens Kolbitsch

my virtual device inside qemu (a pci device) is listening for socket-(tcp)-connections.

however, accept() always fails (code works fine if not executed inside the qemu-process)... now i'm wondering if qemu interferes somehow...

is that possible?

frustrated.... *gg*

ok.... i found an answer to it.

obviously, qemu has to handle interrupt-signals (e.g. from its client-os). this interrupts accepting connections.

Quoted 8 lines
Quoted 2 lines

very bad for me, but at least a logical reason :-/

I guess that you use the Slirp device. This device is masqueraded to the outside, so unless you use something different, like VLAN or TAP, you can only make it work using a tunnel.

Quoted 4 lines

no... i think you misunderstand...

I'm trying to accept a socket inside the qemu-emulation-process. not inside the simulated operating system.

Ah, sorry.

I cannot think of anything which could trigger that, except what you suggested (interrupts are in the way), or maybe timing problems.

Sorry,
Dscho

#8 lore raw

[Qemu-devel] Re: Qemu-devel Digest, Vol 50, Issue 70

In reply to a message not in the archive
Quoted 122 lines · [email protected] wrote:

Send Qemu-devel mailing list submissions to
[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.nongnu.org/mailman/listinfo/qemu-devel
or, via email, send a message with subject or body 'help' to
[email protected]

You can reach the person managing the list at
[email protected]

When replying, please edit your Subject line so it is more specific than "Re: Contents of Qemu-devel digest..."

Today's Topics:

1. qemu vl.c (Paul Brook)
2. QEMU/PCI shutdown event (Clemens Kolbitsch)
3. qemu/hw pxa.h pxa2xx.c (Andrzej Zaborowski)
4. RE: QEMU/PCI shutdown event (Dor Laor)
5. kqemu and 2.6.22-rc3 (Xavier Gnata)
6. qemu mips-dis.c (Thiemo Seufer)
7. qemu/linux-user syscall.c (Thiemo Seufer)
8. Re: qemu/linux-user syscall.c (Paul Brook)

----------------------------------------------------------------------

Message: 1
Date: Mon, 28 May 2007 02:29:59 +0000
From: Paul Brook <[email protected]>
Subject: [Qemu-devel] qemu vl.c
To: [email protected]
Message-ID: <E1HsUzf-0004jM-8j@cvs>

CVSROOT: /sources/qemu
Module name: qemu
Changes by: Paul Brook <pbrook> 07/05/28 02:29:59

Modified files:
. : vl.c

Log message:
Fix tap device counting.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/vl.c?cvsroot=qemu&r1=1.302&r2=1.303

------------------------------

Message: 2
Date: Mon, 28 May 2007 13:05:29 +0200
From: Clemens Kolbitsch <[email protected]>
Subject: [Qemu-devel] QEMU/PCI shutdown event
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

hi everyone!
i'm programming a pci-device that includes some threads & socket-connections (that allow remote debugging of my device).

however, i want to cleanly shutdown all threads and sockets when qemu exits... is there an easy way of getting informed of a qemu shutdown?

(something similar to pci_device_init...)

thanks!!

------------------------------

Message: 3
Date: Mon, 28 May 2007 11:26:16 +0000
From: Andrzej Zaborowski <[email protected]>
Subject: [Qemu-devel] qemu/hw pxa.h pxa2xx.c
To: [email protected]
Message-ID: <E1HsdMe-0006W4-3F@cvs>

CVSROOT: /sources/qemu
Module name: qemu
Changes by: Andrzej Zaborowski <balrog> 07/05/28 11:26:16

Modified files:
hw : pxa.h pxa2xx.c

Log message:
Remove a local subpage IO hack, now that general subpage IO works.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa.h?cvsroot=qemu&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/qemu/hw/pxa2xx.c?cvsroot=qemu&r1=1.13&r2=1.14

------------------------------

Message: 4
Date: Mon, 28 May 2007 04:46:41 -0700
From: "Dor Laor" <[email protected]>
Subject: RE: [Qemu-devel] QEMU/PCI shutdown event
To: <[email protected]>
Message-ID:

	<64F9B87B6B770947A9F8391472E032160BFF5C84@ehost011-8.exch011.intermedia.net>

Content-Type: text/plain; charset="us-ascii"

Quoted 9 lines

hi everyone!
i'm programming a pci-device that includes some threads & socket-connections (that allow remote debugging of my device).

however, i want to cleanly shutdown all threads and sockets when qemu exits... is there an easy way of getting informed of a qemu shutdown?

(something similar to pci_device_init...)

Quoted 8 lines
Quoted 3 lines

thanks!!

You can use qemu_register_reset handler.
Note that it get's called when the guests exits but not if you just quit the monitor.

dear qemu-developers,
i think it would be very helpful, if such a possibility exists.. maybe you could consider implementing this in a future release :-)

just a suggestion ;-)

greets!