Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-10-22 Thread Avi Kivity
Yang, Sheng wrote: > Yeah. We must map guest virtual address of apic page to some determined > hpa(4k aligned), then we write this hpa to vmcs for cpu handling apic > access vmexit. > > Ah of course. The processor traps on the physical address, not the virtual address. -- error compiling c

Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-10-22 Thread Yang, Sheng
Yeah. We must map guest virtual address of apic page to some determined hpa(4k aligned), then we write this hpa to vmcs for cpu handling apic access vmexit. Avi Kivity wrote: > Yang, Sheng wrote: >> Thanks for your advice. :) >> >> It have nothing to do with smp, though each domain shares one >>

Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-10-22 Thread Avi Kivity
Yang, Sheng wrote: > Thanks for your advice. :) > > It have nothing to do with smp, though each domain shares one > apic_access_page now. In fact, currently this page won't be accessed, > just a address mark for cpu. > > You mean, all that's necessary is that the virtual address be mapped so

Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-10-22 Thread Yang, Sheng
Thanks for your advice. :) It have nothing to do with smp, though each domain shares one apic_access_page now. In fact, currently this page won't be accessed, just a address mark for cpu. Avi Kivity wrote: > Yang, Sheng wrote: >> Hi Avi, >> >> I've been work on other things for long time, so t

Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-10-22 Thread Avi Kivity
Yang, Sheng wrote: > Hi Avi, > > I've been work on other things for long time, so this patch delayed for > a while. I am planning to post it out recently, but found that, because > of userspace allocate memory patch, rmap was moved to memslot. So your > suggestion on deal it with gfn_to_page seems

Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-10-22 Thread Yang, Sheng
Hi Avi, I've been work on other things for long time, so this patch delayed for a while. I am planning to post it out recently, but found that, because of userspace allocate memory patch, rmap was moved to memslot. So your suggestion on deal it with gfn_to_page seems got a little trouble. And I d

Re: [kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-09-25 Thread Avi Kivity
Yang, Sheng wrote: > These patches enable memory mapped TPR shadow (FlexPriority). > > Since TPR is accessed very frequently by 32bit Windows, especially SMP > guest, with FlexPriority enabled, we saw significant performance gain. > > The issue is: FlexPriority needs to add a memory slot to the vm

[kvm-devel] [RFC][PATCH]Memory mapped TPR shadow feature enabling

2007-09-24 Thread Yang, Sheng
These patches enable memory mapped TPR shadow (FlexPriority). Since TPR is accessed very frequently by 32bit Windows, especially SMP guest, with FlexPriority enabled, we saw significant performance gain. The issue is: FlexPriority needs to add a memory slot to the vm to make shadow work with APIC