On 06.03.2024 11:33, Andrew Cooper wrote: > On 05/03/2024 2:04 pm, Jan Beulich wrote: >> --- a/xen/arch/x86/x86_64/entry.S >> +++ b/xen/arch/x86/x86_64/entry.S >> @@ -52,7 +52,7 @@ UNLIKELY_END(syscall_no_callback) >> movq %rax,TRAPBOUNCE_eip(%rdx) >> movb %cl,TRAPBOUNCE_flags(%rdx) >> call create_bounce_frame >> - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) >> + andb $~(X86_EFLAGS_DF >> 8), UREGS_eflags + 1(%rsp) > > The other adjustments are fine, but what on earth are we doing with DF here? > > This looks straight up buggy. We've got no legitimate reason to be > playing with the guest's view of DF.
This is the PV equivalent of the SYSCALL_MASK MSR, isn't it? With it not really being an (emulated) MSR, but an agreement that guests will only ever care about having DF cleared (besides the requested way of dealing with the event mask). One of the many things not written down anywhere ... Jan
