Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Andy Lutomirski
On Mon, May 18, 2020 at 1:50 AM Anastassios Nanos wrote: > > On Mon, May 18, 2020 at 10:50 AM Marc Zyngier wrote: > > > > On 2020-05-18 07:58, Anastassios Nanos wrote: > > > To spawn KVM-enabled Virtual Machines on Linux systems, one has to use > > > QEMU, or some other kind of VM monitor in

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Maxim Levitsky
On Mon, 2020-05-18 at 13:51 +0200, Paolo Bonzini wrote: > On 18/05/20 13:34, Maxim Levitsky wrote: > > > In high-performance configurations, most of the time virtio devices are > > > processed in another thread that polls on the virtio rings. In this > > > setup, the rings are configured to not

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Paolo Bonzini
On 18/05/20 13:34, Maxim Levitsky wrote: >> In high-performance configurations, most of the time virtio devices are >> processed in another thread that polls on the virtio rings. In this >> setup, the rings are configured to not cause a vmexit at all; this has >> much smaller latency than even a

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Maxim Levitsky
On Mon, 2020-05-18 at 13:18 +0200, Paolo Bonzini wrote: > On 18/05/20 10:45, Anastassios Nanos wrote: > > Being in the kernel saves us from doing unneccessary mode switches. > > Of course there are optimizations for handling I/O on QEMU/KVM VMs > > (virtio/vhost), but essentially what happens is

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Paolo Bonzini
On 18/05/20 10:45, Anastassios Nanos wrote: > Being in the kernel saves us from doing unneccessary mode switches. > Of course there are optimizations for handling I/O on QEMU/KVM VMs > (virtio/vhost), but essentially what happens is removing mode-switches (and > exits) for I/O operations -- is

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Thomas Gleixner
Anastassios Nanos writes: > On Mon, May 18, 2020 at 11:43 AM Thomas Gleixner wrote: >> >> And this shows clearly how simple the user space is which is required to >> do that. So why on earth would we want to have all of that in the >> kernel? >> > well, the main idea is that all this

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Vitaly Kuznetsov
Anastassios Nanos writes: > Moreover, it doesn't involve *any* mode switch at all while printing > out the result of the addition of these two registers -- which I > guess for a simple use-case like this it isn't much. > But if we were to scale this to a large number of exits (and their >

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Thomas Gleixner
Anastassios Nanos writes: > To spawn KVM-enabled Virtual Machines on Linux systems, one has to use > QEMU, or some other kind of VM monitor in user-space to host the vCPU > threads, I/O threads and various other book-keeping/management mechanisms. > This is perfectly fine for a large number of

Re: [PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Marc Zyngier
On 2020-05-18 07:58, Anastassios Nanos wrote: To spawn KVM-enabled Virtual Machines on Linux systems, one has to use QEMU, or some other kind of VM monitor in user-space to host the vCPU threads, I/O threads and various other book-keeping/management mechanisms. This is perfectly fine for a

[PATCH 0/2] Expose KVM API to Linux Kernel

2020-05-18 Thread Anastassios Nanos
To spawn KVM-enabled Virtual Machines on Linux systems, one has to use QEMU, or some other kind of VM monitor in user-space to host the vCPU threads, I/O threads and various other book-keeping/management mechanisms. This is perfectly fine for a large number of reasons and use cases: for instance,