From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dor Laor Subject: Re: Using VMChannel to communicate with the host. Date: Tue, 18 Sep 2007 00:42:15 +0200 Message-ID: <46EF02C7.1000904@qumranet.com> References: <64F9B87B6B770947A9F8391472E032160D95E340@ehost011-8.exch011.intermedia.net> <46E71D72.7000901@cs.ualberta.ca> <46EC60FF.60209@qumranet.com> <07D7C2A1-A29D-4CED-9B97-5C0071C75AF8@cs.ualberta.ca> Reply-To: dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Cc: kvm-devel To: Cameron Macdonell Return-path: In-Reply-To: <07D7C2A1-A29D-4CED-9B97-5C0071C75AF8-edFDblaTWIyXbbII50Afww@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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 =3D=3D 0x100 > [ 540.148000] hypercall_init_board: MMIO region size =3D=3D 0x00 > [ 540.148000] name=3D: base_addr=3D0xc200, io_addr=3D0x1c200, IRQ=3D9 > 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=3D`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 = > =91hypercall_do_tasklet=92: > /home/kvm/kvm-userspace/drivers/hypercall.c:226: error: invalid = > lvalue in unary =91&=92 > /home/kvm/kvm-userspace/drivers/hypercall.c:226: error: invalid = > lvalue in unary =91&=92 > /home/kvm/kvm-userspace/drivers/hypercall.c:231: warning: implicit = > declaration of function =91hypercall_tx=92 > /home/kvm/kvm-userspace/drivers/hypercall.c: At top level: > /home/kvm/kvm-userspace/drivers/hypercall.c:236: error: static = > declaration of =91hypercall_tx=92 follows non-static declaration > /home/kvm/kvm-userspace/drivers/hypercall.c:231: error: previous = > implicit declaration of =91hypercall_tx=92 was here > /home/kvm/kvm-userspace/drivers/hypercall.c: In function = > =91hypercall_interrupt=92: > /home/kvm/kvm-userspace/drivers/hypercall.c:302: warning: passing = > argument 1 of =91__constant_memcpy=92 makes pointer from integer without = > a cast > /home/kvm/kvm-userspace/drivers/hypercall.c:302: warning: passing = > argument 1 of =91__memcpy=92 makes pointer from integer without a cast > /home/kvm/kvm-userspace/drivers/hypercall.c: In function = > =91hypercall_open=92: > /home/kvm/kvm-userspace/drivers/hypercall.c:320: warning: passing = > argument 2 of =91request_irq=92 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: = > =91hypercall_task=92 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/