qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v8 0/5] hypertrace: Lightweight guest-to-QEMU tr


From: Lluís Vilanova
Subject: Re: [Qemu-devel] [PATCH v8 0/5] hypertrace: Lightweight guest-to-QEMU trace channel
Date: Thu, 31 Aug 2017 18:13:21 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Stefan Hajnoczi writes:

> On Fri, Aug 25, 2017 at 08:34:54PM -0400, Emilio G. Cota wrote:
>> On Sun, Jul 30, 2017 at 17:08:18 +0300, Lluís Vilanova wrote:
>> > The hypertrace channel allows guest code to emit events in QEMU (the host) 
>> > using
>> > its tracing infrastructure (see "docs/trace.txt"). This works in both 
>> > 'system'
>> > and 'user' modes, is architecture-agnostic and introduces minimal noise on 
>> > the
>> > guest.
>> > 
>> > See first commit for a full description, use-cases and an example.
>> > 
>> > Signed-off-by: Lluís Vilanova <address@hidden>
>> 
>> This would be indeed very useful once TCG instrumentation is in place.
>> 
>> However, I'm not very excited about this being PCI-only and Linux-only for
>> system mode
>> I wonder how we could make this work on all hosts -- did you consider using
>> "magic" instructions? We'd need a different magic instruction for each
>> guest ISA, but the library would hide that anyway (and the library code
>> would be the same for user and system modes).

> Magic instructions can potentially be implemented more efficiently in
> TCG too.  They wouldn't work under KVM/HAX/hvf accelerators though.

Yes, we discussed this on the first version of this series long ago. The special
device makes it work on both TCG and KVM (if it were possible to implement a
TCG-to/from-KVM mode switch that'd be awesome).

Also, both approaches have negligible performance impact on the *guest* time.


Cheers,
  Lluis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]