Re: [PATCH v2] tap-win32: Remove unnecessary stubs

2024-02-17 Thread Akihiko Odaki
Hi Jason, I have this and a few other network-related patches not reviewed. Can you review them? I have the following patches ready for review: https://patchew.org/QEMU/20230921094851.36295-1-akihiko.od...@daynix.com/ ("[PATCH v2] Revert "tap: setting error appropriately when calling

Re: [PATCH] ui/vnc: Respect bound console

2024-02-17 Thread Akihiko Odaki
On 2023/12/11 18:43, Marc-André Lureau wrote: On Mon, Dec 11, 2023 at 12:51 PM Akihiko Odaki wrote: ui/vnc may have a bound console so pass it to qemu_console_is_graphic() and qemu_text_console_put_keysym(). Fixes: 1d0d59fe2919 ("vnc: allow binding servers to qemu consoles") Signed-off-by:

Re: [PATCH v3] vl: Print display options for -display help

2024-02-17 Thread Akihiko Odaki
Hi Marc-André, Paolo, This patch has Reviewed-by: and Tested-by: but not pulled yet. Can either of you pull this? Regards, Akihiko Odaki On 2023/12/16 17:03, Akihiko Odaki wrote: -display lists display backends, but does not tell their options. Use the help messages from qemu-options.def,

Re: [PATCH v3 0/8] util: Introduce qemu_get_runtime_dir()

2024-02-17 Thread Akihiko Odaki
Hi, This patch series has been forgotten for a while but can still be applied. Can anyone review it? Regards, Akihiko Odaki On 2023/09/21 16:54, Akihiko Odaki wrote: qemu_get_runtime_dir() returns a dynamically allocated directory path that is appropriate for storing runtime files. It

[RFC PATCH] target/loongarch/kvm: Add software breakpoint support

2024-02-17 Thread Bibo Mao
With KVM virtualization, debug exception is passthrough to to guest kernel rather than host mode. Here hypercall instruction with special hypercall code is used for sw breakpoint usage. Now only software breakpoint is supported, and itt is allowed to insert/remove software breakpoint. Later

[PATCH v3] hw/core: Unify hotplug decision logic

2024-02-17 Thread Akihiko Odaki
Commit 03fcbd9dc508 ("qdev: Check for the availability of a hotplug controller before adding a device") says: > The qdev_unplug() function contains a g_assert(hotplug_ctrl) > statement, so QEMU crashes when the user tries to device_add + > device_del a device that does not have a corresponding

Re: [PATCH v2] qdev: Report an error for machine without HotplugHandler

2024-02-17 Thread Akihiko Odaki
On 2023/12/20 16:53, Markus Armbruster wrote: Akihiko Odaki writes: On 2023/12/18 23:02, Markus Armbruster wrote: Akihiko Odaki writes: On 2023/12/11 15:51, Markus Armbruster wrote: Akihiko Odaki writes: The HotplugHandler of the machine will be used when the parent bus does not

[PATCH v5 10/11] hw/pci: Rename has_power to enabled

2024-02-17 Thread Akihiko Odaki
The renamed state will not only represent powering state of PFs, but also represent SR-IOV VF enablement in the future. Signed-off-by: Akihiko Odaki --- include/hw/pci/pci.h| 7 ++- include/hw/pci/pci_device.h | 2 +- hw/pci/pci.c| 14 +++---

[PATCH v5 08/11] pcie_sriov: Do not reset NumVFs after disabling VFs

2024-02-17 Thread Akihiko Odaki
The spec does not NumVFs is reset after disabling VFs except when resetting the PF. Clearing it is guest visible and out of spec, even though Linux doesn't rely on this value being preserved, so we never noticed. Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization

[PATCH v5 07/11] pcie_sriov: Reset SR-IOV extended capability

2024-02-17 Thread Akihiko Odaki
pcie_sriov_pf_disable_vfs() is called when resetting the PF, but it only disables VFs and does not reset SR-IOV extended capability, leaking the state and making the VF Enable register inconsistent with the actual state. Replace pcie_sriov_pf_disable_vfs() with pcie_sriov_pf_reset(), which does

[PATCH v5 11/11] pcie_sriov: Reuse SR-IOV VF device instances

2024-02-17 Thread Akihiko Odaki
Disable SR-IOV VF devices by reusing code to power down PCI devices instead of removing them when the guest requests to disable VFs. This allows to realize devices and report VF realization errors at PF realization time. Signed-off-by: Akihiko Odaki --- docs/pcie_sriov.txt | 8 ++--

[PATCH v5 00/11] hw/pci: SR-IOV related fixes and improvements

2024-02-17 Thread Akihiko Odaki
I submitted a RFC series[1] to add support for SR-IOV emulation to virtio-net-pci. During the development of the series, I fixed some trivial bugs and made improvements that I think are independently useful. This series extracts those fixes and improvements from the RFC series. [1]:

[PATCH v5 09/11] hw/pci: Always call pcie_sriov_pf_reset()

2024-02-17 Thread Akihiko Odaki
Call pcie_sriov_pf_reset() from pci_do_device_reset() just as we do for msi_reset() and msix_reset() to prevent duplicating code for each SR-IOV PF. Signed-off-by: Akihiko Odaki --- hw/net/igb.c | 2 -- hw/nvme/ctrl.c | 4 hw/pci/pci.c | 1 + 3 files changed, 1 insertion(+), 6

[PATCH v5 01/11] hw/nvme: Use pcie_sriov_num_vfs()

2024-02-17 Thread Akihiko Odaki
nvme_sriov_pre_write_ctrl() used to directly inspect SR-IOV configurations to know the number of VFs being disabled due to SR-IOV configuration writes, but the logic was flawed and resulted in out-of-bound memory access. It assumed PCI_SRIOV_NUM_VF always has the number of currently enabled VFs,

[PATCH v5 06/11] hw/qdev: Remove opts member

2024-02-17 Thread Akihiko Odaki
It is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- include/hw/qdev-core.h | 4 hw/core/qdev.c | 1 - system/qdev-monitor.c | 12 +++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/qdev-core.h

[PATCH v5 02/11] pcie_sriov: Validate NumVFs

2024-02-17 Thread Akihiko Odaki
The guest may write NumVFs greater than TotalVFs and that can lead to buffer overflow in VF implementations. Cc: qemu-sta...@nongnu.org Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization (SR/IOV)") Signed-off-by: Akihiko Odaki --- hw/pci/pcie_sriov.c | 3 +++ 1 file

[PATCH v5 04/11] hw/pci: Determine if rombar is explicitly enabled

2024-02-17 Thread Akihiko Odaki
vfio determines if rombar is explicitly enabled by inspecting QDict. Inspecting QDict is not nice because QDict is untyped and depends on the details on the external interface. Add an infrastructure to determine if rombar is explicitly enabled to hw/pci. Signed-off-by: Akihiko Odaki ---

[PATCH v5 05/11] vfio: Avoid inspecting option QDict for rombar

2024-02-17 Thread Akihiko Odaki
Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly enabled. Signed-off-by: Akihiko Odaki --- hw/vfio/pci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 4fa387f0430d..647f15b2a060 100644 --- a/hw/vfio/pci.c +++

[PATCH v5 03/11] hw/pci: Use -1 as a default value for rombar

2024-02-17 Thread Akihiko Odaki
Currently there is no way to distinguish the case that rombar is explicitly specified as 1 and the case that rombar is not specified. Set rombar -1 by default to distinguish these cases just as it is done for addr and romsize. It was confirmed that changing the default value to -1 will not change

回复: 回复: FW: [PATCH] vhost-user: add VIRTIO_F_IN_ORDER and VIRTIO_F_NOTIFICATION_DATA feature

2024-02-17 Thread Rick Zhong
Hi Michael, Understood. Thanks. Best Regards, Rick Zhong -邮件原件- 发件人: Michael S. Tsirkin 发送时间: 2024年2月13日 17:53 收件人: Rick Zhong 抄送: Eugenio Perez Martin ; qemu-devel@nongnu.org; Jason Wang ; Peter Xu ; Guo Zhi ; Xinying Yu ; Wentao Jia ; Shujing Dong ; Kyle Xu 主题: Re: 回复: FW:

Ping 2: [PATCH v2] Allowing setting and overriding parameters in smb.conf

2024-02-17 Thread Henrik Carlqvist
Still wondering if there are any plans to apply my patch or if you would like to change anything in the patch? Being able to set parameters in smb.conf would be really useful these days for people running old versions of Windows like Windows XP in a qemu guest. Today, the default settings of

Re: [PATCH 6/6] hw/sysbus: Remove now unused sysbus_address_space()

2024-02-17 Thread Richard Henderson
On 2/16/24 05:35, Philippe Mathieu-Daudé wrote: sysbus_address_space() is not more used, remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sysbus.h | 1 - hw/core/sysbus.c| 5 - 2 files changed, 6 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH 5/6] hw/i386/kvmvapic: Inline sysbus_address_space()

2024-02-17 Thread Richard Henderson
On 2/16/24 05:35, Philippe Mathieu-Daudé wrote: sysbus_address_space(...) is a simple wrapper to get_system_memory(). Use it in place, since KVM VAPIC doesn't distinct address spaces. Rename the 'as' variable as 'mr' since it is a MemoryRegion type, not an AddressSpace one. Signed-off-by:

Re: [PATCH 4/6] hw/display/exynos4210_fimd: Pass frame buffer memory region as link

2024-02-17 Thread Richard Henderson
On 2/16/24 05:35, Philippe Mathieu-Daudé wrote: Add the Exynos4210fimdState::'framebuffer-memory' property. Have the board set it. We don't need to call sysbus_address_space() anymore. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/exynos4210_fimd.c | 19 --- 1 file

Re: [PATCH 3/6] hw/arm/exynos4210: Inline sysbus_create_varargs(EXYNOS4210_FIMD)

2024-02-17 Thread Richard Henderson
On 2/16/24 05:35, Philippe Mathieu-Daudé wrote: We want to set another qdev property (a link) for the FIMD device, we can not use sysbus_create_varargs() which only passes sysbus base address and IRQs as arguments. Inline it so we can set the link property in the next commit. Signed-off-by:

Re: [PATCH 2/6] hw/display/pl110: Pass frame buffer memory region as link property

2024-02-17 Thread Richard Henderson
On 2/16/24 05:35, Philippe Mathieu-Daudé wrote: Add the PL110::'framebuffer-memory' property. Have the different ARM boards set it. We don't need to call sysbus_address_space() anymore. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/realview.c| 2 ++ hw/arm/versatilepb.c | 2 ++

Re: [PATCH 1/6] hw/arm: Inline sysbus_create_simple(PL110 / PL111)

2024-02-17 Thread Richard Henderson
On 2/16/24 05:35, Philippe Mathieu-Daudé wrote: We want to set another qdev property (a link) for the pl110 and pl111 devices, we can not use sysbus_create_simple() which only passes sysbus base address and IRQs as arguments. Inline it so we can set the link property in the next commit.

Re: [PATCH v3 07/11] gdbstub: Introduce gdb_handle_query_supported_user()

2024-02-17 Thread Richard Henderson
On 2/16/24 03:05, Ilya Leoshkevich wrote: The upcoming follow-fork-mode child support requires advertising the fork-events feature, which is user-specific. Introduce a user-specific hook for this. Signed-off-by: Ilya Leoshkevich --- gdbstub/gdbstub.c | 12 +--- gdbstub/internals.h

Re: [PATCH v3 06/11] gdbstub: Call gdbserver_fork() both in parent and in child

2024-02-17 Thread Richard Henderson
On 2/16/24 03:05, Ilya Leoshkevich wrote: The upcoming follow-fork-mode child support requires post-fork message exchange between the parent and the child. Prepare gdbserver_fork() for this purpose. Rename it to gdbserver_fork_end() to better reflect its purpose. Signed-off-by: Ilya Leoshkevich

Re: [PATCH v3 05/11] {linux,bsd}-user: Pass pid to gdbserver_fork()

2024-02-17 Thread Richard Henderson
On 2/16/24 03:05, Ilya Leoshkevich wrote: The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Signed-off-by: Ilya Leoshkevich --- bsd-user/main.c| 2 +- gdbstub/user.c | 2 +- include/gdbstub/user.h | 2 +- linux-user/main.c | 2 +-

Re: [PATCH v3 04/11] {linux,bsd}-user: Pass pid to fork_end()

2024-02-17 Thread Richard Henderson
On 2/16/24 03:05, Ilya Leoshkevich wrote: diff --git a/linux-user/user-internals.h b/linux-user/user-internals.h index c63ef45fc78..9014014d920 100644 --- a/linux-user/user-internals.h +++ b/linux-user/user-internals.h @@ -71,7 +71,7 @@ const char *target_strerror(int err); int

Re: [PATCH v3 02/11] {linux,bsd}-user: Update ts_tid after fork()

2024-02-17 Thread Richard Henderson
On 2/16/24 07:45, Alex Bennée wrote: Ilya Leoshkevich writes: Currently ts_tid contains the parent tid after fork(), which is not correct. So far it has not affected anything, but the upcoming follow-fork-mode child support relies on the correct value, so fix it. Signed-off-by: Ilya

Re: [PATCH v3 01/11] gdbstub: Support disablement in a multi-threaded process

2024-02-17 Thread Richard Henderson
On 2/16/24 03:05, Ilya Leoshkevich wrote: The upcoming follow-fork-mode child support will require disabling gdbstub in the parent process, which may have multiple threads (which are represented as CPUs). Loop over all CPUs in order to remove breakpoints and disable single-step. Move the

Re: [PATCH 1/1] target/riscv: Clear vstart_qe_zero flag

2024-02-17 Thread Richard Henderson
On 2/17/24 00:53, Daniel Henrique Barboza wrote: This patch is replacing mark_vs_dirty() with finalize(), that does call mark_vs_dirty() and set start_eq_zero = true, but it's missing the start_eq_zero update for store functions because of these ifs. We could just remove these ifs and

[PATCH v2 4/6] hw/riscv/virt.c: add virtio-iommu-pci hotplug support

2024-02-17 Thread Daniel Henrique Barboza
We want to add a RISC-V 'virt' libqos machine to increase our test coverage. Some of the tests will try to plug a virtio-iommu-pci device into the board and do some tests with it. Enable virtio-iommu-pci in the 'virt' machine. Signed-off-by: Daniel Henrique Barboza Acked-by: Alistair Francis

[PATCH v2 6/6] tests/libqos: add riscv/virt machine nodes

2024-02-17 Thread Daniel Henrique Barboza
Add a RISC-V 'virt' machine to the graph. This implementation is a modified copy of the existing arm machine in arm-virt-machine.c It contains a virtio-mmio and a generic-pcihost controller. The generic-pcihost controller hardcodes assumptions from the ARM 'virt' machine, like ecam and pio_base

[PATCH v2 3/6] hw/riscv/virt.c: create '/soc/pci@...' fdt node earlier

2024-02-17 Thread Daniel Henrique Barboza
Hotplugged FDT nodes will attempt to write this node that, at this moment, is being created only in create_fdt_pcie() during finalize_fdt(). Create it earlier. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- hw/riscv/virt.c | 9 - 1 file changed, 8

[PATCH v2 1/6] libqos/virtio.c: init all elems in qvring_indirect_desc_setup()

2024-02-17 Thread Daniel Henrique Barboza
The loop isn't setting the values for the last element. Every other element is being initialized with addr = 0, flags = VRING_DESC_F_NEXT and next = i + 1. The last elem is never touched. This became a problem when enabling a RISC-V 'virt' libqos machine in the 'indirect' test of

[PATCH v2 2/6] libqos/virtio.c: fix 'avail_event' offset in qvring_init()

2024-02-17 Thread Daniel Henrique Barboza
In qvring_init() we're writing vq->used->avail_event at "vq->used + 2 + array_size". The struct pointed by vq->used is, from virtio_ring.h Linux header): * // A ring of used descriptor heads with free-running index. * __virtio16 used_flags; * __virtio16 used_idx; * struct

[PATCH v2 5/6] hw/riscv/virt.c: make aclint compatible with 'qtest' accel

2024-02-17 Thread Daniel Henrique Barboza
The 'virt' machine makes assumptions on the Advanced Core-Local Interruptor, or aclint, based on 'tcg_enabled()' conditionals. This will impact MSI related tests support when adding a RISC-V 'virt' libqos machine. The accelerator used in that case, 'qtest', isn't being accounted for and we'll

[PATCH v2 0/6] libqos, riscv: libqos fixes, add riscv machine

2024-02-17 Thread Daniel Henrique Barboza
Hi, This second version was rebased with current alistair/riscv.to.apply-next and has typo fixes in patch 1. No other changes were made. All patches reviewed/acked. Changes from v1: - patch 1: typos in the commit message fixed - v1 link:

Re: [PATCH v5 10/10] tests/bench: Add bufferiszero-bench

2024-02-17 Thread Richard Henderson
On 2/16/24 23:49, Alexander Monakov wrote: On Fri, 16 Feb 2024, Richard Henderson wrote: Benchmark each acceleration function vs an aligned buffer of zeros. Signed-off-by: Richard Henderson --- + +static void test(const void *opaque) +{ +size_t len = 64 * KiB; This exceeds L1 cache

Re: [PATCH v5 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-02-17 Thread Richard Henderson
On 2/17/24 01:33, Alexander Monakov wrote: On Fri, 16 Feb 2024, Richard Henderson wrote: Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely double-check with the compiler flags for __ARM_NEON and don't bother with a runtime check. Otherwise, model the loop after the x86

Re: [PATCH v5 06/10] util/bufferiszero: Improve scalar variant

2024-02-17 Thread Richard Henderson
On 2/17/24 02:13, Alexander Monakov wrote: On Fri, 16 Feb 2024, Richard Henderson wrote: Split less-than and greater-than 256 cases. Use unaligned accesses for head and tail. Avoid using out-of-bounds pointers in loop boundary conditions. I guess it did not carry typedef uint64_t

QEMU development setup

2024-02-17 Thread Isaac David Bermudez Lara
Hi, I am just starting out on QEMU development, and I would like to know which tools to use. I would really appreciate it. Additionally, how is the support for LLVM toolchain on QEMU? Best regards * Isaac

Re: [RFC PATCH 4/6] accel/tcg: Inline cpu_mmu_lookup function

2024-02-17 Thread Max Chou
Hi Richard, After I tried to reduce the overhead of unnecessary segment flow and memory plugin callbacks, I observed that there several functions consume most of runtime from perf report. So these three inline patches and previous patch were created to reduce the overhead without modifying

[PATCH] ui/cocoa: Fix incorrect window clipping on macOS Sonoma

2024-02-17 Thread David Parsons
macOS Sonoma changes the NSView.clipsToBounds to false by default where it was true in earlier version of macOS. This causes the window contents to be obscured by the window frame. This fixes the issue by conditionally setting the clipping on Sonoma to true. Resolves:

Re: [PATCH] scsi: megasas: Internal cdbs have 16-byte length

2024-02-17 Thread Guenter Roeck
On 2/17/24 01:06, Michael Tokarev wrote: 28.02.2023 20:11, Guenter Roeck wrote: Host drivers do not necessarily set cdb_len in megasas io commands. With commits 6d1511cea0 ("scsi: Reject commands if the CDB length exceeds buf_len") and fe9d8927e2 ("scsi: Add buf_len parameter to

[PATCH] Print tool binary names in ./configure --help

2024-02-17 Thread Manos Pitsidianakis
configure --help currently outputs the following line for the tools option: -->8--- ░░tcg░TCG░support░░ tools build support utilities that come with QEMU

Re: [PATCH v5 06/10] util/bufferiszero: Improve scalar variant

2024-02-17 Thread Alexander Monakov
On Fri, 16 Feb 2024, Richard Henderson wrote: > Split less-than and greater-than 256 cases. > Use unaligned accesses for head and tail. > Avoid using out-of-bounds pointers in loop boundary conditions. I guess it did not carry typedef uint64_t uint64_a __attribute__((may_alias)); along the

Re: [PATCH 20/23] contrib/plugins: extend execlog to track register changes

2024-02-17 Thread Pierrick Bouvier
On 2/16/24 20:30, Alex Bennée wrote: With the new plugin register API we can now track changes to register values. Currently the implementation is fairly dumb which will slow down if a large number of register values are being tracked. This could be improved by only instrumenting instructions

Re: [PATCH v5 09/10] util/bufferiszero: Add simd acceleration for aarch64

2024-02-17 Thread Alexander Monakov
On Fri, 16 Feb 2024, Richard Henderson wrote: > Because non-embedded aarch64 is expected to have AdvSIMD enabled, merely > double-check with the compiler flags for __ARM_NEON and don't bother with > a runtime check. Otherwise, model the loop after the x86 SSE2 function, > and use VADDV to

Re: [PATCH v4 5/9] pcie_sriov: Validate NumVFs

2024-02-17 Thread Akihiko Odaki
On 2024/02/15 0:55, Michael S. Tsirkin wrote: On Wed, Feb 14, 2024 at 06:53:43PM +0300, Michael Tokarev wrote: Nope, I don't remember how to request a CVE ;) https://www.qemu.org/contribute/security-process/ Thanks, I requested CVEs with the form. QEMU doesn't have any list of features

[PATCH v11 6/6] ui/cocoa: Remove stretch_video flag

2024-02-17 Thread Akihiko Odaki
Evaluate [normalWindow styleMask] & NSWindowStyleMaskResizable instead. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 81de8d92669b..401ed0c3f1f5 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m

[PATCH v11 1/6] ui/cocoa: Release specific mouse buttons

2024-02-17 Thread Akihiko Odaki
ui/cocoa used to release all mouse buttons when it sees NSEventTypeLeftMouseUp, NSEventTypeRightMouseUp, or NSEventTypeOtherMouseUp, but it can instead release specific one according to the delivered event. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 132

[PATCH v11 2/6] ui/cocoa: Scale with NSView instead of Core Graphics

2024-02-17 Thread Akihiko Odaki
Core Graphics is not accelerated and slow. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index fe0eb74b0743..b26669160300 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -496,10

[PATCH v11 5/6] ui/cocoa: Call console_select() with the BQL

2024-02-17 Thread Akihiko Odaki
console_select() can be called anytime so explicitly take the BQL. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 17f290987563..81de8d92669b 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1391,7

[PATCH v11 4/6] ui/cocoa: Make window resizable

2024-02-17 Thread Akihiko Odaki
The window will be resizable when zoom-to-fit is on. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/cocoa.m b/ui/cocoa.m index 0ebe0f326373..17f290987563 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -1379,8 +1379,10 @@ - (void)zoomToFit:(id)

[PATCH v11 3/6] ui/cocoa: Let the platform toggle fullscreen

2024-02-17 Thread Akihiko Odaki
It allows making the window full screen by clicking full screen button provided by the platform (the left-top green button) and save some code. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 423 ++--- 1 file changed, 207 insertions(+), 216

[PATCH v11 0/6] ui/cocoa: Use NSWindow's ability to resize

2024-02-17 Thread Akihiko Odaki
V5 -> V6: Rebased. Signed-off-by: Akihiko Odaki --- Changes in v11: - Ensured to reflect screen size changes to bounds - Link to v10: https://lore.kernel.org/r/20240214-cocoa-v10-0-c7ffe5d9f...@daynix.com Changes in v10: - Removed relative mouse input scaling. - Link to v9:

Re: [PATCH 1/1] target/riscv: Clear vstart_qe_zero flag

2024-02-17 Thread Daniel Henrique Barboza
Richard, On 12/14/23 08:18, Ivan Klokov wrote: The vstart_qe_zero flag is set at the beginning of the translation phase from the env->vstart variable. During the execution phase, some instructions may change env->vstart, but the flag remains the same as at the start of the block. With some

[PATCH] hw/i386/pc_q35: Populate interrupt handlers before realizing LPC PCI function

2024-02-17 Thread Bernhard Beschow
The interrupt handlers need to be populated before the device is realized since internal devices such as the RTC are wired during realize(). If the interrupt handlers aren't populated, devices such as the RTC will be wired with a NULL interrupt handler, i.e. MC146818RtcState::irq is NULL. Fixes:

Re: [RFC PATCH 3/6] target/riscv: Inline vext_ldst_us and coressponding function for performance

2024-02-17 Thread Max Chou
Hi Daniel, Thank you for the information and suggestion. Yes, we can do it better if we load/store more bytes at a time. I'll try to improve the RFC on this way. Thanks, Max On 2024/2/16 5:11 AM, Daniel Henrique Barboza wrote: On 2/15/24 16:28, Max Chou wrote: In the vector unit-stride

[PATCH v2] tests/cdrom-test: Add cdrom test for LoongArch virt machine

2024-02-17 Thread Bibo Mao
The cdrom test skips to execute on LoongArch system with command "make check", this patch enables cdrom test for LoongArch virt machine platform. With this patch, cdrom test passes to run on LoongArch virt machine type. Signed-off-by: Bibo Mao --- Add virtio-blk-pci checking since LoongArch

Re: [RFC PATCH 0/6] Improve the performance of RISC-V vector unit-stride ld/st instructions

2024-02-17 Thread Max Chou
Hi Richard, Thank you for the suggestion and the reference. I'm trying to follow the reference to implement it and I'll send another version for this. Thanks a lot, Max On 2024/2/16 4:24 AM, Richard Henderson wrote: On 2/15/24 09:28, Max Chou wrote: Hi all, When glibc with RVV support

Re: [PATCH v3 1/9] usb: inline device creation functions

2024-02-17 Thread Paolo Bonzini
On Fri, Feb 16, 2024 at 12:14 PM Philippe Mathieu-Daudé wrote: > > On 13/2/24 16:49, Paolo Bonzini wrote: > > Allow boards to use the device creation functions even if USB itself > > is not available; of course the functions will fail inexorably, but > > this can be okay if the calls are

Re: [PATCH v5 10/10] tests/bench: Add bufferiszero-bench

2024-02-17 Thread Alexander Monakov
On Fri, 16 Feb 2024, Richard Henderson wrote: > Benchmark each acceleration function vs an aligned buffer of zeros. > > Signed-off-by: Richard Henderson > --- > + > +static void test(const void *opaque) > +{ > +size_t len = 64 * KiB; This exceeds L1 cache capacity, so the performance

Re: [RFC PATCH 2/6] accel/tcg: Avoid uncessary call overhead from qemu_plugin_vcpu_mem_cb

2024-02-17 Thread Max Chou
Hi Daniel, I think the the overhead from the plugin callbacks depending on the type of plugin callbacks. Because there is only qemu_plugin_vcpu_mem_cb in the perf report of the glibc memcpy benchtest, so I just looked it up for the the memory callbacks in this RFC. I'll try to get more

Re: [PATCH] target/i386: Eip error in x86_64-softmmu

2024-02-17 Thread Michael Tokarev
15.01.2024 05:08, guoguangyao wrote: When closing PCREL, qemu-system-x86_64 run into error. Eip modification here leads to the result. Using s->pc in func gen_update_eip_next() solves the problem. Fixes: b5e0d5d22fbf("target/i386: Fix 32-bit wrapping of pc/eip computation") It looks like the

Re: [PATCH] vdpa: set old virtio status at cvq isolation probing end

2024-02-17 Thread Michael Tokarev
26.07.2023 05:07, Jason Wang wrote: On Wed, Jul 26, 2023 at 2:21 AM Eugenio Pérez wrote: The device already has a virtio status set by vhost_vdpa_init by the time vhost_vdpa_probe_cvq_isolation is called. vhost_vdpa_init set S_ACKNOWLEDGE and S_DRIVER, so it is invalid to just reset it. It

Re: [PATCH] xen/pt: fix igd passthrough for pc machine with xen accelerator

2024-02-17 Thread Michael Tokarev
17.05.2023 22:48, Stefano Stabellini : On Wed, 17 May 2023, Michael Tokarev wrote: 17.05.2023 12:47, Chuck Zmudzinski wrote: On 5/17/2023 2:39 AM, Michael Tokarev wrote: 08.02.2023 05:03, Chuck Zmudzinski wrote:... Fixes: 998250e97661 ("xen, gfx passthrough: register host bridge specific to

Re: [RFC PATCH 2/6] accel/tcg: Avoid uncessary call overhead from qemu_plugin_vcpu_mem_cb

2024-02-17 Thread Max Chou
Hi Richard, Thank you for the suggestion. I'll do a v2 with this. Thanks, Max On 2024/2/16 4:03 AM, Richard Henderson wrote: On 2/15/24 09:28, Max Chou wrote: If there are not any QEMU plugin memory callback functions, checking before calling the qemu_plugin_vcpu_mem_cb function can reduce

Re: [PATCH] scsi: megasas: Internal cdbs have 16-byte length

2024-02-17 Thread Michael Tokarev
28.02.2023 20:11, Guenter Roeck wrote: Host drivers do not necessarily set cdb_len in megasas io commands. With commits 6d1511cea0 ("scsi: Reject commands if the CDB length exceeds buf_len") and fe9d8927e2 ("scsi: Add buf_len parameter to scsi_req_new()"), this results in failures to boot Linux

Re: [PATCH 18/23] plugins: add an API to read registers

2024-02-17 Thread Akihiko Odaki
On 2024/02/17 1:30, Alex Bennée wrote: We can only request a list of registers once the vCPU has been initialised so the user needs to use either call the get function on vCPU initialisation or during the translation phase. We don't expose the reg number to the plugin instead hiding it behind