1 | This pullreq has: | 1 | This bug seemed worth fixing for 8.0 since we need an rc4 anyway: |
---|---|---|---|
2 | * two arm bug fixes which fix some "Linux fails to boot" bugs | 2 | we were using uninitialized data for the guarded bit when |
3 | * a docs typo-fixing patch | 3 | combining stage 1 and stage 2 attrs. |
4 | * a couple of compile failure/warning issues | ||
5 | |||
6 | I think they're all pretty safe and worth having in rc3. | ||
7 | 4 | ||
8 | thanks | 5 | thanks |
9 | -- PMM | 6 | -- PMM |
10 | 7 | ||
11 | The following changes since commit a6b1c53e79d08a99a28cc3e67a3e1a7c34102d6b: | 8 | The following changes since commit 08dede07030973c1053868bc64de7e10bfa02ad6: |
12 | 9 | ||
13 | Merge tag 'linux-user-for-7.1-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2022-08-10 10:26:57 -0700) | 10 | Merge tag 'pull-ppc-20230409' of https://github.com/legoater/qemu into staging (2023-04-10 11:47:52 +0100) |
14 | 11 | ||
15 | are available in the Git repository at: | 12 | are available in the Git repository at: |
16 | 13 | ||
17 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220812 | 14 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230410 |
18 | 15 | ||
19 | for you to fetch changes up to 4311682ea8293f720730f260e8a7601117d79e65: | 16 | for you to fetch changes up to 8539dc00552e8ea60420856fc1262c8299bc6308: |
20 | 17 | ||
21 | cutils: Add missing dyld(3) include on macOS (2022-08-12 11:33:52 +0100) | 18 | target/arm: Copy guarded bit in combine_cacheattrs (2023-04-10 14:31:40 +0100) |
22 | 19 | ||
23 | ---------------------------------------------------------------- | 20 | ---------------------------------------------------------------- |
24 | target-arm queue: | 21 | target-arm: Fix bug where we weren't initializing |
25 | * Don't report Statistical Profiling Extension in ID registers | 22 | guarded bit state when combining S1/S2 attrs |
26 | * virt ACPI tables: Present the GICR structure properly for GICv4 | ||
27 | * Fix some typos in documentation | ||
28 | * tests/unit: fix a -Wformat-truncation warning | ||
29 | * cutils: Add missing dyld(3) include on macOS | ||
30 | 23 | ||
31 | ---------------------------------------------------------------- | 24 | ---------------------------------------------------------------- |
32 | Marc-André Lureau (1): | 25 | Richard Henderson (2): |
33 | tests/unit: fix a -Wformat-truncation warning | 26 | target/arm: PTE bit GP only applies to stage1 |
27 | target/arm: Copy guarded bit in combine_cacheattrs | ||
34 | 28 | ||
35 | Peter Maydell (1): | 29 | target/arm/ptw.c | 11 ++++++----- |
36 | target/arm: Don't report Statistical Profiling Extension in ID registers | 30 | 1 file changed, 6 insertions(+), 5 deletions(-) |
37 | |||
38 | Philippe Mathieu-Daudé (1): | ||
39 | cutils: Add missing dyld(3) include on macOS | ||
40 | |||
41 | Stefan Weil (1): | ||
42 | Fix some typos in documentation (most of them found by codespell) | ||
43 | |||
44 | Zenghui Yu (1): | ||
45 | hw/arm/virt-acpi-build: Present the GICR structure properly for GICv4 | ||
46 | |||
47 | docs/about/deprecated.rst | 2 +- | ||
48 | docs/specs/acpi_erst.rst | 4 ++-- | ||
49 | docs/system/devices/canokey.rst | 8 ++++---- | ||
50 | docs/system/devices/cxl.rst | 12 ++++++------ | ||
51 | hw/arm/virt-acpi-build.c | 4 ++-- | ||
52 | target/arm/cpu.c | 11 +++++++++++ | ||
53 | tests/unit/test-qobject-input-visitor.c | 3 +-- | ||
54 | util/cutils.c | 4 ++++ | ||
55 | util/oslib-posix.c | 4 ---- | ||
56 | 9 files changed, 31 insertions(+), 21 deletions(-) | ||
57 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The newly added neoverse-n1 CPU has ID register values which indicate | ||
2 | the presence of the Statistical Profiling Extension, because the real | ||
3 | hardware has this feature. QEMU's TCG emulation does not yet | ||
4 | implement SPE, though (not even as a minimal stub implementation), so | ||
5 | guests will crash if they try to use it because the SPE system | ||
6 | registers don't exist. | ||
7 | 1 | ||
8 | Force ID_AA64DFR0_EL1.PMSVer to 0 in CPU realize for TCG, so that | ||
9 | we don't advertise to the guest a feature that doesn't exist. | ||
10 | |||
11 | (We could alternatively do this by editing the value that | ||
12 | aarch64_neoverse_n1_initfn() sets for this ID register, but | ||
13 | suppressing the field in realize means we won't re-introduce this bug | ||
14 | when we add other CPUs that have SPE in hardware, such as the | ||
15 | Neoverse-V1.) | ||
16 | |||
17 | An example of a non-booting guest is current mainline Linux (5.19), | ||
18 | when booting in EL2 on the virt board (ie with -machine | ||
19 | virtualization=on). | ||
20 | |||
21 | Reported-by: Zenghui Yu <yuzenghui@huawei.com> | ||
22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
23 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
24 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
25 | Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> | ||
26 | Message-id: 20220811131127.947334-1-peter.maydell@linaro.org | ||
27 | --- | ||
28 | target/arm/cpu.c | 11 +++++++++++ | ||
29 | 1 file changed, 11 insertions(+) | ||
30 | |||
31 | diff --git a/target/arm/cpu.c b/target/arm/cpu.c | ||
32 | index XXXXXXX..XXXXXXX 100644 | ||
33 | --- a/target/arm/cpu.c | ||
34 | +++ b/target/arm/cpu.c | ||
35 | @@ -XXX,XX +XXX,XX @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp) | ||
36 | } | ||
37 | #endif | ||
38 | |||
39 | + if (tcg_enabled()) { | ||
40 | + /* | ||
41 | + * Don't report the Statistical Profiling Extension in the ID | ||
42 | + * registers, because TCG doesn't implement it yet (not even a | ||
43 | + * minimal stub version) and guests will fall over when they | ||
44 | + * try to access the non-existent system registers for it. | ||
45 | + */ | ||
46 | + cpu->isar.id_aa64dfr0 = | ||
47 | + FIELD_DP64(cpu->isar.id_aa64dfr0, ID_AA64DFR0, PMSVER, 0); | ||
48 | + } | ||
49 | + | ||
50 | /* MPU can be configured out of a PMSA CPU either by setting has-mpu | ||
51 | * to false or by setting pmsav7-dregion to 0. | ||
52 | */ | ||
53 | -- | ||
54 | 2.25.1 | ||
55 | |||
56 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Stefan Weil <sw@weilnetz.de> | ||
2 | 1 | ||
3 | Signed-off-by: Stefan Weil <sw@weilnetz.de> | ||
4 | Reviewed-by: Hongren (Zenithal) Zheng <i@zenithal.me> | ||
5 | Message-id: 20220812075642.1200578-1-sw@weilnetz.de | ||
6 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
7 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
8 | --- | ||
9 | docs/about/deprecated.rst | 2 +- | ||
10 | docs/specs/acpi_erst.rst | 4 ++-- | ||
11 | docs/system/devices/canokey.rst | 8 ++++---- | ||
12 | docs/system/devices/cxl.rst | 12 ++++++------ | ||
13 | 4 files changed, 13 insertions(+), 13 deletions(-) | ||
14 | |||
15 | diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst | ||
16 | index XXXXXXX..XXXXXXX 100644 | ||
17 | --- a/docs/about/deprecated.rst | ||
18 | +++ b/docs/about/deprecated.rst | ||
19 | @@ -XXX,XX +XXX,XX @@ by using ``-machine graphics=off``. | ||
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
21 | |||
22 | In QEMU versions 6.1, 6.2 and 7.0, the ``nvme-ns`` generates an EUI-64 | ||
23 | -identifer that is not globally unique. If an EUI-64 identifer is required, the | ||
24 | +identifier that is not globally unique. If an EUI-64 identifier is required, the | ||
25 | user must set it explicitly using the ``nvme-ns`` device parameter ``eui64``. | ||
26 | |||
27 | ``-device nvme,use-intel-id=on|off`` (since 7.1) | ||
28 | diff --git a/docs/specs/acpi_erst.rst b/docs/specs/acpi_erst.rst | ||
29 | index XXXXXXX..XXXXXXX 100644 | ||
30 | --- a/docs/specs/acpi_erst.rst | ||
31 | +++ b/docs/specs/acpi_erst.rst | ||
32 | @@ -XXX,XX +XXX,XX @@ Slot 0 contains a backend storage header that identifies the contents | ||
33 | as ERST and also facilitates efficient access to the records. | ||
34 | Depending upon the size of the backend storage, additional slots will | ||
35 | be designated to be a part of the slot 0 header. For example, at 8KiB, | ||
36 | -the slot 0 header can accomodate 1021 records. Thus a storage size | ||
37 | +the slot 0 header can accommodate 1021 records. Thus a storage size | ||
38 | of 8MiB (8KiB * 1024) requires an additional slot for use by the | ||
39 | header. In this scenario, slot 0 and slot 1 form the backend storage | ||
40 | header, and records can be stored starting at slot 2. | ||
41 | @@ -XXX,XX +XXX,XX @@ References | ||
42 | [2] "Unified Extensible Firmware Interface Specification", | ||
43 | version 2.1, October 2008. | ||
44 | |||
45 | -[3] "Windows Hardware Error Architecture", specfically | ||
46 | +[3] "Windows Hardware Error Architecture", specifically | ||
47 | "Error Record Persistence Mechanism". | ||
48 | diff --git a/docs/system/devices/canokey.rst b/docs/system/devices/canokey.rst | ||
49 | index XXXXXXX..XXXXXXX 100644 | ||
50 | --- a/docs/system/devices/canokey.rst | ||
51 | +++ b/docs/system/devices/canokey.rst | ||
52 | @@ -XXX,XX +XXX,XX @@ With the same software configuration as a hardware key, | ||
53 | the guest OS can use all the functionalities of a secure key as if | ||
54 | there was actually an hardware key plugged in. | ||
55 | |||
56 | -CanoKey QEMU provides much convenience for debuging: | ||
57 | +CanoKey QEMU provides much convenience for debugging: | ||
58 | |||
59 | -* libcanokey-qemu supports debuging output thus developers can | ||
60 | +* libcanokey-qemu supports debugging output thus developers can | ||
61 | inspect what happens inside a secure key | ||
62 | * CanoKey QEMU supports trace event thus event | ||
63 | * QEMU USB stack supports pcap thus USB packet between the guest | ||
64 | @@ -XXX,XX +XXX,XX @@ and find CanoKey QEMU there: | ||
65 | |||
66 | You may setup the key as guided in [6]_. The console for the key is at [7]_. | ||
67 | |||
68 | -Debuging | ||
69 | -======== | ||
70 | +Debugging | ||
71 | +========= | ||
72 | |||
73 | CanoKey QEMU consists of two parts, ``libcanokey-qemu.so`` and ``canokey.c``, | ||
74 | the latter of which resides in QEMU. The former provides core functionality | ||
75 | diff --git a/docs/system/devices/cxl.rst b/docs/system/devices/cxl.rst | ||
76 | index XXXXXXX..XXXXXXX 100644 | ||
77 | --- a/docs/system/devices/cxl.rst | ||
78 | +++ b/docs/system/devices/cxl.rst | ||
79 | @@ -XXX,XX +XXX,XX @@ CXL Fixed Memory Windows (CFMW) | ||
80 | A CFMW consists of a particular range of Host Physical Address space | ||
81 | which is routed to particular CXL Host Bridges. At time of generic | ||
82 | software initialization it will have a particularly interleaving | ||
83 | -configuration and associated Quality of Serice Throtling Group (QTG). | ||
84 | +configuration and associated Quality of Service Throttling Group (QTG). | ||
85 | This information is available to system software, when making | ||
86 | decisions about how to configure interleave across available CXL | ||
87 | memory devices. It is provide as CFMW Structures (CFMWS) in | ||
88 | @@ -XXX,XX +XXX,XX @@ specification defined register interface called CXL Host Bridge | ||
89 | Component Registers (CHBCR). The location of this CHBCR MMIO | ||
90 | space is described to system software via a CXL Host Bridge | ||
91 | Structure (CHBS) in the CEDT ACPI table. The actual interfaces | ||
92 | -are identical to those used for other parts of the CXL heirarchy | ||
93 | +are identical to those used for other parts of the CXL hierarchy | ||
94 | as CXL Component Registers in PCI BARs. | ||
95 | |||
96 | Interfaces provided include: | ||
97 | @@ -XXX,XX +XXX,XX @@ CXL Memory Devices - Type 3 | ||
98 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
99 | CXL type 3 devices use a PCI class code and are intended to be supported | ||
100 | by a generic operating system driver. They have HDM decoders | ||
101 | -though in these EP devices, the decoder is reponsible not for | ||
102 | +though in these EP devices, the decoder is responsible not for | ||
103 | routing but for translation of the incoming host physical address (HPA) | ||
104 | into a Device Physical Address (DPA). | ||
105 | |||
106 | @@ -XXX,XX +XXX,XX @@ Notes: | ||
107 | ranges of the system physical address map. Each CFMW has | ||
108 | particular interleave setup across the CXL Host Bridges (HB) | ||
109 | CFMW0 provides uninterleaved access to HB0, CFW2 provides | ||
110 | - uninterleaved acess to HB1. CFW1 provides interleaved memory access | ||
111 | + uninterleaved access to HB1. CFW1 provides interleaved memory access | ||
112 | across HB0 and HB1. | ||
113 | |||
114 | (2) **Two CXL Host Bridges**. Each of these has 2 CXL Root Ports and | ||
115 | @@ -XXX,XX +XXX,XX @@ Example topology involving a switch:: | ||
116 | --------------------------------------------------- | ||
117 | | Switch 0 USP as PCI 0d:00.0 | | ||
118 | | USP has HDM decoder which direct traffic to | | ||
119 | - | appropiate downstream port | | ||
120 | + | appropriate downstream port | | ||
121 | | Switch BUS appears as 0e | | ||
122 | |x__________________________________________________| | ||
123 | | | | | | ||
124 | @@ -XXX,XX +XXX,XX @@ An example of 4 devices below a switch suitable for 1, 2 or 4 way interleave:: | ||
125 | Kernel Configuration Options | ||
126 | ---------------------------- | ||
127 | |||
128 | -In Linux 5.18 the followings options are necessary to make use of | ||
129 | +In Linux 5.18 the following options are necessary to make use of | ||
130 | OS management of CXL memory devices as described here. | ||
131 | |||
132 | * CONFIG_CXL_BUS | ||
133 | -- | ||
134 | 2.25.1 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
2 | 1 | ||
3 | ../tests/test-qobject-input-visitor.c: In function ‘test_visitor_in_list’: | ||
4 | ../tests/test-qobject-input-visitor.c:454:49: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 6 [-Wformat-truncation=] | ||
5 | 454 | snprintf(string, sizeof(string), "string%d", i); | ||
6 | | ^~ | ||
7 | ../tests/test-qobject-input-visitor.c:454:42: note: directive argument in the range [0, 2147483606] | ||
8 | 454 | snprintf(string, sizeof(string), "string%d", i); | ||
9 | | ^~~~~~~~~~ | ||
10 | ../tests/test-qobject-input-visitor.c:454:9: note: ‘snprintf’ output between 8 and 17 bytes into a destination of size 12 | ||
11 | 454 | snprintf(string, sizeof(string), "string%d", i); | ||
12 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
13 | |||
14 | Rather than trying to be clever, since this is called 3 times during | ||
15 | tests, let's simply use g_strdup_printf(). | ||
16 | |||
17 | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
18 | Reviewed-by: Markus Armbruster <armbru@redhat.com> | ||
19 | Message-id: 20220810121513.1356081-1-marcandre.lureau@redhat.com | ||
20 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
21 | [PMM: fixed commit message typos] | ||
22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
23 | --- | ||
24 | tests/unit/test-qobject-input-visitor.c | 3 +-- | ||
25 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/tests/unit/test-qobject-input-visitor.c b/tests/unit/test-qobject-input-visitor.c | ||
28 | index XXXXXXX..XXXXXXX 100644 | ||
29 | --- a/tests/unit/test-qobject-input-visitor.c | ||
30 | +++ b/tests/unit/test-qobject-input-visitor.c | ||
31 | @@ -XXX,XX +XXX,XX @@ static void test_visitor_in_list(TestInputVisitorData *data, | ||
32 | g_assert(head != NULL); | ||
33 | |||
34 | for (i = 0, item = head; item; item = item->next, i++) { | ||
35 | - char string[12]; | ||
36 | + g_autofree char *string = g_strdup_printf("string%d", i); | ||
37 | |||
38 | - snprintf(string, sizeof(string), "string%d", i); | ||
39 | g_assert_cmpstr(item->value->string, ==, string); | ||
40 | g_assert_cmpint(item->value->integer, ==, 42 + i); | ||
41 | } | ||
42 | -- | ||
43 | 2.25.1 | ||
44 | |||
45 | diff view generated by jsdifflib |
1 | From: Zenghui Yu <yuzenghui@huawei.com> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | With the introduction of the new TCG GICv4, build_madt() is badly broken | 3 | Only perform the extract of GP during the stage1 walk. |
4 | as we do not present any GIC Redistributor structure in MADT for GICv4 | ||
5 | guests, so that they have no idea about where the Redistributor | ||
6 | register frames are. This fixes a Linux guest crash at boot time with | ||
7 | ACPI enabled and '-machine gic-version=4'. | ||
8 | 4 | ||
9 | While at it, let's convert the remaining hard coded gic_version into | 5 | Reported-by: Peter Maydell <peter.maydell@linaro.org> |
10 | enumeration VIRT_GIC_VERSION_2 for consistency. | 6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
11 | |||
12 | Signed-off-by: Zenghui Yu <yuzenghui@huawei.com> | ||
13 | Message-id: 20220812022018.1069-1-yuzenghui@huawei.com | ||
14 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 7 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
8 | Message-id: 20230407185149.3253946-2-richard.henderson@linaro.org | ||
15 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
16 | --- | 10 | --- |
17 | hw/arm/virt-acpi-build.c | 4 ++-- | 11 | target/arm/ptw.c | 10 +++++----- |
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | 12 | 1 file changed, 5 insertions(+), 5 deletions(-) |
19 | 13 | ||
20 | diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c | 14 | diff --git a/target/arm/ptw.c b/target/arm/ptw.c |
21 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
22 | --- a/hw/arm/virt-acpi-build.c | 16 | --- a/target/arm/ptw.c |
23 | +++ b/hw/arm/virt-acpi-build.c | 17 | +++ b/target/arm/ptw.c |
24 | @@ -XXX,XX +XXX,XX @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) | 18 | @@ -XXX,XX +XXX,XX @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw, |
25 | uint32_t pmu_interrupt = arm_feature(&armcpu->env, ARM_FEATURE_PMU) ? | 19 | result->f.attrs.secure = false; |
26 | PPI(VIRTUAL_PMU_IRQ) : 0; | ||
27 | |||
28 | - if (vms->gic_version == 2) { | ||
29 | + if (vms->gic_version == VIRT_GIC_VERSION_2) { | ||
30 | physical_base_address = memmap[VIRT_GIC_CPU].base; | ||
31 | gicv = memmap[VIRT_GIC_VCPU].base; | ||
32 | gich = memmap[VIRT_GIC_HYP].base; | ||
33 | @@ -XXX,XX +XXX,XX @@ build_madt(GArray *table_data, BIOSLinker *linker, VirtMachineState *vms) | ||
34 | build_append_int_noprefix(table_data, armcpu->mp_affinity, 8); | ||
35 | } | 20 | } |
36 | 21 | ||
37 | - if (vms->gic_version == 3) { | 22 | - /* When in aarch64 mode, and BTI is enabled, remember GP in the TLB. */ |
38 | + if (vms->gic_version != VIRT_GIC_VERSION_2) { | 23 | - if (aarch64 && cpu_isar_feature(aa64_bti, cpu)) { |
39 | build_append_gicr(table_data, memmap[VIRT_GIC_REDIST].base, | 24 | - result->f.guarded = extract64(attrs, 50, 1); /* GP */ |
40 | memmap[VIRT_GIC_REDIST].size); | 25 | - } |
41 | if (virt_gicv3_redist_region_count(vms) == 2) { | 26 | - |
27 | if (regime_is_stage2(mmu_idx)) { | ||
28 | result->cacheattrs.is_s2_format = true; | ||
29 | result->cacheattrs.attrs = extract32(attrs, 2, 4); | ||
30 | @@ -XXX,XX +XXX,XX @@ static bool get_phys_addr_lpae(CPUARMState *env, S1Translate *ptw, | ||
31 | assert(attrindx <= 7); | ||
32 | result->cacheattrs.is_s2_format = false; | ||
33 | result->cacheattrs.attrs = extract64(mair, attrindx * 8, 8); | ||
34 | + | ||
35 | + /* When in aarch64 mode, and BTI is enabled, remember GP in the TLB. */ | ||
36 | + if (aarch64 && cpu_isar_feature(aa64_bti, cpu)) { | ||
37 | + result->f.guarded = extract64(attrs, 50, 1); /* GP */ | ||
38 | + } | ||
39 | } | ||
40 | |||
41 | /* | ||
42 | -- | 42 | -- |
43 | 2.25.1 | 43 | 2.34.1 | diff view generated by jsdifflib |
1 | From: Philippe Mathieu-Daudé <f4bug@amsat.org> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | Commit 06680b15b4 moved qemu_*_exec_dir() to cutils but forgot | 3 | The guarded bit comes from the stage1 walk. |
4 | to move the macOS dyld(3) include, resulting in the following | ||
5 | error (when building with Homebrew GCC on macOS Monterey 12.4): | ||
6 | 4 | ||
7 | [313/1197] Compiling C object libqemuutil.a.p/util_cutils.c.o | 5 | Fixes: Coverity CID 1507929 |
8 | FAILED: libqemuutil.a.p/util_cutils.c.o | 6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
9 | ../../util/cutils.c:1039:13: error: implicit declaration of function '_NSGetExecutablePath' [-Werror=implicit-function-declaration] | ||
10 | 1039 | if (_NSGetExecutablePath(fpath, &len) == 0) { | ||
11 | | ^~~~~~~~~~~~~~~~~~~~ | ||
12 | ../../util/cutils.c:1039:13: error: nested extern declaration of '_NSGetExecutablePath' [-Werror=nested-externs] | ||
13 | |||
14 | Fix by moving the include line to cutils. | ||
15 | |||
16 | Fixes: 06680b15b4 ("include: move qemu_*_exec_dir() to cutils") | ||
17 | Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
18 | Message-id: 20220809222046.30812-1-f4bug@amsat.org | ||
19 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 7 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
8 | Message-id: 20230407185149.3253946-3-richard.henderson@linaro.org | ||
20 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
21 | --- | 10 | --- |
22 | util/cutils.c | 4 ++++ | 11 | target/arm/ptw.c | 1 + |
23 | util/oslib-posix.c | 4 ---- | 12 | 1 file changed, 1 insertion(+) |
24 | 2 files changed, 4 insertions(+), 4 deletions(-) | ||
25 | 13 | ||
26 | diff --git a/util/cutils.c b/util/cutils.c | 14 | diff --git a/target/arm/ptw.c b/target/arm/ptw.c |
27 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
28 | --- a/util/cutils.c | 16 | --- a/target/arm/ptw.c |
29 | +++ b/util/cutils.c | 17 | +++ b/target/arm/ptw.c |
30 | @@ -XXX,XX +XXX,XX @@ | 18 | @@ -XXX,XX +XXX,XX @@ static ARMCacheAttrs combine_cacheattrs(uint64_t hcr, |
31 | #include <kernel/image.h> | 19 | |
32 | #endif | 20 | assert(!s1.is_s2_format); |
33 | 21 | ret.is_s2_format = false; | |
34 | +#ifdef __APPLE__ | 22 | + ret.guarded = s1.guarded; |
35 | +#include <mach-o/dyld.h> | 23 | |
36 | +#endif | 24 | if (s1.attrs == 0xf0) { |
37 | + | 25 | tagged = true; |
38 | #ifdef G_OS_WIN32 | ||
39 | #include <pathcch.h> | ||
40 | #include <wchar.h> | ||
41 | diff --git a/util/oslib-posix.c b/util/oslib-posix.c | ||
42 | index XXXXXXX..XXXXXXX 100644 | ||
43 | --- a/util/oslib-posix.c | ||
44 | +++ b/util/oslib-posix.c | ||
45 | @@ -XXX,XX +XXX,XX @@ | ||
46 | #include <lwp.h> | ||
47 | #endif | ||
48 | |||
49 | -#ifdef __APPLE__ | ||
50 | -#include <mach-o/dyld.h> | ||
51 | -#endif | ||
52 | - | ||
53 | #include "qemu/mmap-alloc.h" | ||
54 | |||
55 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
56 | -- | 26 | -- |
57 | 2.25.1 | 27 | 2.34.1 |
58 | |||
59 | diff view generated by jsdifflib |