Re: [RFT] kvm with Windows optimization

Avi Kivity
2007-10-26T10:01:29Z

Dong, Eddie wrote:
>>>
>>>
>> Thanks for the hint; I'll add that. I think Vista hits the tpr much
>> less frequently, so it can work well without the optimization.
>>
>>
> Curious: How do u know ROM is mapped 0xf00000000 in Windows?
> Eddie
>
>
> kvm_get_sregs(kvm_context, env->cpu_index, &sregs);
>
> probe = (rip & 0xf0000000) + 0xe0000;
> phys = map_addr(&sregs, probe, &perms);
> if (phys != 0xe0000)
> return 0;
> printf("bios ok at %lx\n", (long)probe);
>

I checked :)

It's actually not mapped at 0xf0000000. On normal Windows XP it is
mapped at 0x80000000, with /3GB it is mapped at 0xe0000000. The code
checks it is within the same 256MB segment as the code that's hitting
tpr. It could probably be improved.

--
error compiling committee.c: too many arguments to function