From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: VMX: Fix locking order in handle_invalid_guest_state Date: Sun, 26 Jul 2009 16:23:46 +0200 Message-ID: <4A6C66F2.7010606@web.de> References: <4A678A56.7050901@web.de> <20090723214553.GA10152@amt.cnet> <4A695C1D.7030807@web.de> <4A6C5F4B.2000902@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigA185C6AE0BE6F13B53BD5601" Cc: Marcelo Tosatti , kvm-devel To: Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:60040 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753511AbZGZOXr (ORCPT ); Sun, 26 Jul 2009 10:23:47 -0400 In-Reply-To: <4A6C5F4B.2000902@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigA185C6AE0BE6F13B53BD5601 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > On 07/24/2009 10:00 AM, Jan Kiszka wrote: >> Marcelo Tosatti wrote: >> =20 >>> On Wed, Jul 22, 2009 at 11:53:26PM +0200, Jan Kiszka wrote: >>> =20 >>>> Release and re-acquire preemption and IRQ lock in the same order as >>>> vcpu_enter_guest does. >>>> =20 >>> This should happen in vcpu_enter_guest, before it decides to disable >>> preemption/irqs (so you consolidate the control there). >>> =20 >> >> Maybe, maybe not. handle_invalid_guest_state is an alternative way of >> "executing" guest code, and it currently shares the setup and tear-dow= n >> with vmx_vcpu_run. If it has to share parts that actually require >> preemption and IRQ lock, then moving makes not much sense. Can anyone >> comment on what the requirements for handle_invalid_guest_state are? >> =20 >=20 > Like you said, it's an alternative to vmx entry/exit, so it shares the > same requirements. It must run with interrupts and preemption enabled,= > but any code that normally runs in the entry critical section (like > interrupt injection) must continue to run in a critical section. >=20 >=20 >> I would suggest to merge this fix first and then decide about and >> potentially merge a refactoring patch. >> =20 >=20 > btw, what does it fix? a debug warning? >=20 I haven't seen anything in the wild, and I don't think it would raise a warning. All it should cause is a potential delay of some pending reschedule as preempt_enable will not fire under local_irq_disable. Jan --------------enigA185C6AE0BE6F13B53BD5601 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkpsZvIACgkQniDOoMHTA+n5TACePdDigznFts8aB/yDFgCqesK7 LPgAnjcuygSOT53UNGqSzfdiwwTJJa2t =ngQK -----END PGP SIGNATURE----- --------------enigA185C6AE0BE6F13B53BD5601--