[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/traps: Correct overly-general assertion introduced in c/s d5c251c



>>> On 14.12.16 at 14:56, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 14/12/16 12:52, Jan Beulich wrote:
>>>>> On 14.12.16 at 12:35, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> The assertion about guest paging mode must only apply to guest pagefaults.
>>>
>>> This ASSERT() accidentally also trips if Xen takes a pagefault when in HVM
>>> context, such as a copy_to_user() failure in the shadow pagetable code.
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>>
>> But isn't the other piece the original patch touched in the same
>> function suffering a similar problem? I.e. can't this mis-trigger
>> when dealing with a page fault in Xen while in the context of a
>> HVM guest in log-dirty mode, and hence needs re-adding the
>> !paging_mode_external() check (or alternatively using
>> paging_mode_only_log_dirty() instead of paging_mode_log_dirty())?
> 
> Good point, although it should still be guest_mode() to be more clearly
> avoiding the hypervisor case.

Remember the old comment you've replaced: This code appears to
be meant to also take care of certain hypervisor faults (I guess
when accessing guest memory while the guest is in log-dirty mode).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.