All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>
Cc: Anton D Kachalov <mouse@mayc.ru>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Lennart Sorensen <lsorense@csclub.uwaterloo.ca>
Subject: [Qemu-devel] Re: POLL: Why do you use kqemu?
Date: Mon, 08 Jun 2009 15:44:12 +0200	[thread overview]
Message-ID: <4A2D15AC.9000004@siemens.com> (raw)
In-Reply-To: <4A2D10FA.2050606@redhat.com>

Avi Kivity wrote:
> Jan Kiszka wrote:
>> Avi Kivity wrote:
>>  
>>> Jan Kiszka wrote:
>>>    
>>>> And the fact that kqemu has to use tcg in order to achieve a reasonable
>>>> performance is rather a disadvantage. The complexity and overhead for
>>>> synchronizing tcg with the in-kernel accelerator is enormous. If there
>>>> were a feasible way to overcome this with kqemu, it would benefit a
>>>> lot.
>>>> But unfortunately there is none (given you don't want to invest
>>>> reasonable efforts).
>>>>         
>>> Note that kvm suffers from something similar (to a smaller magnitude) as
>>> well: if a guest pages in its page tables, kvm knows nothing about it
>>> and will thus have outdated shadows.  To date we haven't encountered a
>>> problem with it, but it's conceivable.  I think Windows can page its
>>> page tables, but maybe it's disabled by default, or maybe it doesn't dma
>>> directly into the page tables.
>>>     
>>
>> Can't follow, always thought that kernel space gets informed when some
>> I/O operation handled by user space modified an "interesting" page.
>>   
> 
> It doesn't.  Host userspace has unrestricted access to guest memory.
> 
>>> Not sure how to fix.  Maybe write protect the host page tables when we
>>>     
>>
>> You mean guest page table?
>>   
> 
> Both :)
> 
> When kvm write protects a guest page table in the shadow page table
> entries pointing to that guest page, it should also write protect the
> guest page table in the host page table entries to the same guest page.

Ah, now I got it. What do other hypervisors do?

> 
>>> shadow a page table, and get an mmu notifier to tell us when its made
>>> writable?  Seems expensive.  Burying head in sand is much easier.
>>>
>>>     
>>
>> Does this still apply to nested paging? I guess (hope) not...
>>   
> 
> No, nested paging brings cancer and cures world peace.  Or something.
> 

Well, then it's probably not worth bothering, at least until a real
guest problem is explainable with this limitation. Are there any
suspicious reports floating around (maybe not only about Windows)?

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

  reply	other threads:[~2009-06-08 13:44 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 21:57 [Qemu-devel] POLL: Why do you use kqemu? Anthony Liguori
2009-06-04 16:55 ` Anton D Kachalov
2009-06-05  0:44   ` Johannes Schindelin
2009-06-05  7:45     ` Gerd Hoffmann
2009-06-05  8:40       ` Tomasz Chmielewski
2009-06-05  9:08         ` Anton D Kachalov
2009-06-05  9:15         ` Gerd Hoffmann
2009-06-05 20:14   ` Lennart Sorensen
2009-06-05 23:23     ` Johannes Schindelin
2009-06-08  0:13       ` Jamie Lokier
2009-06-08  5:59         ` Avi Kivity
2009-06-08 11:57           ` Jamie Lokier
2009-06-08 12:03             ` Avi Kivity
2009-06-08 12:16               ` Jamie Lokier
2009-06-08 12:28                 ` Avi Kivity
2009-06-08 12:44                   ` [Qemu-devel] " Jan Kiszka
2009-06-08 13:06                     ` Avi Kivity
2009-06-08 13:18                       ` Jan Kiszka
2009-06-08 13:24                         ` Avi Kivity
2009-06-08 13:44                           ` Jan Kiszka [this message]
2009-06-08 14:03                             ` Avi Kivity
2009-06-08 12:36               ` Jan Kiszka
2009-06-08 18:25       ` [Qemu-devel] " Lennart Sorensen
2009-06-06 13:27 ` Andreas Färber
2009-06-06 16:02   ` Avi Kivity
2009-06-06 16:29     ` Blue Swirl
2009-06-06 17:02       ` [Qemu-devel] " Jan Kiszka
2009-06-06 17:25         ` Blue Swirl
2009-06-06 17:32           ` Jan Kiszka
2009-06-06 19:15             ` Andreas Färber
2009-06-07  5:43               ` Avi Kivity
2009-06-07  5:01         ` Avi Kivity
2009-06-07  7:35           ` Jan Kiszka
2009-06-07  7:46             ` Avi Kivity
2009-06-07  8:33             ` Blue Swirl
2009-06-07  8:50               ` Jan Kiszka
2009-06-07  9:01                 ` Blue Swirl
2009-06-07  9:25                   ` Jan Kiszka
2009-06-07  9:37                     ` Avi Kivity
2009-06-07  9:47                       ` Jan Kiszka
2009-06-07  9:52                         ` Avi Kivity
2009-06-07  9:56                           ` Jan Kiszka
2009-06-07 10:06                             ` Avi Kivity
2009-06-07 11:13                     ` Blue Swirl
2009-06-07 11:23                       ` Gleb Natapov
2009-06-07 11:26                         ` Blue Swirl
2009-06-07 11:29                           ` Gleb Natapov
2009-06-07 11:39                           ` Avi Kivity
2009-06-07 12:40                             ` Blue Swirl
2009-06-07 12:43                               ` Avi Kivity
2009-06-07 12:52                                 ` Gleb Natapov
2009-06-07 12:56                                   ` Avi Kivity
2009-06-07 13:18                                 ` Blue Swirl
2009-06-07 13:35                                   ` Jan Kiszka
2009-06-07 13:35                                   ` Avi Kivity
2009-06-07 18:37                                     ` Anthony Liguori
2009-06-07 18:40                                       ` Blue Swirl

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=4A2D15AC.9000004@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=lsorense@csclub.uwaterloo.ca \
    --cc=mouse@mayc.ru \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.