Re: Virtio Devices Patch

Eric Shubert <[email protected]> Fri, 26 Apr 2013 11:55:16 -0700
Newsgroups gmane.comp.security.ipcop.devel
Organization Eric Shubert & Associates
Message-ID <[email protected]>
On 04/18/2013 11:42 PM, [email protected] wrote:
>
>
> ----- Mail original -----
>> De: "Eric Shubert" <[email protected]>
>> À: [email protected]
>> Envoyé: Jeudi 18 Avril 2013 22:29:03
>> Objet: [IPCop-devel] Virtio Devices Patch
>>
>> A fellow developer (Justin H) and I have successfully built the
>> latest
>> (7001) IPCop with support for Virtio (paravirtualized KVM) disk and
>> network devices. These drivers are part of the kernel, and provide
>> significant performance improvements for IPCop virtual hosts running
>> under Linux KVM.
>>
>> The svn diff patch file is attached. It's fairly simple. The code is
>> replicated and tailored from existing IPCop code, and existing code
>> is pretty much untouched.
>>
> Thank for the patch.
> I will care to integrate.
>
> Index: src/installer/partition.c
> ===================================================================
> --- src/installer/partition.c	(revision 7001)
> +++ src/installer/partition.c	(working copy)
> @@ -622,6 +622,8 @@
>       /* TODO be more specific which modules to include */
>       fprintf(handle, "ext3\njbd\n");
>       fprintf(handle, "ehci-hcd\nohci-hcd\nuhci-hcd\nhid\nusbhid\n");
> +    // include virtio so se can boot from a virtio disk.
> +    fprintf(handle, "virtio\nvirtio_pci\nvirtio_blk\n");
>
> Appart of the typo, maybe we could detect boot from KVM?
>
> http://www.dmo.ca/blog/detecting-virtualization-on-linux/
> say 'dmesg | grep -i virtual' detect for all virtualized cases.
>
> To be specific for KVM, I suppose this should do the trick.
> dmesg | grep -i 'paravirtualized kernel on KVM'
>
> Could you confirm?
>
> Gilles
>
> ------------------------------------------------------------------------------

Gilles,

That particular string doesn't work for me, but I found one ('virtual 
kernel memory layout') which tests out ok. I also included a similar 
test ('virtio-pci') when checking for the virtio_net device.

FWIW, I'm still seeing cpu utilization that I think is a little higher 
than it needs to be (8% or so when idling). I'll look into this when I 
get a chance to see if that can be reduced. It might take a newer kernel 
though.

Many thanks for including this in the stock IPCop, Gilles. I'm hoping it 
will make it in the 2.1 release.


-- 
-Eric 'shubes'


------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
IPCop-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ipcop-devel