From: Marius Vlad Subject: Re: [PATCH v3] kvm-unit-tests : Basic architecture of VMX nested test case Date: Tue, 30 Jul 2013 13:51:17 +0200 Message-ID: <20130730115115.GA4324@lea.sec.uni-passau.de> References: <1375020009-6225-1-git-send-email-yzt356@gmail.com> <20130730073115.GA2085@lea.sec.uni-passau.de> <20130730074212.GN18009@redhat.com> <20130730075946.GA4010@lea.sec.uni-passau.de> <20130730080716.GO18009@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Cc: Gleb Natapov , kvm , Jan Kiszka , Paolo Bonzini To: Arthur Chunqi Li Return-path: Received: from tom.rz.uni-passau.de ([132.231.51.4]:48284 "EHLO tom.rz.uni-passau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834Ab3G3LvW (ORCPT ); Tue, 30 Jul 2013 07:51:22 -0400 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2013 at 11:14:38AM +0200, Arthur Chunqi Li wrote: > On Tue, Jul 30, 2013 at 4:07 PM, Gleb Natapov wrote: > > On Tue, Jul 30, 2013 at 09:59:47AM +0200, Marius Vlad wrote: > >> Hi Gleb, > >> > >> On Tue, Jul 30, 2013 at 09:42:12AM +0200, Gleb Natapov wrote: > >> > On Tue, Jul 30, 2013 at 09:31:17AM +0200, Marius Vlad wrote: > >> > > Hi Arthur, > >> > > > >> > > I'm trying to test your patch on a SandyBridge machine. > >> > > > >> > > Used 'nested=3D1' when loading kvm (from 3.9-1-amd64) > >> > Should be kvm-intel, but you will get error otherwise, so I assume t= hat > >> > this is what you did. > >> Indeed. > >> > > >> > > and qemu (emulator version 1.5.1 (Debian 1.5.0+dfsg-5)). > >> > > > >> > > Without nested=3D1 I get ``unhandled excecption 13'', so I pres= ume > >> > > this is OK, with it, the test_vmx_capability() fails at > >> > > detecting vmx. > >> > > > >> > > I've used for qemu: > >> > > $ qemu-system-x86_64 -enable-kvm -device pc-testdev -device > >> > > isa-debug-exit,iobase=3D0xf4,iosize=3D0x4 -display none -serial= stdio -device > >> > > pci-testdev -kernel x86/vmx.flat -cpu SandyBridge,+vmx,+x2apic = -smp 1 > >> > > > >> > > Are there any knobs which I should further tune? > >> > > > >> > On the first glance you have everything that is needed. What is the = output of > >> > "cat /proc/cpuinfo" in the guest is? > > I checked what test_vmx_capability() is actually doing and it uses > > MSR_IA32_FEATURE_CONTROL MSR which is not supported in your version of > > kernel. You need b3897a49e22fc173efa77527a447c714f753f681 commit, it is > > not in any released version of kernel yet. You can just omit the test. > Hi Marius, >=20 > What Gleb said is generally right and I have some additional > information. This patch is ongoing as well as fixing some existing > bugs when developing. You can refer to [1] to get all the relevant bug > fix patches. For kernel, you'd better git clone kvm kernel from [2] > and checkout to "next" branch and make it. Some patches are on kvm's > wait queue and are not merged into master. I somehow hinted that I require an upstream version of kvm. Thanks for pointing the queue branch. The tests pass now. >=20 > Thanks, > Arthur >=20 > [1] http://wiki.qemu.org/Features/KVMNestedVirtualizationTestsuite > [2] https://git.kernel.org/cgit/virt/kvm/kvm.git/ > > > > -- > > Gleb. --9amGYk9869ThD9tj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQIcBAEBAgAGBQJR96ixAAoJEAEQsoLkdw1N4gAP/RGVWGMW8DW9DBiO37etvj2V YyV+26T3407RyibMDT6xQA8XoheuQc8WZR1UE6QzvhhKkusbomydz5gZ4+BTJeYc TGqFJDYmVkffiMoSxfLPwmT4qyk95lU8fR3P/vzcDQw403izEOxFpunemNtQF2hT bxFV9cyd9OuNK48Ey+MLWmu5vcu14YonS5Nh7tbWC8Q3ZlwTkb26js0ayBWs/Mgg 8aLvHfgKusK30ZrnYvB9o3gE3XjGrVTWZ43CyJCdQTV5TPwmPFjdUKTBpmV6uVo7 H5MR9FiadHyDRZu65kzoLZYgRDlvNr2+wC/H+6/4zg/ikM8S/aUWN1TFUJdPM+A8 3CWyyjOhYxBBac3IbQRVP6w5KBu8Qea6LT7ngvO0sEzBPLB2oAWvpVzjx3EdFXOf Yv4DOTg+6ga1aYh+4wHBxER02Izzv2faV2u4ozU8x9zLNZC589c18K8BWjcHF4HN QHrWXw5Dzde/Lg3sUKmAms9MTxp/rGCjUvRn8bQ2uxKjAvrTyKvb9j4OmZZVe3CM iy1vLfptdQAjIwUvPhMvcM8bO35hRrRoakkHub3vsGXhKcqJf9NFxxis00pUlUvx iepv6KID8kcOfxrwr22duMoE41x5Cz+hiNnfJgR12b+5F4iE8zPGe36YJX46xRH2 02ZZ1yLng94RmBSx4O5u =xCJ5 -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--