Commit Graph
69 Commits
Author SHA1 Message Date
Quantum f247d7f0da [host] app: don't read from UUID if none is returned
This allows the Linux host to start.
2022-01-26 23:05:31 +11:00
Geoffrey McRae ccdf7b7c0e [host] app: report the full capture name to the client 2022-01-26 19:32:55 +11:00
Geoffrey McRae fd12d9901a [host] app: dont use pointers when realloc may have changed them
This code was completely broken and corrupts the stack, replace it with
something that is actually safe.
2022-01-09 21:19:17 +11:00
Quantum bf059a6eda [host] app: send CPU socket count information 2022-01-07 21:03:20 +11:00
Quantum 194241c5a3 [common] cpuinfo: add sockets to interface 2022-01-07 21:03:20 +11:00
Geoffrey McRae fdb38a227e [host] app: implement stubs for platform specific guest information 2022-01-05 21:04:57 +11:00
Geoffrey McRae b3f6c75ade [host] app: zero memory allocated for lgmp userdata 2022-01-05 20:13:12 +11:00
Geoffrey McRae 952ebea2c5 [all] refresh copyright dates 2022-01-05 19:42:46 +11:00
Geoffrey McRae 0d27092ef5 [all] move min/max and upcast macros into common/util.h 2022-01-05 19:41:57 +11:00
Geoffrey McRae 7cc9b5f77c [host] app: remove debug line and fix my failure to count 2022-01-05 19:25:51 +11:00
Geoffrey McRae 0ccc84959e [host] app: fix out by one compiler warning 2022-01-05 19:23:19 +11:00
Geoffrey McRae ba9f2b85b6 [host/client] kvmfr: update to include extra user data about the VM
This change allows the host to provide information to the client about
how the VM is configured, information such as the UUID, CPU
configuration and capture method both for informational display in the
client as well as debugging in the client's logs.

The format of the records allows this to be extended later with new
record types without needing to bump the KVMFR version.
2022-01-05 19:18:43 +11:00
Geoffrey McRae ac2c62e560 [host] intiialize the app state earlier to prevent ovewriting re-inits
If there is LGMP corruption the LGMP thread will set the state to
REINIT which if this happens early enough will get overwritten if the
inital app state is set too late. Instead set the application initial
state early to avoid this.
2022-01-04 10:40:00 +11:00
Geoffrey McRae 6f39434bdc [host] correct reinit logic when LGMP corruption is detected 2021-12-30 14:34:45 +11:00
Geoffrey McRae 9b202d5566 [host] detect header corruption and re-initialize if so 2021-12-30 13:49:33 +11:00
Quantum 10110dd940 [host] app: support force quitting
This makes it much less painful to develop the host, as sometimes it
hangs and ^C doesn't work.
2021-12-28 19:04:47 +11:00
Geoffrey McRae 9969896876 [host] app: zero the new client sub count
If a new client connects but there has not been a capture timeout the
new client count wont be zeroed on a valid capture. If there is a
timeout later the host will still think there is a new client and
re-send a frame when it should not. This fixes this by reading the value
on a valid frame which zeros the new subs count.
2021-10-20 15:56:35 +11:00
Quantum e05bb196f0 [host] app: print CPU information on startup 2021-08-31 20:14:10 +10:00
Geoffrey McRae 3c3c0f70be [all] bump the LGMP version to obtain access to data serial tracking 2021-08-19 21:29:03 +10:00
Quantum 712dcee07f [host] app: remove useless ALIGN_DN and ALIGN_UP macros 2021-08-14 08:05:18 +10:00
Geoffrey McRae 2856928b57 [host] windows: implement KVMFR_FEATURE_SETCURSORPOS 2021-08-05 22:35:22 +10:00
Quantum 51b9cd4e5a [all] copyright: use unicode copyright sign ©
This is done for consistency with the license strings in appstrings.c.
2021-08-04 21:16:35 +10:00
arcnmx 552a37122a [host] app: add throttleFPS option 2021-07-28 02:47:24 +10:00
Geoffrey McRae dafd7e7b42 [host] app: when running in sync mode send frame repeats as needed 2021-07-25 17:10:51 +10:00
Geoffrey McRae b39f38350f [common] kvmfr: add a new frameSerial field to the KVMFRFrame struct
This new field is used so that when a new client connects an already
connected client can identify any repeated frame that is sent and ignore
it.
2021-07-25 13:46:48 +10:00
Quantum 80bc9604ba [host] windows: fix graceful exit
We were using an auto-reset event to signal the mousehook exit. This was
fine when there was only one thread, but with the addition of the update
thread, only one thread is signaled, causing the wait to last forever.

The fix is switching to a manual reset event and call ResetEvent after
the threads have exited.
2021-07-21 12:32:14 +10:00
Quantum 9ab85fd0b8 [host] capture: stop sending DPI information
The client doesn't need DPI information anymore, so there is no point
fetching it.
2021-07-18 10:50:57 +10:00
Quantum 9ce4990793 [host] capture: pass frameIndex to capture backends
This allows capture backends to track damage made to each frame.
2021-07-18 10:41:50 +10:00
Quantum 80ab4b5393 [host] capture: add damage rectangles to capture interface 2021-07-18 10:41:50 +10:00
Geoffrey McRae 3ce3b573a3 [host] app: fix infinate loop introduced in the last commit 2021-07-12 17:35:16 +10:00
Geoffrey McRae ce459c24ce [host] app: wait for space in the frame queue
We must always wait for space in the frame queue so that we do not
overwrite memory that is already queued and may be in use by a client.
2021-07-12 17:30:06 +10:00
Geoffrey McRae e477663a7e [host] app: allow the capture interface to select async or sync mode
While it's correct for DXGI to use a asyncronous waitFrame model, other
capture interfaces such as NvFBC it is not correct. This change allows
the capture interface to specify which is more correct for it and moves
the waitFrame/post into the main thread if async is not desired.
2021-07-12 16:57:22 +10:00
Geoffrey McRae 8db4b65dee [host] app: allocate LGMP memory for KVMFRCursor updates without shapes
This changes the host to use a seperate pool of LGMP memory for cursor
positionl updates without shape information helping to prevent
corruption of the shape entries if they are still pending. While this is
not a perfect solution it resolves the issue without making major
changes to LGMP during the RC phase we are currently in.
2021-07-11 12:52:18 +10:00
Geoffrey McRae ada6ada576 [host] app: always send the cursor position to the client
If the guest VM is not showing a cursor when it starts such as on the
Windows login screen, the client never gets the current position of the
cursor, which prevents the client from attempting to send mouse
movements. This change ensures the client gets the mouse location on
startup.
2021-07-06 09:53:42 +10:00
Geoffrey McRae 82e10c1b7e [host] app: fix inverted cursor shape logic
We should only advance the pointerIndex if the buffer was not swapped
out for storage. This is to ensure that we do not overwrite cursor
memory that the client(s) may still be using.
2021-07-04 19:45:10 +10:00
Geoffrey McRae e9b009db9f [host] app: fix issue with wrong cursor shape being sent for new clients
When a new cursor shape is provided by the capture interface we need to
retain a copy of it incase a new client connects which will not yet have
the cursor shape. The logic here was flawed causing the wrong shape to
be sent to a new client in some instances.
2021-07-04 19:04:54 +10:00
Geoffrey McRae d36c4f0e83 [host] kvmfr: allow the frame size to exceed the available memory
This change allows the host to still transmit a frame that is truncated
if the IVSHMEM size is too small to allow for a full frame.
2021-06-12 18:44:28 +10:00
Quantum 24d0aa0c18 [all] normalize copyright on all source files 2021-06-06 11:53:05 +10:00
Geoffrey McRae fb1b30b728 [host] app: calculate and report the required IVSHMEM size
One of the most common issues reported in the support channels is the
IVSHMEM size being too small. This change adds a calculation to
determine an optimal size and uses the new `os_showMessage` platform
method to display a message box to the user with the error.
2021-06-04 12:31:15 +10:00
Quantum a089c4ea32 [host] service: introduce fatal errors for ivshmem failures
Also for failure to parse command line. For these errors, restarting
with exponential backoff will not help: no amount of restarting the
service could possibly make the ivshmem device exist or larger, so
we shouldn't try.
2021-03-22 08:54:58 +11:00
Quantum f2c0b8c0b4 [host] allow user to select capture backend
This commit introduces a new option, app:capture, which can be set to
either DXGI or NvFBC to force the host application to use that backend.

This is very useful for testing DXGI on Quadro cards, which would default
to running with NvFBC.
2021-02-27 17:41:44 +11:00
Quantum 54da11a206 [host] free capture interface on exit
This is needed for proper cleanup.

Freeing the capture interface also avoids a crash when using the NvFBC
backend. This is because we moved the mouse hook removal to nvfbc_free.
If nvfbc_free is not called before we start freeing LGMP memory, the
mouse hook would end up writing the cursor position into an invalid
memory address, causing an access violation.
2021-02-27 17:38:12 +11:00
Quantum 8e98f863b6 [host] windows: detect whether screensaver is disabled in the guest
This will allow us to add an option to disable the screensaver on the client
when an application in the guest requests it. This behaviour may be useful
when the guest is doing media playback.
2021-02-21 10:31:48 +11:00
Geoffrey McRae 1808adc2de [host] app: fix possible string overflow 2021-01-27 01:28:29 +11:00
Geoffrey McRae 04774d9cd6 [host] fix faults caused by improper startup/shudown/restart ordering 2021-01-21 17:05:30 +11:00
Geoffrey McRae 9965a4a3a6 [host] app: prevent double call to stopThreads 2021-01-21 16:27:57 +11:00
Geoffrey McRae 8778827a42 [host] fix invalid LGMP free of cursor memory 2021-01-21 15:53:06 +11:00
Geoffrey McRae e926bad759 [host] dont overwrite the exit code on shutdown 2021-01-21 15:14:50 +11:00
Geoffrey McRae ad9e84eaaa [host] return a proper exit code 2021-01-21 15:07:19 +11:00
Geoffrey McRae 14cc57071c [host] remove the remainder of the YUV420 support 2021-01-18 13:55:44 +11:00