From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754013AbdKNSJk (ORCPT ); Tue, 14 Nov 2017 13:09:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38424 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753018AbdKNSJa (ORCPT ); Tue, 14 Nov 2017 13:09:30 -0500 Subject: Re: [PATCH] x86,kvm: move qemu/guest FPU switching out to vcpu_run To: Rik van Riel , David Hildenbrand Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rkrcmar@redhat.com, borntraeger@de.ibm.com References: <20171114001223.441ea2ca@annuminas.surriel.com> <1510682877.30057.1.camel@redhat.com> From: Paolo Bonzini Message-ID: Date: Tue, 14 Nov 2017 19:09:17 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1510682877.30057.1.camel@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Nhw7iRPiEuMCKra6wFI3d9oGbDMg80VRI" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 14 Nov 2017 18:09:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Nhw7iRPiEuMCKra6wFI3d9oGbDMg80VRI Content-Type: multipart/mixed; boundary="DSodvHMngmEKeve6ignGl2alU8VbiSJlL"; protected-headers="v1" From: Paolo Bonzini To: Rik van Riel , David Hildenbrand Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, rkrcmar@redhat.com, borntraeger@de.ibm.com Message-ID: Subject: Re: [PATCH] x86,kvm: move qemu/guest FPU switching out to vcpu_run References: <20171114001223.441ea2ca@annuminas.surriel.com> <1510682877.30057.1.camel@redhat.com> In-Reply-To: <1510682877.30057.1.camel@redhat.com> --DSodvHMngmEKeve6ignGl2alU8VbiSJlL Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 14/11/2017 19:07, Rik van Riel wrote: > My question is, can the in-kernel emulator code ever > be called from OUTSIDE the KVM_RUN ioctl loop? No, it can't. This makes the patch much more appealing... Paolo > If so, we need to restore the user FPU context before > returning from the emulator code. Given that the current > emulator code does not do that, I suspect this is not > the case. I also see no path from the kvm ioctl into > the emulator code, other than via KVM_RUN. >=20 > The FPU and XSAVE ioctls all work on the saved > vcpu->arch.guest_fpu data, and never directly on the > registers. --DSodvHMngmEKeve6ignGl2alU8VbiSJlL-- --Nhw7iRPiEuMCKra6wFI3d9oGbDMg80VRI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAloLMVAACgkQv/vSX3jH roPJUAgAluvNQspjmgRBFhhM9gyEe3tN9p3oxfWbzd9YnLwburLR7a2ZrcspjU3z ERTR0142pKOX4smbWQoYgwnoK+ViOdrYftFGyzgh/kAhqapzqURrO3Vz1smg47z+ z5Gmk1z7Ziu3mYjD3akZ15RZ5HJqMGLraoqQErEyG82xGlgK+44EPsi5lkQrL9PV cQ0Wx3tsh+zu9GUrCmZRXJ9vadVAhi9NNkkLTr8/5EHUio8NGyIbN16sUmEw+GUI 9k5p40ifEE/PSgLDJnqwLfM7ZUFPtZ+n/qvoEHtveXoB9QvgeyRPNbfVuRe4jmRl G+QGkEil16uPDeP6g6QgFIUWYQjZpw== =4nIH -----END PGP SIGNATURE----- --Nhw7iRPiEuMCKra6wFI3d9oGbDMg80VRI--