Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 78be258c0eeba3d5613c37888889e84f2ba9bd94
      
https://github.com/qemu/qemu/commit/78be258c0eeba3d5613c37888889e84f2ba9bd94
  Author: Paolo Bonzini <[email protected]>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M target/i386/cpu.c

  Log Message:
  -----------
  target/i386: add sha512, sm3, sm4 feature bits

SHA512, SM3, SM4 (CPUID[EAX=7,ECX=1).EAX bits 0 to 2) is supported by
Clearwater Forest processor, add it to QEMU as it does not need any
specific enablement.

See https://lore.kernel.org/kvm/[email protected]/
for reference.

Reviewed-by: Tao Su <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 520c0bb2be47275961ec83bbc95205c7be064589
      
https://github.com/qemu/qemu/commit/520c0bb2be47275961ec83bbc95205c7be064589
  Author: Pierrick Bouvier <[email protected]>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M target/i386/hvf/x86_cpuid.c

  Log Message:
  -----------
  target/i386/hvf: fix clang compilation warning

../target/i386/hvf/x86_cpuid.c:35:28: error: a function declaration without a 
prototype is deprecated in all versions of C

Fixes: 7cac7aa7040a823c585f1578a38f28e83c8bf3e1
Signed-off-by: Pierrick Bouvier <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 700784bfc65496551e15ccebff5ac30b6d13f492
      
https://github.com/qemu/qemu/commit/700784bfc65496551e15ccebff5ac30b6d13f492
  Author: Paolo Bonzini <[email protected]>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M subprojects/packagefiles/arbitrary-int-1-rs/meson.build
    M subprojects/packagefiles/bilge-0.2-rs/meson.build
    M subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
    M subprojects/packagefiles/either-1-rs/meson.build
    M subprojects/packagefiles/itertools-0.11-rs/meson.build
    M subprojects/packagefiles/proc-macro-error-1-rs/meson.build
    M subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
    M subprojects/packagefiles/proc-macro2-1-rs/meson.build
    M subprojects/packagefiles/quote-1-rs/meson.build
    M subprojects/packagefiles/syn-2-rs/meson.build
    M subprojects/packagefiles/unicode-ident-1-rs/meson.build

  Log Message:
  -----------
  rust: add meson_version to all subprojects

Otherwise, newer releases of meson complain.

Reviewed-by: Pierrick Bouvier <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 8fa11a4df344f58375eb26b3b65004345f21ef37
      
https://github.com/qemu/qemu/commit/8fa11a4df344f58375eb26b3b65004345f21ef37
  Author: Alexander Graf <[email protected]>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M target/i386/cpu.h
    M target/i386/tcg/seg_helper.c
    M target/i386/tcg/sysemu/excp_helper.c

  Log Message:
  -----------
  target/i386: Fix legacy page table walk

Commit b56617bbcb4 ("target/i386: Walk NPT in guest real mode") added
logic to run the page table walker even in real mode if we are in NPT
mode.  That function then determined whether real mode or paging is
active based on whether the pg_mode variable was 0.

Unfortunately pg_mode is 0 in two situations:

  1) Paging is disabled (real mode)
  2) Paging is in 2-level paging mode (32bit without PAE)

That means the walker now assumed that 2-level paging mode was real
mode, breaking NetBSD as well as Windows XP.

To fix that, this patch adds a new PG flag to pg_mode which indicates
whether paging is active at all and uses that to determine whether we
are in real mode or not.

Cc: [email protected]
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2654
Fixes: b56617bbcb4 ("target/i386: Walk NPT in guest real mode")
Signed-off-by: Alexander Graf <[email protected]>
Reported-by: Mark Cave-Ayland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 619d144751e6685b24ded9029fe9c484c0494c30
      
https://github.com/qemu/qemu/commit/619d144751e6685b24ded9029fe9c484c0494c30
  Author: Paolo Bonzini <[email protected]>
  Date:   2024-11-07 (Thu, 07 Nov 2024)

  Changed paths:
    M hw/core/eif.c
    M include/qemu/osdep.h

  Log Message:
  -----------
  eif: cope with huge section offsets

Check for overflow to avoid that fseek() receives a sign-extended value.

Cc: Dorjoy Chowdhury <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: b7e55bd9d06d193cc55d2c46bb2864d71b1db1d3
      
https://github.com/qemu/qemu/commit/b7e55bd9d06d193cc55d2c46bb2864d71b1db1d3
  Author: Paolo Bonzini <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M hw/core/eif.c

  Log Message:
  -----------
  eif: cope with huge section sizes

Check for overflow as well as allocation failure.  Resolves Coverity CID 
1564859.

Reviewed-by: Pierrick Bouvier <[email protected]>
Reviewed-by: Dorjoy Chowdhury <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 0e27f3a5d0cbc0099ba8dcd7ff78e7f80d0c4f15
      
https://github.com/qemu/qemu/commit/0e27f3a5d0cbc0099ba8dcd7ff78e7f80d0c4f15
  Author: Phil Dennis-Jordan <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M target/i386/hvf/x86_cpuid.c
    M target/i386/hvf/x86_emu.c

  Log Message:
  -----------
  i386/hvf: Integrates x2APIC support with hvf accel

Support for x2APIC mode was recently introduced in the software emulated
APIC implementation for TCG. Enabling it when using macOS’s hvf
accelerator is useful and significantly helps performance, as Qemu
currently uses the emulated APIC when running on hvf as well.

This change wires up the read & write operations for the MSR VM exits
and allow-lists the CPUID flag in the x86 hvf runtime.

Signed-off-by: Phil Dennis-Jordan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Roman Bolshakov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: e3150028fffb808452078ead055fc6a4d50a63e9
      
https://github.com/qemu/qemu/commit/e3150028fffb808452078ead055fc6a4d50a63e9
  Author: Phil Dennis-Jordan <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M target/i386/hvf/x86_cpuid.c

  Log Message:
  -----------
  i386/hvf: Fix for UB in handling CPUID function 0xD

The handling for CPUID function 0xD (supported XSAVE features) was
improved in a recent patch. Unfortunately, this appears to have
introduced undefined behaviour for cases where ecx > 30, as the result
of (1 << idx) is undefined if idx > 30.

Per Intel SDM section 13.2, the behaviour for ecx values up to and
including 62 are specified. This change therefore specifically sets
all registers returned by the CPUID instruction to 0 for 63 and higher.
Furthermore, the bit shift uses uint64_t, where behaviour for the entire
range of 2..62 is safe and correct.

Signed-off-by: Phil Dennis-Jordan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Roman Bolshakov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 3a75ba650c4b4fc11c29f77c57fc30fd282c5ae9
      
https://github.com/qemu/qemu/commit/3a75ba650c4b4fc11c29f77c57fc30fd282c5ae9
  Author: Phil Dennis-Jordan <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M target/i386/hvf/hvf.c

  Log Message:
  -----------
  i386/hvf: Fixes startup memory leak (vmcs caps)

The hvf_caps data structure only exists once as part of the hvf accelerator
state, but it is initialised during vCPU initialisation. This change therefore
adds a check to ensure memory for it is only allocated once.

Signed-off-by: Phil Dennis-Jordan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Roman Bolshakov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 04858f95fa4b318bb662e046ab090179a1eeeebb
      
https://github.com/qemu/qemu/commit/04858f95fa4b318bb662e046ab090179a1eeeebb
  Author: Phil Dennis-Jordan <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M target/i386/hvf/x86_emu.c

  Log Message:
  -----------
  i386/hvf: Raise exception on error setting APICBASE

When setting the APICBASE MSR to an illegal value, the APIC
implementation will return an error. This change forwards that report
to the guest as an exception rather than ignoring it when using the hvf
accelerator.

Signed-off-by: Phil Dennis-Jordan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Roman Bolshakov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: b659ef9d358a692f941f1f46e7abef29231960d1
      
https://github.com/qemu/qemu/commit/b659ef9d358a692f941f1f46e7abef29231960d1
  Author: Phil Dennis-Jordan <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M target/i386/hvf/hvf.c

  Log Message:
  -----------
  i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec

Pointers to the x86 CPU state already exist at the function scope,
no need to re-obtain them in individual exit reason cases.

Signed-off-by: Phil Dennis-Jordan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Roman Bolshakov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: 88dd060db96d0764543974f53eb45bee3432c99f
      
https://github.com/qemu/qemu/commit/88dd060db96d0764543974f53eb45bee3432c99f
  Author: Paolo Bonzini <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M rust/qemu-api-macros/meson.build

  Log Message:
  -----------
  rust: qemu-api-macros: always process subprojects before dependencies

Avoid looking for Rust dependencies via cmake.

Reviewed-by: Junjie Mao <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: bd0e501e1a4813fa36a4cf9842aaf430323a03c3
      
https://github.com/qemu/qemu/commit/bd0e501e1a4813fa36a4cf9842aaf430323a03c3
  Author: Peter Maydell <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus

The 'isapc' machine type has no PCI bus, but pc_nic_init() still
calls pci_init_nic_devices() passing it a NULL bus pointer.  This
causes the clang sanitizer to complain:

$ ./build/clang/qemu-system-i386 -M isapc
../../hw/pci/pci.c:1866:39: runtime error: member access within null pointer of 
type 'PCIBus' (aka 'struct PCIBus')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
../../hw/pci/pci.c:1866:39 in

This is because pci_init_nic_devices() does
 &bus->qbus
which is undefined behaviour on a NULL pointer even though we're not
actually dereferencing the pointer. (We don't actually crash as
a result, so if you aren't running a sanitizer build then there
are no user-visible effects.)

Make pc_nic_init() avoid trying to initialize PCI NICs on a non-PCI
system.

Cc: [email protected]
Fixes: 8d39f9ba14d64 ("hw/i386/pc: use qemu_get_nic_info() and 
pci_init_nic_devices()")
Signed-off-by: Peter Maydell <[email protected]>
Link: 
https://lore.kernel.org/r/[email protected]
Signed-off-by: Paolo Bonzini <[email protected]>


  Commit: f0cfd067867668870931c9411d96cd518564b7a8
      
https://github.com/qemu/qemu/commit/f0cfd067867668870931c9411d96cd518564b7a8
  Author: Peter Maydell <[email protected]>
  Date:   2024-11-09 (Sat, 09 Nov 2024)

  Changed paths:
    M hw/core/eif.c
    M hw/i386/pc.c
    M include/qemu/osdep.h
    M rust/qemu-api-macros/meson.build
    M subprojects/packagefiles/arbitrary-int-1-rs/meson.build
    M subprojects/packagefiles/bilge-0.2-rs/meson.build
    M subprojects/packagefiles/bilge-impl-0.2-rs/meson.build
    M subprojects/packagefiles/either-1-rs/meson.build
    M subprojects/packagefiles/itertools-0.11-rs/meson.build
    M subprojects/packagefiles/proc-macro-error-1-rs/meson.build
    M subprojects/packagefiles/proc-macro-error-attr-1-rs/meson.build
    M subprojects/packagefiles/proc-macro2-1-rs/meson.build
    M subprojects/packagefiles/quote-1-rs/meson.build
    M subprojects/packagefiles/syn-2-rs/meson.build
    M subprojects/packagefiles/unicode-ident-1-rs/meson.build
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/hvf/hvf.c
    M target/i386/hvf/x86_cpuid.c
    M target/i386/hvf/x86_emu.c
    M target/i386/tcg/seg_helper.c
    M target/i386/tcg/sysemu/excp_helper.c

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* i386: fix -M isapc with ubsan
* i386: add sha512, sm3, sm4 feature bits
* eif: fix Coverity issues
* i386/hvf: x2APIC support
* i386/hvf: fixes
* i386/tcg: fix 2-stage page walk
* eif: fix coverity issues
* rust: fix subproject warnings with new rust, avoid useless cmake fallback

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmcvEHYUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroNn4AgAl+GaD/fHHU+9TCyKRg1Ux/iTSkqh
# PBs76H2w879TDeuPkKZlnYqc7n85rlh1cJwQz01X79OFEeXP6oHiI9Q6qyflSxF0
# V+DrJhZc1CtZBChx9ZUMWUAWjYJFFjNwYA7/LLuLl6RfOm8bIJUWIhDjliJ4Bcea
# 5VI13OtTvYvVurRLUBXWU0inh9KLHIw4RlNgi8Pmb2wNXkPxENpWjsGqWH0jlKS5
# ZUNgTPx/eY5MDwKoAyif2gsdfJlxGxgkpz3Mic4EGE9cw1cRASI3tKb3KH61hNTE
# K21UI0+/+kv27cPnpZzYMDSkrJs7PEgVJ/70NRmAJySA76IG3XSsb5+xZg==
# =pI4/
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat 09 Nov 2024 07:34:14 GMT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Paolo Bonzini <[email protected]>" [full]
# gpg:                 aka "Paolo Bonzini <[email protected]>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu:
  hw/i386/pc: Don't try to init PCI NICs if there is no PCI bus
  rust: qemu-api-macros: always process subprojects before dependencies
  i386/hvf: Removes duplicate/shadowed variables in hvf_vcpu_exec
  i386/hvf: Raise exception on error setting APICBASE
  i386/hvf: Fixes startup memory leak (vmcs caps)
  i386/hvf: Fix for UB in handling CPUID function 0xD
  i386/hvf: Integrates x2APIC support with hvf accel
  eif: cope with huge section sizes
  eif: cope with huge section offsets
  target/i386: Fix legacy page table walk
  rust: add meson_version to all subprojects
  target/i386/hvf: fix clang compilation warning
  target/i386: add sha512, sm3, sm4 feature bits

Signed-off-by: Peter Maydell <[email protected]>


Compare: https://github.com/qemu/qemu/compare/134b44351282...f0cfd0678676

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications

Reply via email to