From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932325AbdBHOsn (ORCPT ); Wed, 8 Feb 2017 09:48:43 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:36755 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753378AbdBHOsg (ORCPT ); Wed, 8 Feb 2017 09:48:36 -0500 Subject: Re: [RFC PATCH] KVM: race-free exit from KVM_RUN without POSIX signals To: Christian Borntraeger , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1486552228-26798-1-git-send-email-pbonzini@redhat.com> <21c5c4e8-dd30-6f47-e169-a642e06656cc@de.ibm.com> From: Paolo Bonzini Message-ID: <8da58a9f-5de6-d2af-559d-4b04201f0d87@redhat.com> Date: Wed, 8 Feb 2017 15:10:24 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <21c5c4e8-dd30-6f47-e169-a642e06656cc@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2017 14:18, Christian Borntraeger wrote: >> VCPU thread service thread >> -------------------------------------------------------------- >> raise signal >> signal handler >> set run->immediate_exit >> KVM_RUN >> check run->immediate_exit > So the idea is to have both, a signal and this flag and you want userspace > to set this flag in its signal handler? Yes. This flag can also replace qemu_cpu_kick_self. > So we no longer block this signal > in QEMU then. Makes sense. > Do you have the QEMU patch ready, to do a better review of the whole idea? I have something that seems to work, but I've not stressed it at all and it depends on a few cleanups to the SIGBUS handling code (which is currently x86-specific). Paolo