Laurent Vivier wrote:
> Dong, Eddie wrote:
>> [EMAIL PROTECTED] 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.  With
>>>>> 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).
> 
> I think I know why it doesn't work: I suppose when it exits from 
> kvm_setup_pio()
> that pio.count is different from 0... which is not the case with in-kernel io.

this little patch makes it working...
(It took me more time to fight against git than to find where was the bug... 
:-P )

Laurent
-- 
------------- [EMAIL PROTECTED]  --------------
          "Software is hard" - Donald Knuth
Index: kvm/drivers/kvm/kvm_main.c
===================================================================
--- 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 = get_segment_base(vcpu, VCPU_SREG_FS);
 
        vcpu->mmio_is_write = 0;
+       vcpu->pio.string = 0;
        r = x86_emulate_memop(&emulate_ctxt, &emulate_ops);
-       if (r && vcpu->pio.count)
+       if (vcpu->pio.string)
                return EMULATE_DO_MMIO;
 
        if ((r || vcpu->mmio_is_write) && run) {

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
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/
_______________________________________________
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel

Reply via email to