Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Eduardo Habkost
On Tue, Sep 29, 2020 at 02:28:48AM +, Kang, Luwei wrote: > > > > No, it's not possible. KVM doesn't have a say on what the > > > > processor writes in the tracing packets. > > > > >>> Can KVM refuse to enable packet generation if CSbase is not zero > > > > >>> and CPUID.(EAX=14H,ECX=

RE: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Kang, Luwei
> >> No, if a feature cannot be emulated, that means it cannot be enabled > >> unless it matches the host. That's generally not a problem since > >> Intel PT is usually used only with "-cpu host". > >> > > The limitation of LIP in qemu will mask off the Intel PT in KVM guest > > even with "-cpu ho

RE: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Kang, Luwei
> > > No, it's not possible. KVM doesn't have a say on what the > > > processor writes in the tracing packets. > > > >>> Can KVM refuse to enable packet generation if CSbase is not zero > > > >>> and CPUID.(EAX=14H,ECX=0)[bit 31] seen by guest is different from > host? > > > >> > > > >>

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Paolo Bonzini
On 28/09/20 14:42, Kang, Luwei wrote: >> No, if a feature cannot be emulated, that means it cannot be >> enabled unless it matches the host. That's generally not a problem >> since Intel PT is usually used only with "-cpu host". >> > The limitation of LIP in qemu will mask off the Intel PT in KVM

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Eduardo Habkost
On Mon, Sep 28, 2020 at 12:42:37PM +, Kang, Luwei wrote: > > No, it's not possible. KVM doesn't have a say on what the > > processor writes in the tracing packets. > > >>> Can KVM refuse to enable packet generation if CSbase is not zero and > > >>> CPUID.(EAX=14H,ECX=0)[bit 31] seen

RE: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Kang, Luwei
> No, it's not possible. KVM doesn't have a say on what the > processor writes in the tracing packets. > >>> Can KVM refuse to enable packet generation if CSbase is not zero and > >>> CPUID.(EAX=14H,ECX=0)[bit 31] seen by guest is different from host? > >> > >> Yes, but the processor cou

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-28 Thread Paolo Bonzini
On 28/09/20 07:19, Kang, Luwei wrote: No, it's not possible. KVM doesn't have a say on what the processor writes in the tracing packets. >>> Can KVM refuse to enable packet generation if CSbase is not zero and >>> CPUID.(EAX=14H,ECX=0)[bit 31] seen by guest is different from host? >> >>

RE: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-27 Thread Kang, Luwei
> >> No, it's not possible. KVM doesn't have a say on what the processor > >> writes in the tracing packets. > > Can KVM refuse to enable packet generation if CSbase is not zero and > > CPUID.(EAX=14H,ECX=0)[bit 31] seen by guest is different from host? > > Yes, but the processor could change ope

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-25 Thread Paolo Bonzini
On 25/09/20 22:29, Eduardo Habkost wrote: >> No, it's not possible. KVM doesn't have a say on what the processor >> writes in the tracing packets. > Can KVM refuse to enable packet generation if CSbase is not zero > and CPUID.(EAX=14H,ECX=0)[bit 31] seen by guest is different from > host? Yes, bu

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-25 Thread Eduardo Habkost
On Fri, Sep 25, 2020 at 10:23:49PM +0200, Paolo Bonzini wrote: > On 25/09/20 18:54, Eduardo Habkost wrote: > > On Fri, Sep 25, 2020 at 04:42:26PM +, Strong, Beeman wrote: > >> LIP=0 will differ from LIP=1 behavior only when CSbase is non-zero, which > >> requires 32-bit code. In that case a L

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-25 Thread Paolo Bonzini
On 25/09/20 18:54, Eduardo Habkost wrote: > On Fri, Sep 25, 2020 at 04:42:26PM +, Strong, Beeman wrote: >> LIP=0 will differ from LIP=1 behavior only when CSbase is non-zero, which >> requires 32-bit code. In that case a LIP=0 implementation will provide only >> the EIP offset from CSbase in

RE: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-25 Thread Strong, Beeman
). -Original Message- From: Eduardo Habkost Sent: Friday, September 25, 2020 9:16 AM To: Kang, Luwei Cc: pbonz...@redhat.com; r...@twiddle.net; qemu-devel@nongnu.org; Strong, Beeman Subject: Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT On Tue, Feb 25, 2020 at 05:38

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-25 Thread Eduardo Habkost
o: Kang, Luwei > Cc: pbonz...@redhat.com; r...@twiddle.net; qemu-devel@nongnu.org; Strong, > Beeman > Subject: Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for > Intel PT > > On Tue, Feb 25, 2020 at 05:38:30AM +0800, Luwei Kang wrote: > > The Intel PT pac

Re: [PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-09-25 Thread Eduardo Habkost
On Tue, Feb 25, 2020 at 05:38:30AM +0800, Luwei Kang wrote: > The Intel PT packets which contain IP payloads will have LIP values, and it > will include the CS base component if the CPUID.(EAX=14H,ECX=0H).ECX.[bit31] > is set. But it will disabled the Intel PT in kvm guest because of the need > of

[PATCH v1 1/3] i386: Remove the limitation of IP payloads for Intel PT

2020-02-24 Thread Luwei Kang
The Intel PT packets which contain IP payloads will have LIP values, and it will include the CS base component if the CPUID.(EAX=14H,ECX=0H).ECX.[bit31] is set. But it will disabled the Intel PT in kvm guest because of the need of live migration safe(c078ca9 i386: Disable Intel PT if packets IP pay