Re: [PATCH 4/6] target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward

2023-03-26 Thread Nicholas Piggin
On Fri Mar 24, 2023 at 11:39 PM AEST, Fabiano Rosas wrote: > Nicholas Piggin writes: > > > This optional behavior was removed from the ISA in v3.0, see > > Summary of Changes preface: > > > > Data Storage Interrupt Status Register for Alignment Interrupt: > > Simplifies the Alignment

Re: [PATCH 3/6] target/ppc: Fix instruction loading endianness in alignment interrupt

2023-03-26 Thread Nicholas Piggin
On Fri Mar 24, 2023 at 11:30 PM AEST, Fabiano Rosas wrote: > Hi Nick, > > > powerpc ifetch endianness depends on MSR[LE] so it has to byteswap > > after cpu_ldl_code(). This corrects DSISR bits in alignment > > interrupts when running in little endian mode. > > > > Just a thought, we have these

Re: [PATCH v7 0/3] Add support for TPM devices over I2C bus

2023-03-26 Thread Ninad Palsule
Hi Joel, On 3/26/23 8:05 PM, Joel Stanley wrote: Hi Ninad, On Sun, 26 Mar 2023 at 22:44, Ninad Palsule wrote: Hello, I have incorporated review comments from Stefan. Please review. This drop adds support for the TPM devices attached to the I2C bus. It only supports the TPM2 protocol. You

Re: [PATCH v6 13/25] target/riscv: Introduce mmuidx_priv

2023-03-26 Thread LIU Zhiwei
On 2023/3/25 18:54, Richard Henderson wrote: Use the priv level encoded into the mmu_idx, rather than starting from env->priv. We have already checked MPRV+MPP in riscv_cpu_mmu_index -- no need to repeat that. Signed-off-by: Richard Henderson --- target/riscv/internals.h | 9 +

Re: [PATCH v6 04/25] target/riscv: Remove mstatus_hs_{fs, vs} from tb_flags

2023-03-26 Thread liweiwei
On 2023/3/25 18:54, Richard Henderson wrote: Merge with mstatus_{fs,vs}. We might perform a redundant assignment to one or the other field, but it's a trivial and saves 4 bits from TB_FLAGS. Signed-off-by: Richard Henderson --- target/riscv/cpu.h| 16 +++-

Re: [PATCH v7 0/3] Add support for TPM devices over I2C bus

2023-03-26 Thread Joel Stanley
Hi Ninad, On Sun, 26 Mar 2023 at 22:44, Ninad Palsule wrote: > > Hello, > > I have incorporated review comments from Stefan. Please review. > > This drop adds support for the TPM devices attached to the I2C bus. It > only supports the TPM2 protocol. You need to run it with the external > TPM

[PATCH 2/2] qtest: Add a test case for TPM TIS I2C connected to Aspeed I2C controller

2023-03-26 Thread Stefan Berger
Add a test case for the TPM TIS I2C device exercising most of its functionality, including localities. Add library functions for being able to read from and write to registers of the TPM TIS I2C device connected to the Aspeed i2c controller. Signed-off-by: Stefan Berger ---

[PATCH 0/2] qtests: tpm: Add test cases for TPM TIS I2C device emulation

2023-03-26 Thread Stefan Berger
Refactor existing test code and move tpm_util_tis_transmit() into tpm-tis-utils.c to avoid having to declare tpm_tis_base_addr in test cases that have nothing to do with TIS and shouldn't need to provide this variable. Add test cases exercising much of the TPM TIS I2C device emulation assuming

[PATCH 1/2] qtest: Move tpm_util_tis_transmit() into tpm-tis-utils.c and rename it

2023-03-26 Thread Stefan Berger
To be able to remove tpm_tis_base_addr from test cases that do not really need it move the tpm_util_tis_transmit() function into tpm-tis-utils.c and rename it to tpm_tis_transmit(). Fix a locality parameter in a test case on the way. Signed-off-by: Stefan Berger ---

Re: [PATCH v7 2/3] tpm: Extend common APIs to support TPM TIS I2C

2023-03-26 Thread Stefan Berger
On 3/26/23 18:44, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. This commit includes changes for the common code. - Added support for the new checksum registers which are required for the I2C

[PATCH v7 1/3] docs: Add support for TPM devices over I2C bus

2023-03-26 Thread Ninad Palsule
This is a documentation change for I2C TPM device support. Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. Signed-off-by: Ninad Palsule --- V2: Incorporated Stephen's review comments - Added example in the document. ---

[PATCH v7 0/3] Add support for TPM devices over I2C bus

2023-03-26 Thread Ninad Palsule
Hello, I have incorporated review comments from Stefan. Please review. This drop adds support for the TPM devices attached to the I2C bus. It only supports the TPM2 protocol. You need to run it with the external TPM emulator like swtpm. I have tested it with swtpm. I have refered to the work

[PATCH v7 2/3] tpm: Extend common APIs to support TPM TIS I2C

2023-03-26 Thread Ninad Palsule
Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. This commit includes changes for the common code. - Added support for the new checksum registers which are required for the I2C support. The checksum calculation is handled in

[PATCH v7 3/3] tpm: Add support for TPM device over I2C bus

2023-03-26 Thread Ninad Palsule
Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. - Added I2C emulation model. Logic was added in the model to temporarily cache the data

Re: [PATCH v6 3/3] tpm: Add support for TPM device over I2C bus

2023-03-26 Thread Ninad Palsule
Hi Stephan, On 3/26/23 8:00 AM, Stefan Berger wrote: On 3/25/23 22:38, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the

[PATCH V2] meson: install keyboard maps only if necessary

2023-03-26 Thread casantos
From: Carlos Santos They are required only for system emulation (i.e. have_system is true). Signed-off-by: Carlos Santos --- pc-bios/keymaps/meson.build | 6 -- tests/fp/berkeley-testfloat-3 | 2 +- ui/keycodemapdb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-)

Re: [PATCH] meson: allow disablind the installation of keymaps

2023-03-26 Thread Carlos Santos
On Mon, Jan 2, 2023 at 1:19 PM wrote: > > From: Carlos Santos > > There are situatuions in which the keyboard maps are not necessary (e.g. > when building only tools or linux-user emulator). Add an option to avoid > installing them, as already possible to do with firmware blobs. > >

[PATCH] meson: install keyboard maps only if necessary

2023-03-26 Thread casantos
From: Carlos Santos They are required only for system emulation (i.e. have_system is true). Signed-off-by: Carlos Santos --- pc-bios/keymaps/meson.build | 6 -- scripts/meson-buildoptions.sh | 2 ++ tests/fp/berkeley-testfloat-3 | 2 +- ui/keycodemapdb | 2 +- 4 files

[PATCH] tracing: install trace events file only if necessary

2023-03-26 Thread casantos
From: Carlos Santos It is required only if linux-user, bsd-user or system emulator is built. Signed-off-by: Carlos Santos --- trace/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trace/meson.build b/trace/meson.build index 8e80be895c..3fb41c97a4 100644 ---

[PATCH v3 3/4] hw/arm: Add WDT to Allwinner-H3 and Orangepi-PC

2023-03-26 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-H3 and Orangepi-PC. WDT is added as an overlay to the Timer module memory area. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/orangepi.rst | 1 + hw/arm/Kconfig| 1 + hw/arm/allwinner-h3.c | 8

[PATCH v3 0/4] Basic Allwinner WDT emulation

2023-03-26 Thread Strahinja Jankovic
This patch set introduces basic emulation of Allwinner WDT. Since WDT in both A10 and H3 is part of Timer module, the WDT functionality is added as an overlay in the memory map. The focus was to enable reboot functionality, so WDT interrupt handling is not covered in this patch set. With these

[PATCH v3 4/4] tests/avocado: Add reboot tests to Cubieboard

2023-03-26 Thread Strahinja Jankovic
Cubieboard tests end with comment "reboot not functioning; omit test". Fix this so reboot is done at the end of each test. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank --- tests/avocado/boot_linux_console.py | 15 --- 1 file changed,

[PATCH v3 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-26 Thread Strahinja Jankovic
This patch adds basic support for Allwinner WDT. Both sun4i and sun6i variants are supported. However, interrupt generation is not supported, so WDT can be used only to trigger system reset. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank Tested-by: Niek Linnenbank ---

[PATCH v3 2/4] hw/arm: Add WDT to Allwinner-A10 and Cubieboard

2023-03-26 Thread Strahinja Jankovic
This patch adds WDT to Allwinner-A10 and Cubieboard. WDT is added as an overlay to the Timer module memory map. Signed-off-by: Strahinja Jankovic Reviewed-by: Niek Linnenbank --- docs/system/arm/cubieboard.rst | 1 + hw/arm/Kconfig | 1 + hw/arm/allwinner-a10.c | 7

Re: [PATCH v2 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-26 Thread Strahinja Jankovic
Hi Niek, On Sun, Mar 26, 2023 at 9:04 PM Niek Linnenbank wrote: > > Hi Strahinja, > > > > > On Fri, Mar 17, 2023 at 1:13 AM Strahinja Jankovic > wrote: >> >> This patch adds basic support for Allwinner WDT. >> Both sun4i and sun6i variants are supported. >> However, interrupt generation is not

Re: [PATCH v2 1/4] hw/watchdog: Allwinner WDT emulation for system reset

2023-03-26 Thread Niek Linnenbank
Hi Strahinja, On Fri, Mar 17, 2023 at 1:13 AM Strahinja Jankovic < strahinjapjanko...@gmail.com> wrote: > This patch adds basic support for Allwinner WDT. > Both sun4i and sun6i variants are supported. > However, interrupt generation is not supported, so WDT can be used only to > trigger

Re: Audio playback speed issue on sam460ex and pegasos2

2023-03-26 Thread Volker Rümelin
Am 19.03.23 um 21:03 schrieb Volker Rümelin: Am 19.03.23 um 18:49 schrieb BALATON Zoltan: Not sure this helps but I get these with DEBUG enabled in qemu/audio on Linux host with alsa set to 44100 Hz dmix rate with default settings without any -audiodev options with AmigaOS guest. With

[PATCH for-8.0 2/3] migration: Fix potential race on postcopy_qemufile_src

2023-03-26 Thread Peter Xu
postcopy_qemufile_src object should be owned by one thread, either the main thread (e.g. when at the beginning, or at the end of migration), or by the return path thread (when during a preempt enabled postcopy migration). If that's not the case the access to the object might be racy.

[PATCH for-8.0 3/3] migration: Recover behavior of preempt channel creation for pre-7.2

2023-03-26 Thread Peter Xu
In 8.0 devel window we reworked preempt channel creation, so that there'll be no race condition when the migration channel and preempt channel got established in the wrong order in commit 5655aab079. However no one noticed that the change will also be not compatible with older qemus, majorly

[PATCH for-8.0 0/3] migration: Preempt mode fixes for 8.0

2023-03-26 Thread Peter Xu
I'm proposing this patchset for current 8.0 rc material. If we decide to merge this we should merge this sooner the better.. If we leave this for next release then 8.0 release will break with preempt migrations to 7.2- binaries, then also we need to copy stable when merged. Currently no stable

[PATCH for-8.0 1/3] io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side

2023-03-26 Thread Peter Xu
TLS iochannel will inherit io_shutdown() from the master ioc, however we missed to do that on the server side. This will e.g. allow qemu_file_shutdown() to work on dest QEMU too for migration. Acked-by: Daniel P. Berrangé Signed-off-by: Peter Xu --- io/channel-tls.c | 3 +++ 1 file changed, 3

Re: s390 migration crash

2023-03-26 Thread Peter Xu
On Wed, Mar 22, 2023 at 03:16:23PM -0400, Peter Xu wrote: > On Wed, Mar 22, 2023 at 06:13:43PM +, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Wed, Mar 22, 2023 at 02:05:06PM +, Dr. David Alan Gilbert wrote: > > > > * Peter Xu (pet...@redhat.com) wrote:

Re: [PATCH 1/1] target/riscv: Convert env->virt to a bool env->virt_enabled

2023-03-26 Thread liweiwei
On 2023/3/25 22:53, LIU Zhiwei wrote: Currently we only use the env->virt to encode the virtual mode enabled status. Let's make it a bool type. Signed-off-by: LIU Zhiwei --- I'm not quite sure the original reason to use a int for virt. However, this change is acceptable to me.

Re: [PATCH v6 00/25] target/riscv: MSTATUS_SUM + cleanups

2023-03-26 Thread liweiwei
On 2023/3/25 18:54, Richard Henderson wrote: This builds on Fei and Zhiwei's SUM and TB_FLAGS changes. * Reclaim 5 TB_FLAGS bits, since we nearly ran out. * Using cpu_mmu_index(env, true) is insufficient to implement HLVX properly. While that chooses the correct mmu_idx, it

Re: [PATCH v6 3/3] tpm: Add support for TPM device over I2C bus

2023-03-26 Thread Stefan Berger
On 3/25/23 22:38, Ninad Palsule wrote: Qemu already supports devices attached to ISA and sysbus. This drop adds support for the I2C bus attached TPM devices. I2C model only supports TPM2 protocol. This commit includes changes for the common code. - Added I2C emulation model. Logic was added

Re: [PATCH v6 02/25] target/riscv: Add a general status enum for extensions

2023-03-26 Thread liweiwei
On 2023/3/25 18:54, Richard Henderson wrote: From: LIU Zhiwei The pointer masking is the only extension that directly use status. The vector or float extension uses the status in an indirect way. Replace the pointer masking extension special status fields with the general status.

Re: [PATCH 6/8] target/riscv: Fix format for indentation

2023-03-26 Thread liweiwei
On 2023/3/25 22:23, LIU Zhiwei wrote: On 2023/3/24 20:38, Weiwei Li wrote: Fix identation problems, and try to use the same indentation strategy in the same file. Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang ---   target/riscv/arch_dump.c    |   4 +-  

Re: [PATCH v4 06/10] migration: Introduce dirty-limit capability

2023-03-26 Thread Hyman Huang
在 2023/3/24 22:32, Markus Armbruster 写道: Hyman Huang writes: 在 2023/3/24 20:11, Markus Armbruster 写道: huang...@chinatelecom.cn writes: From: Hyman Huang(黄勇) Introduce migration dirty-limit capability, which can be turned on before live migration and limit dirty page rate durty live