* [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
@ 2007-08-25 0:19 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D59005E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
[not found] ` <68676e00708281252m64116588q996e1d2079632cfd@mail.gmail.com>
0 siblings, 2 replies; 16+ messages in thread
From: Dor Laor @ 2007-08-25 0:19 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
This is the pci device side in qemu. It just used as
a glue between the pci, tap and virtio code.
Signed-off-by: Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
---
qemu/hw/paravirt_net.c | 213
++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 213 insertions(+), 0 deletions(-)
create mode 100644 qemu/hw/paravirt_net.c
diff --git a/qemu/hw/paravirt_net.c b/qemu/hw/paravirt_net.c
new file mode 100644
index 0000000..fdf2f1c
--- /dev/null
+++ b/qemu/hw/paravirt_net.c
@@ -0,0 +1,213 @@
+/*
+ * QEMU para virtual network emulation
+ *
+ * Copyright (c) 2007 Qumranet
+ *
+ * Permission is hereby granted, free of charge, to any person
obtaining a copy
+ * of this software and associated documentation files (the
"Software"), to deal
+ * in the Software without restriction, including without limitation
the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell
+ * copies of the Software, and to permit persons to whom the Software
is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN
+ * THE SOFTWARE.
+ */
+#include "vl.h"
+#include "virtio.h"
+#include "qemu-kvm.h"
+
+#define DEBUG_PARANET
+
+typedef struct PARANETState {
+ uint8_t macaddr[6];
+ uint8_t mult[8]; /* multicast mask array */
+ PCIDevice *pci_dev;
+ VLANClientState *vc;
+ struct virtio_device * vdev;
+ int tap_fd;
+} PARANETState;
+
+#define MAX_PARANET_DEVICES 1
+static int used_devices = 0;
+static PARANETState *paranet_devs[MAX_PARANET_DEVICES];
+
+static void paranet_reset(void *opaque)
+{
+}
+
+volatile int kvm_pvnet_pending_irq = 0;
+
+void paranet_update_irq(void *opaque)
+{
+ PARANETState *s = opaque;
+
+ paravirt_set_irq(s->pci_dev->config[0x3c]);
+
+ return;
+}
+
+void paravirt_net_poll(void)
+{
+ int i;
+
+ for (i=0; i<used_devices;i++) {
+ paranet_devs[i]->vdev->handle_input(paranet_devs[i]->vdev);
+ }
+}
+
+static int paranet_receive(void *opaque, const uint8_t *buf, int len)
+{
+ printf("PARANET:paravirt_receive\n");
+ return 0;
+}
+static int paranet_can_receive(void *opaque)
+{
+ return 0;
+}
+
+static void paranet_ioport_write(void *opaque, uint32_t addr, uint32_t
val)
+{
+ addr &= 0xf;
+#ifdef DEBUG_PARANET
+ printf("PARANET: write addr=0x%x val=0x%02x\n", addr, val);
+#endif
+
+ switch (addr) {
+ default:
+ printf("%s: BUG\n", __FUNCTION__);
+ break;
+ }
+}
+
+static uint32_t paranet_ioport_read(void *opaque, uint32_t addr)
+{
+ PARANETState* s=(PARANETState*)opaque;
+ uint32_t val = 0;
+ addr &= 0xf;
+
+ switch (addr) {
+ case 0:
+ val = 0;
+ default:
+ printf("%s: BUG\n", __FUNCTION__);
+ break;
+ }
+
+#ifdef DEBUG_PARANET
+ printf("PARANET: read addr=0x%x, val=%x\n", addr, val);
+#endif
+ return val;
+}
+
+static void paranet_save(QEMUFile* f,void* opaque)
+{
+ PARANETState* s=(PARANETState*)opaque;
+
+ if (s->pci_dev)
+ pci_device_save(s->pci_dev, f);
+
+ qemu_put_buffer(f, s->macaddr, 6);
+ qemu_put_buffer(f, s->mult, 8);
+}
+
+static int paranet_load(QEMUFile* f,void* opaque,int version_id)
+{
+ PARANETState* s=(PARANETState*)opaque;
+ int ret = 0;
+
+ if (s->pci_dev) {
+ ret = pci_device_load(s->pci_dev, f);
+ if (ret < 0)
+ return ret;
+ }
+
+ qemu_get_buffer(f, s->macaddr, 6);
+ qemu_get_buffer(f, s->mult, 8);
+
+ return ret;
+}
+
+/***********************************************************/
+/* PCI PARANET definitions */
+
+typedef struct PCIPARANETState {
+ PCIDevice dev;
+ PARANETState PARANET;
+} PCIPARANETState;
+
+static void paranet_map(PCIDevice *pci_dev, int region_num,
+ uint32_t addr, uint32_t size, int type)
+{
+ PCIPARANETState *d = (PCIPARANETState *)pci_dev;
+ PARANETState *s = &d->PARANET;
+
+ register_ioport_write(addr, 16, 1, paranet_ioport_write, s);
+ register_ioport_read(addr, 16, 1, paranet_ioport_read, s);
+}
+
+void pci_paranet_init(PCIBus *bus, NICInfo *nd, int devfn)
+{
+ PCIPARANETState *d;
+ PARANETState *s;
+ uint8_t *pci_conf;
+
+ printf("PARANET: pci_paranet_init start\n");
+
+ virtio_init();
+
+ d = (PCIPARANETState *)pci_register_device(bus,
+ "PARANET",
sizeof(PCIPARANETState),
+ devfn,
+ NULL, NULL);
+ pci_conf = d->dev.config;
+ pci_conf[0x00] = 0x02; // Qumranet vendor ID 0x5002
+ pci_conf[0x01] = 0x50;
+ pci_conf[0x02] = 0x34;
+ pci_conf[0x03] = 0x12;
+ pci_conf[0x04] = 0x05; // command = I/O space, Bus Master
+ pci_conf[0x0a] = 0x00; // ethernet network controller
+ pci_conf[0x0b] = 0x02;
+ pci_conf[0x0e] = 0x00; // header_type
+ pci_conf[0x3d] = 0x01; // interrupt pin 0, currently unused
+
+ pci_register_io_region(&d->dev, 0, 0x100,
+ PCI_ADDRESS_SPACE_IO, paranet_map);
+ s = &d->PARANET;
+ s->pci_dev = (PCIDevice *)d;
+ memcpy(s->macaddr, nd->macaddr, 6);
+ paranet_reset(s);
+ paranet_devs[0] = s;
+
+ s->vc = qemu_new_vlan_client(nd->vlan, NULL,
+ paranet_can_receive, s);
+ s->tap_fd = get_tap_fd(s->vc->vlan->first_client->opaque);
+
+ snprintf(s->vc->info_str, sizeof(s->vc->info_str),
+ "kvm pv pci macaddr=%02x:%02x:%02x:%02x:%02x:%02x",
+ s->macaddr[0],
+ s->macaddr[1],
+ s->macaddr[2],
+ s->macaddr[3],
+ s->macaddr[4],
+ s->macaddr[5]);
+
+ register_savevm("PARANET", 0, 1, paranet_save, paranet_load, s);
+ qemu_register_reset(paranet_reset, s);
+
+ s->vdev = setup_virtnet(s,
+ used_devices,
+ s->tap_fd,
+ paranet_update_irq);
+ paranet_devs[used_devices++] = s;
+
+ printf("PARANET: pci_paranet_init end\n");
+}
-----
In simplicity there is elegance.
Dor Laor ;)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <64F9B87B6B770947A9F8391472E032160D59005E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-08-27 12:22 ` Christian Borntraeger
[not found] ` <200708271422.54306.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Christian Borntraeger @ 2007-08-27 12:22 UTC (permalink / raw)
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Am Samstag, 25. August 2007 schrieb Dor Laor:
> + * Permission is hereby granted, free of charge, to any person
> obtaining a copy
Hi Dor,
some of your patch lines seem line-wrapped. Is there place where I can
download the whole series? Thanks
Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <68676e00708281252m64116588q996e1d2079632cfd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-08-29 6:40 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558C3-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-09-09 12:58 ` Avi Kivity
1 sibling, 1 reply; 16+ messages in thread
From: Dor Laor @ 2007-08-29 6:40 UTC (permalink / raw)
To: Luca; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
>I just noticed this:
>
>> --- /dev/null
>> +++ b/qemu/hw/paravirt_net.c
>> @@ -0,0 +1,213 @@
>> +/*
>> + * QEMU para virtual network emulation
>> + *
>> + * Copyright (c) 2007 Qumranet
>> + *
>> + * Permission is hereby granted, free of charge, to any person
>> obtaining a copy
>> + * of this software and associated documentation files (the
>> "Software"), to deal
>> + * in the Software without restriction, including without limitation
>> the rights
>> + * to use, copy, modify, merge, publish, distribute, sublicense,
>and/or
>> sell
>> + * copies of the Software, and to permit persons to whom the Software
>> is
>> + * furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be
>> included in
>> + * all copies or substantial portions of the Software.
>[cut]
>
>Shouldn't you use the standard GPL boilerplate? (IANAL, so maybe the
>text above is a superset of the GPL and is fine...)
>
>Luca
I took it from the rtl8139 driver. Persoanly I don’t mind to switch to something
better for the community.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <200708271422.54306.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-08-29 6:46 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558CB-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
[not found] ` <200708291223.51252.borntraeger@de.ibm.com>
0 siblings, 2 replies; 16+ messages in thread
From: Dor Laor @ 2007-08-29 6:46 UTC (permalink / raw)
To: Christian Borntraeger, kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
>> + * Permission is hereby granted, free of charge, to any person
>> obtaining a copy
>
>Hi Dor,
>
>some of your patch lines seem line-wrapped. Is there place where I can
>download the whole series? Thanks
>
>Christian
The code can now be accessed by git:
git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
branch name virt-final.
--Dor
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558CB-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-08-29 15:26 ` Cam Macdonell
[not found] ` <46D59029.5080403-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Cam Macdonell @ 2007-08-29 15:26 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Dor Laor wrote:
>
> The code can now be accessed by git:
> git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
> git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
> branch name virt-final.
> --Dor
>
Hi Dor,
I'm really new to git and don't quite grasp it's subtleties. Do I have
to "git clone" your kvm kernel and user-space repos or is there some way
to use your branch as a branch off Avi's? I tried finding an online
reference, but none seem to cover this kind of setup.
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <46D59029.5080403-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-08-29 15:36 ` Luca
[not found] ` <68676e00708290836n375c7501o727ec1cc2b998865-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Luca @ 2007-08-29 15:36 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On 8/29/07, Cam Macdonell <cam-edFDblaTWIyXbbII50Afww@public.gmane.org> wrote:
> Dor Laor wrote:
> > The code can now be accessed by git:
> > git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
> > git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
> > branch name virt-final.
> > --Dor
>
> I'm really new to git and don't quite grasp it's subtleties. Do I have
> to "git clone" your kvm kernel and user-space repos or is there some way
> to use your branch as a branch off Avi's? I tried finding an online
> reference, but none seem to cover this kind of setup.
If Dor's repository is based on the Avi's one (I think so) you can
pull virt-final branch as a branch of you existing repository (see
refspec parameter in git-pull). This is error prone though (after a
while I tend to pull the wrong tree into the wrong branch ;-) )
I prefer to clone the whole tree (disk space is cheap...), sharing GIT
object where possible, e.g.
git clone --reference kvm.avi
git://kvm.qumranet.com/home/dor/src/virtio/kvm kvm.dor
where kvm.avi is you existing kvm git repository.
Luca
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <68676e00708290836n375c7501o727ec1cc2b998865-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-08-29 17:11 ` Cam Macdonell
[not found] ` <46D5A8C9.10408-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-09 12:56 ` Avi Kivity
1 sibling, 1 reply; 16+ messages in thread
From: Cam Macdonell @ 2007-08-29 17:11 UTC (permalink / raw)
To: Luca; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Luca wrote:
> On 8/29/07, Cam Macdonell <cam-edFDblaTWIyXbbII50Afww@public.gmane.org> wrote:
>> Dor Laor wrote:
>>> The code can now be accessed by git:
>>> git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
>>> git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
>>> branch name virt-final.
>>> --Dor
>> I'm really new to git and don't quite grasp it's subtleties. Do I have
>> to "git clone" your kvm kernel and user-space repos or is there some way
>> to use your branch as a branch off Avi's? I tried finding an online
>> reference, but none seem to cover this kind of setup.
>
> If Dor's repository is based on the Avi's one (I think so) you can
> pull virt-final branch as a branch of you existing repository (see
> refspec parameter in git-pull). This is error prone though (after a
> while I tend to pull the wrong tree into the wrong branch ;-) )
> I prefer to clone the whole tree (disk space is cheap...), sharing GIT
> object where possible, e.g.
>
> git clone --reference kvm.avi
> git://kvm.qumranet.com/home/dor/src/virtio/kvm kvm.dor
>
Thanks Luca,
I get this error:
[cam@b5 ~/research/KVM]$ git clone --reference kvm
git://kvm.qumranet.com/home/dor/src/virtio/kvm.git kvm.dor
Initialized empty Git repository in /home/cam/research/KVM/kvm.dor/.git/
fatal: The remote end hung up unexpectedly
fetch-pack from 'git://kvm.qumranet.com/home/dor/src/virtio/kvm.git' failed.
Is there a problem with the repositor or am I doing something wrong?
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <46D5A8C9.10408-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-08-29 17:18 ` Luca
[not found] ` <68676e00708291018t1262e97dg14b9a4278ae0d91e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Luca @ 2007-08-29 17:18 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On 8/29/07, Cam Macdonell <cam-edFDblaTWIyXbbII50Afww@public.gmane.org> wrote:
> Luca wrote:
> > On 8/29/07, Cam Macdonell <cam-edFDblaTWIyXbbII50Afww@public.gmane.org> wrote:
> >> Dor Laor wrote:
> >>> The code can now be accessed by git:
> >>> git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
> >>> git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
> >>> branch name virt-final.
> >>> --Dor
> >> I'm really new to git and don't quite grasp it's subtleties. Do I have
> >> to "git clone" your kvm kernel and user-space repos or is there some way
> >> to use your branch as a branch off Avi's? I tried finding an online
> >> reference, but none seem to cover this kind of setup.
> >
> > If Dor's repository is based on the Avi's one (I think so) you can
> > pull virt-final branch as a branch of you existing repository (see
> > refspec parameter in git-pull). This is error prone though (after a
> > while I tend to pull the wrong tree into the wrong branch ;-) )
> > I prefer to clone the whole tree (disk space is cheap...), sharing GIT
> > object where possible, e.g.
> >
> > git clone --reference kvm.avi
> > git://kvm.qumranet.com/home/dor/src/virtio/kvm kvm.dor
> >
>
> Thanks Luca,
>
> I get this error:
>
> [cam@b5 ~/research/KVM]$ git clone --reference kvm
> git://kvm.qumranet.com/home/dor/src/virtio/kvm.git kvm.dor
> Initialized empty Git repository in /home/cam/research/KVM/kvm.dor/.git/
> fatal: The remote end hung up unexpectedly
> fetch-pack from 'git://kvm.qumranet.com/home/dor/src/virtio/kvm.git' failed.
>
> Is there a problem with the repositor or am I doing something wrong?
The command is correct. It seems that either the repository is not
configured for export or the path is wrong.
Luca
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558C3-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-08-30 23:08 ` Anthony Liguori
0 siblings, 0 replies; 16+ messages in thread
From: Anthony Liguori @ 2007-08-30 23:08 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
On Tue, 2007-08-28 at 23:40 -0700, Dor Laor wrote:
> >I just noticed this:
> >
> >> --- /dev/null
> >> +++ b/qemu/hw/paravirt_net.c
> >> @@ -0,0 +1,213 @@
> >> +/*
> >> + * QEMU para virtual network emulation
> >> + *
> >> + * Copyright (c) 2007 Qumranet
> >> + *
> >> + * Permission is hereby granted, free of charge, to any person
> >> obtaining a copy
> >> + * of this software and associated documentation files (the
> >> "Software"), to deal
> >> + * in the Software without restriction, including without limitation
> >> the rights
> >> + * to use, copy, modify, merge, publish, distribute, sublicense,
> >and/or
> >> sell
> >> + * copies of the Software, and to permit persons to whom the Software
> >> is
> >> + * furnished to do so, subject to the following conditions:
> >> + *
> >> + * The above copyright notice and this permission notice shall be
> >> included in
> >> + * all copies or substantial portions of the Software.
> >[cut]
> >
> >Shouldn't you use the standard GPL boilerplate? (IANAL, so maybe the
> >text above is a superset of the GPL and is fine...)
> >
That text is the X11 license. It is not the GPL. Most device emulation
in QEMU is not actually GPL'd but rather X11.
Regards,
Anthony Liguori
> >Luca
>
>
> I took it from the rtl8139 driver. Persoanly I don’t mind to switch to something
> better for the community.
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-dev
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <68676e00708291018t1262e97dg14b9a4278ae0d91e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-09-03 14:00 ` Cam Macdonell
0 siblings, 0 replies; 16+ messages in thread
From: Cam Macdonell @ 2007-09-03 14:00 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Luca wrote:
> On 8/29/07, Cam Macdonell <cam-edFDblaTWIyXbbII50Afww@public.gmane.org> wrote:
>>
>> I get this error:
>>
>> [cam@b5 ~/research/KVM]$ git clone --reference kvm
>> git://kvm.qumranet.com/home/dor/src/virtio/kvm.git kvm.dor
>> Initialized empty Git repository in /home/cam/research/KVM/kvm.dor/.git/
>> fatal: The remote end hung up unexpectedly
>> fetch-pack from 'git://kvm.qumranet.com/home/dor/src/virtio/kvm.git' failed.
>>
>> Is there a problem with the repositor or am I doing something wrong?
>
> The command is correct. It seems that either the repository is not
> configured for export or the path is wrong.
>
> Luca
Hi Dor,
I can't seem to grab your tree. Is your repository setup properly?
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* git branch of Virtio implementation for KVM
[not found] ` <200708291223.51252.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
@ 2007-09-03 14:23 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D70643B-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Dor Laor @ 2007-09-03 14:23 UTC (permalink / raw)
To: Christian Borntraeger, Cam Macdonell,
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Rusty Russell
Now it should work.
-Kernel repo: git clone git://kvm.qumranet.com/home/dor/src/virtio/kvm
-Userspace repo: >git clone
git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace
Please use virt-final branch.
Note that the repository will likely to undergo some changes in the
following days.
Dor.
>-----Original Message-----
>From: Christian Borntraeger [mailto:borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org]
>Sent: Wednesday, August 29, 2007 1:24 PM
>To: Dor Laor
>Subject: Re: [kvm-devel] [RFC][PATCH 5/6][KVM VIRTIO] Add the network
>device code
>
>> The code can now be accessed by git:
>> git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
>> git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
>> branch name virt-final.
>
>Hmm,
>
>git clone git://kvm.qumranet.com/home/dor/src/virtio/kvm
>git clone git://kvm.qumranet.com/home/dor/src/virtio/kvm.git
>git clone git://kvm.qumranet.com/home/dor/src/virtio/kvm virt-final
>git clone git://kvm.qumranet.com/home/dor/src/virtio/kvm.git virt-final
>
>all fail with
>fatal: The remote end hung up unexpectedly
>
>Any ideas?
>
>Christian
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* VirtIO configure and compilation problems
[not found] ` <64F9B87B6B770947A9F8391472E032160D70643B-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-09-03 21:28 ` Cam Macdonell
[not found] ` <46DC7C84.1080708-edFDblaTWIyXbbII50Afww@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Cam Macdonell @ 2007-09-03 21:28 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi Dor,
I was able to grab the virtio sources. However, the make -C kernel
command to build the modules doesn't copy over all files.
when I run:
make -C kernel sync LINUX=/home/cam/research/KVM/dor/kvm/
the following files:
linux/virtio.h
linux/virtio_blk.h
linux/virtio_net.h
asm-x86_64/hypercall.h
don't get copied into kvm-userspace/kernel/include
after copying them manually, I get the compile to move forward until
this happens:
CC [M] /home/cam/research/KVM/dor/kvm-userspace/kernel/virtio_backend.o
KVM/dor/kvm-userspace/kernel/virtio_backend.c: In function 'virtio_add_buf':
KVM/dor/kvm-userspace/kernel/virtio_backend.c:104: warning: parameter
names (without types) in function declaration
KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: 'prev'
undeclared (first use in this function)
KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: (Each
undeclared identifier is reported only once
KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: for each
function it appears in.)
make[3]: *** [KVM/dor/kvm-userspace/kernel/virtio_backend.o] Error 1
Hopefully I'll get to a point when I can fix these myself, but I'm not
there yet :)
Thanks,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: VirtIO configure and compilation problems
[not found] ` <46DC7C84.1080708-edFDblaTWIyXbbII50Afww@public.gmane.org>
@ 2007-09-04 8:59 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D70662C-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
0 siblings, 1 reply; 16+ messages in thread
From: Dor Laor @ 2007-09-04 8:59 UTC (permalink / raw)
To: Cam Macdonell; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
>Hi Dor,
>
>I was able to grab the virtio sources. However, the make -C kernel
>command to build the modules doesn't copy over all files.
>
>when I run:
>
>make -C kernel sync LINUX=/home/cam/research/KVM/dor/kvm/
>
>the following files:
>linux/virtio.h
>linux/virtio_blk.h
>linux/virtio_net.h
The above files are currently part of the guest kernel (not modules) so
they shouldn't be copied. Instead you should compile the whole kernel
and
use it for the guest. I'll soon make modules out of them for better
usability.
>asm-x86_64/hypercall.h
I'll add it to the sync entry.
10x
>don't get copied into kvm-userspace/kernel/include
>
>after copying them manually, I get the compile to move forward until
>this happens:
>
> CC [M] /home/cam/research/KVM/dor/kvm-
>userspace/kernel/virtio_backend.o
>KVM/dor/kvm-userspace/kernel/virtio_backend.c: In function
>'virtio_add_buf':
>KVM/dor/kvm-userspace/kernel/virtio_backend.c:104: warning: parameter
>names (without types) in function declaration
>KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: 'prev'
>undeclared (first use in this function)
>KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: (Each
>undeclared identifier is reported only once
>KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: for each
>function it appears in.)
>make[3]: *** [KVM/dor/kvm-userspace/kernel/virtio_backend.o] Error 1
>
>Hopefully I'll get to a point when I can fix these myself, but I'm not
>there yet :)
Did it happen after you passed all virtio*.h to kernel/include/linux?
Strange, seems like uninitialized_var(prev) is not good?
>Thanks,
>Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: VirtIO configure and compilation problems
[not found] ` <64F9B87B6B770947A9F8391472E032160D70662C-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
@ 2007-09-04 13:42 ` Cam Macdonell
0 siblings, 0 replies; 16+ messages in thread
From: Cam Macdonell @ 2007-09-04 13:42 UTC (permalink / raw)
To: Dor Laor; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hi Dor,
Dor Laor wrote:
>>
>> the following files:
>> linux/virtio.h
>> linux/virtio_blk.h
>> linux/virtio_net.h
>
> The above files are currently part of the guest kernel (not modules) so
> they shouldn't be copied. Instead you should compile the whole kernel
> and
> use it for the guest. I'll soon make modules out of them for better
> usability.
>
But, correct if I'm wrong, they still need be copied (some how) into
kvm-userspace
build as it requires them.
Also to be clear, do I use the standard kvm host modules then? Should I
specify that
kernel directory when I run "make -C kernel..."?
>> asm-x86_64/hypercall.h
>
> I'll add it to the sync entry.
> 10x
>
>> don't get copied into kvm-userspace/kernel/include
>>
>> after copying them manually, I get the compile to move forward until
>> this happens:
>>
>> CC [M] /home/cam/research/KVM/dor/kvm-
>> userspace/kernel/virtio_backend.o
>> KVM/dor/kvm-userspace/kernel/virtio_backend.c: In function
>> 'virtio_add_buf':
>> KVM/dor/kvm-userspace/kernel/virtio_backend.c:104: warning: parameter
>> names (without types) in function declaration
>> KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: 'prev'
>> undeclared (first use in this function)
>> KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: (Each
>> undeclared identifier is reported only once
>> KVM/dor/kvm-userspace/kernel/virtio_backend.c:131: error: for each
>> function it appears in.)
>> make[3]: *** [KVM/dor/kvm-userspace/kernel/virtio_backend.o] Error 1
>>
>> Hopefully I'll get to a point when I can fix these myself, but I'm not
>> there yet :)
>
> Did it happen after you passed all virtio*.h to kernel/include/linux?
> Strange, seems like uninitialized_var(prev) is not good?
>
Yes, I looked at the code and it seems that a definition of 'prev' is
simply missing.
Thanks for your help,
Cam
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <68676e00708290836n375c7501o727ec1cc2b998865-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-29 17:11 ` Cam Macdonell
@ 2007-09-09 12:56 ` Avi Kivity
1 sibling, 0 replies; 16+ messages in thread
From: Avi Kivity @ 2007-09-09 12:56 UTC (permalink / raw)
To: Luca; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Luca wrote:
> On 8/29/07, Cam Macdonell <cam-edFDblaTWIyXbbII50Afww@public.gmane.org> wrote:
>
>> Dor Laor wrote:
>>
>>> The code can now be accessed by git:
>>> git://kvm.qumranet.com/home/dor/src/virtio/kvm (kernel) and
>>> git://kvm.qumranet.com/home/dor/src/virtio/kvm-userspace.
>>> branch name virt-final.
>>> --Dor
>>>
>> I'm really new to git and don't quite grasp it's subtleties. Do I have
>> to "git clone" your kvm kernel and user-space repos or is there some way
>> to use your branch as a branch off Avi's? I tried finding an online
>> reference, but none seem to cover this kind of setup.
>>
>
> If Dor's repository is based on the Avi's one (I think so) you can
> pull virt-final branch as a branch of you existing repository (see
> refspec parameter in git-pull). This is error prone though (after a
> while I tend to pull the wrong tree into the wrong branch ;-) )
> I prefer to clone the whole tree (disk space is cheap...), sharing GIT
> object where possible, e.g.
>
> git clone --reference kvm.avi
> git://kvm.qumranet.com/home/dor/src/virtio/kvm kvm.dor
>
> where kvm.avi is you existing kvm git repository.
>
My preference pulling random branches and repos is 'git fetch' (or, for
longer lived branches, 'git remote') which doesn't cause fake merges.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
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] 16+ messages in thread
* Re: [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code
[not found] ` <68676e00708281252m64116588q996e1d2079632cfd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-29 6:40 ` [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code Dor Laor
@ 2007-09-09 12:58 ` Avi Kivity
1 sibling, 0 replies; 16+ messages in thread
From: Avi Kivity @ 2007-09-09 12:58 UTC (permalink / raw)
To: Luca; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Luca wrote:
> On 8/25/07, Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>
> I just noticed this:
>
>
>> --- /dev/null
>> +++ b/qemu/hw/paravirt_net.c
>> @@ -0,0 +1,213 @@
>> +/*
>> + * QEMU para virtual network emulation
>> + *
>> + * Copyright (c) 2007 Qumranet
>> + *
>> + * Permission is hereby granted, free of charge, to any person
>> obtaining a copy
>> + * of this software and associated documentation files (the
>> "Software"), to deal
>> + * in the Software without restriction, including without limitation
>> the rights
>> + * to use, copy, modify, merge, publish, distribute, sublicense, and/or
>> sell
>> + * copies of the Software, and to permit persons to whom the Software
>> is
>> + * furnished to do so, subject to the following conditions:
>> + *
>> + * The above copyright notice and this permission notice shall be
>> included in
>> + * all copies or substantial portions of the Software.
>>
> [cut]
>
> Shouldn't you use the standard GPL boilerplate? (IANAL, so maybe the
> text above is a superset of the GPL and is fine...)
>
>
My preference is to just add a copyright and refer to some file in the
top-level, so we don't restrict qemu's licensing unnecessarily (this
could hinder merging).
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
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] 16+ messages in thread
end of thread, other threads:[~2007-09-09 12:58 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <AcfmraaesoemPSOZSEeX8bLIYrKo5w==>
2007-08-25 0:19 ` [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D59005E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-27 12:22 ` Christian Borntraeger
[not found] ` <200708271422.54306.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-08-29 6:46 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558CB-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-29 15:26 ` Cam Macdonell
[not found] ` <46D59029.5080403-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-08-29 15:36 ` Luca
[not found] ` <68676e00708290836n375c7501o727ec1cc2b998865-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-29 17:11 ` Cam Macdonell
[not found] ` <46D5A8C9.10408-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-08-29 17:18 ` Luca
[not found] ` <68676e00708291018t1262e97dg14b9a4278ae0d91e-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-09-03 14:00 ` Cam Macdonell
2007-09-09 12:56 ` Avi Kivity
[not found] ` <200708291223.51252.borntraeger@de.ibm.com>
[not found] ` <200708291223.51252.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-09-03 14:23 ` git branch of Virtio implementation for KVM Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D70643B-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-09-03 21:28 ` VirtIO configure and compilation problems Cam Macdonell
[not found] ` <46DC7C84.1080708-edFDblaTWIyXbbII50Afww@public.gmane.org>
2007-09-04 8:59 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D70662C-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-09-04 13:42 ` Cam Macdonell
[not found] ` <68676e00708281252m64116588q996e1d2079632cfd@mail.gmail.com>
[not found] ` <68676e00708281252m64116588q996e1d2079632cfd-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-29 6:40 ` [RFC][PATCH 5/6][KVM VIRTIO] Add the network device code Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558C3-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-30 23:08 ` Anthony Liguori
2007-09-09 12:58 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox