[5869] Virtio core support
Revision: 5869
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5869 Author: aliguori Date: 2008-12-04 19:38:57 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
Virtio core support
This patch adds core support for VirtIO. VirtIO is a paravirtualization framework that has been in Linux since 2.6.21. A PCI transport has been available since 2.6.25. Network drivers are also available for Windows.
Modified Paths:
--------------
trunk/Makefile.target
Added Paths:
-----------
trunk/hw/virtio.c
trunk/hw/virtio.h
Modified: trunk/Makefile.target
===================================================================
Makefile.target +4 -0
@@ -664,6 +664,8 @@ OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o +# virtio support +OBJS+= virtio.o CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE endif ifeq ($(TARGET_BASE_ARCH), ppc)
@@ -681,6 +683,8 @@ OBJS+= unin_pci.o ppc_chrp.o # PowerPC 4xx boards OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o +# virtio support +OBJS+= virtio.o endif ifeq ($(TARGET_BASE_ARCH), mips) OBJS+= mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
Added: trunk/hw/virtio.c
===================================================================
hw/virtio.c +847 -0
847 lines not on this page · raw message
Added: trunk/hw/virtio.h
===================================================================
hw/virtio.h +121 -0
121 lines not on this page · raw message
Quoted 22 lines · Anthony Liguori
Revision: 5869
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5869 Author: aliguori Date: 2008-12-04 19:38:57 +0000 (Thu, 04 Dec 2008)Added:
trunk/hw/virtio.c
===================================================================hw/virtio.c +10
-0@@ -0,0 +1,847 @@ +/* +* Virtio Support +* +* Copyright IBM, Corp. 2007 +* +* Authors: +* Anthony Liguori <[email protected]> +* +* This work is licensed under the terms of the GNU GPL, version 2. See +* the COPYING file in the top-level directory.
hw/virtio.c line 20
Quoted 10 lines
hw/virtio.c +10
-0+* +*/ + +#include <inttypes.h> +#include <err.h> + +#include "virtio.h" +#include "sysemu.h" + +//#define VIRTIO_ZERO_COPY
I left this here to simplify merging with kvm-userspace.git. I don't have any intention of enabling it though and it will disappear once we get the DMA API committed.
I didn't want anyone to think there are any plans to enable it as it enables code that does bad things (touching guest physical memory directly).
Regards,
Anthony Liguori