|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/8] x86/vm-event/monitor: relocate code-motion more appropriately
Hi Jan, On 7/4/2016 1:22 PM, Jan Beulich wrote: On 30.06.16 at 20:43, <czuzu@xxxxxxxxxxxxxxx> wrote:--- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -475,8 +475,6 @@ void hvm_do_resume(struct vcpu *v)if ( unlikely(v->arch.vm_event) ) I left that so because of patch 5/8 - specifically, monitor_write_data handling shouldn't depend on the vm_event subsystem being initialized. But you're right, it still does depend on that initialization in this patch, so I should leave the call inside the if (and remove the check inside the function) as you suggest and only get it out in 5/8. Will do that in v2.
Well, a summary of what this function does would sound like: "adjusts CR3 load-exiting for cr-write monitor vm-events". IMHO that's (monitor) vm-event specific enough to be placed within the vm-event subsystem. Could you suggest concretely how this separation would look like? (where to put this function/parts of it (and what parts), what name should it have once moved). Another reason this was done (besides avoiding hackishly doing a CR0 update when we actually need a CR3 update specifically for a vm-event to happen) is keeping symmetry between ARM<->X86 in a future patch that would implement monitor CR vm-events for ARM. In that patch write_ctrlreg_adjust_traps is renamed and implemented per-architecture, on ARM it would have the same job, i.e. updating some hypervisor traps (~ vmx execution controls) for CR vm-events to happen. On a different note, one thing I forgot to do though is to also move the following check (instead of completely removing it from arch_monitor_domctl_event):
if ( VM_EVENT_X86_CR3 == mop->u.mov_to_cr.index )
inside write_ctrlreg_adjust_traps. Will remedy that in v2.
Thanks,
Corneliu.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |