From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [nVMX w/ Haswell] KVM unit-tests in L1 - eventinj test fails trying to send NMI Date: Wed, 26 Jun 2013 08:28:11 +0200 Message-ID: <51CA89FB.9070503@web.de> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2VNFHHNWBOLIQRHPBAHSB" Cc: "kvm@vger.kernel.org" , "Nakajima, Jun" , "Ren, Yongjie" To: Kashyap Chamarthy Return-path: Received: from mout.web.de ([212.227.17.11]:55349 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751309Ab3FZG2Y (ORCPT ); Wed, 26 Jun 2013 02:28:24 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VNFHHNWBOLIQRHPBAHSB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-06-05 11:06, Kashyap Chamarthy wrote: > Adding Jan, Jun, to see if they have any inputs here. Thanks for the note, it's very helpful! This test actually fails on older CPUs as well, and I can finally reproduce the issue that Jay also reported. I'm not able to "cure" it by going back to 3b656cf764^, just alter the error report. Anyway, a start. Now I just need time to debug it= =2E.. Jan >=20 > /kashyap >=20 > On Tue, Jun 4, 2013 at 6:14 PM, Kashyap Chamarthy wrote: >> Heya, >> >> So, I invoked this in L1 with: >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> [test@foo kvm-unit-tests]$ time qemu-system-x86_64 -enable-kvm -device= >> pc-testdev -serial stdio -nographic -no-user-config -nodefaults >> -device >> isa-debug-exit,iobase=3D0xf4,iosize=3D0x4 -kernel ./x86/eventinj.flat = | >> tee /var/tmp/eventinj-test.txt >> enabling apic >> paging enabled >> cr0 =3D 80010011 >> cr3 =3D 7fff000 >> cr4 =3D 20 >> Try to divide by 0 >> DE isr running divider is 0 >> Result is 150 >> DE exception: PASS >> Try int 3 >> BP isr running >> After int 3 >> BP exception: PASS >> Try send vec 33 to itself >> irq1 running >> After vec 33 to itself >> vec 33: PASS >> Try int $33 >> irq1 running >> After int $33 >> int $33: PASS >> Try send vec 32 and 33 to itself >> irq1 running >> irq0 running >> After vec 32 and 33 to itself >> vec 32/33: PASS >> Try send vec 32 and int $33 >> irq1 running >> irq0 running >> After vec 32 and int $33 >> vec 32/int $33: PASS >> Try send vec 33 and 62 and mask one with TPR >> irq1 running >> After 33/62 TPR test >> TPR: PASS >> irq0 running >> Try send NMI to itself >> After NMI to itself >> NMI: FAIL >> Try int 33 with shadowed stack >> irq1 running >> After int 33 with shadowed stack >> int 33 with shadowed stack: PASS >> >> summary: 9 tests, 1 failures >> >> real 0m0.647s >> user 0m0.164s >> sys 0m0.146s >> [test@foo kvm-unit-tests]$ >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> Any hints on further debugging this ? >> >> >> Other info: >> -------------- >> >> - L1's qemu-kvm CLI >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> # ps -ef | grep -i qemu >> qemu 5455 1 94 Jun02 ? 1-07:14:29 >> /usr/bin/qemu-system-x86_64 -machine accel=3Dkvm -name regular-guest -= S >> -machine pc-i440fx-1.4,accel=3Dkvm,usb=3Doff -cpu Haswell,+vmx -m 1024= 0 >> -smp 4,sockets=3D4,cores=3D1,threads=3D1 -uuid >> 4ed9ac0b-7f72-dfcf-68b3-e6fe2ac588b2 -nographic -no-user-config >> -nodefaults -chardev >> socket,id=3Dcharmonitor,path=3D/var/lib/libvirt/qemu/regular-guest.mon= itor,server,nowait >> -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol -rtc base=3Dutc= >> -no-shutdown -device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x= 2 >> -drive file=3D/home/test/vmimages/regular-guest.qcow2,if=3Dnone,id=3Dd= rive-virtio-disk0,format=3Dqcow2,cache=3Dnone >> -device virtio-blk-pci,scsi=3Doff,bus=3Dpci.0,addr=3D0x4,drive=3Ddrive= -virtio-disk0,id=3Dvirtio-disk0,bootindex=3D1 >> -netdev tap,fd=3D23,id=3Dhostnet0,vhost=3Don,vhostfd=3D24 -device >> virtio-net-pci,netdev=3Dhostnet0,id=3Dnet0,mac=3D52:54:00:80:c1:34,bus= =3Dpci.0,addr=3D0x3 >> -chardev pty,id=3Dcharserial0 -device >> isa-serial,chardev=3Dcharserial0,id=3Dserial0 -device usb-tablet,id=3D= input0 >> -device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x5 >> root 12255 5419 0 08:41 pts/2 00:00:00 grep --color=3Dauto -i= qemu >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> >> - Setup details -- >> https://github.com/kashyapc/nvmx-haswell/blob/master/SETUP-nVMX.rst >> >> /kashyap ------enig2VNFHHNWBOLIQRHPBAHSB 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/ iEYEARECAAYFAlHKifsACgkQitSsb3rl5xRQnQCgkcSAjNotHBVyhVLJMb77uTDI LacAnjrimlmF+30KrM3BhkXO24tsyRVJ =hru0 -----END PGP SIGNATURE----- ------enig2VNFHHNWBOLIQRHPBAHSB--