qemu-10.0.2-utm.patch 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. From 594fe2f680f571dfe1d69281b803bdcbac925f7a Mon Sep 17 00:00:00 2001
  2. From: osy <osy@turing.llc>
  3. Date: Fri, 18 Jul 2025 13:29:23 -0700
  4. Subject: [PATCH 1/2] tcg/tcti: implement vector immediate shifts
  5. This now seems to be required as a result of the introduction of
  6. gen_gvec_rev{16,32,64} in 38f9950c8e0315d7b26803018a3f73d5f42e6703.
  7. ---
  8. tcg/aarch64-tcti/tcg-target-has.h | 2 +-
  9. tcg/aarch64-tcti/tcg-target-opc.h.inc | 1 +
  10. tcg/aarch64-tcti/tcg-target.c.inc | 45 +++++++++++++++++--
  11. tcg/aarch64-tcti/tcti-gadget-gen.py | 63 +++++++++++++++++++++++++--
  12. 4 files changed, 103 insertions(+), 8 deletions(-)
  13. diff --git a/tcg/aarch64-tcti/tcg-target-has.h b/tcg/aarch64-tcti/tcg-target-has.h
  14. index 8e39891c02..67b50fcdea 100644
  15. --- a/tcg/aarch64-tcti/tcg-target-has.h
  16. +++ b/tcg/aarch64-tcti/tcg-target-has.h
  17. @@ -84,7 +84,7 @@
  18. #define TCG_TARGET_HAS_roti_vec 0
  19. #define TCG_TARGET_HAS_rots_vec 0
  20. #define TCG_TARGET_HAS_rotv_vec 0
  21. -#define TCG_TARGET_HAS_shi_vec 0
  22. +#define TCG_TARGET_HAS_shi_vec 1
  23. #define TCG_TARGET_HAS_shs_vec 0
  24. #define TCG_TARGET_HAS_shv_vec 1
  25. #define TCG_TARGET_HAS_mul_vec 1
  26. diff --git a/tcg/aarch64-tcti/tcg-target-opc.h.inc b/tcg/aarch64-tcti/tcg-target-opc.h.inc
  27. index 88cf2bc53d..5382315c41 100644
  28. --- a/tcg/aarch64-tcti/tcg-target-opc.h.inc
  29. +++ b/tcg/aarch64-tcti/tcg-target-opc.h.inc
  30. @@ -12,3 +12,4 @@
  31. */
  32. DEF(aa64_sshl_vec, 1, 2, 0, TCG_OPF_VECTOR)
  33. +DEF(aa64_sli_vec, 1, 2, 1, TCG_OPF_VECTOR)
  34. diff --git a/tcg/aarch64-tcti/tcg-target.c.inc b/tcg/aarch64-tcti/tcg-target.c.inc
  35. index 7b1186cd01..8b78abe4bb 100644
  36. --- a/tcg/aarch64-tcti/tcg-target.c.inc
  37. +++ b/tcg/aarch64-tcti/tcg-target.c.inc
  38. @@ -217,6 +217,8 @@ tcg_target_op_def(TCGOpcode op, TCGType type, unsigned flags)
  39. return C_O1_I2(w, w, w);
  40. case INDEX_op_bitsel_vec:
  41. return C_O1_I3(w, w, w, w);
  42. + case INDEX_op_aa64_sli_vec:
  43. + return C_O1_I2(w, 0, w);
  44. default:
  45. return C_NotImplemented;
  46. @@ -490,6 +492,13 @@ static void tcg_out_ternary_gadget(TCGContext *s, const void *gadget_base[TCG_TA
  47. tcg_out_gadget(s, gadget_base[reg0][reg1][reg2]);
  48. }
  49. +
  50. +/* Write gadget pointer (three registers, last is immediate value). */
  51. +static void tcg_out_ternary_immediate_gadget(TCGContext *s, const void *gadget_base[TCG_TARGET_GP_REGS][TCG_TARGET_GP_REGS][TCTI_GADGET_IMMEDIATE_ARRAY_LEN], unsigned reg0, unsigned reg1, unsigned reg2)
  52. +{
  53. + tcg_out_gadget(s, gadget_base[reg0][reg1][reg2]);
  54. +}
  55. +
  56. /***************************
  57. * TCG Scalar Operations *
  58. ***************************/
  59. @@ -1558,13 +1567,18 @@ static void tcg_out_nop_fill(tcg_insn_unit *p, int count)
  60. tcg_out_sized_vector_gadget_no64(s, name, ternary, vece, a, b, c)
  61. -#define tcg_out_ternary_vector_gadget_with_scalar(s, name, is_scalar, vece, a, b, c) \
  62. +#define tcg_out_sized_gadget_with_scalar(s, name, arity, is_scalar, vece, args...) \
  63. if (is_scalar) { \
  64. - tcg_out_ternary_gadget(s, gadget_ ## name ## _scalar, w0, w1, w2); \
  65. + tcg_out_ ## arity ## _gadget(s, gadget_ ## name ## _scalar, args); \
  66. } else { \
  67. - tcg_out_ternary_vector_gadget(s, name, vece, w0, w1, w2); \
  68. + tcg_out_sized_vector_gadget(s, name, arity, vece, args); \
  69. }
  70. +#define tcg_out_ternary_vector_gadget_with_scalar(s, name, is_scalar, vece, a, b, c) \
  71. + tcg_out_sized_gadget_with_scalar(s, name, ternary, is_scalar, vece, a, b, c)
  72. +
  73. +#define tcg_out_ternary_immediate_vector_gadget_with_scalar(s, name, is_scalar, vece, a, b, c) \
  74. + tcg_out_sized_gadget_with_scalar(s, name, ternary_immediate, is_scalar, vece, a, b, c)
  75. /* Return true if v16 is a valid 16-bit shifted immediate. */
  76. static bool is_shimm16(uint16_t v16, int *cmode, int *imm8)
  77. @@ -1765,6 +1779,20 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc, unsigned vecl, unsigned
  78. break;
  79. }
  80. + /* inhibit compiler warning because we use imm as a register */
  81. + case INDEX_op_shli_vec:
  82. + tcg_out_ternary_immediate_vector_gadget_with_scalar(s, shl, is_scalar, vece, w0, w1, r2);
  83. + break;
  84. + case INDEX_op_shri_vec:
  85. + tcg_out_ternary_immediate_vector_gadget_with_scalar(s, ushr, is_scalar, vece, w0, w1, r2 - 1);
  86. + break;
  87. + case INDEX_op_sari_vec:
  88. + tcg_out_ternary_immediate_vector_gadget_with_scalar(s, sshr, is_scalar, vece, w0, w1, r2 - 1);
  89. + break;
  90. + case INDEX_op_aa64_sli_vec:
  91. + tcg_out_ternary_immediate_vector_gadget_with_scalar(s, sli, is_scalar, vece, w0, w2, r3);
  92. + break;
  93. +
  94. case INDEX_op_mov_vec: /* Always emitted via tcg_out_mov. */
  95. case INDEX_op_dup_vec: /* Always emitted via tcg_out_dup_vec. */
  96. default:
  97. @@ -1787,6 +1815,9 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, unsigned vece)
  98. case INDEX_op_abs_vec:
  99. case INDEX_op_not_vec:
  100. case INDEX_op_cmp_vec:
  101. + case INDEX_op_shli_vec:
  102. + case INDEX_op_shri_vec:
  103. + case INDEX_op_sari_vec:
  104. case INDEX_op_ssadd_vec:
  105. case INDEX_op_sssub_vec:
  106. case INDEX_op_usadd_vec:
  107. @@ -1827,6 +1858,14 @@ void tcg_expand_vec_op(TCGOpcode opc, TCGType type, unsigned vece,
  108. va_end(va);
  109. switch (opc) {
  110. + case INDEX_op_rotli_vec:
  111. + t1 = tcg_temp_new_vec(type);
  112. + tcg_gen_shri_vec(vece, t1, v1, -a2 & ((8 << vece) - 1));
  113. + vec_gen_4(INDEX_op_aa64_sli_vec, type, vece,
  114. + tcgv_vec_arg(v0), tcgv_vec_arg(t1), tcgv_vec_arg(v1), a2);
  115. + tcg_temp_free_vec(t1);
  116. + break;
  117. +
  118. case INDEX_op_shrv_vec:
  119. case INDEX_op_sarv_vec:
  120. /* Right shifts are negative left shifts for AArch64. */
  121. diff --git a/tcg/aarch64-tcti/tcti-gadget-gen.py b/tcg/aarch64-tcti/tcti-gadget-gen.py
  122. index 275c4ba943..ebed824500 100755
  123. --- a/tcg/aarch64-tcti/tcti-gadget-gen.py
  124. +++ b/tcg/aarch64-tcti/tcti-gadget-gen.py
  125. @@ -113,7 +113,7 @@ def simple(name, *lines, export=True):
  126. -def with_register_substitutions(name, substitutions, *lines, immediate_range=range(0)):
  127. +def with_register_substitutions(name, substitutions, *lines, immediate_range=range(0), filter=lambda p: False):
  128. """ Generates a collection of gadgtes with register substitutions. """
  129. def _expand_op1_immediate(num):
  130. @@ -166,6 +166,10 @@ def substitutions_for_letter(letter, number, line):
  131. # For each permutation...
  132. for permutation in permutations:
  133. + # Filter any invalid combination
  134. + if filter(permutation):
  135. + continue
  136. +
  137. new_lines = lines
  138. # Replace each placeholder element with its proper value...
  139. @@ -212,9 +216,9 @@ def with_dnm(name, *lines):
  140. print("};", file=c_file)
  141. -def with_dn_immediate(name, *lines, immediate_range):
  142. +def with_dn_immediate(name, *lines, immediate_range, filter=lambda m: False):
  143. """ Generates a collection of gadgets with substitutions for Xd, Xn, and Xm, and equivalents. """
  144. - with_register_substitutions(name, ["d", "n"], *lines, immediate_range=immediate_range)
  145. + with_register_substitutions(name, ["d", "n"], *lines, immediate_range=immediate_range, filter=lambda p: filter(p[-1]))
  146. # Fetch the files we'll be using for output.
  147. c_file, h_file = _get_output_files()
  148. @@ -236,7 +240,10 @@ def with_dn_immediate(name, *lines, immediate_range):
  149. # M array
  150. for i in immediate_range:
  151. - print(f"gadget_{name}_arg{d}_arg{n}_arg{i}", end=", ", file=c_file)
  152. + if filter(i):
  153. + print(f"(void *)0", end=", ", file=c_file)
  154. + else:
  155. + print(f"gadget_{name}_arg{d}_arg{n}_arg{i}", end=", ", file=c_file)
  156. print("},", file=c_file)
  157. print("\t},", file=c_file)
  158. @@ -625,6 +632,24 @@ def do_size_replacement(line, size):
  159. sized_lines = (scalar,)
  160. with_dnm(f"{name}_scalar", *sized_lines)
  161. +def vector_dn_immediate(name, *lines, scalar=None, immediate_range, omit_sizes=(), filter=lambda s, m: False):
  162. + """ Creates a set of gadgets for every size of a given vector op. Accepts 'S' as a size placeholder. """
  163. +
  164. + def do_size_replacement(line, size):
  165. + return line.replace(".S", f".{size}")
  166. +
  167. + # Create a variant for each size, replacing any placeholders.
  168. + for size in VECTOR_SIZES:
  169. + if size in omit_sizes:
  170. + continue
  171. +
  172. + sized_lines = (do_size_replacement(line, size) for line in lines)
  173. + with_dn_immediate(f"{name}_{size}", *sized_lines, immediate_range=immediate_range, filter=lambda m: filter(size, m))
  174. +
  175. + if scalar:
  176. + if isinstance(scalar, str):
  177. + sized_lines = (scalar,)
  178. + with_dn_immediate(f"{name}_scalar", *sized_lines, immediate_range=immediate_range, filter=lambda m: filter(None, m))
  179. def vector_math_dnm(name, operation):
  180. """ Generates a collection of gadgets for vector math instructions. """
  181. @@ -647,6 +672,9 @@ def vector_logic_dnm(name, operation):
  182. with_dnm(f"{name}_d", f"{operation} Vd.8b, Vn.8b, Vm.8b")
  183. with_dnm(f"{name}_q", f"{operation} Vd.16b, Vn.16b, Vm.16b")
  184. +def vector_math_dn_immediate(name, operation, immediate_range, filter=lambda x: False):
  185. + """ Generates a collection of gadgets for vector math instructions. """
  186. + vector_dn_immediate(name, f"{operation} Vd.S, Vn.S, #Ii", scalar=f"{operation} Dd, Dn, #Ii", immediate_range=immediate_range, filter=filter)
  187. #
  188. # Gadget definitions.
  189. @@ -1088,6 +1116,33 @@ def vector_logic_dnm(name, operation):
  190. vector_math_dnm("shlv", "ushl")
  191. vector_math_dnm("sshl", "sshl")
  192. +def filter_shl(size, imm):
  193. + match size:
  194. + case '16b': return imm >= 8
  195. + case '8b': return imm >= 8
  196. + case '4h': return imm >= 16
  197. + case '8h': return imm >= 16
  198. + case '2s': return imm >= 32
  199. + case '4s': return imm >= 32
  200. + return False
  201. +
  202. +def filter_shr(size, imm):
  203. + if imm == 0:
  204. + return True
  205. + match size:
  206. + case '16b': return imm > 8
  207. + case '8b': return imm > 8
  208. + case '4h': return imm > 16
  209. + case '8h': return imm > 16
  210. + case '2s': return imm > 32
  211. + case '4s': return imm > 32
  212. + return False
  213. +
  214. +vector_math_dn_immediate("shl", "shl", immediate_range=range(64), filter=filter_shl)
  215. +vector_math_dn_immediate("ushr", "ushr", immediate_range=range(1,65), filter=filter_shr)
  216. +vector_math_dn_immediate("sshr", "sshr", immediate_range=range(1,65), filter=filter_shr)
  217. +vector_math_dn_immediate("sli", "sli", immediate_range=range(64), filter=filter_shl)
  218. +
  219. vector_dnm("cmeq", "cmeq Vd.S, Vn.S, Vm.S", scalar="cmeq Dd, Dn, Dm")
  220. vector_dnm("cmgt", "cmgt Vd.S, Vn.S, Vm.S", scalar="cmgt Dd, Dn, Dm")
  221. vector_dnm("cmge", "cmge Vd.S, Vn.S, Vm.S", scalar="cmge Dd, Dn, Dm")
  222. --
  223. 2.41.0
  224. From 35ba52817dbea01821b429737e989bc54a14d411 Mon Sep 17 00:00:00 2001
  225. From: osy <osy@turing.llc>
  226. Date: Tue, 22 Jul 2025 10:13:34 -0700
  227. Subject: [PATCH 2/2] tcg/tcti: fix goto as first instruction
  228. ---
  229. accel/tcg/tcg-accel-ops.c | 1 +
  230. 1 file changed, 1 insertion(+)
  231. diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c
  232. index 0e8c4c1c67..e07f60357f 100644
  233. --- a/accel/tcg/tcg-accel-ops.c
  234. +++ b/accel/tcg/tcg-accel-ops.c
  235. @@ -68,6 +68,7 @@ void tcg_cpu_init_cflags(CPUState *cpu, bool parallel)
  236. // GOTO_PTR is too complex to emit a simple gadget for.
  237. // We'll let C handle it, since the overhead is similar.
  238. cflags |= CF_NO_GOTO_PTR;
  239. + cpu->cflags_next_tb = CF_NO_GOTO_PTR;
  240. #endif
  241. tcg_cflags_set(cpu, cflags);
  242. }
  243. --
  244. 2.41.0
  245. From 344a5a3cbe3df0c373743969493afe7d1c4fb4d6 Mon Sep 17 00:00:00 2001
  246. From: osy <osy@turing.llc>
  247. Date: Sat, 2 Aug 2025 19:22:04 -0700
  248. Subject: [PATCH] pc-bios: add classicvirtio drivers for m68k/ppc
  249. ---
  250. pc-bios/m68k-declrom | Bin 0 -> 106496 bytes
  251. pc-bios/meson.build | 2 ++
  252. pc-bios/ppc-ndrvloader | Bin 0 -> 191172 bytes
  253. 3 files changed, 2 insertions(+)
  254. create mode 100755 pc-bios/m68k-declrom
  255. create mode 100644 pc-bios/ppc-ndrvloader
  256. diff --git a/pc-bios/meson.build b/pc-bios/meson.build
  257. index 9fb9659c45..63e10cc6df 100644
  258. --- a/pc-bios/meson.build
  259. +++ b/pc-bios/meson.build
  260. @@ -85,6 +85,8 @@ blobs = [
  261. 'npcm8xx_bootrom.bin',
  262. 'vof.bin',
  263. 'vof-nvram.bin',
  264. + 'm68k-declrom',
  265. + 'ppc-ndrvloader',
  266. ]
  267. dtc = find_program('dtc', required: false)
  268. From a172998c2f8bcbd29afeb8cab9b97e43ef3a22b5 Mon Sep 17 00:00:00 2001
  269. From: osy <osy@turing.llc>
  270. Date: Sun, 10 Aug 2025 21:54:34 -0700
  271. Subject: [PATCH] pc-bios: use 2023 Microsoft UEFI certificates
  272. Restore non-secure vars variants as well.
  273. ---
  274. pc-bios/edk2-arm-secure-vars.fd.bz2 | Bin 0 -> 12654 bytes
  275. pc-bios/edk2-arm-vars.fd.bz2 | Bin 6710 -> 595 bytes
  276. pc-bios/edk2-i386-secure-vars.fd.bz2 | Bin 0 -> 12986 bytes
  277. pc-bios/edk2-i386-vars.fd.bz2 | Bin 7727 -> 612 bytes
  278. pc-bios/meson.build | 2 ++
  279. 5 files changed, 2 insertions(+)
  280. create mode 100644 pc-bios/edk2-arm-secure-vars.fd.bz2
  281. create mode 100644 pc-bios/edk2-i386-secure-vars.fd.bz2
  282. diff --git a/pc-bios/meson.build b/pc-bios/meson.build
  283. index 63e10cc6df..1e1b553795 100644
  284. --- a/pc-bios/meson.build
  285. +++ b/pc-bios/meson.build
  286. @@ -4,11 +4,13 @@ if unpack_edk2_blobs
  287. 'edk2-aarch64-code.fd',
  288. 'edk2-aarch64-secure-code.fd',
  289. 'edk2-arm-code.fd',
  290. + 'edk2-arm-secure-vars.fd',
  291. 'edk2-arm-vars.fd',
  292. 'edk2-riscv-code.fd',
  293. 'edk2-riscv-vars.fd',
  294. 'edk2-i386-code.fd',
  295. 'edk2-i386-secure-code.fd',
  296. + 'edk2-i386-secure-vars.fd',
  297. 'edk2-i386-vars.fd',
  298. 'edk2-x86_64-code.fd',
  299. 'edk2-x86_64-secure-code.fd',
  300. --
  301. 2.41.0
  302. From 0f1d6606c28d0ae81a1b311972c5c54e5e867bf0 Mon Sep 17 00:00:00 2001
  303. From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  304. Date: Wed, 11 Jun 2025 14:03:15 +0100
  305. Subject: [PATCH] target/i386: fix TB exit logic in gen_movl_seg() when writing
  306. to SS
  307. Before commit e54ef98c8a ("target/i386: do not trigger IRQ shadow for LSS"), any
  308. write to SS in gen_movl_seg() would cause a TB exit. The changes introduced by
  309. this commit were intended to restrict the DISAS_EOB_INHIBIT_IRQ exit to the case
  310. where inhibit_irq is true, but missed that a DISAS_EOB_NEXT exit can still be
  311. required when writing to SS and inhibit_irq is false.
  312. Comparing the PE(s) && !VM86(s) section with the logic in x86_update_hflags(), we
  313. can see that the DISAS_EOB_NEXT exit is still required for the !CODE32 case when
  314. writing to SS in gen_movl_seg() because any change to the SS flags can affect
  315. hflags. Similarly we can see that the existing CODE32 case is still correct since
  316. a change to any of DS, ES and SS can affect hflags. Finally for the
  317. gen_op_movl_seg_real() case an explicit TB exit is not needed because the segment
  318. register selector does not affect hflags.
  319. Update the logic in gen_movl_seg() so that a write to SS with inhibit_irq set to
  320. false where PE(s) && !VM86(s) will generate a DISAS_EOB_NEXT exit along with the
  321. inline comment. This has the effect of allowing Win98SE to boot in QEMU once
  322. again.
  323. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  324. Fixes: e54ef98c8a ("target/i386: do not trigger IRQ shadow for LSS")
  325. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2987
  326. Link: https://lore.kernel.org/r/20250611130315.383151-1-mark.cave-ayland@ilande.co.uk
  327. Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
  328. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  329. ---
  330. target/i386/tcg/translate.c | 7 +++++--
  331. 1 file changed, 5 insertions(+), 2 deletions(-)
  332. diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
  333. index 0fcddc2ec0..0cb87d0201 100644
  334. --- a/target/i386/tcg/translate.c
  335. +++ b/target/i386/tcg/translate.c
  336. @@ -2033,8 +2033,11 @@ static void gen_movl_seg(DisasContext *s, X86Seg seg_reg, TCGv src, bool inhibit
  337. tcg_gen_trunc_tl_i32(sel, src);
  338. gen_helper_load_seg(tcg_env, tcg_constant_i32(seg_reg), sel);
  339. - /* For move to DS/ES/SS, the addseg or ss32 flags may change. */
  340. - if (CODE32(s) && seg_reg < R_FS) {
  341. + /*
  342. + * For moves to SS, the SS32 flag may change. For CODE32 only, changes
  343. + * to SS, DS and ES may change the ADDSEG flags.
  344. + */
  345. + if (seg_reg == R_SS || (CODE32(s) && seg_reg < R_FS)) {
  346. s->base.is_jmp = DISAS_EOB_NEXT;
  347. }
  348. } else {
  349. --
  350. 2.41.0
  351. From a3955f90f898cfa8efcdeeab285324dcbb033b31 Mon Sep 17 00:00:00 2001
  352. From: osy <osy@turing.llc>
  353. Date: Mon, 11 Aug 2025 22:24:52 -0700
  354. Subject: [PATCH] hw/i386/pc: no floppy when defaults disabled
  355. ---
  356. hw/i386/pc_piix.c | 4 ++--
  357. 1 file changed, 2 insertions(+), 2 deletions(-)
  358. diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
  359. index 6c91e2d292..86978f4671 100644
  360. --- a/hw/i386/pc_piix.c
  361. +++ b/hw/i386/pc_piix.c
  362. @@ -465,7 +465,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
  363. m->default_machine_opts = "firmware=bios-256k.bin";
  364. m->default_display = "std";
  365. m->default_nic = "e1000";
  366. - m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC);
  367. + m->no_floppy = !defaults_enabled() || !module_object_class_by_name(TYPE_ISA_FDC);
  368. m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
  369. machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
  370. machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
  371. @@ -811,7 +811,7 @@ static void isapc_machine_options(MachineClass *m)
  372. pcmc->has_reserved_memory = false;
  373. m->default_nic = "ne2k_isa";
  374. m->default_cpu_type = X86_CPU_TYPE_NAME("486");
  375. - m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC);
  376. + m->no_floppy = !defaults_enabled() || !module_object_class_by_name(TYPE_ISA_FDC);
  377. m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
  378. }
  379. --
  380. 2.41.0