Skip to content

Commit bf163ff

Browse files
committed
Set USB-XHCI bus for USB storage when using aarch64 system architecture
Fixes #3194 (Windows 11 installer causes QEMU EHCI reset, aborting install)
1 parent bd37da9 commit bf163ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Managers/UTMQemuSystem.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ - (NSString *)expandDriveInterface:(NSString *)interface identifier:(NSString *)
209209
[self pushArgv:[NSString stringWithFormat:@"nvme,drive=%@,serial=%@,bootindex=%lu", identifier, identifier, bootindex++]];
210210
} else if ([interface isEqualToString:@"usb"]) {
211211
[self pushArgv:@"-device"];
212-
[self pushArgv:[NSString stringWithFormat:@"usb-storage,drive=%@,removable=%@,bootindex=%lu", identifier, removable ? @"true" : @"false", bootindex++]];
212+
/// use usb 3 bus for arm64 system
213+
NSString *bus = [self.configuration.systemArchitecture isEqualToString:@"aarch64"] ? @",bus=usb-bus.0" : @"";
214+
[self pushArgv:[NSString stringWithFormat:@"usb-storage,drive=%@,removable=%@,bootindex=%lu%@", identifier, removable ? @"true" : @"false", bootindex++, bus]];
213215
} else if ([interface isEqualToString:@"floppy"] && [self.configuration.systemTarget hasPrefix:@"q35"]) {
214216
[self pushArgv:@"-device"];
215217
[self pushArgv:[NSString stringWithFormat:@"isa-fdc,id=fdc%lu,bootindexA=%lu", busindex, bootindex++]];

0 commit comments

Comments
 (0)