Re: [Xen-devel] [PATCH 4/3] x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server
>>> On 13.11.18 at 14:39, wrote: > On 13/11/2018 10:46, Jan Beulich wrote: >> Writes to such pages would need to be handed to the emulator, which we're >> not prepared to do at this point. >> >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -2556,7 +2556,8 @@ static void *_hvm_map_guest_frame(unsign >> >> if ( writable ) >> { >> -if ( unlikely(p2m_is_discard_write(p2mt)) ) >> +if ( unlikely(p2m_is_discard_write(p2mt)) || >> + unlikely(p2mt == p2m_ioreq_server) ) > > Shouldn't we introduce p2m_is_ioreq_server() for consistency and use it > everywhere? I think such abstractions help if multiple types are to be covered; I don't mind them to be used also for single types, but I don't thinks that's overly important. Plus doing so is of course unrelated to this series, as other checks using == already exist. Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 4/3] x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server
On 13/11/2018 10:46, Jan Beulich wrote: > Writes to such pages would need to be handed to the emulator, which we're > not prepared to do at this point. > > Signed-off-by: Jan Beulich > > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -2556,7 +2556,8 @@ static void *_hvm_map_guest_frame(unsign > > if ( writable ) > { > -if ( unlikely(p2m_is_discard_write(p2mt)) ) > +if ( unlikely(p2m_is_discard_write(p2mt)) || > + unlikely(p2mt == p2m_ioreq_server) ) Shouldn't we introduce p2m_is_ioreq_server() for consistency and use it everywhere? Igor > *writable = 0; > else if ( !permanent ) > paging_mark_pfn_dirty(d, _pfn(gfn)); > > > > ___ > Xen-devel mailing list > Xen-devel@lists.xenproject.org > https://lists.xenproject.org/mailman/listinfo/xen-devel > ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 4/3] x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server
>>> On 13.11.18 at 11:54, wrote: >> -Original Message- >> From: Jan Beulich [mailto:jbeul...@suse.com] >> Sent: 13 November 2018 10:47 >> To: xen-devel ; Jan Beulich >> >> Cc: Andrew Cooper ; Paul Durrant >> ; Wei Liu >> Subject: [PATCH 4/3] x86/HVM: hvm_map_guest_frame_rw() should respect >> p2m_ioreq_server >> >> Writes to such pages would need to be handed to the emulator, which we're >> not prepared to do at this point. >> >> Signed-off-by: Jan Beulich > > Patch #4 out of 3? :-) Well - I had realized I should do a pattern search only after sending the first three patches, when seeing further input from Andrew. Yet it didn't seem to make sense to send a v2 right away, or an entirely separate series. > Reviewed-by: Paul Durrant Thanks. Jan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH 4/3] x86/HVM: hvm_map_guest_frame_rw() should respect p2m_ioreq_server
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: 13 November 2018 10:47 > To: xen-devel ; Jan Beulich > > Cc: Andrew Cooper ; Paul Durrant > ; Wei Liu > Subject: [PATCH 4/3] x86/HVM: hvm_map_guest_frame_rw() should respect > p2m_ioreq_server > > Writes to such pages would need to be handed to the emulator, which we're > not prepared to do at this point. > > Signed-off-by: Jan Beulich Patch #4 out of 3? :-) Reviewed-by: Paul Durrant > > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -2556,7 +2556,8 @@ static void *_hvm_map_guest_frame(unsign > > if ( writable ) > { > -if ( unlikely(p2m_is_discard_write(p2mt)) ) > +if ( unlikely(p2m_is_discard_write(p2mt)) || > + unlikely(p2mt == p2m_ioreq_server) ) > *writable = 0; > else if ( !permanent ) > paging_mark_pfn_dirty(d, _pfn(gfn)); > ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel