From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC PATCH] kvm-unit-tests : Basic architecture of VMX nested test case Date: Wed, 24 Jul 2013 13:25:37 +0200 Message-ID: <51EFB9B1.70306@web.de> References: <1374087242-6125-1-git-send-email-yzt356@gmail.com> <51E78295.2010700@redhat.com> <20130718072652.GB11772@redhat.com> <51E7C7D2.5040303@redhat.com> <20130718110639.GA26173@redhat.com> <51E7DAD3.8000906@redhat.com> <20130718195712.GN13732@redhat.com> <51E8DFCC.8060108@redhat.com> <20130719094027.GY13732@redhat.com> <51E92BE2.1080600@redhat.com> <51EF76E2.2030201@redhat.com> <51EF78B9.9090908@redhat.com> <51EF9B88.5040001@redhat.com> <51EFA688.9040504@web.de> <51EFAB4B.80706@web.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2TVPBRUITKXWPCNBWJHKV" Cc: Paolo Bonzini , Gleb Natapov , kvm To: Arthur Chunqi Li Return-path: Received: from mout.web.de ([212.227.15.14]:63857 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751003Ab3GXLZr (ORCPT ); Wed, 24 Jul 2013 07:25:47 -0400 Received: from mchn199C.mchp.siemens.de ([95.157.58.223]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0MfHfy-1Um3Ah45QQ-00Omtp for ; Wed, 24 Jul 2013 13:25:46 +0200 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2TVPBRUITKXWPCNBWJHKV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 2013-07-24 13:20, Arthur Chunqi Li wrote: > And what about this version: >=20 > static int vmx_run() > { > u32 ret =3D 0; >=20 > asm volatile( > "mov %%rsp, %%rsi\n\t" > "mov %2, %%edi\n\t" > "call vmcs_write\n\t" >=20 > "0: " > LOAD_GPR_C > "cmpl $0, %1\n\t" > "jne 1f\n\t" > "vmlaunch;seta %1\n\t" That doesn't differentiate between CF and ZF (so that you can check if vmlaunch set the right flag). Also, only one instruction per line, please. Jan ------enig2TVPBRUITKXWPCNBWJHKV 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.16 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlHvubcACgkQitSsb3rl5xTRLwCfftx13fvlAddSVRTMucH24TeB xikAoLp/fPCS+ToLG8P5oYqypKAXP2bN =0eYp -----END PGP SIGNATURE----- ------enig2TVPBRUITKXWPCNBWJHKV--