* Using VMChannel to communicate with the host.
@ 2007-09-07 22:44 Cam Macdonell
[not found] ` <46E1D44E.90509-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Cam Macdonell @ 2007-09-07 22:44 UTC (permalink / raw)
To: kvm-devel
Hi,
I'm trying to get a better understanding of VM-to-host communication
that doesn't involve going over virtual networks. I understand there
are a couple of developments underway, but I just want to play around a
better sense of things. I think the current hypercall mechanism is the
current way to do this using the -vmchannel option. But, I'm not very
experienced with PCI devices and their drivers so I need some help. All
I want to do is to communicate across a unix domain socket on the host.
Besides loading the hypercall module in the guest how do things needs
to be configured on the host?
Is there a simple tutorial or just a webpage with examples for how to do
this?
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46E1D44E.90509-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-08 0:51 ` Troy Benjegerdes
[not found] ` <20070908005122.GB6764-na1kE3HDu0idQnJuSAr7PQ@public.gmane.org>
2007-09-09 9:56 ` Dor Laor
1 sibling, 1 reply; 14+ messages in thread
From: Troy Benjegerdes @ 2007-09-08 0:51 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel
On Fri, Sep 07, 2007 at 04:44:30PM -0600, Cam Macdonell wrote:
>
> Hi,
>
> I'm trying to get a better understanding of VM-to-host communication
> that doesn't involve going over virtual networks. I understand there
> are a couple of developments underway, but I just want to play around a
> better sense of things. I think the current hypercall mechanism is the
> current way to do this using the -vmchannel option. But, I'm not very
> experienced with PCI devices and their drivers so I need some help. All
> I want to do is to communicate across a unix domain socket on the host.
> Besides loading the hypercall module in the guest how do things needs
> to be configured on the host?
>
> Is there a simple tutorial or just a webpage with examples for how to do
> this?
I'm going to suggest that a better way to do VM-to-host or VM-to-VM
communication would be to write an OpenFabrics (www.openfabrics.org)
driver that uses hypercalls. There is probably some gotcha I am not
aware of, but I think this would allow direct userspace to userspace
communication between a process running on a host, and a process running
on a VM, while still maintaining isolation.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <20070908005122.GB6764-na1kE3HDu0idQnJuSAr7PQ@public.gmane.org>
@ 2007-09-09 8:38 ` Dor Laor
0 siblings, 0 replies; 14+ messages in thread
From: Dor Laor @ 2007-09-09 8:38 UTC (permalink / raw)
To: Troy Benjegerdes; +Cc: kvm-devel
Troy Benjegerdes wrote:
> On Fri, Sep 07, 2007 at 04:44:30PM -0600, Cam Macdonell wrote:
>
>> Hi,
>>
>> I'm trying to get a better understanding of VM-to-host communication
>> that doesn't involve going over virtual networks. I understand there
>> are a couple of developments underway, but I just want to play around a
>> better sense of things. I think the current hypercall mechanism is the
>> current way to do this using the -vmchannel option. But, I'm not very
>> experienced with PCI devices and their drivers so I need some help. All
>> I want to do is to communicate across a unix domain socket on the host.
>> Besides loading the hypercall module in the guest how do things needs
>> to be configured on the host?
>>
>> Is there a simple tutorial or just a webpage with examples for how to do
>> this?
>>
>
> I'm going to suggest that a better way to do VM-to-host or VM-to-VM
> communication would be to write an OpenFabrics (www.openfabrics.org)
> driver that uses hypercalls. There is probably some gotcha I am not
> aware of, but I think this would allow direct userspace to userspace
> communication between a process running on a host, and a process running
> on a VM, while still maintaining isolation.
>
>
Basically that's true but you need a host glue dirver to connect the two
+ the hypercall implementation.
It can be easily added to KVM with a small cost.
BTW: does all windows guest will have the guest side driver implemented?
Including XP, 2k, Vista?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46E1D44E.90509-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-08 0:51 ` Troy Benjegerdes
@ 2007-09-09 9:56 ` Dor Laor
[not found] ` <46E3C345.9090305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
1 sibling, 1 reply; 14+ messages in thread
From: Dor Laor @ 2007-09-09 9:56 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel
Cam Macdonell wrote:
> Hi,
>
> I'm trying to get a better understanding of VM-to-host communication
> that doesn't involve going over virtual networks. I understand there
> are a couple of developments underway, but I just want to play around a
> better sense of things. I think the current hypercall mechanism is the
> current way to do this using the -vmchannel option. But, I'm not very
> experienced with PCI devices and their drivers so I need some help. All
> I want to do is to communicate across a unix domain socket on the host.
> Besides loading the hypercall module in the guest how do things needs
> to be configured on the host?
>
> Is there a simple tutorial or just a webpage with examples for how to do
> this?
>
> Thanks,
> Cam
>
I just tested it, it got a little deprecated over time since it call
pci_module_init instead of pci_register_* and some more irq function
deprecation.The sysfs interface in not complete and you can't read/write
from the device.
The qemu parameters are -vmchannel di:2258,unix:/tmp/file,server
2258 is the vendor id for the device, you can use unix sockets ot even
tcp for the host end.
In several week we'll publish better version of it. Maybe we'll publish
a preview before.
-Dor
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46E3C345.9090305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-09-10 16:01 ` Cam Macdonell
[not found] ` <46E56A71.50102-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Cam Macdonell @ 2007-09-10 16:01 UTC (permalink / raw)
To: dor.laor-atKUWr5tajBWk0Htik3J/w; +Cc: kvm-devel
Dor Laor wrote:
> I just tested it, it got a little deprecated over time since it call
> pci_module_init instead of pci_register_* and some more irq function
> deprecation.The sysfs interface in not complete and you can't read/write
> from the device.
> The qemu parameters are -vmchannel di:2258,unix:/tmp/file,server
> 2258 is the vendor id for the device, you can use unix sockets ot even
> tcp for the host end.
>
Hi Dor,
Thanks, that got it up and running. But in the hypercall.c code (from
the git repo) there is a "hello host" message that looks like it should
be written to the host. How do I trigger that to be sent so my very
simple "listening" program can read it?
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46E56A71.50102-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-11 7:09 ` Dor Laor
[not found] ` <46E63F46.2040707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Dor Laor @ 2007-09-11 7:09 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel
Cam Macdonell wrote:
>
> Dor Laor wrote:
> > I just tested it, it got a little deprecated over time since it call
> > pci_module_init instead of pci_register_* and some more irq function
> > deprecation.The sysfs interface in not complete and you can't read/write
> > from the device.
> > The qemu parameters are -vmchannel di:2258,unix:/tmp/file,server
> > 2258 is the vendor id for the device, you can use unix sockets ot even
> > tcp for the host end.
> >
>
> Hi Dor,
>
> Thanks, that got it up and running. But in the hypercall.c code (from
> the git repo) there is a "hello host" message that looks like it should
> be written to the host. How do I trigger that to be sent so my very
> simple "listening" program can read it?
>
> Thanks,
> Cam
>
You need to open the unix socket you passed to the vmchannel parameter.
An easier alternative is to use -vmchannel di:2258,tcp://0:4444,server.
Before the guest loads you'll need to telnet the 4444 port and then you
should receive the
hello world output once the driver is up.
-Dor
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46E63F46.2040707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-09-11 14:36 ` Cameron Macdonell
[not found] ` <FFFA58AC-4040-4E6D-A28F-BBBDD78F8722-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Cameron Macdonell @ 2007-09-11 14:36 UTC (permalink / raw)
To: dor.laor-atKUWr5tajBWk0Htik3J/w; +Cc: kvm-devel
On 11-Sep-07, at 1:09 AM, Dor Laor wrote:
> Cam Macdonell wrote:
>>
>> Dor Laor wrote:
>> > I just tested it, it got a little deprecated over time since it
>> call
>> > pci_module_init instead of pci_register_* and some more irq
>> function
>> > deprecation.The sysfs interface in not complete and you can't
>> read/write
>> > from the device.
>> > The qemu parameters are -vmchannel di:2258,unix:/tmp/file,server
>> > 2258 is the vendor id for the device, you can use unix sockets
>> ot even
>> > tcp for the host end.
>> >
>>
>> Hi Dor,
>>
>> Thanks, that got it up and running. But in the hypercall.c code
>> (from
>> the git repo) there is a "hello host" message that looks like it
>> should
>> be written to the host. How do I trigger that to be sent so my very
>> simple "listening" program can read it?
>>
>> Thanks,
>> Cam
>>
> You need to open the unix socket you passed to the vmchannel
> parameter.
> An easier alternative is to use -vmchannel di:2258,tcp://
> 0:4444,server.
> Before the guest loads you'll need to telnet the 4444 port and then
> you should receive the
> hello world output once the driver is up.
> -Dor
I tried having a program listening on the unix domain socket.
Actually, the VM won't even start until a program connects to the
socket. I didn't get the message with my listening program, but I'll
try the telnet method as I haven't programmed a socket in a while so
I may have missed a step.
While getting this working is novel to me, it seems from your email
that not much can be done with the hypercall interface in terms of
host-VM or VM-to-VM communication, correct? If reading and writing
don't work, how can one exchange info between VMs? I'll look forward
to the virtIO implementation.
Thanks,
Cam
-----------------------------------------------
A. Cameron Macdonell
Ph.D. Student
Department of Computing Science
University of Alberta
cam-edFDblaTWIyXbbII50Afww@public.gmane.org
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <FFFA58AC-4040-4E6D-A28F-BBBDD78F8722-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-11 20:21 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D95E340-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Dor Laor @ 2007-09-11 20:21 UTC (permalink / raw)
To: Cameron Macdonell; +Cc: kvm-devel
>> You need to open the unix socket you passed to the vmchannel
>> parameter.
>> An easier alternative is to use -vmchannel di:2258,tcp://
>> 0:4444,server.
>> Before the guest loads you'll need to telnet the 4444 port and then
>> you should receive the
>> hello world output once the driver is up.
>> -Dor
>
>I tried having a program listening on the unix domain socket.
>Actually, the VM won't even start until a program connects to the
>socket. I didn't get the message with my listening program, but I'll
>try the telnet method as I haven't programmed a socket in a while so
>I may have missed a step.
Go for it, its 1 minute effort.
>While getting this working is novel to me, it seems from your email
>that not much can be done with the hypercall interface in terms of
>host-VM or VM-to-VM communication, correct? If reading and writing
>don't work, how can one exchange info between VMs? I'll look forward
>to the virtIO implementation.
>
The vmchannel was not intended to VM-to-VM networking, although it can
work.
Next version will be better. Anyway, it should have similar performance
to pv network driver.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <64F9B87B6B770947A9F8391472E032160D95E340-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-09-11 22:57 ` Cam Macdonell
[not found] ` <46E71D72.7000901-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Cam Macdonell @ 2007-09-11 22:57 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel
Dor Laor wrote:
>>> You need to open the unix socket you passed to the vmchannel
>>> parameter.
>>> An easier alternative is to use -vmchannel di:2258,tcp://
>>> 0:4444,server.
>>> Before the guest loads you'll need to telnet the 4444 port and then
>>> you should receive the
>>> hello world output once the driver is up.
>>> -Dor
>> I tried having a program listening on the unix domain socket.
>> Actually, the VM won't even start until a program connects to the
>> socket. I didn't get the message with my listening program, but I'll
>> try the telnet method as I haven't programmed a socket in a while so
>> I may have missed a step.
>
> Go for it, its 1 minute effort.
Hi Dor,
It didn't work. I used the following option: -vmchannel
di:2258,tcp:0:4444,server (the // confused kvm) and when the VM booted,
I connected with "telnet localhost 4444" which allowed the boot to
proceed. But, I didn't get the hello host message when I loaded the
hypercall module. dmesg did show that the module loaded successfully.
I'll dig around with it and see what else I can figure out
>
>> While getting this working is novel to me, it seems from your email
>> that not much can be done with the hypercall interface in terms of
>> host-VM or VM-to-VM communication, correct? If reading and writing
>> don't work, how can one exchange info between VMs? I'll look forward
>> to the virtIO implementation.
>>
>
> The vmchannel was not intended to VM-to-VM networking, although it can
> work.
> Next version will be better. Anyway, it should have similar performance
> to pv network driver.
Cool.
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46E71D72.7000901-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-15 22:47 ` Dor Laor
[not found] ` <46EC60FF.60209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Dor Laor @ 2007-09-15 22:47 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel
[-- Attachment #1.1: Type: text/plain, Size: 1267 bytes --]
Cam Macdonell wrote:
>
> Dor Laor wrote:
> >>> You need to open the unix socket you passed to the vmchannel
> >>> parameter.
> >>> An easier alternative is to use -vmchannel di:2258,tcp://
> >>> 0:4444,server.
> >>> Before the guest loads you'll need to telnet the 4444 port and then
> >>> you should receive the
> >>> hello world output once the driver is up.
> >>> -Dor
> >> I tried having a program listening on the unix domain socket.
> >> Actually, the VM won't even start until a program connects to the
> >> socket. I didn't get the message with my listening program, but I'll
> >> try the telnet method as I haven't programmed a socket in a while so
> >> I may have missed a step.
> >
> > Go for it, its 1 minute effort.
>
> Hi Dor,
>
> It didn't work. I used the following option: -vmchannel
> di:2258,tcp:0:4444,server (the // confused kvm) and when the VM booted,
> I connected with "telnet localhost 4444" which allowed the boot to
> proceed. But, I didn't get the hello host message when I loaded the
> hypercall module. dmesg did show that the module loaded successfully.
> I'll dig around with it and see what else I can figure ou
>
I just tried it and it worked. I used fc7 2.6.21 kernel, 64 bits for
the guest.
Can you send the relevant dmesg?
[-- Attachment #1.2: Type: text/html, Size: 2093 bytes --]
[-- Attachment #2: Type: text/plain, Size: 228 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
[-- Attachment #3: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46EC60FF.60209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-09-17 16:00 ` Cameron Macdonell
[not found] ` <07D7C2A1-A29D-4CED-9B97-5C0071C75AF8-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Cameron Macdonell @ 2007-09-17 16:00 UTC (permalink / raw)
To: dor.laor-atKUWr5tajBWk0Htik3J/w; +Cc: kvm-devel
On 15-Sep-07, at 4:47 PM, Dor Laor wrote:
> Cam Macdonell wrote:
>> It didn't work. I used the following option: -vmchannel
>> di:2258,tcp:0:4444,server (the // confused kvm) and when the VM
>> booted,
>> I connected with "telnet localhost 4444" which allowed the boot to
>> proceed. But, I didn't get the hello host message when I loaded the
>> hypercall module. dmesg did show that the module loaded
>> successfully.
>> I'll dig around with it and see what else I can figure ou
>>
> I just tried it and it worked. I used fc7 2.6.21 kernel, 64 bits
> for the guest.
> Can you send the relevant dmesg?
Here is the dmesg output within the guest. I am running KVM-39 on
Ubuntu 2.6.20 kernel, 32 bit for both
host and guest.
[ 540.144000] Qumranet_hypercall_driver
[ 540.148000] pci dev 0000:00:04.0 (id 5002:2258 rev 00) is a guest
hypercall device
[ 540.148000] PCI: Found IRQ 9 for device 0000:00:04.0
[ 540.148000] hypercall_init_board: PIO region size == 0x100
[ 540.148000] hypercall_init_board: MMIO region size == 0x00
[ 540.148000] name=: base_addr=0xc200, io_addr=0x1c200, IRQ=9
For what it's worth, I can compile the driver/hypercall.c file that
comes with kvm-39. However, I can't compile your hypercall.c
implementation, I get the following error:
make -C /lib/modules/2.6.20-16-generic/build M=`pwd` "$@"
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-generic'
CC [M] /home/kvm/kvm-userspace/drivers/hypercall.o
/home/kvm/kvm-userspace/drivers/hypercall.c: In function
‘hypercall_do_tasklet’:
/home/kvm/kvm-userspace/drivers/hypercall.c:226: error: invalid
lvalue in unary ‘&’
/home/kvm/kvm-userspace/drivers/hypercall.c:226: error: invalid
lvalue in unary ‘&’
/home/kvm/kvm-userspace/drivers/hypercall.c:231: warning: implicit
declaration of function ‘hypercall_tx’
/home/kvm/kvm-userspace/drivers/hypercall.c: At top level:
/home/kvm/kvm-userspace/drivers/hypercall.c:236: error: static
declaration of ‘hypercall_tx’ follows non-static declaration
/home/kvm/kvm-userspace/drivers/hypercall.c:231: error: previous
implicit declaration of ‘hypercall_tx’ was here
/home/kvm/kvm-userspace/drivers/hypercall.c: In function
‘hypercall_interrupt’:
/home/kvm/kvm-userspace/drivers/hypercall.c:302: warning: passing
argument 1 of ‘__constant_memcpy’ makes pointer from integer without
a cast
/home/kvm/kvm-userspace/drivers/hypercall.c:302: warning: passing
argument 1 of ‘__memcpy’ makes pointer from integer without a cast
/home/kvm/kvm-userspace/drivers/hypercall.c: In function
‘hypercall_open’:
/home/kvm/kvm-userspace/drivers/hypercall.c:320: warning: passing
argument 2 of ‘request_irq’ from incompatible pointer type
/home/kvm/kvm-userspace/drivers/hypercall.c:326: warning: assignment
makes integer from pointer without a cast
/home/kvm/kvm-userspace/drivers/hypercall.c:328: error:
‘hypercall_task’ undeclared (first use in this function)
/home/kvm/kvm-userspace/drivers/hypercall.c:328: error: (Each
undeclared identifier is reported only once
/home/kvm/kvm-userspace/drivers/hypercall.c:328: error: for each
function it appears in.)
make[2]: *** [/home/kvm/kvm-userspace/drivers/hypercall.o] Error 1
make[1]: *** [_module_/home/kvm/kvm-userspace/drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-generic'
make: *** [all] Error 2
Thanks,
Cam
-----------------------------------------------
A. Cameron Macdonell
Ph.D. Student
Department of Computing Science
University of Alberta
cam-edFDblaTWIyXbbII50Afww@public.gmane.org
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <07D7C2A1-A29D-4CED-9B97-5C0071C75AF8-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-17 22:42 ` Dor Laor
[not found] ` <46EF02C7.1000904-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Dor Laor @ 2007-09-17 22:42 UTC (permalink / raw)
To: Cameron Macdonell; +Cc: kvm-devel
Cameron Macdonell wrote:
>
> On 15-Sep-07, at 4:47 PM, Dor Laor wrote:
>
> > Cam Macdonell wrote:
> >> It didn't work. I used the following option: -vmchannel
> >> di:2258,tcp:0:4444,server (the // confused kvm) and when the VM
> >> booted,
> >> I connected with "telnet localhost 4444" which allowed the boot to
> >> proceed. But, I didn't get the hello host message when I loaded the
> >> hypercall module. dmesg did show that the module loaded
> >> successfully.
> >> I'll dig around with it and see what else I can figure ou
> >>
> > I just tried it and it worked. I used fc7 2.6.21 kernel, 64 bits
> > for the guest.
> > Can you send the relevant dmesg?
>
> Here is the dmesg output within the guest. I am running KVM-39 on
> Ubuntu 2.6.20 kernel, 32 bit for both
> host and guest.
>
> [ 540.144000] Qumranet_hypercall_driver
> [ 540.148000] pci dev 0000:00:04.0 (id 5002:2258 rev 00) is a guest
> hypercall device
> [ 540.148000] PCI: Found IRQ 9 for device 0000:00:04.0
> [ 540.148000] hypercall_init_board: PIO region size == 0x100
> [ 540.148000] hypercall_init_board: MMIO region size == 0x00
> [ 540.148000] name=: base_addr=0xc200, io_addr=0x1c200, IRQ=9
>
Well this part looks good, I'll try to run 32 bit guest later on.
>
> For what it's worth, I can compile the driver/hypercall.c file that
> comes with kvm-39. However, I can't compile your hypercall.c
> implementation, I get the following error:
>
Hmm, well it's an old code that Uri will rebase for virtio so just drop it.
I just thought it might help.
>
> make -C /lib/modules/2.6.20-16-generic/build M=`pwd` "$@"
> make[1]: Entering directory `/usr/src/linux-headers-2.6.20-16-generic'
> CC [M] /home/kvm/kvm-userspace/drivers/hypercall.o
> /home/kvm/kvm-userspace/drivers/hypercall.c: In function
> ‘hypercall_do_tasklet’:
> /home/kvm/kvm-userspace/drivers/hypercall.c:226: error: invalid
> lvalue in unary ‘&’
> /home/kvm/kvm-userspace/drivers/hypercall.c:226: error: invalid
> lvalue in unary ‘&’
> /home/kvm/kvm-userspace/drivers/hypercall.c:231: warning: implicit
> declaration of function ‘hypercall_tx’
> /home/kvm/kvm-userspace/drivers/hypercall.c: At top level:
> /home/kvm/kvm-userspace/drivers/hypercall.c:236: error: static
> declaration of ‘hypercall_tx’ follows non-static declaration
> /home/kvm/kvm-userspace/drivers/hypercall.c:231: error: previous
> implicit declaration of ‘hypercall_tx’ was here
> /home/kvm/kvm-userspace/drivers/hypercall.c: In function
> ‘hypercall_interrupt’:
> /home/kvm/kvm-userspace/drivers/hypercall.c:302: warning: passing
> argument 1 of ‘__constant_memcpy’ makes pointer from integer without
> a cast
> /home/kvm/kvm-userspace/drivers/hypercall.c:302: warning: passing
> argument 1 of ‘__memcpy’ makes pointer from integer without a cast
> /home/kvm/kvm-userspace/drivers/hypercall.c: In function
> ‘hypercall_open’:
> /home/kvm/kvm-userspace/drivers/hypercall.c:320: warning: passing
> argument 2 of ‘request_irq’ from incompatible pointer type
> /home/kvm/kvm-userspace/drivers/hypercall.c:326: warning: assignment
> makes integer from pointer without a cast
> /home/kvm/kvm-userspace/drivers/hypercall.c:328: error:
> ‘hypercall_task’ undeclared (first use in this function)
> /home/kvm/kvm-userspace/drivers/hypercall.c:328: error: (Each
> undeclared identifier is reported only once
> /home/kvm/kvm-userspace/drivers/hypercall.c:328: error: for each
> function it appears in.)
> make[2]: *** [/home/kvm/kvm-userspace/drivers/hypercall.o] Error 1
> make[1]: *** [_module_/home/kvm/kvm-userspace/drivers] Error 2
> make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-16-generic'
> make: *** [all] Error 2
>
> Thanks,
> Cam
>
> -----------------------------------------------
> A. Cameron Macdonell
> Ph.D. Student
> Department of Computing Science
> University of Alberta
> cam-edFDblaTWIyXbbII50Afww@public.gmane.org
>
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46EF02C7.1000904-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-09-18 22:27 ` Cam Macdonell
[not found] ` <46F050BB.9040801-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 14+ messages in thread
From: Cam Macdonell @ 2007-09-18 22:27 UTC (permalink / raw)
To: dor.laor-atKUWr5tajBWk0Htik3J/w; +Cc: kvm-devel
Dor Laor wrote:
>>
> Hmm, well it's an old code that Uri will rebase for virtio so just drop it.
> I just thought it might help.
>>
No worries. In terms of moving to virtIO I grabbed your tree previously
to look at it. To test and play around with virtIO, do I need to use
your kernel (or module) in the guest?
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Using VMChannel to communicate with the host.
[not found] ` <46F050BB.9040801-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-19 10:31 ` Dor Laor
0 siblings, 0 replies; 14+ messages in thread
From: Dor Laor @ 2007-09-19 10:31 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel
Cam Macdonell wrote:
> Dor Laor wrote:
>
>>>
>> Hmm, well it's an old code that Uri will rebase for virtio so just
>> drop it.
>> I just thought it might help.
>>>
>
> No worries. In terms of moving to virtIO I grabbed your tree
> previously to look at it. To test and play around with virtIO, do I
> need to use your kernel (or module) in the guest?
>
You can use any kernel, just load the kvm-pv, virtio-net, virtio-be,
kvm-net modules in the guest in this order.
Pull again since I fixed some bugs yesterday.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2007-09-19 10:31 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-07 22:44 Using VMChannel to communicate with the host Cam Macdonell
[not found] ` <46E1D44E.90509-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-08 0:51 ` Troy Benjegerdes
[not found] ` <20070908005122.GB6764-na1kE3HDu0idQnJuSAr7PQ@public.gmane.org>
2007-09-09 8:38 ` Dor Laor
2007-09-09 9:56 ` Dor Laor
[not found] ` <46E3C345.9090305-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-10 16:01 ` Cam Macdonell
[not found] ` <46E56A71.50102-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-11 7:09 ` Dor Laor
[not found] ` <46E63F46.2040707-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-11 14:36 ` Cameron Macdonell
[not found] ` <FFFA58AC-4040-4E6D-A28F-BBBDD78F8722-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-11 20:21 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D95E340-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-09-11 22:57 ` Cam Macdonell
[not found] ` <46E71D72.7000901-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-15 22:47 ` Dor Laor
[not found] ` <46EC60FF.60209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-17 16:00 ` Cameron Macdonell
[not found] ` <07D7C2A1-A29D-4CED-9B97-5C0071C75AF8-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-17 22:42 ` Dor Laor
[not found] ` <46EF02C7.1000904-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-18 22:27 ` Cam Macdonell
[not found] ` <46F050BB.9040801-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-19 10:31 ` Dor Laor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox