On 25 Nov 2016 12:27 a.m., <[email protected]> wrote:


On Thursday, 24 November 2016 15:17:13 UTC+11, Jean-Philippe Ouellet wrote:

> On Wed, Nov 23, 2016 at 11:06 PM,  <[email protected]> wrote:
> > qubes_gui_daemon contains next to no code and has next to no
> functionality
> > in it.
>
> I'm sorry, but you are simply mistaken:
>
> [user@fedora-23-dvm]/tmp% git clone https://github.com/QubesOS/qub
> es-gui-daemon
> Cloning into 'qubes-gui-daemon'...
> remote: Counting objects: 4559, done.
> remote: Compressing objects: 100% (50/50), done.
> remote: Total 4559 (delta 25), reused 0 (delta 0), pack-reused 4507
> Receiving objects: 100% (4559/4559), 1.27 MiB | 0 bytes/s, done.
> Resolving deltas: 100% (2625/2625), done.
> Checking connectivity... done.
> [user@fedora-23-dvm]/tmp% cd qubes-gui-daemon
> [user@fedora-23-dvm]/tmp/qubes-gui-daemon% cloc .
>       53 text files.
>       51 unique files.
>       19 files ignored.
>
> github.com/AlDanial/cloc v 1.70  T=0.41 s (86.2 files/s, 17638.1 lines/s)
> -------------------------------------------------------------------------------
>
> Language                     files          blank        comment
> code
> -------------------------------------------------------------------------------
>
> C                               12            511            626
> 4320
> C/C++ Header                    12            253            457
>  441
> Python                           1             27            123
>  179
> make                             7             27             65
>  101
> XML                              1              0              3
>   13
> YAML                             1              0              1
>    8
> Bourne Shell                     1              1              0
>    2
> -------------------------------------------------------------------------------
>
> SUM:                            35            819           1275
> 5064
> ------------------------------------------------------------------
>

Now for my questions (since the code is NOT commented).

Where does it do everything?


Stupid answer would be "in the code". Less silly is in the main event loop.
If is not threaded or asynchronous in any way.

What is it that actually listens?


Libvchan. So, essentially, Linux kernel on a Xen hypercall.

How does it listen?


It opens a Xen event channel to receive new data from the VM. This works
similarly to select syscall on a file.
The data is available in a shared memory buffer managed by Xen gntdev and
evtchn, and finally, the hypervisor.

Note that I haven't checked lately the support for KVM, someone else will
have to speak up.

What protocol does it use?



Custom simple protocol with uncompressed images. Those are relayed from a
composing window manager in the VM.
This part is actually documented.

R. Sz. (not a Qubes dev)

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/CAAmECqTR--a32viZutQuXtfrwzPZchfjrWWaSyXGF6FtaXd6aQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to