From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH 2/2] pio cleanup, split kvm_setup_pio() in two functions Date: Fri, 03 Aug 2007 16:58:07 +0200 Message-ID: <46B3427F.6090807@bull.net> References: <10EA09EFD8728347A513008B6B0DA77A01E0084D@pdsmsx411.ccr.corp.intel.com> <46B33F71.5000605@bull.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0390062943==" Cc: kvm-devel To: Laurent Vivier Return-path: In-Reply-To: <46B33F71.5000605-6ktuUTfB/bM@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0390062943== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig966E58C8C04A55410A1FD37A" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig966E58C8C04A55410A1FD37A Content-Type: multipart/mixed; boundary="------------040908000209040606090409" This is a multi-part message in MIME format. --------------040908000209040606090409 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Laurent Vivier wrote: > Dong, Eddie wrote: >> kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org wrote: >>>>> I may confuse you. Currently master doesn't do in kernel PIO >>>>> emulation, all string PIO will go to user level which is fine. Wit= h >>>>> lapic3, we have kernel PIO emulation for PIC. Linux doesn;t use >>>>> string PIO for PIC (port 0x20/0x21) but XP and Win2003 does. So can= >>>>> u test kernel string PIO? >>>> Yes, I should be able, just explain me what and how... >>>> >>>> Laurent >>> Just check out both lapic3 user & kernel branch >>> (may need to rebase to master). And try to boot XP >>> guest like you do for master. >>> thanks, eddie >> BTW, I did a quick try, it broke Windows XP & 2003. >> in kernel PIC get wrong initial value (port 0x20). >=20 > I think I know why it doesn't work: I suppose when it exits from kvm_se= tup_pio() > that pio.count is different from 0... which is not the case with in-ker= nel io. this little patch makes it working... (It took me more time to fight against git than to find where was the bug= =2E.. :-P ) Laurent --=20 ------------- Laurent.Vivier-6ktuUTfB/bM@public.gmane.org -------------- "Software is hard" - Donald Knuth --------------040908000209040606090409 Content-Type: text/plain; name="lapic3-ins_outs" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="lapic3-ins_outs" Index: kvm/drivers/kvm/kvm_main.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- kvm.orig/drivers/kvm/kvm_main.c 2007-08-03 16:46:40.000000000 +0200 +++ kvm/drivers/kvm/kvm_main.c 2007-08-03 16:52:51.000000000 +0200 @@ -1321,8 +1321,9 @@ emulate_ctxt.fs_base =3D get_segment_base(vcpu, VCPU_SREG_FS); =20 vcpu->mmio_is_write =3D 0; + vcpu->pio.string =3D 0; r =3D x86_emulate_memop(&emulate_ctxt, &emulate_ops); - if (r && vcpu->pio.count) + if (vcpu->pio.string) return EMULATE_DO_MMIO; =20 if ((r || vcpu->mmio_is_write) && run) { --------------040908000209040606090409-- --------------enig966E58C8C04A55410A1FD37A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.7 (GNU/Linux) iD8DBQFGs0KD9Kffa9pFVzwRAlhdAKDIyqLzNlNoWQCyS8n1R6H5UjstNACfa04N kAWf05gD2kebCK5PwgWzjWU= =Zo5q -----END PGP SIGNATURE----- --------------enig966E58C8C04A55410A1FD37A-- --===============0390062943== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ --===============0390062943== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0390062943==--