[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/vm_event: correctly gather gs_shadow value
On Wed, May 1, 2019 at 8:20 AM Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> wrote: > > On 5/1/19 4:58 PM, Tamas K Lengyel wrote: > >>> It might be worth introducing a "sync state from hw" hook which collects > >>> all the data we intend to pass to the introspection agent. > >> > >> You mean adding another hvm hook? > > > > Actually, instead of another hook I think what would make sense it to > > just update vmx_save_vmcs_ctxt to automatically refresh the cached > > register values when it's called with "v == current". Thoughts? > > That's probably the better way to go about it, since otherwise the > xc_hvm_getcontext_partial() hypercall will suffer from the same problem. > (there are two ways of getting guest state: one is via the vm_event > cached values, the other is via the aforementioned hypercall). True, although issuing the hypercall in the vm_event callback is actually fine - that's how I found the issue to begin with, since the vCPU will be scheduled out with the cached registers refreshed and thus be different then what the vm_event itself had. But other callers of the hypercall can run into the problem if the guest/vcpu is not paused. Tamas _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |