Error in compiling a module

2010-07-27 Thread Balachandar
Hello, I am trying add a new network protocol family to the kernel. But i get the following error for .h file '11: two or more data types in declaration specifiers In .c file 18: static struct net_proto_family ucnet_family_ops = { 19: .family = PF_UCNET, 20: .create = sock_ucnet_create

KVM get stuck when using vhost

2010-07-14 Thread Balachandar
Hello, I am trying to run my KVM with vhost module for better network performance. I followed the instructions found at the kvm website http://www.linux-kvm.org/page/VhostNet . I already have a 2.6.34 kernel compiled with vhost support. I tool qemu-kvm from git:// git.kernel.org/pub/scm/linux/ker

Re: Where is the entry of hypercalls in kvm?

2010-06-30 Thread Balachandar
On Wed, Jun 30, 2010 at 4:17 AM, Peter Teoh wrote: > Your questioned is answered here: > > http://www.spinics.net/lists/kvm/msg37526.html > > And check this paper out: > > http://ozlabs.org/~rusty/virtio-spec/virtio-paper.pdf > > The general concept to remember is that QEMU and KVM just execute th

Re: Where is the entry of hypercalls in kvm?

2010-06-30 Thread Balachandar
On Wed, Jun 30, 2010 at 10:59 AM, Balachandar wrote: > On Wed, Jun 30, 2010 at 4:17 AM, Peter Teoh wrote: >> Your questioned is answered here: >> >> http://www.spinics.net/lists/kvm/msg37526.html >> >> And check this paper out: >> >> http://o

Where is the entry of hypercalls in kvm?

2010-06-25 Thread Balachandar
Hello, I am trying to understand the virtio mechanism in linux. I read that the kick function will notify the host side about the newly published buffers. I am looking especially at virtio_net.Once a packet is ready for transmission the kick function is called here

Re: Use of double pointer in linux kernel Hash list implementation

2010-06-17 Thread Balachandar
On Wed, Jun 16, 2010 at 11:32 PM, Namhyung Kim wrote: > 2010-06-16 (수), 22:50 -0400, Balachandar: > > Hi, > > I am trying to understand Linux Kernel implementation of linked list > > and hash table. A link to the implementation is here. I understood the > > linked li

Use of double pointer in linux kernel Hash list implementation

2010-06-16 Thread Balachandar
Hi, I am trying to understand Linux Kernel implementation of linked list and hash table. A link to the implementation is here. I understood the linked list implementation. But i am little confused of why double pointers is being used in hlis

linux scatterlist api

2010-06-09 Thread Balachandar
Hello, I have been trying to understand and use the scatterlist api's in Linux. I searched but couldn't find any clear document on it. If anybody have some link to know on the usage of these api's, please pass it on to me. Thank you... Thanks, Bala

Doubt in function typedef's

2010-06-08 Thread Balachandar
Hello, I came across the following statements and confused about it. typedef void vq_callback_t (struct virtqueue *); and in some other file vq_callback_t

Re: error in loading a module in 2.6.34

2010-05-22 Thread Balachandar
On Sat, May 22, 2010 at 9:45 PM, Simon Kitching wrote: > I see that drivers/vhost/Kconfig contains this: > > config VHOST_NET >  tristate "Host kernel accelerator for virtio net (EXPERIMENTAL)" >  depends on NET && EVENTFD && (TUN || !TUN) && (MACVTAP || !MACVTAP) >   && EXPERIMENTAL > > I'm not

Re: error in loading a module in 2.6.34

2010-05-22 Thread Balachandar
On Sat, May 22, 2010 at 9:45 PM, Simon Kitching wrote: > On Sat, 2010-05-22 at 21:01 -0400, Balachandar wrote: >> I tried both. When i tried modprobe it says that vhost_net.ko not >> found. Actually i want to point out that i configured the module to be >> built along with th

Re: error in loading a module in 2.6.34

2010-05-22 Thread Balachandar
lease correct me if i am wrong. Thanks, Bala On Sat, May 22, 2010 at 8:27 PM, Simon Kitching wrote: > On Sat, 2010-05-22 at 19:20 -0400, Balachandar wrote: > > Hello, > > I recently downloaded the 2.6.34 kernel and wanted to use the new > > vhost_net module. I selected the opti

error in loading a module in 2.6.34

2010-05-22 Thread Balachandar
Hello, I recently downloaded the 2.6.34 kernel and wanted to use the new vhost_net module. I selected the option in the 'make menuconfig' as a module and built the kernel. After rebooting, i couldn't find the module using the lsmod command. So i decided to insert the module manually. But when i t

How the kernel gives seg. fault for a scenario like this?

2010-05-11 Thread Balachandar
I have a doubt in accessing some invalid data. How will the OS cause segmentation fault for a scenario like this? Suppose a date segment has some 100 bytes. This will be mapped and a page table entry will be created. But the page size is 4K. Consider the data segment is aligned with this page boun

Doubts in System call mechanism in linux

2010-05-10 Thread Balachandar
Hello, We transit from ring3 to ring0 using 'int' or the new 'syscall/sysenter' instruction. Does that mean that the page tables and other stuffs that needs to be modified for the kernel is automatically done by the 'int' instruction or the interrupt handler for the 'int 0x80' will do the require

Shared buffer between user and kernel space

2010-05-03 Thread Balachandar
Hi, I need a shared buffer between user and kernel space. I read that one way is to allocated buffer in kernel and then call mmap from the user space. I searched for an example but couldn't find something useful. If you know, could you please send me any links or sample code that does this Tha

Doubts in fast system call

2010-04-28 Thread Balachandar
Hello All, My problem is i want to find a fast way to switch from user mode to kernel mode. I read about the sysenter instructions on the net. I want to know a method to find whether my OS uses sysenter or software interrupt method (int 0x80). Can anybody please help me in finding this? Also i