From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: x86: Don't report guest userspace emulation error to userspace, why ? Date: Wed, 09 Dec 2015 17:18:32 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain To: kvm Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51962 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753187AbbLIWSd (ORCPT ); Wed, 9 Dec 2015 17:18:33 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 51AE9C0B0229 for ; Wed, 9 Dec 2015 22:18:33 +0000 (UTC) Received: from aqua (ovpn-113-145.phx2.redhat.com [10.3.113.145]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB9MIWKm009664 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 9 Dec 2015 17:18:32 -0500 Sender: kvm-owner@vger.kernel.org List-ID: Commit a2b9e6c1a35afcc09: KVM: x86: Don't report guest userspace emulation error to userspace Commit fc3a9157d314 ("KVM: X86: Don't report L2 emulation failures to user-space") disabled the reporting of L2 (nested guest) emulation failures to userspace due to race-condition between a vmexit and the instruction emulator. The same rational applies also to userspace applications that are permitted by the guest OS to access MMIO area or perform PIO. This patch extends the current behavior - of injecting a #UD instead of reporting it to userspace - also for guest userspace code. I searched the archives but failed in finding anything. Can someone please explain why this is needed ? Or, why not let userspace decide what to do based on the cpl, whether to continue execution or kill the guest ? Is the assumption here that this is what userspace always wants ?