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

Re: [Xen-devel] VMI: singlestep event not received



On Monday 22 April 2019 12:28, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:

> On 21/04/2019 23:26, Mathieu Tarral wrote:
>
> Answering out of order.
>
> > I discussed this bug on IRC with andyhpp, who convinced me to move the 
> > discussion on the mailing list.
> > Apparently the singlestepping in Xen was in a poor quality state because of 
> > multiple layers of refactoring.
>
> What I said was that x86 is a complete mess.  Various aspects of debug
> behaviour aren't even documented, and have had to be reversed engineered
> after finding security vulnerabilities with how software handles them
> (caused by a lack of documentation).

My bad, i understood that i was related to Xen's code, not just x86.

> > I'm running on Xen packaged by Fedora 29: 4.11.1, in a nested virt 
> > environment on top of KVM.
>
> I didn't realise you were nested on top of KVM.  That definitely isn't
> helping things, and there is an equal chance that you've hit a nested
> virt bug in KVM.
>
> Please try and reproduce it without KVM, to rule out some of the complexity.

I would like to, but Grub cannot boot on Xen's kernel on my machine, i need to 
run it in a VM.

I'm hitting a bug in Fedora where module2.mod and multiboot2.mod are absent:
https://bugzilla.redhat.com/show_bug.cgi?id=1486002

Also, it's not the first time i'm having this bug,
I was already working on Xen 6 months before:
https://github.com/libvmi/libvmi/issues/636


> > The funny thing is that it's always at the same instruction that it fails, 
> > the 106th singlestep,
> > at 0x806d32dc:
> > [0x7c90e514]> s 0x806d32dc
> > [0x806d32dc]> pd 10
> > 0x806d32dc 890d8000feff mov dword [0xfffe0080], ecx
>
> This is a read of the APIC TPR, which is very commonly an operation
> accelerated by hardware (because without it, virtualising windows XP is
> exceedingly slow).
>
> What is your CPU, and how exactly are you trying to singlestep.  Is it
> with MTF, or using the trap flag inside the guest?

My CPU is an Intel i7-8750H.
I'm using the libvmi API, which is enabling the MTF flag to singlestep, if i 
judge by the debug logs.

Thanks.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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