[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC v1] x86/emulate: Send vm_event form emulate
On Thu, Jan 10, 2019 at 5:40 PM Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx> wrote: > > > >>> > >>> Newline. > >>> > >>>> + default: > >>>> + return false; > >>>> + } > >>> > >>> I'm not sure the switch is needed, you can't have a PFEC_write_access > >>> for example if the p2m type is p2m_access_w or p2m_access_rw, hence it > >>> seems like it could be simplified to only take the pfec into account? > >> > >> It is possible to have PFEC_write_access and p2m_access_w but then there > >> is no violation and the event will not be sent. > > > > I'm not sure I follow. PFEC is a way to signal a page fault, hence it > > would make no sense to for example get PFEC_write_access if the access > > is p2m_access_w? > > > Yes, normally pfec (page fault error code) does what the name implies > but in this case the pfec var is constructed in the caller function. > > Let's take for example hvmemul_write() pfec here has always > PFEC_write_access so every emulated write will have this no matter if is > a fault or not and that is what I am checking. If in fact there is a > fault then the event is sent. OK, this seems weird but you are right that hvmemul_write will always pass PFEC_write_access to hvmemul_map_linear_addr. Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |