[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v1 0/7] Implement support for external IPT monitoring
On Wed, Jun 17, 2020 at 10:20:20PM +0200, Michał Leszczyński wrote: > ----- 17 cze 2020 o 18:19, Andrew Cooper andrew.cooper3@xxxxxxxxxx napisał(a): > > > On 17/06/2020 04:02, Tamas K Lengyel wrote: > >> On Tue, Jun 16, 2020 at 2:17 PM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > >> wrote: > >>> On 16/06/2020 19:47, Michał Leszczyński wrote: > >>>> ----- 16 cze 2020 o 20:17, Andrew Cooper andrew.cooper3@xxxxxxxxxx > >>>> napisał(a): > >>>> > >>>>> Are there any restrictions on EPT being enabled in the first place? I'm > >>>>> not aware of any, and in principle we could use this functionality for > >>>>> PV guests as well (using the CPL filter). Therefore, I think it would > >>>>> be helpful to not tie the functionality to HVM guests, even if that is > >>>>> the only option enabled to start with. > >>>> I think at the moment it's not required to have EPT. This patch series > >>>> doesn't > >>>> use any translation feature flags, so the output address is always a > >>>> machine > >>>> physical address, regardless of context. I will check if it could be > >>>> easily > >>>> used with PV. > >>> If its trivial to add PV support then please do. If its not, then don't > >>> feel obliged, but please do at least consider how PV support might look > >>> in the eventual feature. > >>> > >>> (Generally speaking, considering "how would I make this work in other > >>> modes where it is possible" leads to a better design.) > >>> > >>>>> The buffer mapping and creation logic is fairly problematic. Instead of > >>>>> fighting with another opencoded example, take a look at the IOREQ > >>>>> server's use of "acquire resource" which is a mapping interface which > >>>>> supports allocating memory on behalf of the guest, outside of the guest > >>>>> memory, for use by control tools. > >>>>> > > > One thing that remains unclear to me is the "acquire resource" part. Could > you give some more details on that? > > Assuming that buffers are allocated right from the domain creation, what > mechanism (instead of xc_map_foreign_range) should I use to map the IPT > buffers into Dom0? Take a look at demu's demu_initialize function [0] (and it's usage of xenforeignmemory_map_resource), you likely need something similar for the trace buffers, introducing a new XENMEM_resource_trace_data kind of resource (naming subject to change), and use the id field in xen_mem_acquire_resource to signal which vCPU buffer you want to map. That's usable by both PV and HVM guests. Roger. [0] http://xenbits.xen.org/gitweb/?p=people/pauldu/demu.git;a=blob;f=demu.c;h=f785b394d0cf141dffa05bdddecf338214358aea;hb=refs/heads/master#l453
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |