qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Host <-> guest interface port?
@ 2004-05-04 16:16 Matthew Mastracci
  2004-05-04 22:12 ` Fabrice Bellard
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Mastracci @ 2004-05-04 16:16 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 520 bytes --]

Would it be possible to add a host/guest interface port, akin to how 
VMWare handles this?  It's a convenient way to get/set various 
properties from the host while running the guest operating system.  This 
also allows a smoother mouse interface - ie: auto capture/release of the 
mouse as it hits the screen boundaries, clipboard synchronization as 
well as synchronization of the guest's clock with the host's.

Some more info on the VMWare port is here:
http://chitchat.at.infoseek.co.jp/vmware/backdoor.html

Matt.

[-- Attachment #2: matt.vcf --]
[-- Type: text/x-vcard, Size: 286 bytes --]

begin:vcard
fn:Matthew Mastracci
n:Mastracci;Matthew
org:aclaro Softworks, inc.
adr:;;1900 a - 11 St. SE;Calgary;Alberta;T2H 3G2;Canada
email;internet:matt@aclaro.com
title:Software Developer
tel;work:(403) 299-6612
x-mozilla-html:FALSE
url:http://www.aclaro.com
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Host <-> guest interface port?
  2004-05-04 16:16 [Qemu-devel] Host <-> guest interface port? Matthew Mastracci
@ 2004-05-04 22:12 ` Fabrice Bellard
  2004-05-04 22:46   ` Michael L Torrie
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Fabrice Bellard @ 2004-05-04 22:12 UTC (permalink / raw)
  To: qemu-devel

Matthew Mastracci wrote:
> Would it be possible to add a host/guest interface port, akin to how 
> VMWare handles this?  It's a convenient way to get/set various 
> properties from the host while running the guest operating system.  This 
> also allows a smoother mouse interface - ie: auto capture/release of the 
> mouse as it hits the screen boundaries, clipboard synchronization as 
> well as synchronization of the guest's clock with the host's.
> 
> Some more info on the VMWare port is here:
> http://chitchat.at.infoseek.co.jp/vmware/backdoor.html

Of course it is possible to add that, but first we must define the 
features we want and implement the necessary support in the guest OSes, 
which seems to be the most difficult AFAIK. Clipboard support would be 
interesting. Does anyone know how to implement it for Linux and Windows 
guests ?

Fabrice.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Host <-> guest interface port?
  2004-05-04 22:12 ` Fabrice Bellard
@ 2004-05-04 22:46   ` Michael L Torrie
  2004-05-04 23:32   ` [Qemu-devel] " Matthew Mastracci
  2004-05-05  2:58   ` [Qemu-devel] " Jim C. Brown
  2 siblings, 0 replies; 8+ messages in thread
From: Michael L Torrie @ 2004-05-04 22:46 UTC (permalink / raw)
  To: qemu-devel

On Tue, 2004-05-04 at 16:12, Fabrice Bellard wrote:
> Of course it is possible to add that, but first we must define the 
> features we want and implement the necessary support in the guest OSes, 
> which seems to be the most difficult AFAIK. Clipboard support would be 
> interesting. Does anyone know how to implement it for Linux and Windows 
> guests ?

A clipboard solution that requires no current changes to qemu or custom
drivers in windows (and that is currently used by many win4lin users) is
the MultiPlatform ClipBoard program, or mpcb.  It is available at
http://www.idata.sk/~robo/mpcb/ and can link clipboards on a variety of
platforms over a socket (tcp/ip) connection.

Michael


> 
> Fabrice.
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel
-- 
Michael L Torrie <torriem@chem.byu.edu>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: Host <-> guest interface port?
  2004-05-04 22:12 ` Fabrice Bellard
  2004-05-04 22:46   ` Michael L Torrie
@ 2004-05-04 23:32   ` Matthew Mastracci
  2004-05-05 18:31     ` Fabrice Bellard
  2004-05-05  2:58   ` [Qemu-devel] " Jim C. Brown
  2 siblings, 1 reply; 8+ messages in thread
From: Matthew Mastracci @ 2004-05-04 23:32 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1933 bytes --]

Fabrice Bellard wrote:

> Matthew Mastracci wrote:
>
>> Would it be possible to add a host/guest interface port, akin to how 
>> VMWare handles this?  It's a convenient way to get/set various 
>> properties from the host while running the guest operating system.  
>> This also allows a smoother mouse interface - ie: auto 
>> capture/release of the mouse as it hits the screen boundaries, 
>> clipboard synchronization as well as synchronization of the guest's 
>> clock with the host's.
>>
>> Some more info on the VMWare port is here:
>> http://chitchat.at.infoseek.co.jp/vmware/backdoor.html
>
>
> Of course it is possible to add that, but first we must define the 
> features we want and implement the necessary support in the guest 
> OSes, which seems to be the most difficult AFAIK. Clipboard support 
> would be interesting. Does anyone know how to implement it for Linux 
> and Windows guests ?
>
I can implement text-clipboard-passing for a windows guest without much 
effort.  If the CPU protection for the IO port is disabled, even when 
running at IOPL3, it could be implemented entirely in userspace.

It would be nice to define standard register values for the different 
features, as well as add functionality to query the availability of the 
feature.  For instance, the first two registers could define the 
supported interface:

Register 0: Returns the maximum supported register index by the current 
version of QEMU
Register 1: Write to the register with a given register index - returns 
1 if supported or 0 if unsupported or disabled.

Possible register functionality (off the top of my head):
 - Get host clock: returns the host clock time in UTC (useful for clock 
sync between guest/host)
 - Get host clock TZ: returns the host clock offset relative to UTC
 - Set host's clipboard
 - Get host's clipboard
 - Attach/detach virtual device (floppy/cd/etc)
 - Transfer file (?)
 - Read guest filesystem

Matt.

[-- Attachment #2: matt.vcf --]
[-- Type: text/x-vcard, Size: 286 bytes --]

begin:vcard
fn:Matthew Mastracci
n:Mastracci;Matthew
org:aclaro Softworks, inc.
adr:;;1900 a - 11 St. SE;Calgary;Alberta;T2H 3G2;Canada
email;internet:matt@aclaro.com
title:Software Developer
tel;work:(403) 299-6612
x-mozilla-html:FALSE
url:http://www.aclaro.com
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Host <-> guest interface port?
  2004-05-04 22:12 ` Fabrice Bellard
  2004-05-04 22:46   ` Michael L Torrie
  2004-05-04 23:32   ` [Qemu-devel] " Matthew Mastracci
@ 2004-05-05  2:58   ` Jim C. Brown
  2004-05-05 15:17     ` [Qemu-devel] " Matthew Mastracci
  2 siblings, 1 reply; 8+ messages in thread
From: Jim C. Brown @ 2004-05-05  2:58 UTC (permalink / raw)
  To: qemu-devel

On Wed, May 05, 2004 at 12:12:27AM +0200, Fabrice Bellard wrote:
> Matthew Mastracci wrote:
> >Would it be possible to add a host/guest interface port, akin to how 
> >VMWare handles this?  It's a convenient way to get/set various 
> >properties from the host while running the guest operating system.  This 
> >also allows a smoother mouse interface - ie: auto capture/release of the 
> >mouse as it hits the screen boundaries, clipboard synchronization as 
> >well as synchronization of the guest's clock with the host's.
> >
> >Some more info on the VMWare port is here:
> >http://chitchat.at.infoseek.co.jp/vmware/backdoor.html
> 
> Of course it is possible to add that, but first we must define the 
> features we want and implement the necessary support in the guest OSes, 
> which seems to be the most difficult AFAIK. Clipboard support would be 
> interesting. Does anyone know how to implement it for Linux and Windows 
> guests ?
> 
> Fabrice.
> 
> 

I volunteer to write the code for the Linux client if necessary. I'm studying
the X11 clipboard mechanism anyways. I have a pretty good idea of how to get
the clock of the host, also.

Not sure how auto-capture/release of mouse would work tho.

> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel

-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: Host <-> guest interface port?
  2004-05-05  2:58   ` [Qemu-devel] " Jim C. Brown
@ 2004-05-05 15:17     ` Matthew Mastracci
  2004-05-06 21:48       ` Jim C. Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Mastracci @ 2004-05-05 15:17 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

Jim C. Brown wrote:

>I volunteer to write the code for the Linux client if necessary. I'm studying
>the X11 clipboard mechanism anyways. I have a pretty good idea of how to get
>the clock of the host, also.
>
>Not sure how auto-capture/release of mouse would work tho.
>  
>
Since the host knows exactly where the guest cursor is (the guest is 
sending cursor location updates), it can release the mouse when the 
guest cursor is against the edge of the screen.  This works in reverse 
as well - when the mouse is moved over the QEMU screen, the host 
captures it (hiding the local cursor) and updates the guest location to 
match.  It's a seamless transition from real mouse to virtual mouse.

The guest can also hide and show the guest OS cursor as it is 
captured/released.  You'll only see the cursor in the guest if it is 
captured by QEMU.

Matt.


[-- Attachment #2: matt.vcf --]
[-- Type: text/x-vcard, Size: 286 bytes --]

begin:vcard
fn:Matthew Mastracci
n:Mastracci;Matthew
org:aclaro Softworks, inc.
adr:;;1900 a - 11 St. SE;Calgary;Alberta;T2H 3G2;Canada
email;internet:matt@aclaro.com
title:Software Developer
tel;work:(403) 299-6612
x-mozilla-html:FALSE
url:http://www.aclaro.com
version:2.1
end:vcard


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Re: Host <-> guest interface port?
  2004-05-04 23:32   ` [Qemu-devel] " Matthew Mastracci
@ 2004-05-05 18:31     ` Fabrice Bellard
  0 siblings, 0 replies; 8+ messages in thread
From: Fabrice Bellard @ 2004-05-05 18:31 UTC (permalink / raw)
  To: qemu-devel


I would prefer a network based solution first. Changing the interface to 
use a CPU specific hack won't be difficult in the future.

Fabrice.

Matthew Mastracci wrote:
> Fabrice Bellard wrote:
> 
>> Matthew Mastracci wrote:
>>
>>> Would it be possible to add a host/guest interface port, akin to how 
>>> VMWare handles this?  It's a convenient way to get/set various 
>>> properties from the host while running the guest operating system.  
>>> This also allows a smoother mouse interface - ie: auto 
>>> capture/release of the mouse as it hits the screen boundaries, 
>>> clipboard synchronization as well as synchronization of the guest's 
>>> clock with the host's.
>>>
>>> Some more info on the VMWare port is here:
>>> http://chitchat.at.infoseek.co.jp/vmware/backdoor.html
>>
>>
>>
>> Of course it is possible to add that, but first we must define the 
>> features we want and implement the necessary support in the guest 
>> OSes, which seems to be the most difficult AFAIK. Clipboard support 
>> would be interesting. Does anyone know how to implement it for Linux 
>> and Windows guests ?
>>
> I can implement text-clipboard-passing for a windows guest without much 
> effort.  If the CPU protection for the IO port is disabled, even when 
> running at IOPL3, it could be implemented entirely in userspace.
> 
> It would be nice to define standard register values for the different 
> features, as well as add functionality to query the availability of the 
> feature.  For instance, the first two registers could define the 
> supported interface:
> 
> Register 0: Returns the maximum supported register index by the current 
> version of QEMU
> Register 1: Write to the register with a given register index - returns 
> 1 if supported or 0 if unsupported or disabled.
> 
> Possible register functionality (off the top of my head):
> - Get host clock: returns the host clock time in UTC (useful for clock 
> sync between guest/host)
> - Get host clock TZ: returns the host clock offset relative to UTC
> - Set host's clipboard
> - Get host's clipboard
> - Attach/detach virtual device (floppy/cd/etc)
> - Transfer file (?)
> - Read guest filesystem

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Re: Host <-> guest interface port?
  2004-05-05 15:17     ` [Qemu-devel] " Matthew Mastracci
@ 2004-05-06 21:48       ` Jim C. Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Jim C. Brown @ 2004-05-06 21:48 UTC (permalink / raw)
  To: qemu-devel

On Wed, May 05, 2004 at 09:17:17AM -0600, Matthew Mastracci wrote:
> Since the host knows exactly where the guest cursor is (the guest is 
> sending cursor location updates), it can release the mouse when the 
> guest cursor is against the edge of the screen.  This works in reverse 
> as well - when the mouse is moved over the QEMU screen, the host 
> captures it (hiding the local cursor) and updates the guest location to 
> match.  It's a seamless transition from real mouse to virtual mouse.
> 
> The guest can also hide and show the guest OS cursor as it is 
> captured/released.  You'll only see the cursor in the guest if it is 
> captured by QEMU.
> 
> Matt.
> 

This is tricky though, especially when you try to set the mouse to the spot
where it enters the window.

I personally prefer the Synaptic Touchpad solution, since we won't need to
grab the mouse at all that way. (Right now I'm using a patched qemu where the
guest mouse follows the host mouse w/o using SDL grab, and sometimes it will
go all over the place.)

> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://mail.nongnu.org/mailman/listinfo/qemu-devel


-- 
Infinite complexity begets infinite beauty.
Infinite precision begets infinite perfection.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-05-06 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-04 16:16 [Qemu-devel] Host <-> guest interface port? Matthew Mastracci
2004-05-04 22:12 ` Fabrice Bellard
2004-05-04 22:46   ` Michael L Torrie
2004-05-04 23:32   ` [Qemu-devel] " Matthew Mastracci
2004-05-05 18:31     ` Fabrice Bellard
2004-05-05  2:58   ` [Qemu-devel] " Jim C. Brown
2004-05-05 15:17     ` [Qemu-devel] " Matthew Mastracci
2004-05-06 21:48       ` Jim C. Brown

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).