Backend - Per-VM CPU affinity (vmstart/affinity.go, affinity_flow.go): modes auto / all / P-cores / non-LP-E / custom, saved in the VM folder, applied to the QEMU process on start (GUI and CLI) and live via SetVMAffinity; copied on clone. Start summary logs the resolved mapping. Host report gains CPU topology helpers (mask <-> CPU list). - Offline qcow2 restore points via qemu-img (driver/reims/snapshot.go, snapshot_flow.go): list / create / restore / delete. - SSH helpers (ssh_flow.go): remembered user, open a terminal, write an ~/.ssh/config entry, open VS Code Remote-SSH. - FocusVMWindow brings the QEMU window forward (restoring it if minimized); CopyVMScreenshot copies a full-resolution frame to the clipboard. - DeliverPathsToGuest copies dropped host files into the shared folder; main.go enables Wails file drop on elements marked --wails-drop-target. - VM note (.reims-go-note) and a storage breakdown (extras_flow.go). Frontend - VM page: running state's "Show Window" and the screen preview use FocusVMWindow; camera button and More-menu item copy a screenshot; editable note under the name; SSH row shows the saved user with Terminal / config / VS Code actions; restore-point list; install guide steps can be ticked off; drop files onto the page to send them. - Sidebar right-click menu per VM (start, show window, screenshot, stop, restart, settings, folders, clone, delete); double-click and Ctrl+Enter still run the main action. - AffinityDialog opened from the VM menu and VM settings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
883 B
Go
36 lines
883 B
Go
//go:build windows
|
|
|
|
package host
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestWindowsProcessAffinityAndTopology(t *testing.T) {
|
|
pid := uint32(os.Getpid())
|
|
procMask, sysMask, err := GetProcessAffinityMask(pid)
|
|
if err != nil {
|
|
t.Fatalf("GetProcessAffinityMask(self=%d): %v", pid, err)
|
|
}
|
|
if procMask == 0 || sysMask == 0 {
|
|
t.Fatalf("unexpected zero masks: proc=0x%X sys=0x%X", procMask, sysMask)
|
|
}
|
|
if procMask&sysMask != procMask {
|
|
t.Fatalf("procMask 0x%X is not subset of sysMask 0x%X", procMask, sysMask)
|
|
}
|
|
|
|
rep := Inspect(t.TempDir())
|
|
if len(rep.CPUTopology) == 0 {
|
|
t.Fatalf("expected non-empty CPUTopology on Windows")
|
|
}
|
|
for i, c := range rep.CPUTopology {
|
|
if i > 0 && c.Index <= rep.CPUTopology[i-1].Index {
|
|
t.Fatalf("CPUTopology not strictly sorted at %d: %+v", i, rep.CPUTopology)
|
|
}
|
|
if c.Tier == "" {
|
|
t.Fatalf("empty tier for CPU %d", c.Index)
|
|
}
|
|
}
|
|
}
|