1 | Last few changes before rc0: a few bug fixes, but mostly | 1 | A last small test of bug fixes before rc1. |
---|---|---|---|
2 | docs stuff. | ||
3 | 2 | ||
3 | thanks | ||
4 | -- PMM | 4 | -- PMM |
5 | 5 | ||
6 | The following changes since commit a97fca4ceb9d9b10aa8b582e817a5ee6c42ffbaf: | 6 | The following changes since commit ed8ad9728a9c0eec34db9dff61dfa2f1dd625637: |
7 | 7 | ||
8 | Merge remote-tracking branch 'remotes/mst/tags/for_upstream3' into staging (2021-07-16 16:34:42 +0100) | 8 | Merge tag 'pull-tpm-2023-07-14-1' of https://github.com/stefanberger/qemu-tpm into staging (2023-07-15 14:54:04 +0100) |
9 | 9 | ||
10 | are available in the Git repository at: | 10 | are available in the Git repository at: |
11 | 11 | ||
12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210718 | 12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230717 |
13 | 13 | ||
14 | for you to fetch changes up to 8fe612a183dec4c63afdc57537079bc742d024ca: | 14 | for you to fetch changes up to c2c1c4a35c7c2b1a4140b0942b9797c857e476a4: |
15 | 15 | ||
16 | target/arm: Remove duplicate 'plus1' function from Neon and SVE decode (2021-07-18 10:59:47 +0100) | 16 | hw/nvram: Avoid unnecessary Xilinx eFuse backstore write (2023-07-17 11:05:52 +0100) |
17 | 17 | ||
18 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
19 | target-arm queue: | 19 | target-arm queue: |
20 | * Remove duplicate 'plus1' function from Neon and SVE decode | 20 | * hw/arm/sbsa-ref: set 'slots' property of xhci |
21 | * Fix offsets for TTBCR for big-endian hosts | 21 | * linux-user: Remove pointless NULL check in clock_adjtime handling |
22 | * docs: fix copyright date | 22 | * ptw: Fix S1_ptw_translate() debug path |
23 | * docs: add license/version info to HTML footers | 23 | * ptw: Account for FEAT_RME when applying {N}SW, SA bits |
24 | * docs: add an About section | 24 | * accel/tcg: Zero-pad PC in TCG CPU exec trace lines |
25 | * docs: document some more arm boards | 25 | * hw/nvram: Avoid unnecessary Xilinx eFuse backstore write |
26 | 26 | ||
27 | ---------------------------------------------------------------- | 27 | ---------------------------------------------------------------- |
28 | Peter Maydell (11): | 28 | Peter Maydell (5): |
29 | docs: Fix documentation Copyright date | 29 | linux-user: Remove pointless NULL check in clock_adjtime handling |
30 | docs: Stop calling the top level subsections of our manual 'manuals' | 30 | target/arm/ptw.c: Add comments to S1Translate struct fields |
31 | docs: Remove "Contents:" lines from top-level subsections | 31 | target/arm: Fix S1_ptw_translate() debug path |
32 | docs: Move deprecation, build and license info out of system/ | 32 | target/arm/ptw.c: Account for FEAT_RME when applying {N}SW, SA bits |
33 | docs: Add some actual About text to about/index.rst | 33 | accel/tcg: Zero-pad PC in TCG CPU exec trace lines |
34 | docs: Add license note to the HTML page footer | ||
35 | docs: Add QEMU version information to HTML footer | ||
36 | docs: Add skeletal documentation of cubieboard | ||
37 | docs: Add skeletal documentation of the emcraft-sf2 | ||
38 | docs: Add skeletal documentation of highbank and midway | ||
39 | target/arm: Remove duplicate 'plus1' function from Neon and SVE decode | ||
40 | 34 | ||
41 | Richard Henderson (1): | 35 | Tong Ho (1): |
42 | target/arm: Fix offsets for TTBCR | 36 | hw/nvram: Avoid unnecessary Xilinx eFuse backstore write |
43 | 37 | ||
44 | docs/_templates/footer.html | 14 ++++++++++++++ | 38 | Yuquan Wang (1): |
45 | docs/{system => about}/build-platforms.rst | 0 | 39 | hw/arm/sbsa-ref: set 'slots' property of xhci |
46 | docs/{system => about}/deprecated.rst | 0 | ||
47 | docs/about/index.rst | 27 +++++++++++++++++++++++++++ | ||
48 | docs/{system => about}/license.rst | 0 | ||
49 | docs/{system => about}/removed-features.rst | 0 | ||
50 | docs/conf.py | 2 +- | ||
51 | docs/devel/index.rst | 7 +------ | ||
52 | docs/index.rst | 1 + | ||
53 | docs/interop/index.rst | 9 ++------- | ||
54 | docs/meson.build | 3 ++- | ||
55 | docs/specs/index.rst | 7 ++----- | ||
56 | docs/system/arm/cubieboard.rst | 16 ++++++++++++++++ | ||
57 | docs/system/arm/emcraft-sf2.rst | 15 +++++++++++++++ | ||
58 | docs/system/arm/highbank.rst | 19 +++++++++++++++++++ | ||
59 | docs/system/index.rst | 11 +---------- | ||
60 | docs/system/target-arm.rst | 3 +++ | ||
61 | docs/tools/index.rst | 7 ++----- | ||
62 | docs/user/index.rst | 7 +------ | ||
63 | target/arm/neon-ls.decode | 4 ++-- | ||
64 | target/arm/neon-shared.decode | 2 +- | ||
65 | target/arm/sve.decode | 2 +- | ||
66 | target/arm/helper.c | 11 +++++++---- | ||
67 | target/arm/translate-neon.c | 5 ----- | ||
68 | target/arm/translate-sve.c | 5 ----- | ||
69 | MAINTAINERS | 4 ++++ | ||
70 | 26 files changed, 122 insertions(+), 59 deletions(-) | ||
71 | create mode 100644 docs/_templates/footer.html | ||
72 | rename docs/{system => about}/build-platforms.rst (100%) | ||
73 | rename docs/{system => about}/deprecated.rst (100%) | ||
74 | create mode 100644 docs/about/index.rst | ||
75 | rename docs/{system => about}/license.rst (100%) | ||
76 | rename docs/{system => about}/removed-features.rst (100%) | ||
77 | create mode 100644 docs/system/arm/cubieboard.rst | ||
78 | create mode 100644 docs/system/arm/emcraft-sf2.rst | ||
79 | create mode 100644 docs/system/arm/highbank.rst | ||
80 | 40 | ||
41 | accel/tcg/cpu-exec.c | 4 +-- | ||
42 | accel/tcg/translate-all.c | 2 +- | ||
43 | hw/arm/sbsa-ref.c | 1 + | ||
44 | hw/nvram/xlnx-efuse.c | 11 ++++-- | ||
45 | linux-user/syscall.c | 12 +++---- | ||
46 | target/arm/ptw.c | 90 +++++++++++++++++++++++++++++++++++++++++------ | ||
47 | 6 files changed, 98 insertions(+), 22 deletions(-) | diff view generated by jsdifflib |
1 | The Neon and SVE decoders use private 'plus1' functions to implement | 1 | From: Yuquan Wang <wangyuquan1236@phytium.com.cn> |
---|---|---|---|
2 | "add one" for the !function decoder syntax. We have a generic | ||
3 | "plus_1" function in translate.h, so use that instead. | ||
4 | 2 | ||
3 | This extends the slots of xhci to 64, since the default xhci_sysbus | ||
4 | just supports one slot. | ||
5 | |||
6 | Signed-off-by: Wang Yuquan <wangyuquan1236@phytium.com.cn> | ||
7 | Signed-off-by: Chen Baozi <chenbaozi@phytium.com.cn> | ||
8 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
9 | Reviewed-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
10 | Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> | ||
11 | Message-id: 20230710063750.473510-2-wangyuquan1236@phytium.com.cn | ||
5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
6 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
7 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | ||
8 | Message-id: 20210715095341.701-1-peter.maydell@linaro.org | ||
9 | --- | 13 | --- |
10 | target/arm/neon-ls.decode | 4 ++-- | 14 | hw/arm/sbsa-ref.c | 1 + |
11 | target/arm/neon-shared.decode | 2 +- | 15 | 1 file changed, 1 insertion(+) |
12 | target/arm/sve.decode | 2 +- | ||
13 | target/arm/translate-neon.c | 5 ----- | ||
14 | target/arm/translate-sve.c | 5 ----- | ||
15 | 5 files changed, 4 insertions(+), 14 deletions(-) | ||
16 | 16 | ||
17 | diff --git a/target/arm/neon-ls.decode b/target/arm/neon-ls.decode | 17 | diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c |
18 | index XXXXXXX..XXXXXXX 100644 | 18 | index XXXXXXX..XXXXXXX 100644 |
19 | --- a/target/arm/neon-ls.decode | 19 | --- a/hw/arm/sbsa-ref.c |
20 | +++ b/target/arm/neon-ls.decode | 20 | +++ b/hw/arm/sbsa-ref.c |
21 | @@ -XXX,XX +XXX,XX @@ VLD_all_lanes 1111 0100 1 . 1 0 rn:4 .... 11 n:2 size:2 t:1 a:1 rm:4 \ | 21 | @@ -XXX,XX +XXX,XX @@ static void create_xhci(const SBSAMachineState *sms) |
22 | vd=%vd_dp | 22 | hwaddr base = sbsa_ref_memmap[SBSA_XHCI].base; |
23 | 23 | int irq = sbsa_ref_irqmap[SBSA_XHCI]; | |
24 | # Neon load/store single structure to one lane | 24 | DeviceState *dev = qdev_new(TYPE_XHCI_SYSBUS); |
25 | -%imm1_5_p1 5:1 !function=plus1 | 25 | + qdev_prop_set_uint32(dev, "slots", XHCI_MAXSLOTS); |
26 | -%imm1_6_p1 6:1 !function=plus1 | 26 | |
27 | +%imm1_5_p1 5:1 !function=plus_1 | 27 | sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); |
28 | +%imm1_6_p1 6:1 !function=plus_1 | 28 | sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, base); |
29 | |||
30 | VLDST_single 1111 0100 1 . l:1 0 rn:4 .... 00 n:2 reg_idx:3 align:1 rm:4 \ | ||
31 | vd=%vd_dp size=0 stride=1 | ||
32 | diff --git a/target/arm/neon-shared.decode b/target/arm/neon-shared.decode | ||
33 | index XXXXXXX..XXXXXXX 100644 | ||
34 | --- a/target/arm/neon-shared.decode | ||
35 | +++ b/target/arm/neon-shared.decode | ||
36 | @@ -XXX,XX +XXX,XX @@ | ||
37 | # which is 0 for fp16 and 1 for fp32 into a MO_* constant. | ||
38 | # (Note that this is the reverse of the sense of the 1-bit size | ||
39 | # field in the 3same_fp Neon insns.) | ||
40 | -%vcadd_size 20:1 !function=plus1 | ||
41 | +%vcadd_size 20:1 !function=plus_1 | ||
42 | |||
43 | VCMLA 1111 110 rot:2 . 1 . .... .... 1000 . q:1 . 0 .... \ | ||
44 | vm=%vm_dp vn=%vn_dp vd=%vd_dp size=%vcadd_size | ||
45 | diff --git a/target/arm/sve.decode b/target/arm/sve.decode | ||
46 | index XXXXXXX..XXXXXXX 100644 | ||
47 | --- a/target/arm/sve.decode | ||
48 | +++ b/target/arm/sve.decode | ||
49 | @@ -XXX,XX +XXX,XX @@ | ||
50 | ########################################################################### | ||
51 | # Named fields. These are primarily for disjoint fields. | ||
52 | |||
53 | -%imm4_16_p1 16:4 !function=plus1 | ||
54 | +%imm4_16_p1 16:4 !function=plus_1 | ||
55 | %imm6_22_5 22:1 5:5 | ||
56 | %imm7_22_16 22:2 16:5 | ||
57 | %imm8_16_10 16:5 10:3 | ||
58 | diff --git a/target/arm/translate-neon.c b/target/arm/translate-neon.c | ||
59 | index XXXXXXX..XXXXXXX 100644 | ||
60 | --- a/target/arm/translate-neon.c | ||
61 | +++ b/target/arm/translate-neon.c | ||
62 | @@ -XXX,XX +XXX,XX @@ | ||
63 | #include "translate.h" | ||
64 | #include "translate-a32.h" | ||
65 | |||
66 | -static inline int plus1(DisasContext *s, int x) | ||
67 | -{ | ||
68 | - return x + 1; | ||
69 | -} | ||
70 | - | ||
71 | static inline int neon_3same_fp_size(DisasContext *s, int x) | ||
72 | { | ||
73 | /* Convert 0==fp32, 1==fp16 into a MO_* value */ | ||
74 | diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c | ||
75 | index XXXXXXX..XXXXXXX 100644 | ||
76 | --- a/target/arm/translate-sve.c | ||
77 | +++ b/target/arm/translate-sve.c | ||
78 | @@ -XXX,XX +XXX,XX @@ static int tszimm_shl(DisasContext *s, int x) | ||
79 | return x - (8 << tszimm_esz(s, x)); | ||
80 | } | ||
81 | |||
82 | -static inline int plus1(DisasContext *s, int x) | ||
83 | -{ | ||
84 | - return x + 1; | ||
85 | -} | ||
86 | - | ||
87 | /* The SH bit is in bit 8. Extract the low 8 and shift. */ | ||
88 | static inline int expand_imm_sh8s(DisasContext *s, int x) | ||
89 | { | ||
90 | -- | 29 | -- |
91 | 2.20.1 | 30 | 2.34.1 |
92 | |||
93 | diff view generated by jsdifflib |
1 | Add skeletal documentation for the highbank and midway machines. | 1 | In the code for TARGET_NR_clock_adjtime, we set the pointer phtx to |
---|---|---|---|
2 | the address of the local variable htx. This means it can never be | ||
3 | NULL, but later in the code we check it for NULL anyway. Coverity | ||
4 | complains about this (CID 1507683) because the NULL check comes after | ||
5 | a call to clock_adjtime() that assumes it is non-NULL. | ||
6 | |||
7 | Since phtx is always &htx, and is used only in three places, it's not | ||
8 | really necessary. Remove it, bringing the code structure in to line | ||
9 | with that for TARGET_NR_clock_adjtime64, which already uses a simple | ||
10 | '&htx' when it wants a pointer to 'htx'. | ||
2 | 11 | ||
3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
13 | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> | ||
4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 14 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 15 | Message-id: 20230623144410.1837261-1-peter.maydell@linaro.org |
6 | Message-id: 20210713142226.19155-4-peter.maydell@linaro.org | ||
7 | --- | 16 | --- |
8 | docs/system/arm/highbank.rst | 19 +++++++++++++++++++ | 17 | linux-user/syscall.c | 12 +++++------- |
9 | docs/system/target-arm.rst | 1 + | 18 | 1 file changed, 5 insertions(+), 7 deletions(-) |
10 | MAINTAINERS | 1 + | ||
11 | 3 files changed, 21 insertions(+) | ||
12 | create mode 100644 docs/system/arm/highbank.rst | ||
13 | 19 | ||
14 | diff --git a/docs/system/arm/highbank.rst b/docs/system/arm/highbank.rst | 20 | diff --git a/linux-user/syscall.c b/linux-user/syscall.c |
15 | new file mode 100644 | ||
16 | index XXXXXXX..XXXXXXX | ||
17 | --- /dev/null | ||
18 | +++ b/docs/system/arm/highbank.rst | ||
19 | @@ -XXX,XX +XXX,XX @@ | ||
20 | +Calxeda Highbank and Midway (``highbank``, ``midway``) | ||
21 | +====================================================== | ||
22 | + | ||
23 | +``highbank`` is a model of the Calxeda Highbank (ECX-1000) system, | ||
24 | +which has four Cortex-A9 cores. | ||
25 | + | ||
26 | +``midway`` is a model of the Calxeda Midway (ECX-2000) system, | ||
27 | +which has four Cortex-A15 cores. | ||
28 | + | ||
29 | +Emulated devices: | ||
30 | + | ||
31 | +- L2x0 cache controller | ||
32 | +- SP804 dual timer | ||
33 | +- PL011 UART | ||
34 | +- PL061 GPIOs | ||
35 | +- PL031 RTC | ||
36 | +- PL022 synchronous serial port controller | ||
37 | +- AHCI | ||
38 | +- XGMAC ethernet controllers | ||
39 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst | ||
40 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
41 | --- a/docs/system/target-arm.rst | 22 | --- a/linux-user/syscall.c |
42 | +++ b/docs/system/target-arm.rst | 23 | +++ b/linux-user/syscall.c |
43 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running | 24 | @@ -XXX,XX +XXX,XX @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, |
44 | arm/digic | 25 | #if defined(TARGET_NR_clock_adjtime) && defined(CONFIG_CLOCK_ADJTIME) |
45 | arm/cubieboard | 26 | case TARGET_NR_clock_adjtime: |
46 | arm/emcraft-sf2 | 27 | { |
47 | + arm/highbank | 28 | - struct timex htx, *phtx = &htx; |
48 | arm/musicpal | 29 | + struct timex htx; |
49 | arm/gumstix | 30 | |
50 | arm/nrf | 31 | - if (target_to_host_timex(phtx, arg2) != 0) { |
51 | diff --git a/MAINTAINERS b/MAINTAINERS | 32 | + if (target_to_host_timex(&htx, arg2) != 0) { |
52 | index XXXXXXX..XXXXXXX 100644 | 33 | return -TARGET_EFAULT; |
53 | --- a/MAINTAINERS | 34 | } |
54 | +++ b/MAINTAINERS | 35 | - ret = get_errno(clock_adjtime(arg1, phtx)); |
55 | @@ -XXX,XX +XXX,XX @@ L: qemu-arm@nongnu.org | 36 | - if (!is_error(ret) && phtx) { |
56 | S: Odd Fixes | 37 | - if (host_to_target_timex(arg2, phtx) != 0) { |
57 | F: hw/arm/highbank.c | 38 | - return -TARGET_EFAULT; |
58 | F: hw/net/xgmac.c | 39 | - } |
59 | +F: docs/system/arm/highbank.rst | 40 | + ret = get_errno(clock_adjtime(arg1, &htx)); |
60 | 41 | + if (!is_error(ret) && host_to_target_timex(arg2, &htx)) { | |
61 | Canon DIGIC | 42 | + return -TARGET_EFAULT; |
62 | M: Antony Pavlov <antonynpavlov@gmail.com> | 43 | } |
44 | } | ||
45 | return ret; | ||
63 | -- | 46 | -- |
64 | 2.20.1 | 47 | 2.34.1 |
65 | 48 | ||
66 | 49 | diff view generated by jsdifflib |
1 | Add skeletal documentation of the emcraft-sf2 machine. | 1 | Add comments to the in_* fields in the S1Translate struct |
---|---|---|---|
2 | that explain what they're doing. | ||
2 | 3 | ||
3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 4 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 5 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 6 | Message-id: 20230710152130.3928330-2-peter.maydell@linaro.org |
6 | Message-id: 20210713142226.19155-3-peter.maydell@linaro.org | ||
7 | --- | 7 | --- |
8 | docs/system/arm/emcraft-sf2.rst | 15 +++++++++++++++ | 8 | target/arm/ptw.c | 40 ++++++++++++++++++++++++++++++++++++++++ |
9 | docs/system/target-arm.rst | 1 + | 9 | 1 file changed, 40 insertions(+) |
10 | MAINTAINERS | 1 + | ||
11 | 3 files changed, 17 insertions(+) | ||
12 | create mode 100644 docs/system/arm/emcraft-sf2.rst | ||
13 | 10 | ||
14 | diff --git a/docs/system/arm/emcraft-sf2.rst b/docs/system/arm/emcraft-sf2.rst | 11 | diff --git a/target/arm/ptw.c b/target/arm/ptw.c |
15 | new file mode 100644 | 12 | index XXXXXXX..XXXXXXX 100644 |
16 | index XXXXXXX..XXXXXXX | 13 | --- a/target/arm/ptw.c |
17 | --- /dev/null | 14 | +++ b/target/arm/ptw.c |
18 | +++ b/docs/system/arm/emcraft-sf2.rst | ||
19 | @@ -XXX,XX +XXX,XX @@ | 15 | @@ -XXX,XX +XXX,XX @@ |
20 | +Emcraft SmartFusion2 SOM kit (``emcraft-sf2``) | 16 | #endif |
21 | +============================================== | 17 | |
22 | + | 18 | typedef struct S1Translate { |
23 | +The ``emcraft-sf2`` board emulates the SmartFusion2 SOM kit from | 19 | + /* |
24 | +Emcraft (M2S010). This is a System-on-Module from EmCraft systems, | 20 | + * in_mmu_idx : specifies which TTBR, TCR, etc to use for the walk. |
25 | +based on the SmartFusion2 SoC FPGA from Microsemi Corporation. | 21 | + * Together with in_space, specifies the architectural translation regime. |
26 | +The SoC is based on a Cortex-M4 processor. | 22 | + */ |
27 | + | 23 | ARMMMUIdx in_mmu_idx; |
28 | +Emulated devices: | 24 | + /* |
29 | + | 25 | + * in_ptw_idx: specifies which mmuidx to use for the actual |
30 | +- System timer | 26 | + * page table descriptor load operations. This will be one of the |
31 | +- System registers | 27 | + * ARMMMUIdx_Stage2* or one of the ARMMMUIdx_Phys_* indexes. |
32 | +- SPI controller | 28 | + * If a Secure ptw is "downgraded" to NonSecure by an NSTable bit, |
33 | +- UART | 29 | + * this field is updated accordingly. |
34 | +- EMAC | 30 | + */ |
35 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst | 31 | ARMMMUIdx in_ptw_idx; |
36 | index XXXXXXX..XXXXXXX 100644 | 32 | + /* |
37 | --- a/docs/system/target-arm.rst | 33 | + * in_space: the security space for this walk. This plus |
38 | +++ b/docs/system/target-arm.rst | 34 | + * the in_mmu_idx specify the architectural translation regime. |
39 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running | 35 | + * If a Secure ptw is "downgraded" to NonSecure by an NSTable bit, |
40 | arm/sabrelite | 36 | + * this field is updated accordingly. |
41 | arm/digic | 37 | + * |
42 | arm/cubieboard | 38 | + * Note that the security space for the in_ptw_idx may be different |
43 | + arm/emcraft-sf2 | 39 | + * from that for the in_mmu_idx. We do not need to explicitly track |
44 | arm/musicpal | 40 | + * the in_ptw_idx security space because: |
45 | arm/gumstix | 41 | + * - if the in_ptw_idx is an ARMMMUIdx_Phys_* then the mmuidx |
46 | arm/nrf | 42 | + * itself specifies the security space |
47 | diff --git a/MAINTAINERS b/MAINTAINERS | 43 | + * - if the in_ptw_idx is an ARMMMUIdx_Stage2* then the security |
48 | index XXXXXXX..XXXXXXX 100644 | 44 | + * space used for ptw reads is the same as that of the security |
49 | --- a/MAINTAINERS | 45 | + * space of the stage 1 translation for all cases except where |
50 | +++ b/MAINTAINERS | 46 | + * stage 1 is Secure; in that case the only possibilities for |
51 | @@ -XXX,XX +XXX,XX @@ M: Peter Maydell <peter.maydell@linaro.org> | 47 | + * the ptw read are Secure and NonSecure, and the in_ptw_idx |
52 | L: qemu-arm@nongnu.org | 48 | + * value being Stage2 vs Stage2_S distinguishes those. |
53 | S: Maintained | 49 | + */ |
54 | F: hw/arm/msf2-som.c | 50 | ARMSecuritySpace in_space; |
55 | +F: docs/system/arm/emcraft-sf2.rst | 51 | + /* |
56 | 52 | + * in_secure: whether the translation regime is a Secure one. | |
57 | ASPEED BMCs | 53 | + * This is always equal to arm_space_is_secure(in_space). |
58 | M: Cédric Le Goater <clg@kaod.org> | 54 | + * If a Secure ptw is "downgraded" to NonSecure by an NSTable bit, |
55 | + * this field is updated accordingly. | ||
56 | + */ | ||
57 | bool in_secure; | ||
58 | + /* | ||
59 | + * in_debug: is this a QEMU debug access (gdbstub, etc)? Debug | ||
60 | + * accesses will not update the guest page table access flags | ||
61 | + * and will not change the state of the softmmu TLBs. | ||
62 | + */ | ||
63 | bool in_debug; | ||
64 | /* | ||
65 | * If this is stage 2 of a stage 1+2 page table walk, then this must | ||
59 | -- | 66 | -- |
60 | 2.20.1 | 67 | 2.34.1 |
61 | |||
62 | diff view generated by jsdifflib |
1 | From: Richard Henderson <richard.henderson@linaro.org> | 1 | In commit fe4a5472ccd6 we rearranged the logic in S1_ptw_translate() |
---|---|---|---|
2 | so that the debug-access "call get_phys_addr_*" codepath is used both | ||
3 | when S1 is doing ptw reads from stage 2 and when it is doing ptw | ||
4 | reads from physical memory. However, we didn't update the | ||
5 | calculation of s2ptw->in_space and s2ptw->in_secure to account for | ||
6 | the "ptw reads from physical memory" case. This meant that debug | ||
7 | accesses when in Secure state broke. | ||
2 | 8 | ||
3 | The functions vmsa_ttbcr_write and vmsa_ttbcr_raw_write expect | 9 | Create a new function S2_security_space() which returns the |
4 | the offset to be for the complete TCR structure, not the offset | 10 | correct security space to use for the ptw load, and use it to |
5 | to the low 32-bits of a uint64_t. Using offsetoflow32 in this | 11 | determine the correct .in_secure and .in_space fields for the |
6 | case breaks big-endian hosts. | 12 | stage 2 lookup for the ptw load. |
7 | 13 | ||
8 | For TTBCR2, we do want the high 32-bits of a uint64_t. | 14 | Reported-by: Jean-Philippe Brucker <jean-philippe@linaro.org> |
9 | Use cp15.tcr_el[*].raw_tcr as the offsetofhigh32 argument to | 15 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
10 | clarify this. | 16 | Tested-by: Jean-Philippe Brucker <jean-philippe@linaro.org> |
11 | 17 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | |
12 | Buglink: https://gitlab.com/qemu-project/qemu/-/issues/187 | 18 | Message-id: 20230710152130.3928330-3-peter.maydell@linaro.org |
13 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | 19 | Fixes: fe4a5472ccd6 ("target/arm: Use get_phys_addr_with_struct in S1_ptw_translate") |
14 | Message-id: 20210709230621.938821-2-richard.henderson@linaro.org | ||
15 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
16 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 20 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
17 | --- | 21 | --- |
18 | target/arm/helper.c | 11 +++++++---- | 22 | target/arm/ptw.c | 37 ++++++++++++++++++++++++++++++++----- |
19 | 1 file changed, 7 insertions(+), 4 deletions(-) | 23 | 1 file changed, 32 insertions(+), 5 deletions(-) |
20 | 24 | ||
21 | diff --git a/target/arm/helper.c b/target/arm/helper.c | 25 | diff --git a/target/arm/ptw.c b/target/arm/ptw.c |
22 | index XXXXXXX..XXXXXXX 100644 | 26 | index XXXXXXX..XXXXXXX 100644 |
23 | --- a/target/arm/helper.c | 27 | --- a/target/arm/ptw.c |
24 | +++ b/target/arm/helper.c | 28 | +++ b/target/arm/ptw.c |
25 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo vmsa_cp_reginfo[] = { | 29 | @@ -XXX,XX +XXX,XX @@ static bool S2_attrs_are_device(uint64_t hcr, uint8_t attrs) |
26 | .access = PL1_RW, .accessfn = access_tvm_trvm, | 30 | } |
27 | .type = ARM_CP_ALIAS, .writefn = vmsa_ttbcr_write, | 31 | } |
28 | .raw_writefn = vmsa_ttbcr_raw_write, | 32 | |
29 | - .bank_fieldoffsets = { offsetoflow32(CPUARMState, cp15.tcr_el[3]), | 33 | +static ARMSecuritySpace S2_security_space(ARMSecuritySpace s1_space, |
30 | - offsetoflow32(CPUARMState, cp15.tcr_el[1])} }, | 34 | + ARMMMUIdx s2_mmu_idx) |
31 | + /* No offsetoflow32 -- pass the entire TCR to writefn/raw_writefn. */ | 35 | +{ |
32 | + .bank_fieldoffsets = { offsetof(CPUARMState, cp15.tcr_el[3]), | 36 | + /* |
33 | + offsetof(CPUARMState, cp15.tcr_el[1])} }, | 37 | + * Return the security space to use for stage 2 when doing |
34 | REGINFO_SENTINEL | 38 | + * the S1 page table descriptor load. |
35 | }; | 39 | + */ |
36 | 40 | + if (regime_is_stage2(s2_mmu_idx)) { | |
37 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo ttbcr2_reginfo = { | 41 | + /* |
38 | .name = "TTBCR2", .cp = 15, .opc1 = 0, .crn = 2, .crm = 0, .opc2 = 3, | 42 | + * The security space for ptw reads is almost always the same |
39 | .access = PL1_RW, .accessfn = access_tvm_trvm, | 43 | + * as that of the security space of the stage 1 translation. |
40 | .type = ARM_CP_ALIAS, | 44 | + * The only exception is when stage 1 is Secure; in that case |
41 | - .bank_fieldoffsets = { offsetofhigh32(CPUARMState, cp15.tcr_el[3]), | 45 | + * the ptw read might be to the Secure or the NonSecure space |
42 | - offsetofhigh32(CPUARMState, cp15.tcr_el[1]) }, | 46 | + * (but never Realm or Root), and the s2_mmu_idx tells us which. |
43 | + .bank_fieldoffsets = { | 47 | + * Root translations are always single-stage. |
44 | + offsetofhigh32(CPUARMState, cp15.tcr_el[3].raw_tcr), | 48 | + */ |
45 | + offsetofhigh32(CPUARMState, cp15.tcr_el[1].raw_tcr), | 49 | + if (s1_space == ARMSS_Secure) { |
46 | + }, | 50 | + return arm_secure_to_space(s2_mmu_idx == ARMMMUIdx_Stage2_S); |
47 | }; | 51 | + } else { |
48 | 52 | + assert(s2_mmu_idx != ARMMMUIdx_Stage2_S); | |
49 | static void omap_ticonfig_write(CPUARMState *env, const ARMCPRegInfo *ri, | 53 | + assert(s1_space != ARMSS_Root); |
54 | + return s1_space; | ||
55 | + } | ||
56 | + } else { | ||
57 | + /* ptw loads are from phys: the mmu idx itself says which space */ | ||
58 | + return arm_phys_to_space(s2_mmu_idx); | ||
59 | + } | ||
60 | +} | ||
61 | + | ||
62 | /* Translate a S1 pagetable walk through S2 if needed. */ | ||
63 | static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, | ||
64 | hwaddr addr, ARMMMUFaultInfo *fi) | ||
65 | { | ||
66 | - ARMSecuritySpace space = ptw->in_space; | ||
67 | bool is_secure = ptw->in_secure; | ||
68 | ARMMMUIdx mmu_idx = ptw->in_mmu_idx; | ||
69 | ARMMMUIdx s2_mmu_idx = ptw->in_ptw_idx; | ||
70 | @@ -XXX,XX +XXX,XX @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, | ||
71 | * From gdbstub, do not use softmmu so that we don't modify the | ||
72 | * state of the cpu at all, including softmmu tlb contents. | ||
73 | */ | ||
74 | + ARMSecuritySpace s2_space = S2_security_space(ptw->in_space, s2_mmu_idx); | ||
75 | S1Translate s2ptw = { | ||
76 | .in_mmu_idx = s2_mmu_idx, | ||
77 | .in_ptw_idx = ptw_idx_for_stage_2(env, s2_mmu_idx), | ||
78 | - .in_secure = s2_mmu_idx == ARMMMUIdx_Stage2_S, | ||
79 | - .in_space = (s2_mmu_idx == ARMMMUIdx_Stage2_S ? ARMSS_Secure | ||
80 | - : space == ARMSS_Realm ? ARMSS_Realm | ||
81 | - : ARMSS_NonSecure), | ||
82 | + .in_secure = arm_space_is_secure(s2_space), | ||
83 | + .in_space = s2_space, | ||
84 | .in_debug = true, | ||
85 | }; | ||
86 | GetPhysAddrResult s2 = { }; | ||
50 | -- | 87 | -- |
51 | 2.20.1 | 88 | 2.34.1 |
52 | |||
53 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | In commit 6d8980a38fa we updated the copyright string we present to | ||
2 | the user in -version output, About dialogs, etc, but we forgot that | ||
3 | the Sphinx manuals have a separate copyright string setting. Update | ||
4 | that one too. | ||
5 | 1 | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
7 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
8 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
9 | Message-id: 20210705095547.15790-2-peter.maydell@linaro.org | ||
10 | --- | ||
11 | docs/conf.py | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/docs/conf.py b/docs/conf.py | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/docs/conf.py | ||
17 | +++ b/docs/conf.py | ||
18 | @@ -XXX,XX +XXX,XX @@ | ||
19 | |||
20 | # General information about the project. | ||
21 | project = u'QEMU' | ||
22 | -copyright = u'2020, The QEMU Project Developers' | ||
23 | +copyright = u'2021, The QEMU Project Developers' | ||
24 | author = u'The QEMU Project Developers' | ||
25 | |||
26 | # The version info for the project you're documenting, acts as replacement for | ||
27 | -- | ||
28 | 2.20.1 | ||
29 | |||
30 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | We merged our previous multiple-manual setup into a single Sphinx | ||
2 | manual, but we left some text in the various index.rst lines that | ||
3 | still calls the top level subsections separate 'manuals'. Update | ||
4 | them to talk about "this section of the manual" instead, and remove | ||
5 | now-obsolete comments about how the index.rst files are the "top | ||
6 | level page for the 'foo' manual". | ||
7 | 1 | ||
8 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
10 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
11 | Message-id: 20210705095547.15790-3-peter.maydell@linaro.org | ||
12 | --- | ||
13 | docs/devel/index.rst | 5 +---- | ||
14 | docs/interop/index.rst | 7 ++----- | ||
15 | docs/specs/index.rst | 5 ++--- | ||
16 | docs/system/index.rst | 5 +---- | ||
17 | docs/tools/index.rst | 5 ++--- | ||
18 | docs/user/index.rst | 5 +---- | ||
19 | 6 files changed, 9 insertions(+), 23 deletions(-) | ||
20 | |||
21 | diff --git a/docs/devel/index.rst b/docs/devel/index.rst | ||
22 | index XXXXXXX..XXXXXXX 100644 | ||
23 | --- a/docs/devel/index.rst | ||
24 | +++ b/docs/devel/index.rst | ||
25 | @@ -XXX,XX +XXX,XX @@ | ||
26 | -.. This is the top level page for the 'devel' manual. | ||
27 | - | ||
28 | - | ||
29 | Developer Information | ||
30 | ===================== | ||
31 | |||
32 | -This manual documents various parts of the internals of QEMU. | ||
33 | +This section of the manual documents various parts of the internals of QEMU. | ||
34 | You only need to read it if you are interested in reading or | ||
35 | modifying QEMU's source code. | ||
36 | |||
37 | diff --git a/docs/interop/index.rst b/docs/interop/index.rst | ||
38 | index XXXXXXX..XXXXXXX 100644 | ||
39 | --- a/docs/interop/index.rst | ||
40 | +++ b/docs/interop/index.rst | ||
41 | @@ -XXX,XX +XXX,XX @@ | ||
42 | -.. This is the top level page for the 'interop' manual. | ||
43 | - | ||
44 | - | ||
45 | System Emulation Management and Interoperability | ||
46 | ================================================ | ||
47 | |||
48 | -This manual contains documents and specifications that are useful | ||
49 | -for making QEMU interoperate with other software. | ||
50 | +This section of the manual contains documents and specifications that | ||
51 | +are useful for making QEMU interoperate with other software. | ||
52 | |||
53 | Contents: | ||
54 | |||
55 | diff --git a/docs/specs/index.rst b/docs/specs/index.rst | ||
56 | index XXXXXXX..XXXXXXX 100644 | ||
57 | --- a/docs/specs/index.rst | ||
58 | +++ b/docs/specs/index.rst | ||
59 | @@ -XXX,XX +XXX,XX @@ | ||
60 | -.. This is the top level page for the 'specs' manual | ||
61 | - | ||
62 | - | ||
63 | System Emulation Guest Hardware Specifications | ||
64 | ============================================== | ||
65 | |||
66 | +This section of the manual contains specifications of | ||
67 | +guest hardware that is specific to QEMU. | ||
68 | |||
69 | Contents: | ||
70 | |||
71 | diff --git a/docs/system/index.rst b/docs/system/index.rst | ||
72 | index XXXXXXX..XXXXXXX 100644 | ||
73 | --- a/docs/system/index.rst | ||
74 | +++ b/docs/system/index.rst | ||
75 | @@ -XXX,XX +XXX,XX @@ | ||
76 | -.. This is the top level page for the 'system' manual. | ||
77 | - | ||
78 | - | ||
79 | System Emulation | ||
80 | ================ | ||
81 | |||
82 | -This manual is the overall guide for users using QEMU | ||
83 | +This section of the manual is the overall guide for users using QEMU | ||
84 | for full system emulation (as opposed to user-mode emulation). | ||
85 | This includes working with hypervisors such as KVM, Xen, Hax | ||
86 | or Hypervisor.Framework. | ||
87 | diff --git a/docs/tools/index.rst b/docs/tools/index.rst | ||
88 | index XXXXXXX..XXXXXXX 100644 | ||
89 | --- a/docs/tools/index.rst | ||
90 | +++ b/docs/tools/index.rst | ||
91 | @@ -XXX,XX +XXX,XX @@ | ||
92 | -.. This is the top level page for the 'tools' manual | ||
93 | - | ||
94 | - | ||
95 | Tools | ||
96 | ===== | ||
97 | |||
98 | +This section of the manual documents QEMU's "tools": its | ||
99 | +command line utilities and other standalone programs. | ||
100 | |||
101 | Contents: | ||
102 | |||
103 | diff --git a/docs/user/index.rst b/docs/user/index.rst | ||
104 | index XXXXXXX..XXXXXXX 100644 | ||
105 | --- a/docs/user/index.rst | ||
106 | +++ b/docs/user/index.rst | ||
107 | @@ -XXX,XX +XXX,XX @@ | ||
108 | -.. This is the top level page for the 'user' manual. | ||
109 | - | ||
110 | - | ||
111 | User Mode Emulation | ||
112 | =================== | ||
113 | |||
114 | -This manual is the overall guide for users using QEMU | ||
115 | +This section of the manual is the overall guide for users using QEMU | ||
116 | for user-mode emulation. In this mode, QEMU can launch | ||
117 | processes compiled for one CPU on another CPU. | ||
118 | |||
119 | -- | ||
120 | 2.20.1 | ||
121 | |||
122 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | Since the top-level subsections aren't self-contained manuals | ||
2 | any more, the "Contents:" lines at the top of each of their | ||
3 | index pages look a bit odd; remove them. | ||
4 | 1 | ||
5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
6 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
7 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
8 | Message-id: 20210705095547.15790-4-peter.maydell@linaro.org | ||
9 | --- | ||
10 | docs/devel/index.rst | 2 -- | ||
11 | docs/interop/index.rst | 2 -- | ||
12 | docs/specs/index.rst | 2 -- | ||
13 | docs/system/index.rst | 2 -- | ||
14 | docs/tools/index.rst | 2 -- | ||
15 | docs/user/index.rst | 2 -- | ||
16 | 6 files changed, 12 deletions(-) | ||
17 | |||
18 | diff --git a/docs/devel/index.rst b/docs/devel/index.rst | ||
19 | index XXXXXXX..XXXXXXX 100644 | ||
20 | --- a/docs/devel/index.rst | ||
21 | +++ b/docs/devel/index.rst | ||
22 | @@ -XXX,XX +XXX,XX @@ This section of the manual documents various parts of the internals of QEMU. | ||
23 | You only need to read it if you are interested in reading or | ||
24 | modifying QEMU's source code. | ||
25 | |||
26 | -Contents: | ||
27 | - | ||
28 | .. toctree:: | ||
29 | :maxdepth: 2 | ||
30 | :includehidden: | ||
31 | diff --git a/docs/interop/index.rst b/docs/interop/index.rst | ||
32 | index XXXXXXX..XXXXXXX 100644 | ||
33 | --- a/docs/interop/index.rst | ||
34 | +++ b/docs/interop/index.rst | ||
35 | @@ -XXX,XX +XXX,XX @@ System Emulation Management and Interoperability | ||
36 | This section of the manual contains documents and specifications that | ||
37 | are useful for making QEMU interoperate with other software. | ||
38 | |||
39 | -Contents: | ||
40 | - | ||
41 | .. toctree:: | ||
42 | :maxdepth: 2 | ||
43 | |||
44 | diff --git a/docs/specs/index.rst b/docs/specs/index.rst | ||
45 | index XXXXXXX..XXXXXXX 100644 | ||
46 | --- a/docs/specs/index.rst | ||
47 | +++ b/docs/specs/index.rst | ||
48 | @@ -XXX,XX +XXX,XX @@ System Emulation Guest Hardware Specifications | ||
49 | This section of the manual contains specifications of | ||
50 | guest hardware that is specific to QEMU. | ||
51 | |||
52 | -Contents: | ||
53 | - | ||
54 | .. toctree:: | ||
55 | :maxdepth: 2 | ||
56 | |||
57 | diff --git a/docs/system/index.rst b/docs/system/index.rst | ||
58 | index XXXXXXX..XXXXXXX 100644 | ||
59 | --- a/docs/system/index.rst | ||
60 | +++ b/docs/system/index.rst | ||
61 | @@ -XXX,XX +XXX,XX @@ for full system emulation (as opposed to user-mode emulation). | ||
62 | This includes working with hypervisors such as KVM, Xen, Hax | ||
63 | or Hypervisor.Framework. | ||
64 | |||
65 | -Contents: | ||
66 | - | ||
67 | .. toctree:: | ||
68 | :maxdepth: 3 | ||
69 | |||
70 | diff --git a/docs/tools/index.rst b/docs/tools/index.rst | ||
71 | index XXXXXXX..XXXXXXX 100644 | ||
72 | --- a/docs/tools/index.rst | ||
73 | +++ b/docs/tools/index.rst | ||
74 | @@ -XXX,XX +XXX,XX @@ Tools | ||
75 | This section of the manual documents QEMU's "tools": its | ||
76 | command line utilities and other standalone programs. | ||
77 | |||
78 | -Contents: | ||
79 | - | ||
80 | .. toctree:: | ||
81 | :maxdepth: 2 | ||
82 | |||
83 | diff --git a/docs/user/index.rst b/docs/user/index.rst | ||
84 | index XXXXXXX..XXXXXXX 100644 | ||
85 | --- a/docs/user/index.rst | ||
86 | +++ b/docs/user/index.rst | ||
87 | @@ -XXX,XX +XXX,XX @@ This section of the manual is the overall guide for users using QEMU | ||
88 | for user-mode emulation. In this mode, QEMU can launch | ||
89 | processes compiled for one CPU on another CPU. | ||
90 | |||
91 | -Contents: | ||
92 | - | ||
93 | .. toctree:: | ||
94 | :maxdepth: 2 | ||
95 | |||
96 | -- | ||
97 | 2.20.1 | ||
98 | |||
99 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | Now that we have a single Sphinx manual rather than multiple manuals, | ||
2 | we can provide a better place for "common to all of QEMU" information | ||
3 | like the deprecation notices, build platforms, license information, | ||
4 | which we currently have in the system/ manual even though it applies | ||
5 | to all of QEMU. | ||
6 | 1 | ||
7 | Create a new directory about/ on the same level as system/, user/, | ||
8 | etc, and move these documents there. | ||
9 | |||
10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
11 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
12 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
13 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
14 | Message-id: 20210705095547.15790-5-peter.maydell@linaro.org | ||
15 | --- | ||
16 | docs/{system => about}/build-platforms.rst | 0 | ||
17 | docs/{system => about}/deprecated.rst | 0 | ||
18 | docs/about/index.rst | 10 ++++++++++ | ||
19 | docs/{system => about}/license.rst | 0 | ||
20 | docs/{system => about}/removed-features.rst | 0 | ||
21 | docs/index.rst | 1 + | ||
22 | docs/system/index.rst | 4 ---- | ||
23 | 7 files changed, 11 insertions(+), 4 deletions(-) | ||
24 | rename docs/{system => about}/build-platforms.rst (100%) | ||
25 | rename docs/{system => about}/deprecated.rst (100%) | ||
26 | create mode 100644 docs/about/index.rst | ||
27 | rename docs/{system => about}/license.rst (100%) | ||
28 | rename docs/{system => about}/removed-features.rst (100%) | ||
29 | |||
30 | diff --git a/docs/system/build-platforms.rst b/docs/about/build-platforms.rst | ||
31 | similarity index 100% | ||
32 | rename from docs/system/build-platforms.rst | ||
33 | rename to docs/about/build-platforms.rst | ||
34 | diff --git a/docs/system/deprecated.rst b/docs/about/deprecated.rst | ||
35 | similarity index 100% | ||
36 | rename from docs/system/deprecated.rst | ||
37 | rename to docs/about/deprecated.rst | ||
38 | diff --git a/docs/about/index.rst b/docs/about/index.rst | ||
39 | new file mode 100644 | ||
40 | index XXXXXXX..XXXXXXX | ||
41 | --- /dev/null | ||
42 | +++ b/docs/about/index.rst | ||
43 | @@ -XXX,XX +XXX,XX @@ | ||
44 | +About QEMU | ||
45 | +========== | ||
46 | + | ||
47 | +.. toctree:: | ||
48 | + :maxdepth: 2 | ||
49 | + | ||
50 | + build-platforms | ||
51 | + deprecated | ||
52 | + removed-features | ||
53 | + license | ||
54 | diff --git a/docs/system/license.rst b/docs/about/license.rst | ||
55 | similarity index 100% | ||
56 | rename from docs/system/license.rst | ||
57 | rename to docs/about/license.rst | ||
58 | diff --git a/docs/system/removed-features.rst b/docs/about/removed-features.rst | ||
59 | similarity index 100% | ||
60 | rename from docs/system/removed-features.rst | ||
61 | rename to docs/about/removed-features.rst | ||
62 | diff --git a/docs/index.rst b/docs/index.rst | ||
63 | index XXXXXXX..XXXXXXX 100644 | ||
64 | --- a/docs/index.rst | ||
65 | +++ b/docs/index.rst | ||
66 | @@ -XXX,XX +XXX,XX @@ Welcome to QEMU's documentation! | ||
67 | :maxdepth: 2 | ||
68 | :caption: Contents: | ||
69 | |||
70 | + about/index | ||
71 | system/index | ||
72 | user/index | ||
73 | tools/index | ||
74 | diff --git a/docs/system/index.rst b/docs/system/index.rst | ||
75 | index XXXXXXX..XXXXXXX 100644 | ||
76 | --- a/docs/system/index.rst | ||
77 | +++ b/docs/system/index.rst | ||
78 | @@ -XXX,XX +XXX,XX @@ or Hypervisor.Framework. | ||
79 | targets | ||
80 | security | ||
81 | multi-process | ||
82 | - deprecated | ||
83 | - removed-features | ||
84 | - build-platforms | ||
85 | - license | ||
86 | -- | ||
87 | 2.20.1 | ||
88 | |||
89 | diff view generated by jsdifflib |
1 | Add skeletal documentation of the cubieboard machine. | 1 | In get_phys_addr_twostage() the code that applies the effects of |
---|---|---|---|
2 | VSTCR.{SA,SW} and VTCR.{NSA,NSW} only updates result->f.attrs.secure. | ||
3 | Now we also have f.attrs.space for FEAT_RME, we need to keep the two | ||
4 | in sync. | ||
5 | |||
6 | These bits only have an effect for Secure space translations, not | ||
7 | for Root, so use the input in_space field to determine whether to | ||
8 | apply them rather than the input is_secure. This doesn't actually | ||
9 | make a difference because Root translations are never two-stage, | ||
10 | but it's a little clearer. | ||
2 | 11 | ||
3 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 12 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
4 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | 13 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> |
5 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 14 | Message-id: 20230710152130.3928330-4-peter.maydell@linaro.org |
6 | Message-id: 20210713142226.19155-2-peter.maydell@linaro.org | ||
7 | --- | 15 | --- |
8 | docs/system/arm/cubieboard.rst | 16 ++++++++++++++++ | 16 | target/arm/ptw.c | 13 ++++++++----- |
9 | docs/system/target-arm.rst | 1 + | 17 | 1 file changed, 8 insertions(+), 5 deletions(-) |
10 | MAINTAINERS | 1 + | ||
11 | 3 files changed, 18 insertions(+) | ||
12 | create mode 100644 docs/system/arm/cubieboard.rst | ||
13 | 18 | ||
14 | diff --git a/docs/system/arm/cubieboard.rst b/docs/system/arm/cubieboard.rst | 19 | diff --git a/target/arm/ptw.c b/target/arm/ptw.c |
15 | new file mode 100644 | ||
16 | index XXXXXXX..XXXXXXX | ||
17 | --- /dev/null | ||
18 | +++ b/docs/system/arm/cubieboard.rst | ||
19 | @@ -XXX,XX +XXX,XX @@ | ||
20 | +Cubietech Cubieboard (``cubieboard``) | ||
21 | +===================================== | ||
22 | + | ||
23 | +The ``cubieboard`` model emulates the Cubietech Cubieboard, | ||
24 | +which is a Cortex-A8 based single-board computer using | ||
25 | +the AllWinner A10 SoC. | ||
26 | + | ||
27 | +Emulated devices: | ||
28 | + | ||
29 | +- Timer | ||
30 | +- UART | ||
31 | +- RTC | ||
32 | +- EMAC | ||
33 | +- SDHCI | ||
34 | +- USB controller | ||
35 | +- SATA controller | ||
36 | diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst | ||
37 | index XXXXXXX..XXXXXXX 100644 | 20 | index XXXXXXX..XXXXXXX 100644 |
38 | --- a/docs/system/target-arm.rst | 21 | --- a/target/arm/ptw.c |
39 | +++ b/docs/system/target-arm.rst | 22 | +++ b/target/arm/ptw.c |
40 | @@ -XXX,XX +XXX,XX @@ undocumented; you can get a complete list by running | 23 | @@ -XXX,XX +XXX,XX @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw, |
41 | arm/aspeed | 24 | hwaddr ipa; |
42 | arm/sabrelite | 25 | int s1_prot, s1_lgpgsz; |
43 | arm/digic | 26 | bool is_secure = ptw->in_secure; |
44 | + arm/cubieboard | 27 | + ARMSecuritySpace in_space = ptw->in_space; |
45 | arm/musicpal | 28 | bool ret, ipa_secure; |
46 | arm/gumstix | 29 | ARMCacheAttrs cacheattrs1; |
47 | arm/nrf | 30 | ARMSecuritySpace ipa_space; |
48 | diff --git a/MAINTAINERS b/MAINTAINERS | 31 | @@ -XXX,XX +XXX,XX @@ static bool get_phys_addr_twostage(CPUARMState *env, S1Translate *ptw, |
49 | index XXXXXXX..XXXXXXX 100644 | 32 | * Check if IPA translates to secure or non-secure PA space. |
50 | --- a/MAINTAINERS | 33 | * Note that VSTCR overrides VTCR and {N}SW overrides {N}SA. |
51 | +++ b/MAINTAINERS | 34 | */ |
52 | @@ -XXX,XX +XXX,XX @@ S: Odd Fixes | 35 | - result->f.attrs.secure = |
53 | F: hw/*/allwinner* | 36 | - (is_secure |
54 | F: include/hw/*/allwinner* | 37 | - && !(env->cp15.vstcr_el2 & (VSTCR_SA | VSTCR_SW)) |
55 | F: hw/arm/cubieboard.c | 38 | - && (ipa_secure |
56 | +F: docs/system/arm/cubieboard.rst | 39 | - || !(env->cp15.vtcr_el2 & (VTCR_NSA | VTCR_NSW)))); |
57 | 40 | + if (in_space == ARMSS_Secure) { | |
58 | Allwinner-h3 | 41 | + result->f.attrs.secure = |
59 | M: Niek Linnenbank <nieklinnenbank@gmail.com> | 42 | + !(env->cp15.vstcr_el2 & (VSTCR_SA | VSTCR_SW)) |
43 | + && (ipa_secure | ||
44 | + || !(env->cp15.vtcr_el2 & (VTCR_NSA | VTCR_NSW))); | ||
45 | + result->f.attrs.space = arm_secure_to_space(result->f.attrs.secure); | ||
46 | + } | ||
47 | |||
48 | return false; | ||
49 | } | ||
60 | -- | 50 | -- |
61 | 2.20.1 | 51 | 2.34.1 |
62 | |||
63 | diff view generated by jsdifflib |
1 | Add a line to the HTML document footer mentioning the QEMU version. | 1 | In commit f0a08b0913befbd we changed the type of the PC from |
---|---|---|---|
2 | The version information is already provided in very faint text below | 2 | target_ulong to vaddr. In doing so we inadvertently dropped the |
3 | the QEMU logo in the sidebar, but that is rather inconspicious, so | 3 | zero-padding on the PC in trace lines (the second item inside the [] |
4 | repeating it in the footer seems useful. | 4 | in these lines). They used to look like this on AArch64, for |
5 | instance: | ||
5 | 6 | ||
7 | Trace 0: 0x7f2260000100 [00000000/0000000040000000/00000061/ff200000] | ||
8 | |||
9 | and now they look like this: | ||
10 | Trace 0: 0x7f4f50000100 [00000000/40000000/00000061/ff200000] | ||
11 | |||
12 | and if the PC happens to be somewhere low like 0x5000 | ||
13 | then the field is shown as /5000/. | ||
14 | |||
15 | This is because TARGET_FMT_lx is a "%08x" or "%016x" specifier, | ||
16 | depending on TARGET_LONG_SIZE, whereas VADDR_PRIx is just PRIx64 | ||
17 | with no width specifier. | ||
18 | |||
19 | Restore the zero-padding by adding an 016 width specifier to | ||
20 | this tracing and a couple of others that were similarly recently | ||
21 | changed to use VADDR_PRIx without a width specifier. | ||
22 | |||
23 | We can't unfortunately restore the "32-bit guests are padded to | ||
24 | 8 hex digits and 64-bit guests to 16 hex digits" behaviour so | ||
25 | easily. | ||
26 | |||
27 | Fixes: f0a08b0913befbd ("accel/tcg/cpu-exec.c: Widen pc to vaddr") | ||
6 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 28 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
7 | Acked-by: Markus Armbruster <armbru@redhat.com> | 29 | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> |
8 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | 30 | Reviewed-by: Anton Johansson <anjo@rev.ng> |
9 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | 31 | Message-id: 20230711165434.4123674-1-peter.maydell@linaro.org |
10 | Message-id: 20210705095547.15790-8-peter.maydell@linaro.org | ||
11 | --- | 32 | --- |
12 | docs/_templates/footer.html | 2 ++ | 33 | accel/tcg/cpu-exec.c | 4 ++-- |
13 | 1 file changed, 2 insertions(+) | 34 | accel/tcg/translate-all.c | 2 +- |
35 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
14 | 36 | ||
15 | diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html | 37 | diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c |
16 | index XXXXXXX..XXXXXXX 100644 | 38 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/docs/_templates/footer.html | 39 | --- a/accel/tcg/cpu-exec.c |
18 | +++ b/docs/_templates/footer.html | 40 | +++ b/accel/tcg/cpu-exec.c |
19 | @@ -XXX,XX +XXX,XX @@ | 41 | @@ -XXX,XX +XXX,XX @@ static void log_cpu_exec(vaddr pc, CPUState *cpu, |
20 | <!-- Empty para to force a blank line after "Built with Sphinx ..." --> | 42 | if (qemu_log_in_addr_range(pc)) { |
21 | <p></p> | 43 | qemu_log_mask(CPU_LOG_EXEC, |
22 | 44 | "Trace %d: %p [%08" PRIx64 | |
23 | +<p>This documentation is for QEMU version {{ version }}.</p> | 45 | - "/%" VADDR_PRIx "/%08x/%08x] %s\n", |
24 | + | 46 | + "/%016" VADDR_PRIx "/%08x/%08x] %s\n", |
25 | {% trans path=pathto('about/license') %} | 47 | cpu->cpu_index, tb->tc.ptr, tb->cs_base, pc, |
26 | <p><a href="{{ path }}">QEMU and this manual are released under the | 48 | tb->flags, tb->cflags, lookup_symbol(pc)); |
27 | GNU General Public License, version 2.</a></p> | 49 | |
50 | @@ -XXX,XX +XXX,XX @@ cpu_tb_exec(CPUState *cpu, TranslationBlock *itb, int *tb_exit) | ||
51 | if (qemu_loglevel_mask(CPU_LOG_EXEC)) { | ||
52 | vaddr pc = log_pc(cpu, last_tb); | ||
53 | if (qemu_log_in_addr_range(pc)) { | ||
54 | - qemu_log("Stopped execution of TB chain before %p [%" | ||
55 | + qemu_log("Stopped execution of TB chain before %p [%016" | ||
56 | VADDR_PRIx "] %s\n", | ||
57 | last_tb->tc.ptr, pc, lookup_symbol(pc)); | ||
58 | } | ||
59 | diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c | ||
60 | index XXXXXXX..XXXXXXX 100644 | ||
61 | --- a/accel/tcg/translate-all.c | ||
62 | +++ b/accel/tcg/translate-all.c | ||
63 | @@ -XXX,XX +XXX,XX @@ void cpu_io_recompile(CPUState *cpu, uintptr_t retaddr) | ||
64 | if (qemu_loglevel_mask(CPU_LOG_EXEC)) { | ||
65 | vaddr pc = log_pc(cpu, tb); | ||
66 | if (qemu_log_in_addr_range(pc)) { | ||
67 | - qemu_log("cpu_io_recompile: rewound execution of TB to %" | ||
68 | + qemu_log("cpu_io_recompile: rewound execution of TB to %016" | ||
69 | VADDR_PRIx "\n", pc); | ||
70 | } | ||
71 | } | ||
28 | -- | 72 | -- |
29 | 2.20.1 | 73 | 2.34.1 |
30 | 74 | ||
31 | 75 | diff view generated by jsdifflib |
1 | Add some text to About to act as a brief introduction to the QEMU | 1 | From: Tong Ho <tong.ho@amd.com> |
---|---|---|---|
2 | manual and to make the about page a bit less of an abrupt start to | ||
3 | it. | ||
4 | 2 | ||
3 | Add a check in the bit-set operation to write the backstore | ||
4 | only if the affected bit is 0 before. | ||
5 | |||
6 | With this in place, there will be no need for callers to | ||
7 | do the checking in order to avoid unnecessary writes. | ||
8 | |||
9 | Signed-off-by: Tong Ho <tong.ho@amd.com> | ||
10 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | ||
11 | Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com> | ||
12 | Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> | ||
5 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
6 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
7 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
8 | Message-id: 20210705095547.15790-6-peter.maydell@linaro.org | ||
9 | --- | 14 | --- |
10 | docs/about/index.rst | 17 +++++++++++++++++ | 15 | hw/nvram/xlnx-efuse.c | 11 +++++++++-- |
11 | 1 file changed, 17 insertions(+) | 16 | 1 file changed, 9 insertions(+), 2 deletions(-) |
12 | 17 | ||
13 | diff --git a/docs/about/index.rst b/docs/about/index.rst | 18 | diff --git a/hw/nvram/xlnx-efuse.c b/hw/nvram/xlnx-efuse.c |
14 | index XXXXXXX..XXXXXXX 100644 | 19 | index XXXXXXX..XXXXXXX 100644 |
15 | --- a/docs/about/index.rst | 20 | --- a/hw/nvram/xlnx-efuse.c |
16 | +++ b/docs/about/index.rst | 21 | +++ b/hw/nvram/xlnx-efuse.c |
17 | @@ -XXX,XX +XXX,XX @@ | 22 | @@ -XXX,XX +XXX,XX @@ static bool efuse_ro_bits_find(XlnxEFuse *s, uint32_t k) |
18 | About QEMU | 23 | |
19 | ========== | 24 | bool xlnx_efuse_set_bit(XlnxEFuse *s, unsigned int bit) |
20 | 25 | { | |
21 | +QEMU is a generic and open source machine emulator and virtualizer. | 26 | + uint32_t set, *row; |
22 | + | 27 | + |
23 | +QEMU can be used in several different ways. The most common is for | 28 | if (efuse_ro_bits_find(s, bit)) { |
24 | +"system emulation", where it provides a virtual model of an | 29 | g_autofree char *path = object_get_canonical_path(OBJECT(s)); |
25 | +entire machine (CPU, memory and emulated devices) to run a guest OS. | 30 | |
26 | +In this mode the CPU may be fully emulated, or it may work with | 31 | @@ -XXX,XX +XXX,XX @@ bool xlnx_efuse_set_bit(XlnxEFuse *s, unsigned int bit) |
27 | +a hypervisor such as KVM, Xen, Hax or Hypervisor.Framework to | 32 | return false; |
28 | +allow the guest to run directly on the host CPU. | 33 | } |
29 | + | 34 | |
30 | +The second supported way to use QEMU is "user mode emulation", | 35 | - s->fuse32[bit / 32] |= 1 << (bit % 32); |
31 | +where QEMU can launch processes compiled for one CPU on another CPU. | 36 | - efuse_bdrv_sync(s, bit); |
32 | +In this mode the CPU is always emulated. | 37 | + /* Avoid back-end write unless there is a real update */ |
33 | + | 38 | + row = &s->fuse32[bit / 32]; |
34 | +QEMU also provides a number of standalone commandline utilities, | 39 | + set = 1 << (bit % 32); |
35 | +such as the `qemu-img` disk image utility that allows you to create, | 40 | + if (!(set & *row)) { |
36 | +convert and modify disk images. | 41 | + *row |= set; |
37 | + | 42 | + efuse_bdrv_sync(s, bit); |
38 | .. toctree:: | 43 | + } |
39 | :maxdepth: 2 | 44 | return true; |
45 | } | ||
40 | 46 | ||
41 | -- | 47 | -- |
42 | 2.20.1 | 48 | 2.34.1 |
43 | 49 | ||
44 | 50 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The standard Sphinx/RTD HTML page footer gives a copyright line | ||
2 | (based on the 'copyright' variable set in conf.py) and a line "Built | ||
3 | with Sphinx using a theme provided by Read the Docs" (which can be | ||
4 | disabled via the html_show_sphinx variable, but we leave it enabled). | ||
5 | As a free software project, we'd like to also mention the license | ||
6 | QEMU and its manual are released under. | ||
7 | 1 | ||
8 | Add a template footer.html which defines the 'extrafooter' block that | ||
9 | the RtD theme provides for this purpose. The new line of text will | ||
10 | go below the existing copyright and sphinx-acknowledgement lines. | ||
11 | (Unfortunately the RTD footer template does not permit putting it | ||
12 | after the copyright but before the sphinx-acknowledgement.) | ||
13 | |||
14 | We use the templating functionality to make the new text also be a | ||
15 | hyperlink to the about/license.html page of the manual. | ||
16 | |||
17 | Unlike rst files, HTML template files are not reported to our depfile | ||
18 | plugin, so we maintain a manual list in meson.build. New template | ||
19 | files should be rare, so not being able to auto-generate the | ||
20 | dependency info is not too awkward. | ||
21 | |||
22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
23 | Acked-by: Markus Armbruster <armbru@redhat.com> | ||
24 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
25 | Message-id: 20210705095547.15790-7-peter.maydell@linaro.org | ||
26 | --- | ||
27 | docs/_templates/footer.html | 12 ++++++++++++ | ||
28 | docs/meson.build | 3 ++- | ||
29 | MAINTAINERS | 1 + | ||
30 | 3 files changed, 15 insertions(+), 1 deletion(-) | ||
31 | create mode 100644 docs/_templates/footer.html | ||
32 | |||
33 | diff --git a/docs/_templates/footer.html b/docs/_templates/footer.html | ||
34 | new file mode 100644 | ||
35 | index XXXXXXX..XXXXXXX | ||
36 | --- /dev/null | ||
37 | +++ b/docs/_templates/footer.html | ||
38 | @@ -XXX,XX +XXX,XX @@ | ||
39 | +{% extends "!footer.html" %} | ||
40 | +{% block extrafooter %} | ||
41 | + | ||
42 | +<!-- Empty para to force a blank line after "Built with Sphinx ..." --> | ||
43 | +<p></p> | ||
44 | + | ||
45 | +{% trans path=pathto('about/license') %} | ||
46 | +<p><a href="{{ path }}">QEMU and this manual are released under the | ||
47 | +GNU General Public License, version 2.</a></p> | ||
48 | +{% endtrans %} | ||
49 | +{{ super() }} | ||
50 | +{% endblock %} | ||
51 | diff --git a/docs/meson.build b/docs/meson.build | ||
52 | index XXXXXXX..XXXXXXX 100644 | ||
53 | --- a/docs/meson.build | ||
54 | +++ b/docs/meson.build | ||
55 | @@ -XXX,XX +XXX,XX @@ if build_docs | ||
56 | meson.source_root() / 'docs/sphinx/qapidoc.py', | ||
57 | meson.source_root() / 'docs/sphinx/qmp_lexer.py', | ||
58 | qapi_gen_depends ] | ||
59 | + sphinx_template_files = [ meson.source_root() / 'docs/_templates/footer.html' ] | ||
60 | |||
61 | have_ga = have_tools and config_host.has_key('CONFIG_GUEST_AGENT') | ||
62 | |||
63 | @@ -XXX,XX +XXX,XX @@ if build_docs | ||
64 | output: 'docs.stamp', | ||
65 | input: files('conf.py'), | ||
66 | depfile: 'docs.d', | ||
67 | - depend_files: sphinx_extn_depends, | ||
68 | + depend_files: [ sphinx_extn_depends, sphinx_template_files ], | ||
69 | command: [SPHINX_ARGS, '-Ddepfile=@DEPFILE@', | ||
70 | '-Ddepfile_stamp=@OUTPUT0@', | ||
71 | '-b', 'html', '-d', private_dir, | ||
72 | diff --git a/MAINTAINERS b/MAINTAINERS | ||
73 | index XXXXXXX..XXXXXXX 100644 | ||
74 | --- a/MAINTAINERS | ||
75 | +++ b/MAINTAINERS | ||
76 | @@ -XXX,XX +XXX,XX @@ S: Maintained | ||
77 | F: docs/conf.py | ||
78 | F: docs/*/conf.py | ||
79 | F: docs/sphinx/ | ||
80 | +F: docs/_templates/ | ||
81 | |||
82 | Miscellaneous | ||
83 | ------------- | ||
84 | -- | ||
85 | 2.20.1 | ||
86 | |||
87 | diff view generated by jsdifflib |