[PATCH v2 0/4] ui/console: Remove console_select()

2024-03-18 Thread Akihiko Odaki
so eliminates the need to replace NULL with the active console and save code. Signed-off-by: Akihiko Odaki --- Changes in v2: - Changed to fall back to a text console if there is no graphical console as previously done. - Link to v1: https://lore.kernel.org/r/20240318-console-v1-0-f4efbfa71..

[PATCH v2 3/4] ui/cocoa: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
ui/cocoa needs to update the UI info and reset the keyboard state tracker when switching the console, or the new console will see the stale UI info or keyboard state. Previously, updating the UI info was done with cocoa_switch(), but it is meant to be called when the surface is being replaced, and

[PATCH v2 4/4] ui/curses: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
ui/curses is the only user of console_select(). Move the implementation to ui/curses. Signed-off-by: Akihiko Odaki --- include/ui/console.h | 1 - ui/console-priv.h | 2 +- ui/console-vc-stubs.c | 2 +- ui/console-vc.c | 3 +- ui/console.c | 121 +-

[PATCH v2 2/4] ui/vnc: Do not use console_select()

2024-03-18 Thread Akihiko Odaki
console_select() is shared by other displays and a console_select() call from one of them triggers console switching also in ui/curses, circumventing key state reinitialization that needs to be performed in preparation and resulting in stuck keys. Use its internal state to track the current active

RE: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Duan, Zhenzhong
Hi Eric, >-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >callback > >Hi ZHenzhong, > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Introduce host_iommu_device_create callback and a wrapper for it. >> >> This callback is used to

RE: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >callback > > > >On 3/18/24 14:52, Eric Auger wrote: >> Hi ZHenzhong, >> >> On 2/28/24 04:58, Zhenzhong Duan wrote: >>> Introduce host_iommu_device_create callback and a wrapper

RE: [PATCH v1 08/11] vfio/pci: Allocate and initialize HostIOMMUDevice after attachment

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 08/11] vfio/pci: Allocate and initialize >HostIOMMUDevice after attachment > > > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Signed-off-by: Zhenzhong Duan >> --- >> hw/vfio/pci.c | 4 >> 1 file changed, 4 insertions(+)

RE: [PATCH v1 01/11] Introduce a common abstract struct HostIOMMUDevice

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 01/11] Introduce a common abstract struct >HostIOMMUDevice > >Hi Zhenzhong, >On 2/28/24 04:58, Zhenzhong Duan wrote: >> HostIOMMUDevice will be inherited by two sub classes, >> legacy and iommufd currently. >As this patch intr

Re: [PATCH] target/i386: Export RFDS bit to guests

2024-03-18 Thread Xiaoyao Li
On 3/13/2024 10:53 PM, Pawan Gupta wrote: Register File Data Sampling (RFDS) is a CPU side-channel vulnerability that may expose stale register value. CPUs that set RFDS_NO bit in MSR IA32_ARCH_CAPABILITIES indicate that they are not vulnerable to RFDS. Similarly, RFDS_CLEAR indicates that CPU is

答复: [PATCH v1 1/2] system/cpus: Fix pause_all_vcpus() under concurrent environment

2024-03-18 Thread zhukeqian via
Hi David, Thanks for reviewing. On 17.03.24 09:37, Keqian Zhu via wrote: >> Both main loop thread and vCPU thread are allowed to call >> pause_all_vcpus(), and in general resume_all_vcpus() is called after >> it. Two issues live in pause_all_vcpus(): > >In general, calling pause_all_vcpus() fro

[PATCH] target/ppc/mmu-radix64: Use correct string format in walk_tree()

2024-03-18 Thread Philippe Mathieu-Daudé
'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format. Fixes: d2066bc50d ("target/ppc: Check page dir/table base alignment") Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/mmu-radix64.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff -

答复: [PATCH v1 2/2] system/cpus: Fix resume_all_vcpus() under vCPU hotplug condition

2024-03-18 Thread zhukeqian via
Hi David, On 17.03.24 09:37, Keqian Zhu via wrote: >> For vCPU being hotplugged, qemu_init_vcpu() is called. In this >> function, we set vcpu state as stopped, and then wait vcpu thread to >> be created. >> >> As the vcpu state is stopped, it will inform us it has been created >> and then wait

[PATCH] target/tricore/helper: Use correct string format in cpu_tlb_fill()

2024-03-18 Thread Philippe Mathieu-Daudé
'address' got converted from target_ulong to vaddr in commit 68d6eee73c ("target/tricore: Convert to CPUClass::tlb_fill"). Use the corresponding format string to avoid casting. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

RE: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create callback

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 05/11] vfio: Introduce host_iommu_device_create >callback > > > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Introduce host_iommu_device_create callback and a wrapper for it. >> >> This callback is used to allocate a host iommu

RE: [PATCH v1 09/11] hw/pci: Introduce pci_device_set/unset_iommu_device()

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 09/11] hw/pci: Introduce >pci_device_set/unset_iommu_device() > >Hi Zhenzhong, > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> From: Yi Liu >> >> This adds pci_device_set/unset_iommu_device() to set/unset >> HostIOMMUDevice for

RE: [PATCH v1 00/11] Add a host IOMMU device abstraction

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 00/11] Add a host IOMMU device abstraction > > > >On 2/28/24 04:58, Zhenzhong Duan wrote: >> Hi, >> >> Based on Joao's suggestion, the iommufd nesting prerequisite series [1] >> is further splitted to host IOMMU device abstrac

RE: [PATCH v1 11/11] backends/iommufd: Introduce helper function iommufd_device_get_info()

2024-03-18 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Subject: Re: [PATCH v1 11/11] backends/iommufd: Introduce helper >function iommufd_device_get_info() > >Hi Joao, > >On 3/18/24 16:09, Joao Martins wrote: >> On 18/03/2024 07:54, Eric Auger wrote: >>> Hi Zhenzhong, >>> >>> On 2/28/24 04:59, Zhenzhong

[PATCH-for-9.1 1/8] target/microblaze: Use correct string format in do_unaligned_access()

2024-03-18 Thread Philippe Mathieu-Daudé
'addr' is of type 'vaddr'; no need to cast, use the corresponding format string. Fixes: ab0c8d0f5b ("target/microblaze: Use cc->do_unaligned_access") Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targe

[PATCH-for-9.1 0/8] target/microblaze: Sprint housekeeping

2024-03-18 Thread Philippe Mathieu-Daudé
Cleanups while trying to remove non-essential target_ulong uses. Last use is in helper_stackprot(), but I couldn't figure what to do there yet. Philippe Mathieu-Daudé (8): target/microblaze: Use correct string format in do_unaligned_access() target/microblaze: Use hwaddr/vaddr in cpu_get_phys

[PATCH-for-9.1 6/8] target/microblaze: Rename helper.c -> sys_helper.c

2024-03-18 Thread Philippe Mathieu-Daudé
helper.c only contains system emulation helpers, rename it as sys_helper.c. Adapt meson and remove pointless #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/{helper.c => sys_helper.c} | 5 + target/microblaze/meson.build| 2 +- 2 files changed, 2 insert

[PATCH-for-9.1 7/8] target/microblaze: Move MMU helpers to sys_helper.c

2024-03-18 Thread Philippe Mathieu-Daudé
MMU helpers are only used during system emulation, move them to sys_helper.c. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/op_helper.c | 48 -- target/microblaze/sys_helper.c | 47 + 2 files changed, 47 insertions(+)

[RFC PATCH-for-9.1 8/8] target/microblaze: Widen $ear to 64-bit

2024-03-18 Thread Philippe Mathieu-Daudé
The Exception Address Register is 64-bit wide. User emulation only access the 32 lower bits. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/cpu.h | 2 +- linux-user/elfload.c | 2 +- target/microblaze/gdbstub.c | 2 +- target/microblaze/translate.c | 2 +- 4 files c

[PATCH-for-9.1 4/8] target/microblaze: Use 32-bit destination in gen_goto_tb()

2024-03-18 Thread Philippe Mathieu-Daudé
cpu_pc and jmp_dest are 32-bit. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c index 4e52ef32db..d6a42381bb 100644 --- a/target/microblaze/tr

[PATCH-for-9.1 3/8] target/microblaze: Widen vaddr in mmu_translate()

2024-03-18 Thread Philippe Mathieu-Daudé
Use 'vaddr' type for virtual addresses. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/mmu.h | 2 +- target/microblaze/mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/microblaze/mmu.h b/target/microblaze/mmu.h index 1068bd2d52..2aca39c923 100644 -

[PATCH-for-9.1 5/8] target/microblaze: Restrict 64-bit 'res_addr' to system emulation

2024-03-18 Thread Philippe Mathieu-Daudé
'res_addr' is only used in system emulation, where we have TARGET_LONG_BITS = 64, so we can directly use the native uint64_t type instead of target_ulong. Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/cpu.h | 10 +- target/microblaze/cpu.c | 2 ++ target/microb

Re: [PATCH] target/tricore/helper: Use correct string format in cpu_tlb_fill()

2024-03-18 Thread Philippe Mathieu-Daudé
+Anton On 19/3/24 06:14, Philippe Mathieu-Daudé wrote: 'address' got converted from target_ulong to vaddr in commit 68d6eee73c ("target/tricore: Convert to CPUClass::tlb_fill"). Use the corresponding format string to avoid casting. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/hel

Re: [PATCH] target/ppc/mmu-radix64: Use correct string format in walk_tree()

2024-03-18 Thread Philippe Mathieu-Daudé
+Anton On 19/3/24 06:10, Philippe Mathieu-Daudé wrote: 'mask', 'nlb' and 'base_addr' are all uin64_t types. Use the corresponding PRIx64 format. Fixes: d2066bc50d ("target/ppc: Check page dir/table base alignment") Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/mmu-radix64.c | 8 --

[PATCH-for-9.1 2/8] target/microblaze: Use hwaddr/vaddr in cpu_get_phys_page_attrs_debug()

2024-03-18 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- target/microblaze/helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/microblaze/helper.c b/target/microblaze/helper.c index 0a12c4ea94..3f410fc7b5 100644 --- a/target/microblaze/helper.c +++ b/target/microblaze/helper.c

Re: [PATCH-for-9.1 0/8] target/microblaze: Sprint housekeeping

2024-03-18 Thread Philippe Mathieu-Daudé
s/sprint/spring/ in Subject ;) On 19/3/24 07:28, Philippe Mathieu-Daudé wrote: Cleanups while trying to remove non-essential target_ulong uses. Last use is in helper_stackprot(), but I couldn't figure what to do there yet. Philippe Mathieu-Daudé (8): target/microblaze: Use correct string fo

[PATCH v1] target/loongarch: Fix qemu-loongarch64 hang when executing 'll.d $t0, $t0, 0'

2024-03-18 Thread Song Gao
On gen_ll, if a->imm is 0, The value of t0 should be src1. Links: https://www.openwall.com/lists/musl/2024/03/12/4 Signed-off-by: Song Gao --- target/loongarch/tcg/insn_trans/trans_atomic.c.inc | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/loongarch/tcg/insn_

Re: [PATCH v2 1/2] system/memory.c: support unaligned access

2024-03-18 Thread Philippe Mathieu-Daudé
On 18/3/24 17:15, Peter Xu wrote: Hi, On Thu, Feb 01, 2024 at 05:13:12PM +0900, Tomoyuki HIROSE wrote: The previous code ignored 'impl.unaligned' and handled unaligned accesses as is. But this implementation cannot emulate specific registers of some devices that allow unaligned access such as x

Re: [PATCH v2 1/2] system/memory.c: support unaligned access

2024-03-18 Thread Philippe Mathieu-Daudé
Hi Tomoyuki, On 19/3/24 07:43, Philippe Mathieu-Daudé wrote: On 18/3/24 17:15, Peter Xu wrote: Hi, On Thu, Feb 01, 2024 at 05:13:12PM +0900, Tomoyuki HIROSE wrote: The previous code ignored 'impl.unaligned' and handled unaligned accesses as is. But this implementation cannot emulate specific

<    1   2   3   4