[PULL 3/3] hw/nvme: Return error for fused operations

2021-09-23 Thread Klaus Jensen
From: Pankaj Raghav Currently, FUSED operations are not supported by QEMU. As per the 1.4 SPEC, controller should abort the command that requested a fused operation with an INVALID FIELD error code if they are not supported. Changes from v1: Added FUSE flag check also to the admin cmd processing

Re: [PATCH] block: introduce max_hw_iov for use in scsi-generic

2021-09-23 Thread Christian Borntraeger
Peter, Michael, do we still do stable releases for QEMU or has this stopped? Am 24.09.21 um 07:27 schrieb Paolo Bonzini: Yes, the question is whether it still exists... Paolo El jue., 23 sept. 2021 16:48, Christian Borntraeger escribió: Am 23.09.21 um 15:04 schrieb Paolo Bonzini: > Linux lim

Re: [PATCH v3] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean and V=1 in mark_fs_dirty()

2021-09-23 Thread Alistair Francis
On Tue, Sep 21, 2021 at 12:03 PM wrote: > > From: Frank Chang > > When V=1, both vsstauts.FS and HS-level sstatus.FS are in effect. > Modifying the floating-point state when V=1 causes both fields to > be set to 3 (Dirty). > > However, it's possible that HS-level sstatus.FS is Clean and VS-level

Re: [PATCH v2 2/3] target/riscv: Implement the stval/mtval illegal instruction

2021-09-23 Thread Alistair Francis
On Wed, Sep 8, 2021 at 4:48 PM Richard Henderson wrote: > > On 9/8/21 6:54 AM, Alistair Francis wrote: > > @@ -967,6 +967,16 @@ void riscv_cpu_do_interrupt(CPUState *cs) > > write_tval = true; > > tval = env->badaddr; > > break; > > +case RISCV_EX

[PULL 1/3] hw/nvme: fix validation of ASQ and ACQ

2021-09-23 Thread Klaus Jensen
From: Klaus Jensen Address 0x0 is a valid address. Fix the admin submission and completion queue address validation to not error out on this. Signed-off-by: Klaus Jensen Reviewed-by: Keith Busch --- hw/nvme/ctrl.c | 8 hw/nvme/trace-events | 2 -- 2 files changed, 10 deletions(

RE: [question] VFIO Device Migration: The vCPU may be paused during vfio device DMA in iommu nested stage mode && vSVA

2021-09-23 Thread Tian, Kevin
> From: Kunkun Jiang > Sent: Friday, September 24, 2021 2:19 PM > > Hi all, > > I encountered a problem in vfio device migration test. The > vCPU may be paused during vfio-pci DMA in iommu nested > stage mode && vSVA. This may lead to migration fail and > other problems related to device hardwar

[PULL 0/3] hw/nvme updates

2021-09-23 Thread Klaus Jensen
From: Klaus Jensen Hi Peter, The following changes since commit 2c3e83f92d93fbab071b8a96b8ab769b01902475: Merge remote-tracking branch 'remotes/alistair23/tags/pull-riscv-to-apply-20210921' into staging (2021-09-21 10:57:48 -0700) are available in the Git repository at: git://git.infrad

Re: [PATCH v5 23/31] target/riscv: Restrict has_work() handler to sysemu and TCG

2021-09-23 Thread Alistair Francis
On Tue, Sep 21, 2021 at 8:09 AM Philippe Mathieu-Daudé wrote: > > Restrict has_work() to TCG sysemu. > > Reviewed-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Alistair > --- > target/riscv/cpu.c | 8 +++- > 1 file changed, 3 insertions(+), 5 d

Re: [PATCH v3] target/riscv: Set mstatus_hs.[SD|FS] bits if Clean and V=1 in mark_fs_dirty()

2021-09-23 Thread Alistair Francis
On Tue, Sep 21, 2021 at 12:03 PM wrote: > > From: Frank Chang > > When V=1, both vsstauts.FS and HS-level sstatus.FS are in effect. > Modifying the floating-point state when V=1 causes both fields to > be set to 3 (Dirty). > > However, it's possible that HS-level sstatus.FS is Clean and VS-level

Re: [PATCH v5 14/20] mac-nubus-bridge: rename MacNubusState to MacNubusBridge

2021-09-23 Thread Mark Cave-Ayland
On 23/09/2021 17:03, Mark Cave-Ayland wrote: On 23/09/2021 14:53, Laurent Vivier wrote: Le 23/09/2021 à 14:50, Mark Cave-Ayland a écrit : On 23/09/2021 11:35, Laurent Vivier wrote: Le 23/09/2021 à 11:13, Mark Cave-Ayland a écrit : This better reflects that the mac-nubus-bridge device is de

[PATCH 0/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-23 Thread pdel
From: Peter Delevoryas Hey everyone, I think there might be a bug aspeed_gpio_update, when it's selecting a GPIO IRQ to update. I was testing booting Facebook's OpenBMC platform "YosemiteV2" (fby2), and I was hitting a segfault in QEMU: qemu-system-arm -machine ast2500-evb \ -drive file=fby

[PATCH 1/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-23 Thread pdel
From: Peter Delevoryas The gpio array is declared as a dense array: ... qemu_irq gpios[ASPEED_GPIO_NR_PINS]; (AST2500 has 228, AST2400 has 216, AST2600 has 208) However, this array is used like a matrix of GPIO sets (e.g. gpio[NR_SETS][NR_PINS_PER_SET] = gpio[8][32]) size_t offset = set * GPI

[question] VFIO Device Migration: The vCPU may be paused during vfio device DMA in iommu nested stage mode && vSVA

2021-09-23 Thread Kunkun Jiang
Hi all, I encountered a problem in vfio device migration test. The vCPU may be paused during vfio-pci DMA in iommu nested stage mode && vSVA. This may lead to migration fail and other problems related to device hardware and driver implementation. It may be a bit early to discuss this issue, afte

Re: [PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-23 Thread Hannes Reinecke
On 9/23/21 10:09 PM, Klaus Jensen wrote: On Sep 9 13:37, Hannes Reinecke wrote: On 9/9/21 12:47 PM, Klaus Jensen wrote: On Sep 9 11:43, Hannes Reinecke wrote: With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") namespaces get moved from the controller to the subsystem if one is

Re: [RFC 00/10] add the rest of riscv bitmapip-0.93 instructions

2021-09-23 Thread eric tang
Ok, thanks. ^ ^! Alistair Francis 于2021年9月24日周五 下午12:39写道: > On Sat, Sep 18, 2021 at 6:20 PM Eric Tang > wrote: > > > > These patches fixed some issues about srow/sroiw/clzw instructions and > > add the rest of riscv bitmapip-0.93 instructions except fsri/fsriw & > > bext/bdep & bextw/bdepw for

Re: [PATCH] block: introduce max_hw_iov for use in scsi-generic

2021-09-23 Thread Paolo Bonzini
Yes, the question is whether it still exists... Paolo El jue., 23 sept. 2021 16:48, Christian Borntraeger escribió: > > > Am 23.09.21 um 15:04 schrieb Paolo Bonzini: > > Linux limits the size of iovecs to 1024 (UIO_MAXIOV in the kernel > > sources, IOV_MAX in POSIX). Because of this, on some h

Re: [RFC 00/10] add the rest of riscv bitmapip-0.93 instructions

2021-09-23 Thread Alistair Francis
On Sat, Sep 18, 2021 at 6:20 PM Eric Tang wrote: > > These patches fixed some issues about srow/sroiw/clzw instructions and > add the rest of riscv bitmapip-0.93 instructions except fsri/fsriw & > bext/bdep & bextw/bdepw for opcode coding or name conflict problems. The > problems had been fixed in

Re: [PATCH v11 00/16] target/riscv: Update QEmu for Zb[abcs] 1.0.0

2021-09-23 Thread Alistair Francis
On Fri, Sep 24, 2021 at 7:32 AM Philipp Tomsich wrote: > > Alistair, > > Is there something that is holding this series up? > I believe we should avoid having an outdated draft version of the > bitmanip proposal in 6.2. Thanks for the ping. Applied to riscv-to-apply.next Alistair > > Thanks, >

Re: [PATCH v2] spapr/xive: Fix kvm_xive_source_reset trace event

2021-09-23 Thread David Gibson
On Wed, Sep 22, 2021 at 09:02:05AM +0200, Cédric Le Goater wrote: > The trace event was placed in the wrong routine. Move it under > kvmppc_xive_source_reset_one(). > > Fixes: 4e960974d4ee ("xive: Add trace events") > Signed-off-by: Cédric Le Goater Applied to ppc-for-6.2, thanks. > --- > hw/i

Re: [PATCH v7 0/7] DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-23 Thread David Gibson
On Wed, Sep 22, 2021 at 02:03:33PM +0200, Markus Armbruster wrote: > Markus Armbruster writes: > > > Not yet merged. David, would you like to do the pull request? > > Oops, there's v8. Take that one of course. I have it in ppc-for-6.2, probably looking at a PR next week. -- David Gibson

[PATCH v1 8/9] hw/mos6522: Synchronize timer interrupt and timer counter

2021-09-23 Thread Finn Thain
We rely on a QEMUTimer callback to set the interrupt flag, and this races with counter register accesses, such that the guest might see the counter reloaded but might not see the interrupt flagged. According to the datasheet, a real 6522 device counts down to , then raises the relevant IRQ. Af

[PATCH v1 9/9] hw/mos6522: Implement oneshot mode

2021-09-23 Thread Finn Thain
Timer 1 has two modes: continuous interrupt and oneshot. Signed-off-by: Finn Thain --- Changed since RFC: - Moved to end of series. This patch is quite a bit shorter here. --- hw/misc/mos6522.c | 6 -- include/hw/misc/mos6522.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-

[PATCH v1 6/9] hw/mos6522: Call mos6522_update_irq() when appropriate

2021-09-23 Thread Finn Thain
It necessary to call mos6522_update_irq() when the interrupt flags change and unnecessary when they haven't. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/mos6522.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/misc/mos6522.c b/hw/misc/mos6

[PATCH v1 7/9] hw/mos6522: Avoid using discrepant QEMU clock values

2021-09-23 Thread Finn Thain
mos6522_read() and mos6522_write() may call various functions to determine timer irq state, timer counter value and QEMUTimer deadline. All called functions must use the same value for the present time. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- Changed since RFC - Moved

[PATCH v1 0/9] hw/mos6522: VIA timer emulation fixes and improvements

2021-09-23 Thread Finn Thain
This is a patch series for QEMU that I started last year. The aim was to try to get a monotonic clocksource for Linux/m68k guests. That hasn't been achieved yet (for q800 machines). I'm submitting the patch series because, - it improves 6522 emulation fidelity, although slightly slower, and

[PATCH v1 4/9] hw/mos6522: Rename timer callback functions

2021-09-23 Thread Finn Thain
This improves readability. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/mos6522.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c index 1d4a56077e..c0d6bee4cc 100644 --- a/hw/misc/mos6522.c +++ b/h

[PATCH v1 2/9] hw/mos6522: Remove get_counter_value() methods and functions

2021-09-23 Thread Finn Thain
This code appears to be unnecessary. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/mos6522.c | 22 ++ 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c index a478c1ca43..ff246b5437 100644 --- a/hw

[PATCH v1 5/9] hw/mos6522: Fix initial timer counter reload

2021-09-23 Thread Finn Thain
The first reload of timer 1 is early by half of a clock cycle as it gets measured from a falling edge. By contrast, the succeeding reloads are measured from rising edge to rising edge. Neglecting that complication, the behaviour of the counter should be the same from one reload to the next. The se

[PATCH v1 3/9] hw/mos6522: Remove redundant mos6522_timer1_update() calls

2021-09-23 Thread Finn Thain
Reads and writes to the TL and TC registers have no immediate effect on a running timer, with the exception of a write to TCH. Hence these mos6522_timer_update() calls are not needed. Signed-off-by: Finn Thain --- hw/misc/mos6522.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/hw/mis

[PATCH v1 1/9] hw/mos6522: Remove get_load_time() methods and functions

2021-09-23 Thread Finn Thain
This code appears to be unnecessary. Signed-off-by: Finn Thain Reviewed-by: Philippe Mathieu-Daudé --- hw/misc/mos6522.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/hw/misc/mos6522.c b/hw/misc/mos6522.c index 1c57332b40..a478c1ca43 100644 --- a/hw/

Re: [PATCH] hw/misc: Add an iBT device model

2021-09-23 Thread Titus Rwantare
Hello all, I'd like some clarification on how the following code transfers irqs back and forth: > b/hw/arm/aspeed_soc.c >+/* iBT */ >+if (!sysbus_realize(SYS_BUS_DEVICE(&s->ibt), errp)) { >+return; >+} >+memory_region_add_subregion(&s->lpc.iomem, >+ sc->m

Re: [PATCH] ui/gtk: skip any extra draw of same guest scanout blob res

2021-09-23 Thread Dongwon Kim
On Fri, Sep 17, 2021 at 12:02:02PM +0200, Gerd Hoffmann wrote: > Hi, > > > +bool draw_submitted; > > +QemuMutex mutex; > > Why the mutex? I think all the code runs while holding the BQL so it > should be serialized. Gerd, I did more experiment and verified mutex is actually not r

Ping: [PATCH 0/2] cocoa.m: keyboard quality of life reborn

2021-09-23 Thread Programmingkid
Hi Peter, are you reviewing cocoa patches? Should someone else see these patches? Thank you. Ping: https://patchwork.kernel.org/project/qemu-devel/patch/90e28997-9afa-4d8c-8323-bd087e629...@gmail.com/ https://patchwork.kernel.org/project/qemu-devel/patch/20210730170945.4468-3-programmingk...@g

Re: [PULL 00/12] jobs: mirror: Handle errors after READY cancel

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
22.09.2021 22:19, Vladimir Sementsov-Ogievskiy wrote: 22.09.2021 19:05, Richard Henderson wrote: On 9/21/21 3:20 AM, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit 326ff8dd09556fc2e257196c49f35009700794ac:    Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-

Re: [PATCH v6 07/11] block: use int64_t instead of int in driver write_zeroes handlers

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
23.09.2021 23:33, Eric Blake wrote: On Fri, Sep 03, 2021 at 01:28:03PM +0300, Vladimir Sementsov-Ogievskiy wrote: We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk

Re: [PATCH v11 00/16] target/riscv: Update QEmu for Zb[abcs] 1.0.0

2021-09-23 Thread Philipp Tomsich
Alistair, Is there something that is holding this series up? I believe we should avoid having an outdated draft version of the bitmanip proposal in 6.2. Thanks, Philipp. On Sat, 11 Sept 2021 at 16:00, Philipp Tomsich wrote: > > > The Zb[abcs] extensions have complete public review and are near

Re: [PATCH v4] Prevent vhost-user-blk-test hang

2021-09-23 Thread ebl...@redhat.com
On Thu, Sep 23, 2021 at 03:16:17PM +, Raphael Norwitz wrote: > In the vhost-user-blk-test, as of now there is nothing stoping > vhost-user-blk in QEMU writing to the socket right after forking off the > storage daemon before it has a chance to come up properly, leaving the > test hanging foreve

Re: [PATCH v6 10/11] block: use int64_t instead of int in driver discard handlers

2021-09-23 Thread Eric Blake
On Fri, Sep 03, 2021 at 01:28:06PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are generally moving to int64_t for both offset and bytes parameters > on all io paths. > > Main motivation is realization of 64-bit write_zeroes operation for > fast zeroing large disk chunks, up to the whole disk.

Re: [PATCH v3 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread Alexander Bulekov
On 210923 1513, John Snow wrote: > The single backtick markup in ReST is the "default role". Currently, > Sphinx's default role is called "content". Sphinx suggests you can use > the "Any" role instead to turn any single-backtick enclosed item into a > cross-reference. > > This is useful for thing

Re: [PATCH v6 07/11] block: use int64_t instead of int in driver write_zeroes handlers

2021-09-23 Thread Eric Blake
On Thu, Sep 23, 2021 at 03:33:45PM -0500, Eric Blake wrote: > > +++ b/block/nbd.c > > @@ -1407,15 +1407,17 @@ static int nbd_client_co_pwritev(BlockDriverState > > *bs, int64_t offset, > > } > > > > static int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t > > offset, > > -

Re: [PATCH v3 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread Eduardo Habkost
On Thu, Sep 23, 2021 at 03:13:22PM -0400, John Snow wrote: > The single backtick markup in ReST is the "default role". Currently, > Sphinx's default role is called "content". Sphinx suggests you can use > the "Any" role instead to turn any single-backtick enclosed item into a > cross-reference. >

Re: [PATCH v3 2/2] docs/sphinx: change default role to "any"

2021-09-23 Thread Eduardo Habkost
On Thu, Sep 23, 2021 at 03:13:23PM -0400, John Snow wrote: > This interprets single-backtick syntax in all of our Sphinx docs as a > cross-reference to *something*, including Python symbols. > > From here on out, new uses of `backticks` will cause a build failure if > the target cannot be referenc

Re: [PATCH v2 2/6] iotests: add warning for rogue 'qemu' packages

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
23.09.2021 21:44, John Snow wrote: On Thu, Sep 23, 2021 at 2:32 PM Vladimir Sementsov-Ogievskiy mailto:vsement...@virtuozzo.com>> wrote: 23.09.2021 21:07, John Snow wrote: > Add a warning for when 'iotests' runs against a qemu namespace that > isn't the one in the source tree. Th

Re: [PATCH v6 07/11] block: use int64_t instead of int in driver write_zeroes handlers

2021-09-23 Thread Eric Blake
On Fri, Sep 03, 2021 at 01:28:03PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are generally moving to int64_t for both offset and bytes parameters > on all io paths. > > Main motivation is realization of 64-bit write_zeroes operation for > fast zeroing large disk chunks, up to the whole disk.

Re: [RFC PATCH v2] hw/nvme:Adding Support for namespace management

2021-09-23 Thread Klaus Jensen
On Aug 19 18:39, Naveen Nagar wrote: > From: Naveen > > This patch supports namespace management : create and delete operations. > > Since v1: > - Modified and moved nvme_ns_identify_common in ns.c file > - Added check for CSI field in NS management > - Indentation fix in namespace create > >

Re: [PATCH v2] hw/nvme: Return error for fused operations

2021-09-23 Thread Klaus Jensen
On Sep 15 17:43, Pankaj Raghav wrote: > Currently, FUSED operations are not supported by QEMU. As per the 1.4 SPEC, > controller should abort the command that requested a fused operation with > an INVALID FIELD error code if they are not supported. > > Changes from v1: > Added FUSE flag check als

Re: [PATCH] hw/nvme: reattach subsystem namespaces on hotplug

2021-09-23 Thread Klaus Jensen
On Sep 9 13:37, Hannes Reinecke wrote: > On 9/9/21 12:47 PM, Klaus Jensen wrote: > > On Sep 9 11:43, Hannes Reinecke wrote: > >> With commit 5ffbaeed16 ("hw/nvme: fix controller hot unplugging") > >> namespaces get moved from the controller to the subsystem if one > >> is specified. > >> That kee

Re: [PATCH v6 06/11] block: make BlockLimits::max_pwrite_zeroes 64bit

2021-09-23 Thread Eric Blake
On Fri, Sep 03, 2021 at 01:28:02PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are going to support 64 bit write-zeroes requests. Now update the > limit variable. It's absolutely safe. The variable is set in some > drivers, and used in bdrv_co_do_pwrite_zeroes(). > > Update also max_write_zero

[PATCH 4/5] util/qemu-option: make qemu_opt_del_all() function public

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/option.h | 1 + util/qemu-option.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/option.h b/include/qemu/option.h index 306bf07575..4ba88f2632 100644 --- a/inc

[PATCH 5/5] trace: add qmp trace event namespace

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
Add a possibility to trace some qmp commands by user selection. User API is simple: it looks like after this patch we have trace-points for all qmp commands, in format "qmp:". So user may do --trace qmp:drive-backup or run qmp command trace-event-set-state with arguments name="qmp:drive-bac

[PATCH 2/5] qapi/qmp: QmpCommand: add .tracing field and API

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
We are going to add a possibility to trace some qmp commands by user selection. For now add a new field to QmpCommand structure and two functions to manipulate with it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qapi/qmp/dispatch.h | 14 ++ qapi/qmp-registry.c |

[PATCH 3/5] monitor: add qmp tracing API for qmp_commands

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
Add wrappers to manipulate with .tracing in qmp_commands list. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/monitor/monitor.h | 3 +++ monitor/qmp.c | 10 ++ 2 files changed, 13 insertions(+) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h inde

[PATCH 0/5] trace: inroduce qmp: trace namespace

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
Hi all! We have handle_qmp_command and qmp_command_repond trace points to trace qmp commands. They are very useful to debug problems involving management tools like libvirt. But tracing all qmp commands is too much. Here I suggest a kind of tracing namespace. Formally this series adds a trace po

[PATCH 1/5] trace/control: introduce trace_opt_parse_opts()

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
Add a function same as trace_opt_parse, but parameter is QemuOpts. Signed-off-by: Vladimir Sementsov-Ogievskiy --- trace/control.h | 7 +++ trace/control.c | 18 -- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/trace/control.h b/trace/control.h index 23b839

[PATCH v3 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread John Snow
The single backtick markup in ReST is the "default role". Currently, Sphinx's default role is called "content". Sphinx suggests you can use the "Any" role instead to turn any single-backtick enclosed item into a cross-reference. This is useful for things like autodoc for Python docstrings, where i

[PATCH v3 2/2] docs/sphinx: change default role to "any"

2021-09-23 Thread John Snow
This interprets single-backtick syntax in all of our Sphinx docs as a cross-reference to *something*, including Python symbols. >From here on out, new uses of `backticks` will cause a build failure if the target cannot be referenced. Signed-off-by: John Snow --- docs/conf.py | 5 + 1 file c

[PATCH v3 0/2] docs/sphinx: change default `role` to "any"

2021-09-23 Thread John Snow
Rebased to not let the work done in removing erroneous references prior to 6.1 regress. V3: Removed bad rebase confetti fixed the OSS-Fuzz link to ... actually be a link. John Snow (2): docs: remove non-reference uses of single backticks docs/sphinx: change default role to "any" docs/co

Re: [PATCH v2 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread John Snow
On Thu, Sep 23, 2021 at 2:33 PM Eduardo Habkost wrote: > On Thu, Sep 23, 2021 at 02:22:03PM -0400, John Snow wrote: > > The single backtick markup in ReST is the "default role". Currently, > > Sphinx's default role is called "content". Sphinx suggests you can use > > the "Any" role instead to tur

Re: [PATCH v2 2/6] iotests: add warning for rogue 'qemu' packages

2021-09-23 Thread John Snow
On Thu, Sep 23, 2021 at 2:32 PM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > 23.09.2021 21:07, John Snow wrote: > > Add a warning for when 'iotests' runs against a qemu namespace that > > isn't the one in the source tree. This might occur if you have > > (accidentally) install

Re: [PATCH v2 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread Eduardo Habkost
On Thu, Sep 23, 2021 at 02:22:03PM -0400, John Snow wrote: > The single backtick markup in ReST is the "default role". Currently, > Sphinx's default role is called "content". Sphinx suggests you can use > the "Any" role instead to turn any single-backtick enclosed item into a > cross-reference. >

Re: [PATCH v2 2/6] iotests: add warning for rogue 'qemu' packages

2021-09-23 Thread Vladimir Sementsov-Ogievskiy
23.09.2021 21:07, John Snow wrote: Add a warning for when 'iotests' runs against a qemu namespace that isn't the one in the source tree. This might occur if you have (accidentally) installed the Python namespace package to your local packages. (I'm not going to say that this is because I bit mys

Re: [PATCH v2 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread Peter Maydell
On Thu, 23 Sept 2021 at 19:22, John Snow wrote: > > The single backtick markup in ReST is the "default role". Currently, > Sphinx's default role is called "content". Sphinx suggests you can use > the "Any" role instead to turn any single-backtick enclosed item into a > cross-reference. > > This is

Re: [PATCH 6/6] ide: Rename ide_bus_new() to ide_bus_init()

2021-09-23 Thread John Snow
On Thu, Sep 23, 2021 at 8:12 AM Peter Maydell wrote: > The function ide_bus_new() does an in-place initialization. Rename > it to ide_bus_init() to follow our _init vs _new convention. > > Signed-off-by: Peter Maydell > --- > include/hw/ide/internal.h | 4 ++-- > hw/ide/ahci.c | 2

[PATCH v2 2/2] docs/sphinx: change default role to "any"

2021-09-23 Thread John Snow
This interprets single-backtick syntax in all of our Sphinx docs as a cross-reference to *something*, including Python symbols. >From here on out, new uses of `backticks` will cause a build failure if the target cannot be referenced. Signed-off-by: John Snow --- docs/conf.py | 5 + 1 file c

[PATCH v2 1/2] docs: remove non-reference uses of single backticks

2021-09-23 Thread John Snow
The single backtick markup in ReST is the "default role". Currently, Sphinx's default role is called "content". Sphinx suggests you can use the "Any" role instead to turn any single-backtick enclosed item into a cross-reference. This is useful for things like autodoc for Python docstrings, where i

[PATCH v2 0/2] docs/sphinx: change default `role` to "any"

2021-09-23 Thread John Snow
Rebased to not let the work done in removing erroneous references prior to 6.1 regress. John Snow (2): docs: remove non-reference uses of single backticks docs/sphinx: change default role to "any" docs/conf.py | 5 + docs/devel/fuzzing.rst | 9

[PATCH v2 6/6] iotests: Update for pylint 2.11.1

2021-09-23 Thread John Snow
1. Ignore the new f-strings warning, we're not interested in doing a full conversion at this time. 2. Just mute the unbalanced-tuple-unpacking warning, it's not a real error in this case and muting the dozens of callsites is just not worth it. 3. Add encodings to read_text(). Signed-off

[PATCH v2 2/6] iotests: add warning for rogue 'qemu' packages

2021-09-23 Thread John Snow
Add a warning for when 'iotests' runs against a qemu namespace that isn't the one in the source tree. This might occur if you have (accidentally) installed the Python namespace package to your local packages. (I'm not going to say that this is because I bit myself with this, but you can fill in th

[PATCH v2 1/6] iotests: add 'qemu' package location to PYTHONPATH in testenv

2021-09-23 Thread John Snow
We can drop the sys.path hacking in various places by doing this. Additionally, by doing it in one place right up top, we can print interesting warnings in case the environment does not look correct. (See next commit.) If we ever decide to change how the environment is crafted, all of the "help me

[PATCH v2 5/6] iotests/migrate-bitmaps-test: delint

2021-09-23 Thread John Snow
Mostly uninteresting stuff. Move the test injections under a function named main() so that the variables used during that process aren't in the global scope. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Hanna Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed

[PATCH v2 0/6] iotests: update environment and linting configuration

2021-09-23 Thread John Snow
GitLab: https://gitlab.com/jsnow/qemu/-/commits/python-package-iotest-pt1 CI: https://gitlab.com/jsnow/qemu/-/pipelines/376236687 This series partially supersedes: [PATCH v3 00/16] python/iotests: Run iotest linters during Python CI' Howdy, this is good stuff we want even if we aren't yet in ag

[PATCH v2 3/6] iotests/linters: check mypy files all at once

2021-09-23 Thread John Snow
We can circumvent the '__main__' redefinition problem by passing --scripts-are-modules. Take mypy out of the loop per-filename and check everything in one go: it's quite a bit faster. Signed-off-by: John Snow Reviewed-by: Hanna Reitz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Vladimir Sem

Re: [PATCH v5 01/31] target/arm: Implement arm_v7m_cpu_has_work()

2021-09-23 Thread Philippe Mathieu-Daudé
On 9/23/21 20:01, Peter Maydell wrote: On Thu, 23 Sept 2021 at 18:17, Philippe Mathieu-Daudé wrote: Since we provide info->class_init as arm_v7m_class_init(), only tcg_ops and gdb_core_xml_file from CPUClass are set: static void arm_v7m_class_init(ObjectClass *oc, void *data) { ARMCPUCla

[PATCH v2 4/6] iotests/mirror-top-perms: Adjust imports

2021-09-23 Thread John Snow
We need to import subpackages from the qemu namespace package; importing the namespace package alone doesn't bring the subpackages with it -- unless someone else (like iotests.py) imports them too. Adjust the imports. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Han

Re: [PATCH v5 01/31] target/arm: Implement arm_v7m_cpu_has_work()

2021-09-23 Thread Peter Maydell
On Thu, 23 Sept 2021 at 18:17, Philippe Mathieu-Daudé wrote: > Since we provide info->class_init as arm_v7m_class_init(), only > tcg_ops and gdb_core_xml_file from CPUClass are set: > > static void arm_v7m_class_init(ObjectClass *oc, void *data) > { > ARMCPUClass *acc = ARM_CPU_CLASS(oc); >

Re: [PATCH v4 02/30] MAINTAINERS: Add tcg/loongarch64 entry with myself as maintainer

2021-09-23 Thread Philippe Mathieu-Daudé
On 9/23/21 18:59, WANG Xuerui wrote: I ported the initial code, so I should maintain it of course. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- MAINTAINERS | 5 + 1 file changed, 5 insertions(+) Welcome ;) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v5 05/31] sysemu: Introduce AccelOpsClass::has_work()

2021-09-23 Thread Philippe Mathieu-Daudé
On 9/20/21 23:58, Richard Henderson wrote: On 9/20/21 2:44 PM, Philippe Mathieu-Daudé wrote: -    g_assert(cc->has_work); -    return cc->has_work(cpu); +    if (cc->has_work) { +    return cc->has_work(cpu); +    } +    if (cpus_accel->has_work) { +    return cpus_accel->has_work(cpu);

[PATCH v4 27/30] tcg/loongarch64: Register the JIT

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 44 1 file changed, 44 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 83b8bcdfdf..bce03a96d7 100644 --- a/tcg/l

[PATCH v4 26/30] tcg/loongarch64: Implement tcg_target_init

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 27 +++ 1 file changed, 27 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index e09bf832bd..83b8bcdfdf 100644 --- a/tcg/loonga

Re: [PATCH v5 08/31] accel/tcg: Implement AccelOpsClass::has_work() as stub

2021-09-23 Thread Philippe Mathieu-Daudé
On 9/21/21 00:01, Richard Henderson wrote: On 9/20/21 2:44 PM, Philippe Mathieu-Daudé wrote: +static bool tcg_cpu_has_work(CPUState *cpu) +{ +    CPUClass *cc = CPU_GET_CLASS(cpu); + +    g_assert(cc->tcg_ops->has_work); +    return cc->tcg_ops->has_work(cpu); +} Now, you're expecting cc->has_

[PATCH v4 24/30] tcg/loongarch64: Implement tcg_target_qemu_prologue

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 68 1 file changed, 68 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 09ec560a72..3cf9a4924b 100644 --- a/tcg/l

Re: [PATCH v5 01/31] target/arm: Implement arm_v7m_cpu_has_work()

2021-09-23 Thread Philippe Mathieu-Daudé
Hi Peter, On 9/21/21 11:45, Philippe Mathieu-Daudé wrote: On 9/21/21 11:34, Peter Maydell wrote: On Mon, 20 Sept 2021 at 22:44, Philippe Mathieu-Daudé wrote: Implement SysemuCPUOps::has_work() handler for the ARM v7M CPU. See the comments added in commit 7ecdaa4a963 ("armv7m: Fix condition

[PATCH v4 23/30] tcg/loongarch64: Add softmmu load/store helpers, implement qemu_ld/qemu_st ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 342 +++ 2 files changed, 344 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-con-set.h index e54ca9b2de..349c

[PATCH v4 30/30] configure, meson.build: Mark support for loongarch64 hosts

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- configure | 7 ++- meson.build | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1043ccce4f..3a9035385d 100755 --- a/configure +++ b/configure @@ -659,6 +659,8 @@ elif check_defin

[PATCH v4 28/30] linux-user: Add safe syscall handling for loongarch64 hosts

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- linux-user/host/loongarch64/hostdep.h | 34 .../host/loongarch64/safe-syscall.inc.S | 80 +++ 2 files changed, 114 insertions(+) create mode 100644 linux-user/host/loongarch64/hostdep.h create

[PATCH v4 21/30] tcg/loongarch64: Implement tcg_out_call

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 34 1 file changed, 34 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 3f12fbeb78..6a374c1941 100644 --- a/tcg/l

[PATCH v4 20/30] tcg/loongarch64: Implement setcond ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 69 2 files changed, 70 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-co

[PATCH v4 18/30] tcg/loongarch64: Implement mul/mulsh/muluh/div/divu/rem/remu ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 65 tcg/loongarch64/tcg-target.h | 16 +++ 3 files changed, 74 insertions(+), 8 deletions(-) diff --git a/tc

[PATCH v4 12/30] tcg/loongarch64: Implement not/and/or/xor/nor/andc/orc ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 + tcg/loongarch64/tcg-target.c.inc | 88 tcg/loongarch64/tcg-target.h | 16 ++--- 3 files changed, 98 insertions(+), 8 deletions(-) diff --git a/tcg/

[PATCH v4 29/30] accel/tcg/user-exec: Implement CPU-specific signal handler for loongarch64 hosts

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- accel/tcg/user-exec.c | 73 +++ 1 file changed, 73 insertions(+) diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c index 8fed542622..38d4ad8a7d 100644 --- a/accel/tcg/user-exec.c +++ b

[PATCH v4 15/30] tcg/loongarch64: Implement clz/ctz ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 42 tcg/loongarch64/tcg-target.h | 8 +++--- 3 files changed, 47 insertions(+), 4 deletions(-) diff --git a/tcg

[PATCH v4 17/30] tcg/loongarch64: Implement add/sub ops

2021-09-23 Thread WANG Xuerui
The neg_i{32,64} ops is fully expressible with sub, so omitted for simplicity. Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 2 ++ tcg/loongarch64/tcg-target.c.inc | 38 2 files changed, 40 insertions(+) d

[PATCH v4 25/30] tcg/loongarch64: Implement exit_tb/goto_tb

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 3cf9a4924b..e09bf832bd 100644 --- a/tcg/loongarch64/tc

[PATCH v4 11/30] tcg/loongarch64: Implement sign-/zero-extension ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 82 tcg/loongarch64/tcg-target.h | 24 3 files changed, 95 insertions(+), 12 deletions(-) diff --git a/

[PATCH v4 10/30] tcg/loongarch64: Implement goto_ptr

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 17 + tcg/loongarch64/tcg-target.c.inc | 15 +++ 2 files changed, 32 insertions(+) create mode 100644 tcg/loongarch64/tcg-target-con-set.h diff --git a/tcg/loong

[PATCH v4 22/30] tcg/loongarch64: Implement simple load/store ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 131 +++ 2 files changed, 132 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-

[PATCH v4 13/30] tcg/loongarch64: Implement deposit/extract ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 21 + tcg/loongarch64/tcg-target.h | 8 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/tcg/loon

[PATCH v4 07/30] tcg/loongarch64: Implement necessary relocation operations

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 66 1 file changed, 66 insertions(+) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index f0930f77ef..6967f143e9 100644 --- a/tcg/l

[PATCH v4 19/30] tcg/loongarch64: Implement br/brcond ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target-con-set.h | 1 + tcg/loongarch64/tcg-target.c.inc | 53 2 files changed, 54 insertions(+) diff --git a/tcg/loongarch64/tcg-target-con-set.h b/tcg/loongarch64/tcg-target-co

[PATCH v4 14/30] tcg/loongarch64: Implement bswap{16,32,64} ops

2021-09-23 Thread WANG Xuerui
Signed-off-by: WANG Xuerui Reviewed-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 32 tcg/loongarch64/tcg-target.h | 10 +- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch

  1   2   3   >