[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 1/7] x86/xpti: avoid copying L4 page table contents when possible
>>> On 22.03.18 at 16:26, <jgross@xxxxxxxx> wrote: > On 22/03/18 15:31, Jan Beulich wrote: >>>>> On 21.03.18 at 13:51, <jgross@xxxxxxxx> wrote: >>> void write_ptbase(struct vcpu *v) >>> { >>> + if ( this_cpu(root_pgt) && is_pv_vcpu(v) && !is_pv_32bit_vcpu(v) ) >>> + get_cpu_info()->root_pgt_changed = true; >>> write_cr3(v->arch.cr3); >> >> When you come here from e.g. __sync_local_execstate(), you >> don't really need to set the flag. Of course you'll come here again >> before the next 64-bit PV vCPU will make it to restore_all_guest, >> so by the time we make it there the flag will be set anyway. >> However, if you already use such a subtlety, then there's also >> no point excluding 32-bit vCPU-s here (nor in make_cr3()), as >> those will never make it to restore_all_guest. Same then for >> excluding HVM vCPU-s. And I then wonder whether (here or >> more likely in a later patch) the root_pgt check couldn't go away >> as well. > > I'm not sure this is worth it. Patch 3 will re-introduce a conditional > here and it will look rather different (e.g. without the root_pgt > check). So micro-optimizing this patch barely makes any sense. Yes, I've seen that once I made it there. Perhaps worth dropping the two is_*() checks here, but not worry about the root_pgt one. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |