public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Alexander Graf <agraf@suse.de>
Cc: Avi Kivity <avi@redhat.com>,
	Christoffer Dall <cdall@cs.columbia.edu>,
	kvm@vger.kernel.org, a.costa@virtualopensystems.com,
	android-virt@lists.cs.columbia.edu,
	s.raho@virtualopensystems.com
Subject: Re: [Android-virt] [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support
Date: Sun, 05 Jun 2011 20:19:20 +0200	[thread overview]
Message-ID: <4DEBC8A8.6000501@web.de> (raw)
In-Reply-To: <E60651CA-E96B-4D58-B426-9FF69D3C5D97@suse.de>

[-- Attachment #1: Type: text/plain, Size: 3041 bytes --]

On 2011-06-05 20:12, Alexander Graf wrote:
> 
> On 05.06.2011, at 20:04, Jan Kiszka wrote:
> 
>> On 2011-06-05 20:00, Alexander Graf wrote:
>>>
>>> On 05.06.2011, at 19:56, Jan Kiszka wrote:
>>>
>>>> On 2011-06-05 19:54, Alexander Graf wrote:
>>>>>
>>>>> On 05.06.2011, at 19:48, Jan Kiszka wrote:
>>>>>
>>>>>> On 2011-06-05 19:19, Alexander Graf wrote:
>>>>>>>
>>>>>>> On 05.06.2011, at 18:33, Avi Kivity wrote:
>>>>>>>
>>>>>>>> On 06/05/2011 07:30 PM, Alexander Graf wrote:
>>>>>>>>>>>
>>>>>>>>>>> Could you elaborate what you mean here? I'm not really following. Are
>>>>>>>>>>> you suggesting a new arch-generic interface? (Pardon my ignorance).
>>>>>>>>>>
>>>>>>>>>> Using KVM_IRQ_LINE everywhere except s390, not just in x86 and ARM.
>>>>>>>>>
>>>>>>>>> An in-kernel MPIC implementation is coming for PPC, so I don't see any reason to switch from something that works now.
>>>>>>>>
>>>>>>>> Right, this is spilled milk.
>>>>>>>>
>>>>>>>> Does the ppc qemu implementation raise KVM_INTERRUPT solely from the vcpu thread?
>>>>>>>
>>>>>>> Well, without iothread it used to obviously. Now that we have an iothread, it calls ioctl(KVM_INTERRUPT) from a separate thread. The code also doesn't forcefully wake up the vcpu thread, so yes, I think here's a chance for at least delaying interrupt delivery. Chances are pretty slim we don't get out of the vcpu thread at all :).
>>>>>>
>>>>>> There are good chances to run into a deadlock when calling a per-vcpu
>>>>>> IOCTL over a foreign context: calling thread holds qemu_mutex and blocks
>>>>>> on kvm_mutex inside the kernel, target vcpu is running endless guest
>>>>>> loop, holding kvm_mutex, all other qemu threads will sooner or later
>>>>>> block on the global lock. That's at least one pattern you can get on x86
>>>>>> (we had a few of such bugs in the past).
>>>>>
>>>>> Any recommendations? Should we just signal the main thread when we want to inject an interrupt?
>>>>
>>>> Yep. That's also what x86 does (when using user space irqchips).
>>>
>>> Hrm, ok :). I guess the main reason we don't see major issues is that
>>>
>>>  1) people don't use iothread too often yet - is it even enabled by default?
>>
>> Nope (unless you use qemu-kvm.git next).
> 
> Any plans on finally doing that step? Code that isn't enabled by default is pretty prone to not be tested ;). It's a good way to slowly move code upstream, stabilize it there and then finally have it enabled by default. But I don't think this process should last more than 1/2 year. And IIRC with iothread, we're way past that point.

That's getting a bit off-topic for this thread now:

The good news is that 'next' will become 'master' fairly soon (unless
some regression is found), and then we are using QEMU upstream's
iothread code in qemu-kvm. By default.

For upstream, we are still facing TCG performance regressions in
iothread mode, thus it's still default off. $Someone would have to sort
them out, and then we could flip defaults there as well.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2011-06-05 18:19 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 15:03 [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support Christoffer Dall
2011-06-03 15:03 ` [PATCH v3 2/8] ARM: KVM: Hypervisor identity mapping Christoffer Dall
2011-06-03 15:03 ` [PATCH v3 3/8] ARM: KVM: Add hypervisor inititalization Christoffer Dall
2011-06-03 15:03 ` [PATCH v3 4/8] ARM: KVM: Memory virtualization setup Christoffer Dall
2011-06-05 12:41   ` Avi Kivity
2011-06-05 14:50     ` Christoffer Dall
2011-06-05 14:53       ` Avi Kivity
2011-06-05 15:14         ` Avi Kivity
2011-06-05 15:27           ` Christoffer Dall
2011-06-05 16:02             ` Avi Kivity
2011-06-03 15:03 ` [PATCH v3 5/8] ARM: KVM: World-switch implementation Christoffer Dall
2011-06-03 15:04 ` [PATCH v3 6/8] ARM: KVM: Emulation framework and CP15 emulation Christoffer Dall
2011-06-03 15:04 ` [PATCH v3 7/8] ARM: KVM: Handle guest faults in KVM Christoffer Dall
2011-06-05 12:48   ` Avi Kivity
2011-06-11 10:37     ` Christoffer Dall
2011-06-12  8:24       ` Avi Kivity
2011-06-12  8:57         ` Christoffer Dall
2011-06-03 15:04 ` [PATCH v3 8/8] ARM: KVM: Handle I/O aborts Christoffer Dall
2011-06-03 15:31 ` [PATCH v3 1/8] ARM: KVM: Initial skeleton to compile KVM support Jan Kiszka
2011-06-03 15:53   ` Jan Kiszka
2011-06-03 16:19     ` Christoffer Dall
2011-06-03 16:31       ` [Android-virt] " Alexander Graf
2011-06-04 14:13     ` Alexander Graf
2011-06-05 12:21     ` Avi Kivity
2011-06-05 14:13       ` Jan Kiszka
2011-06-05 14:18         ` Avi Kivity
2011-06-05 14:58           ` Jan Kiszka
2011-06-05 15:10             ` Avi Kivity
2011-06-05 15:14               ` Jan Kiszka
2011-06-05 15:18                 ` Avi Kivity
2011-06-05 16:25                 ` Christoffer Dall
2011-06-05 16:28                   ` Avi Kivity
2011-06-05 16:30                     ` [Android-virt] " Alexander Graf
2011-06-05 16:33                       ` Avi Kivity
2011-06-05 17:19                         ` Alexander Graf
2011-06-05 17:48                           ` Jan Kiszka
2011-06-05 17:54                             ` Alexander Graf
2011-06-05 17:56                               ` Jan Kiszka
2011-06-05 18:00                                 ` Alexander Graf
2011-06-05 18:04                                   ` Jan Kiszka
2011-06-05 18:12                                     ` Alexander Graf
2011-06-05 18:19                                       ` Jan Kiszka [this message]
2011-06-06  7:42                               ` Avi Kivity
2011-06-06  7:41                           ` Avi Kivity
2011-06-05 16:24             ` Christoffer Dall
2011-06-05 16:31               ` Avi Kivity
2011-06-05 12:36 ` Avi Kivity
2011-06-05 16:03   ` Christoffer Dall
2011-06-05 16:06     ` Avi Kivity
     [not found]     ` <211B3F42-9B68-41BB-B1FA-348B5500C60A@suse.de>
2011-06-10  8:40       ` [Android-virt] " Christoffer Dall
2011-06-10  9:23         ` Catalin Marinas
2011-06-10  9:53           ` Alexander Graf
2011-06-10  9:58             ` Catalin Marinas
2011-06-10 11:56               ` Christoffer Dall
2011-06-05 12:52 ` Avi Kivity
2011-06-05 14:00   ` Avi Kivity
2011-06-05 14:13     ` Christoffer Dall
2011-06-05 14:18       ` Avi Kivity

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=4DEBC8A8.6000501@web.de \
    --to=jan.kiszka@web.de \
    --cc=a.costa@virtualopensystems.com \
    --cc=agraf@suse.de \
    --cc=android-virt@lists.cs.columbia.edu \
    --cc=avi@redhat.com \
    --cc=cdall@cs.columbia.edu \
    --cc=kvm@vger.kernel.org \
    --cc=s.raho@virtualopensystems.com \
    /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