Skip to content

Commit ff6d849

Browse files
committed
Merge tag 'hw-misc-20240702' of https://github.com/philmd/qemu into staging
Misc HW patches queue - Prevent NULL deref in sPAPR network model (Oleg) - Automatic deprecation of versioned machine types (Daniel) - Correct 'dump-guest-core' property name in hint (Akihiko) - Prevent IRQ leak in MacIO IDE model (Mark) - Remove dead #ifdef'ry related to unsupported macOS 12.0 (Akihiko) - Remove "hw/hw.h" where unnecessary (Thomas) # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmaDiSQACgkQ4+MsLN6t # wN4jmBAA2kxwFAGbKvokANDAZBwWmJdnuIPcqS+jdo/wCuQXOo1ROADd3NFlgQWx # z1xOv/LiAmQiUeeiP+nlA8gWCdW93PErU07og1p1+N2D1sBO6oG5QDlT/tTFuEGd # IL21jG2xWkEemd3PSN2pHKrytpS0e4S0cNZIKgTUTKdv+Mb2ZEiQi7K4zUTjcmjz # nlsSjTXdyKBmoiqNGhITWfbR2IUWjtCpzUO44ceqXd5HDpvfGhpKI7Uwun1W2xNU # yw1XrAFd64Qhd/lvc28G1DLfDdtRIoaRGxgLzQbU6621s0o50Ecs6TNHseuUAKvd # tQhOtM8IEuZ6jVw8nswCPIcJyjbeY29kjI4WmD2weF1fZbDey6Emlrf+dkJUIuCb # TximyTXw3rb1nREUVsEQLF69BKjTjE5+ETaplcTWGHCoH2+uA/5MqygalTH1Ub9W # TwVWSUwpNvIJ3RTsT20YVowkill8piF+ECldTKzJuWjqDviiJDoMm5EFdkkcUB20 # nMyhGoiXtiQ4NYU0/B6HbHOXZkqLbhWcx9G281xJ+RRwjUyVxXD3zHGR9AoOp9ls # EAo/2URJtGN95LJmzCtaD+oo0wRZ5+7lmnqHPPXkYUdwFm4bhe3dP4NggIrS0cXn # 19wvBqQuPwywxIbFEu6327YtfPRcImWIlFthWnm9lUyDmbOqDKw= # =fLCx # -----END PGP SIGNATURE----- # gpg: Signature made Mon 01 Jul 2024 09:59:16 PM PDT # gpg: using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <[email protected]>" [full] * tag 'hw-misc-20240702' of https://github.com/philmd/qemu: (22 commits) Remove inclusion of hw/hw.h from files that don't need it net/vmnet: Drop ifdef for macOS versions older than 12.0 block/file-posix: Drop ifdef for macOS versions older than 12.0 audio: Drop ifdef for macOS versions older than 12.0 hvf: Drop ifdef for macOS versions older than 12.0 hw/ide/macio: switch from using qemu_allocate_irq() to qdev input GPIOs system/physmem: Fix reference to dump-guest-core docs: document special exception for machine type deprecation & removal hw/i386: remove obsolete manual deprecation reason string of i440fx machines hw/ppc: remove obsolete manual deprecation reason string of spapr machines hw: skip registration of outdated versioned machine types hw: set deprecation info for all versioned machine types include/hw: temporarily disable deletion of versioned machine types include/hw: add macros for deprecation & removal of versioned machines hw/i386: convert 'q35' machine definitions to use new macros hw/i386: convert 'i440fx' machine definitions to use new macros hw/m68k: convert 'virt' machine definitions to use new macros hw/ppc: convert 'spapr' machine definitions to use new macros hw/s390x: convert 'ccw' machine definitions to use new macros hw/arm: convert 'virt' machine definitions to use new macros ... Signed-off-by: Richard Henderson <[email protected]>
2 parents c80a339 + f0936cb commit ff6d849

File tree

24 files changed

+702
-466
lines changed

24 files changed

+702
-466
lines changed

accel/hvf/hvf-all.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ const char *hvf_return_string(hv_return_t ret)
2323
case HV_NO_RESOURCES: return "HV_NO_RESOURCES";
2424
case HV_NO_DEVICE: return "HV_NO_DEVICE";
2525
case HV_UNSUPPORTED: return "HV_UNSUPPORTED";
26-
#if defined(MAC_OS_VERSION_11_0) && \
27-
MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0
2826
case HV_DENIED: return "HV_DENIED";
29-
#endif
3027
default: return "[unknown hv_return value]";
3128
}
3229
}

audio/coreaudio.m

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@
4444
bool enabled;
4545
} coreaudioVoiceOut;
4646

47-
#if !defined(MAC_OS_VERSION_12_0) \
48-
|| (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_12_0)
49-
#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster
50-
#endif
51-
5247
static const AudioObjectPropertyAddress voice_addr = {
5348
kAudioHardwarePropertyDefaultOutputDevice,
5449
kAudioObjectPropertyScopeGlobal,

block/file-posix.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3929,11 +3929,6 @@ BlockDriver bdrv_file = {
39293929
static kern_return_t GetBSDPath(io_iterator_t mediaIterator, char *bsdPath,
39303930
CFIndex maxPathSize, int flags);
39313931

3932-
#if !defined(MAC_OS_VERSION_12_0) \
3933-
|| (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_VERSION_12_0)
3934-
#define IOMainPort IOMasterPort
3935-
#endif
3936-
39373932
static char *FindEjectableOpticalMedia(io_iterator_t *mediaIterator)
39383933
{
39393934
kern_return_t kernResult = KERN_FAILURE;

docs/about/deprecated.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ releases, the feature is liable to be removed. Deprecated features may also
1111
generate warnings on the console when QEMU starts up, or if activated via a
1212
monitor command, however, this is not a mandatory requirement.
1313

14+
As a special exception to this general timeframe, rather than have an
15+
indefinite lifetime, versioned machine types are only intended to be
16+
supported for a period of 6 years, equivalent to 18 QEMU releases. All
17+
versioned machine types will be automatically marked deprecated after an
18+
initial 3 years (9 QEMU releases) has passed, and will then be deleted after
19+
a further 3 year period has passed. It is recommended that a deprecated
20+
machine type is only used for incoming migrations and restore of saved state,
21+
for pre-existing VM deployments. They should be scheduled for updating to a
22+
newer machine type during an appropriate service window. Newly deployed VMs
23+
should exclusively use a non-deprecated machine type, with use of the most
24+
recent version highly recommended. Non-versioned machine types follow the
25+
general feature deprecation policy.
26+
1427
Prior to the 2.10.0 release there was no official policy on how
1528
long features would be deprecated prior to their removal, nor
1629
any documented list of which features were deprecated. Thus

hw/arm/virt.c

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,33 +101,37 @@ static void arm_virt_compat_set(MachineClass *mc)
101101
arm_virt_compat_len);
102102
}
103103

104-
#define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
105-
static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
106-
void *data) \
104+
#define DEFINE_VIRT_MACHINE_IMPL(latest, ...) \
105+
static void MACHINE_VER_SYM(class_init, virt, __VA_ARGS__)( \
106+
ObjectClass *oc, \
107+
void *data) \
107108
{ \
108109
MachineClass *mc = MACHINE_CLASS(oc); \
109110
arm_virt_compat_set(mc); \
110-
virt_machine_##major##_##minor##_options(mc); \
111-
mc->desc = "QEMU " # major "." # minor " ARM Virtual Machine"; \
111+
MACHINE_VER_SYM(options, virt, __VA_ARGS__)(mc); \
112+
mc->desc = "QEMU " MACHINE_VER_STR(__VA_ARGS__) " ARM Virtual Machine"; \
113+
MACHINE_VER_DEPRECATION(__VA_ARGS__); \
112114
if (latest) { \
113115
mc->alias = "virt"; \
114116
} \
115117
} \
116-
static const TypeInfo machvirt_##major##_##minor##_info = { \
117-
.name = MACHINE_TYPE_NAME("virt-" # major "." # minor), \
118+
static const TypeInfo MACHINE_VER_SYM(info, virt, __VA_ARGS__) = \
119+
{ \
120+
.name = MACHINE_VER_TYPE_NAME("virt", __VA_ARGS__), \
118121
.parent = TYPE_VIRT_MACHINE, \
119-
.class_init = virt_##major##_##minor##_class_init, \
122+
.class_init = MACHINE_VER_SYM(class_init, virt, __VA_ARGS__), \
120123
}; \
121-
static void machvirt_machine_##major##_##minor##_init(void) \
124+
static void MACHINE_VER_SYM(register, virt, __VA_ARGS__)(void) \
122125
{ \
123-
type_register_static(&machvirt_##major##_##minor##_info); \
126+
MACHINE_VER_DELETION(__VA_ARGS__); \
127+
type_register_static(&MACHINE_VER_SYM(info, virt, __VA_ARGS__)); \
124128
} \
125-
type_init(machvirt_machine_##major##_##minor##_init);
129+
type_init(MACHINE_VER_SYM(register, virt, __VA_ARGS__));
126130

127131
#define DEFINE_VIRT_MACHINE_AS_LATEST(major, minor) \
128-
DEFINE_VIRT_MACHINE_LATEST(major, minor, true)
132+
DEFINE_VIRT_MACHINE_IMPL(true, major, minor)
129133
#define DEFINE_VIRT_MACHINE(major, minor) \
130-
DEFINE_VIRT_MACHINE_LATEST(major, minor, false)
134+
DEFINE_VIRT_MACHINE_IMPL(false, major, minor)
131135

132136

133137
/* Number of external interrupt lines to configure the GIC with */

0 commit comments

Comments
 (0)