✅ Test the HID transport the guest's mouse names
8277faa32 named the arm64 mouse's HID transport, "Virtual", so a lookup of
it through the mouse's parents stops before display 0's framebuffer and the
dictionary IOMobileFramebuffer keeps under the same key, which killed macOS
26.6.2's WindowServer at each start. The name lived in RgfxPointerDevice.cpp,
which no native test compiles, so taking it out would fail only a boot.
The name moves into RgfxPointerMotion.hpp as kRgfxMouseTransport, and
pointer_motion_test checks it in both builds: IOHIDKeys.h's Virtual where the
arm64e kext builds it, none where the x86-64 kext does.
What changes for the guest: nothing; the kexts name the same transport.
This commit is contained in:
1 parent
8c8e3a0971
commit
773b0b97fb
4 files changed
+28
-9
No files matched your search
@@ -148,7 +148,7 @@ OSNumber *RgfxPointerDevice::newPrimaryUsagePageNumber() const
|
||||
#if defined(__arm64e__)
|
||||
OSString *RgfxPointerDevice::newTransportString() const
|
||||
{
|
||||
return OSString::withCString(kIOHIDTransportVirtualValue);
|
||||
return OSString::withCString(kRgfxMouseTransport);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -65,13 +65,13 @@ public:
|
||||
OSNumber *newPrimaryUsageNumber() const override;
|
||||
OSNumber *newPrimaryUsagePageNumber() const override;
|
||||
#if defined(__arm64e__)
|
||||
// Its HID transport, "Virtual" (kIOHIDTransportVirtualValue), on arm64 alone. There display
|
||||
// 0's framebuffer, its provider, carries IOMobileFramebuffer's own "Transport", a dictionary
|
||||
// (ReimsGraphicsMobile.cpp), which a lookup of the mouse's transport through its parents finds
|
||||
// where the mouse names none: macOS 26.6.2's ReportIntervalServiceFilter took it for a string,
|
||||
// and WindowServer died of the exception at each start, so no desktop came (lane a64ptr,
|
||||
// potluck job m3-max-35949). The x86-64 kext's framebuffer has no "Transport", so its mouse
|
||||
// names none, as before.
|
||||
// Its HID transport, kRgfxMouseTransport (RgfxPointerMotion.hpp), "Virtual", on arm64 alone.
|
||||
// There display 0's framebuffer, its provider, carries IOMobileFramebuffer's own "Transport", a
|
||||
// dictionary (ReimsGraphicsMobile.cpp), which a lookup of the mouse's transport through its
|
||||
// parents finds where the mouse names none: macOS 26.6.2's ReportIntervalServiceFilter took it
|
||||
// for a string, and WindowServer died of the exception at each start, so no desktop came (lane
|
||||
// a64ptr, potluck job m3-max-35949). The x86-64 kext's framebuffer has no "Transport", so its
|
||||
// mouse names none, as before.
|
||||
OSString *newTransportString() const override;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -86,6 +86,13 @@ constexpr uint8_t kRgfxMouseReportDescriptor[] = {
|
||||
// The size of one report.
|
||||
constexpr size_t kRgfxMouseReportBytes = RGFX_GUEST_ARM64 ? 6 : 7;
|
||||
|
||||
// The HID transport the mouse names (RgfxPointerDevice's newTransportString): "Virtual",
|
||||
// IOHIDKeys.h's kIOHIDTransportVirtualValue, on arm64, where display 0's framebuffer, the mouse's
|
||||
// provider, carries IOMobileFramebuffer's own "Transport", a dictionary, which a lookup of the
|
||||
// mouse's transport through its parents finds where the mouse names none (RgfxPointerDevice.hpp);
|
||||
// none on x86-64, whose framebuffer has no "Transport".
|
||||
constexpr const char *kRgfxMouseTransport = RGFX_GUEST_ARM64 ? "Virtual" : nullptr;
|
||||
|
||||
// The most one report moves on an axis, and turns the wheel (or pans).
|
||||
constexpr int32_t kRgfxMouseReportMotionMax = 32767;
|
||||
constexpr int32_t kRgfxMouseReportWheelMax = 127;
|
||||
|
||||
@@ -4,9 +4,11 @@
|
||||
// X and Y and an 8-bit wheel, six bytes a report, and as the x86-64 kext builds it an 8-bit AC
|
||||
// Pan after the wheel, seven bytes, which a SCROLL's notches turn, and the precise scroller's
|
||||
// descriptor and counts, which a SCROLL's distance turns (pointer_motion_arm64_test builds it as
|
||||
// the arm64e kext does, which has neither).
|
||||
// the arm64e kext does, which has neither), and the HID transport the mouse names.
|
||||
#include "RgfxPointerMotion.hpp"
|
||||
|
||||
#include <IOKit/hid/IOHIDKeys.h>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@@ -225,6 +227,16 @@ int main()
|
||||
"which every report carries");
|
||||
}
|
||||
#endif
|
||||
// The transport the mouse names: on arm64 IOHIDKeys.h's Virtual, a string, so a lookup of it
|
||||
// through the mouse's parents stops before display 0's framebuffer and its dictionary of the
|
||||
// same key (a desktop-killing exception in macOS 26.6.2's WindowServer, m3-max-35949); none on
|
||||
// x86-64, whose framebuffer has none.
|
||||
if (RGFX_GUEST_ARM64)
|
||||
check(kRgfxMouseTransport != nullptr &&
|
||||
std::strcmp(kRgfxMouseTransport, kIOHIDTransportVirtualValue) == 0,
|
||||
"the arm64 mouse names the Virtual transport");
|
||||
else
|
||||
check(kRgfxMouseTransport == nullptr, "the x86-64 mouse names no transport");
|
||||
std::printf("pointer_motion_test: %d checks passed\n", checks);
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user