* [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
@ 2006-11-30 7:03 Yu, Xiaoyang
2006-11-30 7:08 ` Lonnie Mendez
0 siblings, 1 reply; 5+ messages in thread
From: Yu, Xiaoyang @ 2006-11-30 7:03 UTC (permalink / raw)
To: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
Hi guys,
I am using QEMU with Xen and Intel VT, and I have a question about
detecting the CD-ROM disk unmount event: When user ejects CD-ROM in the
guest domain, how can QEMU detect this event?
I know if we use "info block" command before and after a CD-ROM disk is
ejected, we can see the difference. But I want to add code to handle the
CD-ROM unmount event, so I need to know which source file I should take
a look. It seems to be not "monitor.c". Any comment will be appreciated.
Thanks in advance!
Thanks
Xiaoyang
[-- Attachment #2: Type: text/html, Size: 3366 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
2006-11-30 7:03 Yu, Xiaoyang
@ 2006-11-30 7:08 ` Lonnie Mendez
0 siblings, 0 replies; 5+ messages in thread
From: Lonnie Mendez @ 2006-11-30 7:08 UTC (permalink / raw)
To: qemu-devel
On Thu, 2006-11-30 at 15:03 +0800, Yu, Xiaoyang wrote:
> Hi guys,
>
>
>
> I am using QEMU with Xen and Intel VT, and I have a question about
> detecting the CD-ROM disk unmount event: When user ejects CD-ROM in
> the guest domain, how can QEMU detect this event?
>
>
>
> I know if we use “info block” command before and after a CD-ROM disk
> is ejected, we can see the difference. But I want to add code to
> handle the CD-ROM unmount event, so I need to know which source file I
> should take a look. It seems to be not “monitor.c”. Any comment will
> be appreciated. Thanks in advance!
hw/ide.c, block.c:bdrv_eject()
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
@ 2006-12-01 8:21 Yu, Xiaoyang
2006-12-01 9:01 ` Lonnie Mendez
0 siblings, 1 reply; 5+ messages in thread
From: Yu, Xiaoyang @ 2006-12-01 8:21 UTC (permalink / raw)
To: qemu-devel
Great! Thanks a lot for the information! I found the function definition in the files you pointed out, by looking into the latest CVS snapshot.
It seems that code changed a lot since version 0.8.2 released. So if I still use version 0.8.2, is there some files or function I should look at instead? Thanks a lot!
Thanks
Xiaoyang
-----Original Message-----
From: qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org [mailto:qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org] On Behalf Of Lonnie Mendez
Sent: 2006年11月30日 15:08
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
On Thu, 2006-11-30 at 15:03 +0800, Yu, Xiaoyang wrote:
> Hi guys,
>
>
>
> I am using QEMU with Xen and Intel VT, and I have a question about
> detecting the CD-ROM disk unmount event: When user ejects CD-ROM in
> the guest domain, how can QEMU detect this event?
>
>
>
> I know if we use “info block” command before and after a CD-ROM disk
> is ejected, we can see the difference. But I want to add code to
> handle the CD-ROM unmount event, so I need to know which source file I
> should take a look. It seems to be not “monitor.c”. Any comment will
> be appreciated. Thanks in advance!
hw/ide.c, block.c:bdrv_eject()
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
2006-12-01 8:21 [Qemu-devel] About the code to detect a CD-ROM disk is unmounted Yu, Xiaoyang
@ 2006-12-01 9:01 ` Lonnie Mendez
0 siblings, 0 replies; 5+ messages in thread
From: Lonnie Mendez @ 2006-12-01 9:01 UTC (permalink / raw)
To: qemu-devel
On Fri, 2006-12-01 at 16:21 +0800, Yu, Xiaoyang wrote:
> Great! Thanks a lot for the information! I found the function definition in the files you pointed out, by looking into the latest CVS snapshot.
>
> It seems that code changed a lot since version 0.8.2 released. So if I still use version 0.8.2, is there some files or function I should look at instead? Thanks a lot!
I found this just by searching for 'eject' in the source. It does look
like qemu from cvs has nicely refactored the code for dealing with
removable media since the qemu 0.8.2 release. Follow the path of the
bdrv_close handler (for cdrom raw_close() is called). The call is made
from hw/ide.c (GPCMD_START_STOP_UNIT).
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
@ 2006-12-04 7:42 Yu, Xiaoyang
0 siblings, 0 replies; 5+ messages in thread
From: Yu, Xiaoyang @ 2006-12-04 7:42 UTC (permalink / raw)
To: qemu-devel
Yes raw_close() will be triggered when issue "eject CD-ROM" command in guest OS. Thanks a lot for your help. Much appreciated.
-----Original Message-----
From: qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org [mailto:qemu-devel-bounces+xiaoyang.yu=intel.com@nongnu.org] On Behalf Of Lonnie Mendez
Sent: 2006年12月1日 17:01
To: qemu-devel@nongnu.org
Subject: RE: [Qemu-devel] About the code to detect a CD-ROM disk is unmounted
On Fri, 2006-12-01 at 16:21 +0800, Yu, Xiaoyang wrote:
> Great! Thanks a lot for the information! I found the function definition in the files you pointed out, by looking into the latest CVS snapshot.
>
> It seems that code changed a lot since version 0.8.2 released. So if I still use version 0.8.2, is there some files or function I should look at instead? Thanks a lot!
I found this just by searching for 'eject' in the source. It does look
like qemu from cvs has nicely refactored the code for dealing with
removable media since the qemu 0.8.2 release. Follow the path of the
bdrv_close handler (for cdrom raw_close() is called). The call is made
from hw/ide.c (GPCMD_START_STOP_UNIT).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-04 7:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01 8:21 [Qemu-devel] About the code to detect a CD-ROM disk is unmounted Yu, Xiaoyang
2006-12-01 9:01 ` Lonnie Mendez
-- strict thread matches above, loose matches on Subject: below --
2006-12-04 7:42 Yu, Xiaoyang
2006-11-30 7:03 Yu, Xiaoyang
2006-11-30 7:08 ` Lonnie Mendez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).