Re: ppc pbr403 vmstate

2022-01-13 Thread Cédric Le Goater
On 1/14/22 00:41, David Gibson wrote: On Thu, Jan 13, 2022 at 06:51:56PM +, Dr. David Alan Gilbert wrote: Hi, Is there any easy way of getting a machine where the pbr403 vmstate would be generated? The condition in pbr403_needed is... return (pvr & 0x) == 0x0020; .. w

[PULL 13/20] hw/mips/jazz: Inline vga_mmio_init() and remove it

2022-01-13 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé vga_mmio_init() is used only one time and not very helpful, inline and remove it. Reviewed-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20211206224528.563588-5-f4...@amsat.org> Signed-off-by: Gerd Hoffmann --- in

[PULL 15/20] edid: Added support for 4k@60 Hz monitor

2022-01-13 Thread Gerd Hoffmann
From: Satyeshwar Singh Previously, the large modes (>1080p) that were generated by Qemu in its EDID were all 50 Hz. If we provide them to a Guest OS and the user selects one of these modes, then the OS by default only gets 50 FPS. This is especially true for Windows OS. With this patch, we are no

[PULL 07/20] ui/dbus: fix buffer-overflow detected by ASAN

2022-01-13 Thread Gerd Hoffmann
From: Marc-André Lureau On the last added dbus patch, I left a tiny BO: ==441487==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61125a70 at pc 0x7f0817bb764c bp 0x7ffde672ae60 sp 0x7ffde672ae58 WRITE of size 8 at 0x61125a70 thread T0 #0 0x7f0817bb764b in dbus_vc_class_i

[PULL 20/20] ui/input-legacy: pass horizontal scroll information

2022-01-13 Thread Gerd Hoffmann
From: Dmitry Petrov This code seems to be used by vmport hack, passing these values allows to implement horizontal scroll support even when using vmport. In case it's not supported horizontal scroll will act as a vertical one. Signed-off-by: Dmitry Petrov Message-Id: <20220108153947.171861-6-dp

[PULL 16/20] ps2: Initial horizontal scroll support

2022-01-13 Thread Gerd Hoffmann
From: Dmitry Petrov This change adds support for horizontal scroll to ps/2 mouse device code. The code is implemented to match the logic of linux kernel which is used as a reference. Signed-off-by: Dmitry Petrov Message-Id: <20220108153947.171861-2-dpetr...@gmail.com> Signed-off-by: Gerd Hoffma

[PULL 04/20] jackaudio: use ifdefs to hide unavailable functions

2022-01-13 Thread Gerd Hoffmann
From: Volker Rümelin On Windows the jack_set_thread_creator() function and on MacOS the pthread_setname_np() function with a thread pointer paramater is not available. Use #ifdefs to remove the jack_set_thread_creator() function call and the qjack_thread_creator() function in both cases. The qja

[PULL 09/20] uas: add missing return

2022-01-13 Thread Gerd Hoffmann
Otherwise we run the error handling code even for successful requests. Fixes: 13b250b12ad3 ("uas: add stream number sanity checks.") Reported-by: Guenter Roeck Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20211210080659.2537084-1-kra...@redhat.com> --- hw/usb/d

[PULL 18/20] ui/gtk: pass horizontal scroll information to the device code

2022-01-13 Thread Gerd Hoffmann
From: Dmitry Petrov Signed-off-by: Dmitry Petrov Message-Id: <20220108153947.171861-4-dpetr...@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 54 ++ 1 file changed, 42 insertions(+), 12 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c i

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Peter Xu
On Fri, Jan 14, 2022 at 01:58:07PM +0800, Jason Wang wrote: > > > Right, but I think you meant to do this only when scalable mode is > > > disabled. > > > > Yes IMHO it will definitely suite for !scalable case since that's exactly > > what > > we did before. What I'm also wondering is even if sc

[PULL 05/20] dsoundaudio: fix crackling audio recordings

2022-01-13 Thread Gerd Hoffmann
From: Volker Rümelin Audio recordings with the DirectSound backend don't sound right. A look a the Microsoft online documentation tells us why. >From the DirectSound Programming Guide, Capture Buffer Information: 'You can safely copy data from the buffer only up to the read cursor.' Change the

[PULL 17/20] ui/cocoa: pass horizontal scroll information to the device code

2022-01-13 Thread Gerd Hoffmann
From: Dmitry Petrov Signed-off-by: Dmitry Petrov Message-Id: <20220108153947.171861-3-dpetr...@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/cocoa.m | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index 69745c483b45..ac18e14ce01c

[PULL 06/20] hw/audio/intel-hda: fix stream reset

2022-01-13 Thread Gerd Hoffmann
From: Volker Rümelin Quote from: High Definition Audio Specification 1.0a, section 3.3.35 Offset 80: {IOB}SDnCTL Stream Reset (SRST): Writing a 1 causes the corresponding stream to be reset. The Stream Descriptor registers (except the SRST bit itself) ... are reset. Change the code to reset the

[PULL 19/20] ui/sdl2: pass horizontal scroll information to the device code

2022-01-13 Thread Gerd Hoffmann
From: Dmitry Petrov Signed-off-by: Dmitry Petrov Message-Id: <20220108153947.171861-5-dpetr...@gmail.com> Signed-off-by: Gerd Hoffmann --- ui/sdl2.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 0bd30504cfcc..46a252d7d9d7 100644 --- a/ui/sdl2.c +++ b/ui/s

[PULL 02/20] usb: allow max 8192 bytes for desc

2022-01-13 Thread Gerd Hoffmann
From: zhenwei pi A device of USB video class usually uses larger desc structure, so use larger buffer to avoid failure. (dev-video.c is ready) This is an unlikely code path: 1, during guest startup, guest tries to probe device. 2, run 'lsusb' command in guest(or other similar commands). Reviewe

Re: [RFC PATCH] MAINTAINERS: Add myself to s390 I/O areas

2022-01-13 Thread Christian Borntraeger
Am 12.01.22 um 17:40 schrieb Eric Farman: After the recent restructuring, I'd like to volunteer to help in some of the s390 I/O areas. Built on "[PATCH RFC v2] MAINTAINERS: split out s390x sections" Signed-off-by: Eric Farman Acked-by: Christian Borntraeger Thanks a lot Eric --- MAIN

[PULL 12/20] hw/display/vga-mmio: QOM'ify vga_mmio_init() as TYPE_VGA_MMIO

2022-01-13 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Introduce TYPE_VGA_MMIO, a sysbus device. While there is no change in the vga_mmio_init() interface, this is a migration compatibility break of the MIPS Acer Pica 61 Jazz machine (pica61). Suggested-by: Thomas Huth Reviewed-by: BALATON Zoltan Signed-off-by: Philip

[PULL 08/20] ui: fix gtk clipboard clear assertion

2022-01-13 Thread Gerd Hoffmann
From: Marc-André Lureau When closing the QEMU Gtk display window, it can occasionaly warn: qemu-system-x86_64: Gtk: gtk_clipboard_set_with_data: assertion 'targets != NULL' failed #3 0x74f02f22 in gtk_clipboard_set_with_data (clipboard=, targets=, n_targets=, get_func=, clear_func=, us

[PULL 11/20] hw/display/vga-mmio: Inline vga_mm_init()

2022-01-13 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé Inline vga_mm_init() in vga_mmio_init() to simplify the next patch review. Kind of. Reviewed-by: BALATON Zoltan Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20211206224528.563588-3-f4...@amsat.org> Signed-off-by: Gerd Hoffmann ---

Re: [PATCH 06/30] bsd-user/arm/target_arch_cpu.h: Correct code pointer

2022-01-13 Thread Warner Losh
On Thu, Jan 13, 2022 at 10:15 AM Peter Maydell wrote: > On Sun, 9 Jan 2022 at 16:26, Warner Losh wrote: > > > > The code has moved in FreeBSD since the emulator was started, update the > > comment to reflect that change. Remove now-redundant comment saying the > > same thing (but incorrectly). >

[PULL 01/20] hw/usb/dev-wacom: add missing HID descriptor

2022-01-13 Thread Gerd Hoffmann
From: Dario Binacchi Linux need to fill up the HID descriptor in order to let the driver be emulated. The descriptor was downloaded from [1]. The patch was tested with evtest tool on top of qemu 5.2.0 with linux kernel 4.19.208. [1] https://github.com/linuxwacom/wacom-hid-descriptors/tree/maste

[PULL 10/20] hw/display: Rename VGA_ISA_MM -> VGA_MMIO

2022-01-13 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé There is no ISA bus part in the MMIO VGA device, so rename: * hw/display/vga-isa-mm.c -> hw/display/vga-mmio.c * CONFIG_VGA_ISA_MM -> CONFIG_VGA_MMIO * ISAVGAMMState -> VGAMmioState * isa_vga_mm_init() -> vga_mmio_init() Reviewed-by: BALATON Zoltan Reviewed

[PULL 03/20] ui/vnc.c: Fixed a deadlock bug.

2022-01-13 Thread Gerd Hoffmann
From: Rao Lei The GDB statck is as follows: (gdb) bt 0 __lll_lock_wait (futex=futex@entry=0x56211df20360, private=0) at lowlevellock.c:52 1 0x7f263caf20a3 in __GI___pthread_mutex_lock (mutex=0x56211df20360) at ../nptl/pthread_mutex_lock.c:80 2 0x56211a757364 in qemu_mutex_lock_impl (

[PULL 00/20] Kraxel 20220114 patches

2022-01-13 Thread Gerd Hoffmann
The following changes since commit 91f5f7a5df1fda8c34677a7c49ee8a4bb5b56a36: Merge remote-tracking branch 'remotes/lvivier-gitlab/tags/linux-user-for-7.0-pull-request' into staging (2022-01-12 11:51:47 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/kraxel-202

Re: [PATCH v6 03/23] target/riscv: Implement hgeie and hgeip CSRs

2022-01-13 Thread Frank Chang
Anup Patel 於 2021年12月30日 週四 下午8:45寫道: > From: Anup Patel > > The hgeie and hgeip CSRs are required for emulating an external > interrupt controller capable of injecting virtual external interrupt > to Guest/VM running at VS-level. > > Signed-off-by: Anup Patel > Signed-off-by: Anup Patel > Rev

Re: [PATCH 05/30] bsd-user/arm/arget_arch_cpu.h: Move EXCP_DEBUG and EXCP_BKPT together

2022-01-13 Thread Warner Losh
On Thu, Jan 13, 2022 at 10:13 AM Peter Maydell wrote: > On Sun, 9 Jan 2022 at 16:26, Warner Losh wrote: > > > > Implement EXCP_DEBUG and EXCP_BKPT the same, as is done in > > linux-user. The prior adjustment of register 15 isn't needed, so remove > > that. Remove a redunant comment (that code in

Re: [PATCH v3 kvm/queue 14/16] KVM: Handle page fault for private memory

2022-01-13 Thread Yan Zhao
hi Sean, Sorry for the late reply. I just saw this mail in my mailbox. On Wed, Jan 05, 2022 at 08:52:39PM +, Sean Christopherson wrote: > On Wed, Jan 05, 2022, Yan Zhao wrote: > > Sorry, maybe I didn't express it clearly. > > > > As in the kvm_faultin_pfn_private(), > > static bool kvm_fault

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Jason Wang
On Fri, Jan 14, 2022 at 11:31 AM Peter Xu wrote: > > On Fri, Jan 14, 2022 at 10:47:44AM +0800, Jason Wang wrote: > > > > 在 2022/1/13 下午1:06, Peter Xu 写道: > > > On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > > > > @@ -1725,11 +1780,16 @@ static bool > > > > vtd_do_iommu_translate(VT

[PULL V3 11/13] net/vmnet: implement bridged mode (vmnet-bridged)

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- net/vmnet-bridged.m | 105 +--- 1 file changed, 100 insertions(+), 5 deletions(-) diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m index 4e42a90..

[PULL V3 10/13] net/vmnet: implement host mode (vmnet-host)

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- net/vmnet-host.c | 110 --- 1 file changed, 104 insertions(+), 6 deletions(-) diff --git a/net/vmnet-host.c b/net/vmnet-host.c index 4a5ef99..501b67

[PULL V3 09/13] net/vmnet: implement shared mode (vmnet-shared)

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk Interaction with vmnet.framework in different modes differs only on configuration stage, so we can create common `send`, `receive`, etc. procedures and reuse them. vmnet.framework supports iov, but writing more than one iov into vmnet interface fails with 'VMNET_INVALI

[PULL V3 13/13] net/vmnet: update MAINTAINERS list

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6ccdec7..1dc9d49 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2645,6 +2645,11 @@ W: http://info.ie

[PULL V3 08/13] net/vmnet: add vmnet backends to qapi/net

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk Create separate netdevs for each vmnet operating mode: - vmnet-host - vmnet-shared - vmnet-bridged Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- net/clients.h | 11 + net/meson.build | 7 +++ net/net.c | 10 net/v

[PULL V3 04/13] net/colo-compare.c: Optimize compare order for performance

2022-01-13 Thread Jason Wang
From: Zhang Chen COLO-compare use the glib function g_queue_find_custom to dump another VM's networking packet to compare. But this function always start find from the queue->head(here is the newest packet), It will reduce the success rate of comparison. So this patch reversed the order of the qu

[PULL V3 12/13] net/vmnet: update qemu-options.hx

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jason Wang --- qemu-options.hx | 25 + 1 file changed, 25 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index ec90505..81dd34f 100644 --- a/qemu-options.hx +++ b/qemu-options.h

[PULL V3 07/13] net/vmnet: add vmnet dependency and customizable option

2022-01-13 Thread Jason Wang
From: Vladislav Yaroshchuk vmnet.framework dependency is added with 'vmnet' option to enable or disable it. Default value is 'auto'. vmnet features to be used are available since macOS 11.0, corresponding probe is created into meson.build. Signed-off-by: Vladislav Yaroshchuk Signed-off-by: Jas

[PULL V3 05/13] net/colo-compare.c: Update the default value comments

2022-01-13 Thread Jason Wang
From: Zhang Chen Make the comments consistent with the REGULAR_PACKET_CHECK_MS. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/colo-compare.c b/net/colo-compare.c index 216de5a..62554b5 100644

[PULL V3 03/13] net: Fix uninitialized data usage

2022-01-13 Thread Jason Wang
From: Peter Foley e.g. 1109 15:16:20.151506 Uninitialized bytes in ioctl_common_pre at offset 0 inside [0x7ffc516af9b8, 4) 1109 15:16:20.151659 ==588974==WARNING: MemorySanitizer: use-of-uninitialized-value 1109 15:16:20.312923 #0 0x5639b88acb21 in tap_probe_vnet_hdr_len third_party/qemu

[PULL V3 02/13] net/tap: Set return code on failure

2022-01-13 Thread Jason Wang
From: Peter Foley Match the other error handling in this function. Fixes: e7b347d0bf6 ("net: detect errors from probing vnet hdr flag for TAP devices") Reviewed-by: Patrick Venture Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Foley Signed-off-by: Jason Wang --- net/tap.c | 1 +

[PULL V3 01/13] hw/net/vmxnet3: Log guest-triggerable errors using LOG_GUEST_ERROR

2022-01-13 Thread Jason Wang
From: Philippe Mathieu-Daudé The "Interrupt Cause" register (VMXNET3_REG_ICR) is read-only. Write accesses are ignored. Log them with as LOG_GUEST_ERROR instead of aborting: [R +0.239743] writeq 0xe0002031 0x46291a5a55460800 ERROR:hw/net/vmxnet3.c:1819:vmxnet3_io_bar1_write: code should not

[PULL V3 00/13] Net patches

2022-01-13 Thread Jason Wang
The following changes since commit f8d75e10d3e0033a0a29a7a7e4777a4fbc17a016: Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220112' into staging (2022-01-13 11:18:24 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request fo

[PULL V3 06/13] net/filter: Optimize filter_send to coroutine

2022-01-13 Thread Jason Wang
From: Rao Lei This patch is to improve the logic of QEMU main thread sleep code in qemu_chr_write_buffer() where it can be blocked and can't run other coroutines during COLO IO stress test. Our approach is to put filter_send() in a coroutine. In this way, filter_send() will call qemu_coroutine_y

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Peter Xu
On Fri, Jan 14, 2022 at 09:30:39AM +0800, Hyman Huang wrote: > > > 在 2022/1/14 0:22, Markus Armbruster 写道: > > Peter Xu writes: > > > > > On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: > > > > > > +struct { > > > > > > +DirtyLimitState *states; > > > > > > +int max_cpus; >

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Peter Xu
On Fri, Jan 14, 2022 at 10:47:44AM +0800, Jason Wang wrote: > > 在 2022/1/13 下午1:06, Peter Xu 写道: > > On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: > > > @@ -1725,11 +1780,16 @@ static bool > > > vtd_do_iommu_translate(VTDAddressSpace *vtd_as, PCIBus *bus, > > > cc_entry->c

Re: [PATCH 1/3] intel-iommu: don't warn guest errors when getting rid2pasid entry

2022-01-13 Thread Jason Wang
在 2022/1/13 下午3:05, Michael S. Tsirkin 写道: On Thu, Jan 13, 2022 at 11:35:19AM +0800, Peter Xu wrote: On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: We use to warn on wrong rid2pasid entry. But this error could be triggered by the guest and could happens during initialization. So

Re: [PATCH 1/3] intel-iommu: don't warn guest errors when getting rid2pasid entry

2022-01-13 Thread Jason Wang
在 2022/1/13 下午3:06, Michael S. Tsirkin 写道: On Wed, Jan 05, 2022 at 12:19:43PM +0800, Jason Wang wrote: We use to warn on wrong rid2pasid entry. But this error could be triggered by the guest and could happens during initialization. So let's don't warn in this case. Signed-off-by: Jason Wang

Re: [PULL V2 00/13] Net patches

2022-01-13 Thread Jason Wang
On Thu, Jan 13, 2022 at 11:36 PM Philippe Mathieu-Daudé wrote: > > On 13/1/22 15:00, Peter Maydell wrote: > > On Wed, 12 Jan 2022 at 08:32, Jason Wang wrote: > >> > >> The following changes since commit > >> 64c01c7da449bcafc614b27ecf1325bb08031c84: > >> > >>Merge remote-tracking branch 'rem

Re: [PATCH 3/3] intel-iommu: PASID support

2022-01-13 Thread Jason Wang
在 2022/1/13 下午1:06, Peter Xu 写道: On Wed, Jan 05, 2022 at 12:19:45PM +0800, Jason Wang wrote: @@ -1725,11 +1780,16 @@ static bool vtd_do_iommu_translate(VTDAddressSpace *vtd_as, PCIBus *bus, cc_entry->context_cache_gen = s->context_cache_gen; } +/* Try to fetch slpte for

Re: [PATCH 2/3] intel-iommu: drop VTDBus

2022-01-13 Thread Jason Wang
在 2022/1/13 下午12:12, Peter Xu 写道: On Wed, Jan 05, 2022 at 12:19:44PM +0800, Jason Wang wrote: We introduce VTDBus structure as an intermediate step for searching the address space. This works well with SID based matching/lookup. But when we want to support SID plus PASID based address space lo

[PATCH v3 3/3] target/riscv: add support for svpbmt extension

2022-01-13 Thread Weiwei Li
It uses two PTE bits, but otherwise has no effect on QEMU, since QEMU is sequentially consistent and doesn't model PMAs currently Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Tested-by: Heiko Stuebner --- target/riscv/cpu.c| 1 + target/riscv/cpu.h| 1 + target/riscv/

[PATCH v3 2/3] target/riscv: add support for svinval extension

2022-01-13 Thread Weiwei Li
Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 1 + target/riscv/insn32.decode | 7 ++ target/riscv/insn_trans/trans_svinval.c.inc | 75 + target/ri

[PATCH v3 1/3] target/riscv: add support for svnapot extension

2022-01-13 Thread Weiwei Li
Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang --- target/riscv/cpu.c| 2 ++ target/riscv/cpu.h| 1 + target/riscv/cpu_bits.h | 1 + target/riscv/cpu_helper.c | 20 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/target/riscv/cpu.c

[PATCH v3 0/3] support subsets of virtual memory extension

2022-01-13 Thread Weiwei Li
This patchset implements virtual memory related RISC-V extensions: Svnapot version 1.0, Svinval vesion 1.0, Svpbmt version 1.0. Specification: https://github.com/riscv/virtual-memory/tree/main/specs The port is available here: https://github.com/plctlab/plct-qemu/tree/plct-virtmem-upstream-v3

Re: [PATCH v10 2/3] cpu-throttle: implement virtual CPU throttle

2022-01-13 Thread Hyman Huang
在 2022/1/14 0:22, Markus Armbruster 写道: Peter Xu writes: On Fri, Dec 31, 2021 at 12:36:40AM +0800, Hyman Huang wrote: +struct { +DirtyLimitState *states; +int max_cpus; +unsigned long *bmap; /* running thread bitmap */ +unsigned long nr; +QemuThread thread; +} *dirtylim

[PATCH] fdc: check for illegal dma length calculation

2022-01-13 Thread Jon Maloy
The function fdctrl_start_transfer() calculates the dma data length wrongly when certain boundary conditions are fulfilled. We have noticed that the if ((fdctrl->fifo[5] - fdctrl->fifo[6]) > 1) we get a dma length that will be interpreted as negative by the next function in the chain, fdctrl_transf

[PATCH 2/2] qemu-timer: Skip empty timer lists before locking in qemu_clock_deadline_ns_all

2022-01-13 Thread Idan Horowitz
This decreases qemu_clock_deadline_ns_all's share from 23.2% to 13% in a profile of icount-enabled aarch64-softmmu. Signed-off-by: Idan Horowitz --- util/qemu-timer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/qemu-timer.c b/util/qemu-timer.c index f36c75e594..e56895ef55 100644

[PATCH] target/arm: Allow only specific instructions based on the SCTLR_EL1.UCI bit

2022-01-13 Thread Idan Horowitz
The SCTLR_EL1.UCI bit only affects a subset of cache maintenance instructions as specified by the specification. Any other cache maintenance instructions must still be trapped from EL0. Signed-off-by: Idan Horowitz --- target/arm/helper.c | 68 ++--- 1 fil

[PATCH 1/2] softmmu/cpus: Check if the cpu work list is empty atomically

2022-01-13 Thread Idan Horowitz
Instead of taking the lock of the cpu work list in order to check if it's empty, we can just read the head pointer atomically. This decreases cpu_work_list_empty's share from 5% to 1.3% in a profile of icount-enabled aarch64-softmmu. Signed-off-by: Idan Horowitz --- softmmu/cpus.c | 7 +-- 1

Re: ppc pbr403 vmstate

2022-01-13 Thread David Gibson
On Thu, Jan 13, 2022 at 06:51:56PM +, Dr. David Alan Gilbert wrote: > Hi, > Is there any easy way of getting a machine where the pbr403 vmstate > would be generated? The condition in pbr403_needed is... return (pvr & 0x) == 0x0020; .. which looks to be the PVR for ppc403 mo

Re: [PATCH 21/30] bsd-user/signal.c: force_sig

2022-01-13 Thread Kyle Evans
On Thu, Jan 13, 2022 at 2:53 PM Peter Maydell wrote: > > On Thu, 13 Jan 2022 at 20:29, Peter Maydell wrote: > > > > On Sun, 9 Jan 2022 at 16:44, Warner Losh wrote: > > > > > > Force delivering a signal and generating a core file. > > > > +/* Abort execution with signal. */ > > > +void QEMU_NORET

Re: [PATCH] Mark remaining global TypeInfo instances as const

2022-01-13 Thread Alistair Francis
On Fri, Jan 14, 2022 at 3:33 AM Bernhard Beschow wrote: > > More than 1k of TypeInfo instances are already marked as const. Mark the > remaining ones, too. > > Signed-off-by: Bernhard Beschow Reviewed-by: Alistair Francis Alistair > --- > hw/core/generic-loader.c | 2 +- > hw/core/guest-lo

Re: [PATCH 21/30] bsd-user/signal.c: force_sig

2022-01-13 Thread Peter Maydell
On Thu, 13 Jan 2022 at 20:29, Peter Maydell wrote: > > On Sun, 9 Jan 2022 at 16:44, Warner Losh wrote: > > > > Force delivering a signal and generating a core file. > > +/* Abort execution with signal. */ > > +void QEMU_NORETURN force_sig(int target_sig) > > In linux-user we call this dump_core_

Re: [PATCH v2 3/3] migration: Perform vmsd structure check during tests

2022-01-13 Thread Peter Maydell
On Thu, 13 Jan 2022 at 19:45, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > Perform a check on vmsd structures during test runs in the hope > of catching any missing terminators and other simple screwups. > > Signed-off-by: Dr. David Alan Gilbert > --- > migration/s

Re: [PATCH 20/30] bsd-user/signal.c: core_dump_signal

2022-01-13 Thread Peter Maydell
On Thu, 13 Jan 2022 at 20:28, Warner Losh wrote: > On Thu, Jan 13, 2022 at 1:22 PM Peter Maydell > wrote: >> Code is fine, but since this is a static function with no callers >> the compiler is going to emit a warning about that. It's a small >> function, so the easiest thing is just to squash t

Re: [PATCH v2 1/3] ppc: Fix vmstate_pbr403 subsection name

2022-01-13 Thread Peter Maydell
On Thu, 13 Jan 2022 at 19:45, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The pbr403 subsection is part of the tlb6xx state, so I believe it's > name needs to be: > > .name = "cpu/tlb6xx/pbr403", > > Signed-off-by: Dr. David Alan Gilbert > --- > target/ppc/mac

Re: [PATCH v2 2/3] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-13 Thread Peter Maydell
On Thu, 13 Jan 2022 at 19:45, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; > given that the current check is only for ->name being NULL, sometimes > we get unlucky and the code apparently works

Re: [PATCH 3/3] Link new ppc-spapr-hotplug.rst file to pseries.rst.

2022-01-13 Thread Daniel Henrique Barboza
On 1/12/22 10:52, lagar...@linux.ibm.com wrote: From: Leonardo Garcia Signed-off-by: Leonardo Garcia --- Reviewed-by: Daniel Henrique Barboza docs/system/ppc/pseries.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system/ppc/pseries.rst b/docs/system/ppc

Re: [PATCH 2/3] docs: Rename ppc-spapr-hotplug.txt to ppc-spapr-hotplug.rst.

2022-01-13 Thread Daniel Henrique Barboza
On 1/12/22 10:52, lagar...@linux.ibm.com wrote: From: Leonardo Garcia Signed-off-by: Leonardo Garcia --- Reviewed-by: Daniel Henrique Barboza docs/specs/{ppc-spapr-hotplug.txt => ppc-spapr-hotplug.rst} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/specs/{ppc-spa

Re: [PATCH 22/30] bsd-user/signal.c: Fill in queue_signal

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:51, Warner Losh wrote: > > Fill in queue signal implementation, as well as routines allocate and > delete elements of the signal queue. See reply to patch 18 for why you probably don't want to do this. > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-of

Re: [PATCH 1/3] docs: rSTify ppc-spapr-hotplug.txt.

2022-01-13 Thread Daniel Henrique Barboza
On 1/12/22 10:52, lagar...@linux.ibm.com wrote: From: Leonardo Garcia While working on this file, also removed and unused reference in the end of the file. The reference in the text was removed by commit 9f992cca93d (spapr: update spapr hotplug documentation), but the link in the end of th

Re: [PATCH 21/30] bsd-user/signal.c: force_sig

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:44, Warner Losh wrote: > > Force delivering a signal and generating a core file. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/qemu.h | 1 + > bsd-user/signal.c | 59 ++

Re: [PATCH 20/30] bsd-user/signal.c: core_dump_signal

2022-01-13 Thread Warner Losh
On Thu, Jan 13, 2022 at 1:22 PM Peter Maydell wrote: > On Sun, 9 Jan 2022 at 16:48, Warner Losh wrote: > > > > Returns 1 for signals that cause core files. > > > > Signed-off-by: Stacey Son > > Signed-off-by: Kyle Evans > > Signed-off-by: Warner Losh > > --- > > bsd-user/signal.c | 17 ++

Re: [PATCH 20/30] bsd-user/signal.c: core_dump_signal

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:48, Warner Losh wrote: > > Returns 1 for signals that cause core files. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/bsd-user

Re: [PATCH 19/30] bsd-user/strace.c: print_taken_signal

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:46, Warner Losh wrote: > > print_taken_signal() prints signals when we're tracing signals. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v2 1/2] target/riscv: iterate over a table of decoders

2022-01-13 Thread Philipp Tomsich
To split up the decoder into multiple functions (both to support vendor-specific opcodes in separate files and to simplify maintenance of orthogonal extensions), this changes decode_op to iterate over a table of decoders predicated on guard functions. This commit only adds the new structure and th

[PATCH v2 2/2] target/riscv: Add XVentanaCondOps custom extension

2022-01-13 Thread Philipp Tomsich
This adds the decoder and translation for the XVentanaCondOps custom extension (vendor-defined by Ventana Micro Systems), which is documented at https://github.com/ventanamicro/ventana-custom-extensions/releases/download/v1.0.0/ventana-custom-extensions-v1.0.0.pdf This commit then also adds a gua

Re: [PATCH 18/30] bsd-user/signal.c: Implement host_signal_handler

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:40, Warner Losh wrote: > > Implement host_signal_handler to handle signals generated by the host > and to do safe system calls. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 105 ++

Re: [PATCH 1/1] virtio: fix the condition for iommu_platform not supported

2022-01-13 Thread Halil Pasic
On Thu, 13 Jan 2022 12:11:42 -0500 "Michael S. Tsirkin" wrote: > On Thu, Jan 13, 2022 at 05:51:31PM +0100, Halil Pasic wrote: > > The commit 04ceb61a40 ("virtio: Fail if iommu_platform is requested, but > > unsupported") claims to fail the device hotplug when iommu_platform > > is requested, but

[PATCH v2 2/3] migration: Add canary to VMSTATE_END_OF_LIST

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" We fairly regularly forget VMSTATE_END_OF_LIST markers off descriptions; given that the current check is only for ->name being NULL, sometimes we get unlucky and the code apparently works and no one spots the error. Explicitly add a flag, VMS_END that should be set

[PATCH v2 0/3] vmsd checks

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Aftern the patch the other day where I added a missing END_OF_LIST, Peter suggested adding something more robust. Here I: add a check for a flag at the end of the list add a check that's performed in vmstate_register_with_alias_id only within qtest recursiv

[PATCH v2 3/3] migration: Perform vmsd structure check during tests

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Perform a check on vmsd structures during test runs in the hope of catching any missing terminators and other simple screwups. Signed-off-by: Dr. David Alan Gilbert --- migration/savevm.c | 39 +++ 1 file changed, 39 insertions

Re: [PATCH 17/30] bsd-user/signal.c: Implement rewind_if_in_safe_syscall

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:32, Warner Losh wrote: > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/qemu.h | 2 ++ > bsd-user/signal.c | 12 > 2 files changed, 14 insertions(+) Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 16/30] bsd-user/signal.c: host_to_target_siginfo_noswap

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:41, Warner Losh wrote: > > Implement conversion of host to target siginfo. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- > bsd-user/signal.c | 37 + > 1 file changed, 37 insertions(+) >

Re: [PATCH 15/30] bsd-user: Add trace events for bsd-usr

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:36, Warner Losh wrote: > > Add the bsd-user specific events and infrastructure. Only include the > linux-user trace events for linux-user, not bsd-user. > > Signed-off-by: Stacey Son > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh Typo in subject: should be 'b

Re: [PATCH 14/30] bsd-user: Add host signals to the build

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:32, Warner Losh wrote: > > Start to add the host signal functionality to the build. > > Signed-off-by: Warner Losh > --- > bsd-user/meson.build | 1 + > bsd-user/signal.c| 1 + > meson.build | 1 + > 3 files changed, 3 insertions(+) Reviewed-by: Peter Mayde

Re: [PATCH 12/30] bsd-user/host/i386/host-signal.h: Implement host_signal_*

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:29, Warner Losh wrote: > > Implement host_signal_pc, host_signal_set_pc and host_signal_write for > i386. > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 13/30] bsd-user/host/x86_64/host-signal.h: Implement host_signal_*

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:37, Warner Losh wrote: > > Implement host_signal_pc, host_signal_set_pc and host_signal_write for > x86_64. > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > --- Reviewed-by: Peter Maydell thanks -- PMM

[PATCH v2 1/3] ppc: Fix vmstate_pbr403 subsection name

2022-01-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The pbr403 subsection is part of the tlb6xx state, so I believe it's name needs to be: .name = "cpu/tlb6xx/pbr403", Signed-off-by: Dr. David Alan Gilbert --- target/ppc/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/ppc/

[PATCH 17/17] ppc/pnv: rename pnv_pec_stk_update_map()

2022-01-13 Thread Daniel Henrique Barboza
This function does not use 'stack' anymore. Rename it to pnv_pec_phb_update_map(). Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/pnv_phb4.c b/hw/pci-host/pnv_phb4.c index a9ec42ce2c..d27b62a50

Re: [PATCH 11/30] bsd-user/host/arm/host-signal.h: Implement host_signal_*

2022-01-13 Thread Peter Maydell
On Sun, 9 Jan 2022 at 16:33, Warner Losh wrote: > > Implement host_signal_pc, host_signal_set_pc and host_signal_write for > arm. > > Signed-off-by: Kyle Evans > Signed-off-by: Warner Losh > +static inline bool host_signal_write(siginfo_t *info, ucontext_t *uc) > +{ > +/* > + * In the F

[PATCH 15/17] ppc/pnv: convert pec->stacks[] into pec->phbs[]

2022-01-13 Thread Daniel Henrique Barboza
This patch changes the design of the PEC device to use PHB4s instead of PecStacks. After all the recent changes, PHB4s now contain all the information needed for their proper functioning, not relying on PecStack in any capacity. All changes are being made in a single patch to avoid renaming parts

[PATCH 14/17] ppc/pnv: move default_phb_realize() to pec_realize()

2022-01-13 Thread Daniel Henrique Barboza
This is the last step before making the PEC device uses PHB4s directly. Move the current pnv_pec_stk_default_phb_realize() call to pec_realize(), renaming the function to pnv_pec_default_phb_realize(), and set the PHB attributes using the PEC object directly. Signed-off-by: Daniel Henrique Barboza

[PATCH 13/17] ppc/pnv: remove stack pointer from PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
This pointer was being used for two reasons: pnv_phb4_update_regions() was using it to access the PHB and phb4_realize() was using it as a way to determine if the PHB was user created. We can determine if the PHB is user created via phb->pec, introduced in the previous patch, and pnv_phb4_update_r

[PATCH 16/17] ppc/pnv: remove PnvPhb4PecStack object

2022-01-13 Thread Daniel Henrique Barboza
All the complexity that was scattered between PnvPhb4PecStack and PnvPHB4 are now centered in the PnvPHB4 device. PnvPhb4PecStack does not serve any purpose in the current code base. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4_pec.c | 34 --

[PATCH 08/17] ppc/pnv: change pnv_pec_stk_update_map() to use PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
stack->nest_regs_mr wasn't migrated to PnvPHB4 together with phb->nest_regs[] in the previous patch. We were unable to cleanly convert its write MemoryRegionOps, pnv_pec_stk_nest_xscom_write(), to use PnvPHB4 instead of PnvPhb4PecStack due to pnv_pec_stk_update_map() using a stack. Thing is, we're

[PATCH 05/17] ppc/pnv: change pnv_phb4_update_regions() to use PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
The function does not rely on stack for anything it does anymore. This is also one less instance of 'stack->phb' that we need to worry about. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/pci-host/

[PATCH 12/17] ppc/pnv: introduce PnvPHB4 'pec' property

2022-01-13 Thread Daniel Henrique Barboza
This property will track the owner PEC of this PHB. For now it's redundant since we can retrieve the PEC via phb->stack->pec but it will not be redundant when we get rid of the stack device. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 20 +++- hw/p

[PATCH 11/17] ppc/pnv: introduce PnvPHB4 'phb_number' property

2022-01-13 Thread Daniel Henrique Barboza
One of the remaining dependencies we have on the PnvPhb4PecStack object is the stack->stack_no property. This is set as the position the stack occupies in the pec->stacks[] array. We need a way to report this same value in the PnvPHB4. This patch creates a new property called 'phb_number' to be us

[PATCH 03/17] ppc/pnv: move phbbar to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
This MemoryRegion is simple enough to be moved in a single step. A 'stack->phb' pointer had to be introduced in pnv_pec_stk_update_map() because this function isn't ready to be fully converted to use a PnvPHB4 pointer instead. This will be dealt with in the following patches. Signed-off-by: Danie

[PATCH 06/17] ppc/pnv: move mmbar0/mmbar1 and friends to PnvPHB4

2022-01-13 Thread Daniel Henrique Barboza
These 2 MemoryRegions, together with mmio(0|1)_base and mmio(0|1)_size variables, are used together in the same functions. We're better of moving them all in a single step. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb4.c | 52 +- include/

  1   2   3   >