public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Dor Laor <dor.laor-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel
	<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
Subject: Re: virtio & hypercall interface?
Date: Sun, 16 Sep 2007 00:56:37 +0300	[thread overview]
Message-ID: <46EC5515.2020004@qumranet.com> (raw)
In-Reply-To: <46EC1709.2080803-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

Anthony Liguori wrote:
> Dor Laor wrote:
>> Avi Kivity wrote:
>>> Anthony Liguori wrote:
>>>  
>>>> Dor Laor wrote:
>>>>     
>>>>>> Hi all,
>>>>>>
>>>>>>     I've finally started looking at Dor's git tree, and it struck me
>>>>>>                   
>>>>> that
>>>>>           
>>>>>> it conflicts with Anthony's hypercall patches.  FWIW I like 
>>>>>> Anthony's
>>>>>> patching thing, and don't really care about arg order.  It'd be 
>>>>>> nice if
>>>>>> we could pull in the same direction tho 8)
>>>>>>
>>>>>> Thanks,
>>>>>> Rusty.
>>>>>>                   
>>>>> Good news you're looking at my tree, since the forum I didn't do much
>>>>> since I had to catch up some gazlion other tasks, never the less
>>>>> starting on Sunday I'm back again.
>>>>>
>>>>> Actually, I wanted to rebase my hypercalls over Anhtony's too (except
>>>>> for allowing userspace handling).
>>>>>           
>>>> I thought we discussed just providing a signaling message to 
>>>> userspace for virtio?  It's not strictly necessary to expose 
>>>> hypercalls to userspace in order to implement a virtio backend in 
>>>> userspace.
>>>>
>>>>       
>>>
>>> Yes, that's what I'd like to see too.  Signal a channel.
>>>
>>>   
>> First, I though that this 
>> http://www.mail-archive.com/kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org/msg06230.html 
>>
>> was your latest opinion.
>> Second, regardless of the channel signal notification, there are 
>> still real necessities for userspace hypercall handling:
>> 1. For virtio drivers there is also registration hypercall for 
>> passing the shared memory pfns.
>>    Sure there are other possibilities, but why limit ourselves?
>
> Can you elaborate here?  Using a PCI discover mechanism, you've got 
> your memory already.  Not point in reinventing PCI with hypercalls.
In this case I agree that it should be done using pci/other_bus config 
space.
>
>>
>> 2. For other purposes such as a balloon driver, a deflate/inflate 
>> hypercalls are needed.
>>    Although for x86 mmio/pio can be used but this is not compatible 
>> with other architectures.
>
> Isn't a balloon driver just another virtio device?  Rather, it might 
> be interesting to build a simple RPC mechanism on top of virtio and do 
> things like balloon on top of that.
Currently the balloon driver is not a virtio device but it will become 
one, nevertheless, not all devices must be virtio, and we cannot predict 
all sort
of usages. Even if a device can work over virtio it shouldn't be a 
perquisite.

I have another two new points in favor of userspace hypercall handling:
1. Hypercalls needed for pci pass through devices.
    We have an home grown implementation for pci pass through devices 
that will soon be merged.
     It allows redirecting a physical pci device into a guest.
     The guest kernel issues hypercalls to know whether a device is 
physical or not. It's much more easy to let
     userspace catch them since it is aware of all devices, unlike the 
kernel.

2. Vmexit speeds
   Theoretically, vmcall should be faster than pio/mmio for the bare 
hardware.
   When implementing PV driver, the guest implementation is agnostic to 
the host implementation. For maximum performance
   the host side will use kernel modules while for flexibility a 
userspace implementation will do the job.
   So although vmcall efficiency is neglectable comparing to context 
switch to user, there will be occasions were the host has a PV driver 
backend.

Does it help changing your minds?
Dor

-------------------------------------------------------------------------
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/

  parent reply	other threads:[~2007-09-15 21:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-13  6:21 virtio & hypercall interface? Rusty Russell
     [not found] ` <1189664514.32322.14.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-13 19:21   ` Anthony Liguori
     [not found]     ` <46E98DC0.3050509-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-13 21:26       ` Rusty Russell
     [not found]         ` <1189718818.32322.41.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-13 21:41           ` Anthony Liguori
2007-09-13 20:33   ` Dor Laor
     [not found]     ` <64F9B87B6B770947A9F8391472E032160DA17EF2-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-09-13 20:45       ` Anthony Liguori
     [not found]         ` <46E9A17D.5040205-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-14 16:46           ` Avi Kivity
     [not found]             ` <46EABAD0.40300-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-14 22:31               ` Dor Laor
     [not found]                 ` <46EB0BD8.6040000-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-15  3:06                   ` Rusty Russell
     [not found]                     ` <1189825560.7262.77.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-15  8:05                       ` Avi Kivity
     [not found]                         ` <46EB9245.4010005-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-15  8:32                           ` Rusty Russell
     [not found]                             ` <1189845153.7262.94.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-15  9:38                               ` Avi Kivity
     [not found]                                 ` <46EBA806.6070507-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-16  7:50                                   ` Rusty Russell
     [not found]                                     ` <1189929012.7262.105.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-16  8:57                                       ` Avi Kivity
     [not found]                                         ` <46ECEFEE.6000208-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-16  9:35                                           ` Rusty Russell
     [not found]                                             ` <1189935324.7262.120.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-09-16  9:45                                               ` Avi Kivity
2007-09-15  7:59                   ` Avi Kivity
2007-09-15 17:31                   ` Anthony Liguori
     [not found]                     ` <46EC1709.2080803-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-15 21:56                       ` Dor Laor [this message]
     [not found]                         ` <46EC5515.2020004-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-15 22:49                           ` Anthony Liguori
2007-09-14 16:44   ` Avi Kivity
     [not found]     ` <46EABA59.10808-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-09-14 16:49       ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46EC5515.2020004@qumranet.com \
    --to=dor.laor-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=dor.laor-atKUWr5tajBWk0Htik3J/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox