Re: [PATCH v4 08/10] nbd/server: introduce NBDExtentArray

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
27.02.2020 16:21, Eric Blake wrote: On 2/27/20 6:46 AM, Vladimir Sementsov-Ogievskiy wrote: 26.02.2020 18:06, Eric Blake wrote: On 2/5/20 5:20 AM, Vladimir Sementsov-Ogievskiy wrote: Introduce NBDExtentArray class, to handle extents list creation in more controlled way and with fewer OUT

Re: [PATCH v4 00/10] Further bitmaps improvements

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
26.02.2020 16:13, Max Reitz wrote: On 05.02.20 12:20, Vladimir Sementsov-Ogievskiy wrote: Hi! The main feature here is improvement of _next_dirty_area API, which I'm going to use then for backup / block-copy. Somehow, I thought that it was merged, but seems I even forgot to send v4. The

[PATCH v3 1/9] job: refactor progress to separate object

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
We need it in separate to pass to the block-copy object in the next commit. Cc: qemu-sta...@nongnu.org Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- include/qemu/job.h| 11 ++- include/qemu/progress_meter.h | 58

[PATCH v3 8/9] block/block-copy: reduce intersecting request lock

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Currently, block_copy operation lock the whole requested region. But there is no reason to lock clusters, which are already copied, it will disturb other parallel block_copy requests for no reason. Let's instead do the following: Lock only sub-region, which we are going to operate on. Then,

[PATCH v3 7/9] block/block-copy: rename start to offset in interfaces

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
offset/bytes pair is more usual naming in block layer, let's use it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Reviewed-by: Max Reitz --- include/block/block-copy.h | 4 +- block/block-copy.c | 84 +++--- 2 files

[PATCH v3 6/9] block/block-copy: refactor interfaces to use bytes instead of end

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
We have a lot of "chunk_end - start" invocations, let's switch to bytes/cur_bytes scheme instead. While being here, improve check on block_copy_do_copy parameters to not overflow when calculating nbytes and use int64_t for bytes in block_copy for consistency. Signed-off-by: Vladimir

[PATCH v3 4/9] block/block-copy: use block_status

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Use bdrv_block_status_above to chose effective chunk size and to handle zeroes effectively. This substitutes checking for just being allocated or not, and drops old code path for it. Assistance by backup job is dropped too, as caching block-status information is more difficult than just caching

[PATCH v3 9/9] block/block-copy: hide structure definitions

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Hide structure definitions and add explicit API instead, to keep an eye on the scope of the shared fields. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 52 +++ block/backup-top.c | 6 ++-- block/backup.c | 25

[PATCH v3 5/9] block/block-copy: factor out find_conflicting_inflight_req

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Split find_conflicting_inflight_req to be used separately. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich --- block/block-copy.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/block/block-copy.c

[PATCH v3 2/9] block/block-copy: fix progress calculation

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Assume we have two regions, A and B, and region B is in-flight now, region A is not yet touched, but it is unallocated and should be skipped. Correspondingly, as progress we have total = A + B current = 0 If we reset unallocated region A and call progress_reset_callback, it will calculate 0

[PATCH v3 3/9] block/block-copy: specialcase first copy_range request

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
In block_copy_do_copy we fallback to read+write if copy_range failed. In this case copy_size is larger than defined for buffered IO, and there is corresponding commit. Still, backup copies data cluster by cluster, and most of requests are limited to one cluster anyway, so the only source of this

[PATCH v3 0/9] block-copy improvements: part I

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
v3: 01: new 03: fix block_copy_do_copy 04: add comment, rebase on 01 05: s/block_copy_find_inflight_req/find_conflicting_inflight_req/ 06: add overflow check use int64_t for block_copy bytes parameter fix preexisting typo in modified comment 07: update forgotten block_copy prototype

Re: [PATCH v2] virtio-serial-bus: do cleanup on the error path in realize() to avoid memleaks

2020-03-05 Thread Amit Shah
On Fri, 2020-03-06 at 10:50 +0800, Pan Nengyuan wrote: > port->bh forgot to delete on the error path, this patch add it to fix > memleaks. It's easy to reproduce as follow(add a same nr port): > {'execute': 'device_add', 'arguments': {'id': > 'virtio_serial_pci0', 'driver':

Re: [PATCH 2/2] via-ide: Also emulate non 100% native mode

2020-03-05 Thread Mark Cave-Ayland
On 06/03/2020 00:21, BALATON Zoltan wrote: > On Fri, 6 Mar 2020, BALATON Zoltan wrote: >> On Thu, 5 Mar 2020, Mark Cave-Ayland wrote: >>> On 04/03/2020 22:33, BALATON Zoltan wrote: >>> another possibility: PCI configuration space register 0x3d (Interrupt pin) >>> is >>> documented as having

Re: [PATCH v4 1/4] qapi: Add a 'coroutine' flag for commands

2020-03-05 Thread Markus Armbruster
Kevin Wolf writes: > Am 05.03.2020 um 16:30 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 22.01.2020 um 07:32 hat Markus Armbruster geschrieben: >> >> Kevin Wolf writes: >> >> >> >> > This patch adds a new 'coroutine' flag to QMP command definitions that >> >> > tells

Re: [PATCH 2/2] via-ide: Also emulate non 100% native mode

2020-03-05 Thread Mark Cave-Ayland
On 05/03/2020 23:35, BALATON Zoltan wrote: >> I just a quick look at the PCI specification and found this interesting >> paragraph in >> the section about "Interrupt Line": >> >> >> "The Interrupt Line register is an eight-bit register used to communicate >> interrupt >> line routing

Re: [PATCH] console: make QMP screendump use coroutine

2020-03-05 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Mar 5, 2020 at 3:46 PM Markus Armbruster wrote: >> >> I tried to observe the main loop keeps running while the screendump does >> its work. >> >> The main loop appears to lack trace points. Alright, if there's no >> hammer handy, I'll use a rock: >>

[PATCH v8 10/10] xen: introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 01/10] error: auto propagated local_err

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Here is introduced ERRP_AUTO_PROPAGATE macro, to be used at start of functions with an errp OUT parameter. It has three goals: 1. Fix issue with error_fatal and error_prepend/error_append_hint: user can't see this additional information, because exit() happens in error_setg earlier than

[PATCH v8 07/10] virtio-9p: introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 08/10] TPM: introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 02/10] scripts: add coccinelle script to use auto propagated errp

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and does corresponding changes in code (look for details in include/qapi/error.h) Usage example: spatch --sp-file scripts/coccinelle/auto-propagated-errp.cocci \ --macro-file scripts/cocci-macro-file.h --in-place --no-show-diff \

[PATCH v8 09/10] nbd: introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 05/10] pflash: introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 00/10] error: auto propagated local_err part I

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
File with errp-cleaning APIs dropped for two reasons: 1. I'm tired after a 3-days war with coccinelle, and don't want to add more patches here. 2. Markus noted, that we forget two more functions which needs such wrappers and corresponding conversion, so seems better to handle all these

[PATCH v8 04/10] SD (Secure Card): introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 06/10] fw_cfg: introduce ERRP_AUTO_PROPAGATE

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro. Otherwise, this info will not be added when errp == _fatal (the program will exit prior to the error_append_hint() or error_prepend() call). Fix such cases. If we want to

[PATCH v8 03/10] hw/sd/ssi-sd: fix error handling in ssi_sd_realize

2020-03-05 Thread Vladimir Sementsov-Ogievskiy
It's wrong to use same err object as errp parameter for several function calls without intermediate checking for error: we'll crash if try to set err object twice. Fix that, using new ERRP_AUTO_PROPAGATE macro. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake ---

Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c

2020-03-05 Thread Liu, Jingqi
On 3/6/2020 12:40 AM, Peter Maydell wrote: On Thu, 5 Mar 2020 at 16:11, Ján Tomko wrote: On a Thursday in 2020, Jingqi Liu wrote: The CONFIG_LINUX symbol is always not defined in this file. This fixes that "config-host.h" header file is not included for getting macros. Signed-off-by: Jingqi

[PATCH] migration: not require length align when choose fast dirty sync path

2020-03-05 Thread Keqian Zhu
In aa777e297c840, ramblock length is required to align word pages when we choose the fast dirty sync path. The reason is that "If the Ramblock is less than 64 pages in length that long can contain bits representing two different RAMBlocks, but the code will update the bmap belinging to the 1st

Re: [PATCH] util: fix to get configuration macros in util/mmap-alloc.c

2020-03-05 Thread Liu, Jingqi
On 3/6/2020 12:10 AM, Ján Tomko wrote: On a Thursday in 2020, Jingqi Liu wrote: The CONFIG_LINUX symbol is always not defined in this file. This fixes that "config-host.h" header file is not included for getting macros. Signed-off-by: Jingqi Liu --- util/mmap-alloc.c | 2 ++ 1 file changed, 2

[PATCH v2] virtio-serial-bus: do cleanup on the error path in realize() to avoid memleaks

2020-03-05 Thread Pan Nengyuan
port->bh forgot to delete on the error path, this patch add it to fix memleaks. It's easy to reproduce as follow(add a same nr port): {'execute': 'device_add', 'arguments': {'id': 'virtio_serial_pci0', 'driver': 'virtio-serial-pci', 'bus': 'pci.0', 'addr': '0x5'}, 'id': 'yVkZcGgV'}

[PATCH v1 3/3] i386: Add support for save/load IA32_PEBS_DATA_CFG MSR

2020-03-05 Thread Luwei Kang
Add support for save/load PEBS baseline feature IA32_PEBS_DATA_CFG MSR. Signed-off-by: Luwei Kang --- target/i386/cpu.h | 2 ++ target/i386/kvm.c | 14 ++ target/i386/machine.c | 24 3 files changed, 40 insertions(+) diff --git a/target/i386/cpu.h

[PATCH v1 1/3] i386: Add "pebs" parameter to enable PEBS feature

2020-03-05 Thread Luwei Kang
The PEBS virtualization enabling in KVM guest will be supported start from IceLake hardware. This patch introduce a new CPU parameter "pebs" to enable PEBS feature. The paramter of "pebs" is false by default. PDCM,DTES64,DTS are needed by PEBS feature. Expose these feature bits to KVM guest when

[PATCH v1 2/3] i386: Add support for save/load PEBS MSRs

2020-03-05 Thread Luwei Kang
PEBS feature virtualization required IA32_PEBS_ENABLE and DS_AREA MSRs. This patch is to add the support of these MSRs saved/loaded in guest. Signed-off-by: Luwei Kang --- target/i386/cpu.h | 6 ++ target/i386/kvm.c | 29 + target/i386/machine.c | 25

[PATCH v1 0/3] PEBS virtualization enabling via DS in Qemu

2020-03-05 Thread Luwei Kang
The PEBS virtualization will be first supported on ICELAKE server. This patchset introduce a new CPU parameter "pebs"(e.g. "-cpu Icelake-Server,pmu=true,pebs=true") that use for enable PEBS feature in KVM guest, and add the support for save/load PEBS MSRs. Luwei Kang (3): i386: Add "pebs"

RE: [PATCH] contrib/elf2dmp: prevent uninitialized warning

2020-03-05 Thread Chenqun (kuhn)
>-Original Message- >From: Viktor Prutyanov [mailto:viktor.prutya...@phystech.edu] >Sent: Friday, March 6, 2020 2:59 AM >To: Chenqun (kuhn) >Cc: qemu-devel@nongnu.org; pbonz...@redhat.com; Zhanghailiang >; qemu-triv...@nongnu.org >Subject: Re: [PATCH] contrib/elf2dmp: prevent

Re: [PATCH qemu v7 0/5] spapr: Kill SLOF

2020-03-05 Thread Alexey Kardashevskiy
On 27/02/2020 17:35, Paolo Bonzini wrote: > On 27/02/20 00:38, Alexey Kardashevskiy wrote: >> >> >> On 26/02/2020 22:34, Paolo Bonzini wrote: >>> On 26/02/20 00:58, Alexey Kardashevskiy wrote: On 21/02/2020 19:27, Paolo Bonzini wrote: > On 21/02/20 01:18, Alexey Kardashevskiy

RE: [PATCH] hw/arm/stm32f405: Add preliminary flash interface emulation support

2020-03-05 Thread Stephanos Ioannidis
> I think a lot of comments from your other patch apply to this patch as well > (about bit fields and splitting the patch specifically). Certainly does, I will send the v2 for this as well. Stephanos -Original Message- From: Alistair Francis Sent: Friday, March 6, 2020 8:08 AM To:

RE: [PATCH] hw/arm/stm32f405: Add preliminary RCC emulation support

2020-03-05 Thread Stephanos Ioannidis
> These should at least be numbers (if not macros) instead of binary. Just wanted to follow the convention that the reference manual uses (it lists the field values in binary). > Can't you just do (rcc_pllcfgr.pllp + 1) * 2 instead of a switch case? > I don't think we need a switch statement

Re: [PATCH v4 3/3] hw/misc/mos6522: move timer_new from init() into realize() to avoid memleaks

2020-03-05 Thread Pan Nengyuan
On 3/6/2020 6:56 AM, David Gibson wrote: > On Thu, Mar 05, 2020 at 02:54:22PM +0800, Pan Nengyuan wrote: >> There are some memleaks when we call 'device_list_properties'. This patch >> move timer_new from init into realize to fix it. >> >> Reported-by: Euler Robot >> Signed-off-by: Pan

RE: [PATCH] hw/arm/stm32f405: Add preliminary RCC emulation support

2020-03-05 Thread Stephanos Ioannidis
> Is it portable, though? I thought C bitfield order and packing was > implementation-defined, which would mean that you can't guarantee that this > union will give you the required thing in the uint32_t half. They are indeed implementation defined. As for packing, it is often controllable; as

Re: [PATCH v2 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-03-05 Thread Peter Xu
On Thu, Mar 05, 2020 at 04:58:57PM -0700, Alex Williamson wrote: Hi, Alex, [...] > > +bool kvm_resample_fd_notify(int gsi) > > +{ > > +KVMResampleFd *rfd; > > + > > +if (!kvm_irqchip_is_split()) { > > +return false; > > +} > > Nit, checking split irqchip here seems

RE: [PATCH] hw/arm/stm32f405: Add preliminary RCC emulation support

2020-03-05 Thread Stephanos Ioannidis
Thanks for the review. > Would you mind splitting this patch up into three? One for the SysTick fix, > one to add the RCC device (unused) and then one to connect it? It just makes > reviewieing easier. I will look into splitting this patch into four separate commits: 1. RCC device (unused),

RE: [PATCH v3 00/21] linux-user: generate syscall_nr.sh

2020-03-05 Thread Taylor Simpson
Reviewed-by: Taylor Simpson FWIW, the Hexagon Linux port does not use this mechanism. I can work with our kernel maintainer and in the meantime create something suitable for qemu. > -Original Message- > From: Qemu-devel bounces+tsimpson=quicinc@nongnu.org> On Behalf Of Laurent

[RFC PATCH 1/1] ppc/spapr: Add hotplugged flag on DIMM LMBs on drmem_v2

2020-03-05 Thread Leonardo Bras
On reboot, all memory that was previously added using object_add and device_add is placed in this DIMM area. The new SPAPR_LMB_FLAGS_HOTPLUGGED flag helps Linux to put this memory in the correct memory zone, so no unmovable allocations are made there, allowing the object to be easily hot-removed

Re: [PATCH 2/2] via-ide: Also emulate non 100% native mode

2020-03-05 Thread BALATON Zoltan
On Fri, 6 Mar 2020, BALATON Zoltan wrote: On Thu, 5 Mar 2020, Mark Cave-Ayland wrote: On 04/03/2020 22:33, BALATON Zoltan wrote: another possibility: PCI configuration space register 0x3d (Interrupt pin) is documented as having value 0 == Legacy IRQ routing which should be the initial value

Re: [PATCH v1 2/3] riscv/sifive_u: Add a serial property to the sifive_u SoC

2020-03-05 Thread Bin Meng
Hi Alistair, On Fri, Mar 6, 2020 at 12:53 AM Alistair Francis wrote: > > On Thu, Mar 5, 2020 at 1:31 AM Bin Meng wrote: > > > > Hi Alistair, > > > > On Thu, Mar 5, 2020 at 7:13 AM Alistair Francis > > wrote: > > > > > > On Wed, Mar 4, 2020 at 6:47 AM Bin Meng wrote: > > > > > > > > Hi

Re: [PATCH v2 0/4] riscv: Upgrade OpenSBI to v0.6 and add 32-bit sifive_u bios image

2020-03-05 Thread Palmer Dabbelt
On Mon, 24 Feb 2020 05:39:40 PST (-0800), bmeng...@gmail.com wrote: This series advances the roms/opensbi submodule to the v0.6 release, and builds and captures platform firmware binaries from that release. A 32-bit sifive_u bios image has also been added, so that we can have 32-bit test

Re: [PATCH v2 4/4] gitlab-ci.yml: Add jobs to build OpenSBI firmware binaries

2020-03-05 Thread Palmer Dabbelt
On Mon, 24 Feb 2020 05:39:44 PST (-0800), bmeng...@gmail.com wrote: Add two GitLab jobs to build the OpenSBI firmware binaries. The first job builds a Docker image with the packages requisite to build OpenSBI, and stores this image in the GitLab registry. The second job pulls the image from the

Re: [PATCH v2 4/5] KVM: Kick resamplefd for split kernel irqchip

2020-03-05 Thread Alex Williamson
On Fri, 28 Feb 2020 11:15:02 -0500 Peter Xu wrote: > This is majorly only for X86 because that's the only one that supports > split irqchip for now. > > When the irqchip is split, we face a dilemma that KVM irqfd will be > enabled, however the slow irqchip is still running in the userspace. >

Re: [PATCH v4 3/3] hw/misc/mos6522: move timer_new from init() into realize() to avoid memleaks

2020-03-05 Thread David Gibson
On Thu, Mar 05, 2020 at 02:54:22PM +0800, Pan Nengyuan wrote: > There are some memleaks when we call 'device_list_properties'. This patch > move timer_new from init into realize to fix it. > > Reported-by: Euler Robot > Signed-off-by: Pan Nengyuan Applied to ppc-for-5.0. Probably the memory

Re: [PATCH v3 0/7] hw/scsi/spapr_vscsi: Fix time bomb buffer overflow

2020-03-05 Thread David Gibson
On Thu, Mar 05, 2020 at 01:12:46PM +0100, Philippe Mathieu-Daudé wrote: > This series fixes a possible buffer overflow. > > Simples patches first (dissociate the buffer holding DMA > requests with pointer to SRP Information Unit packets) to > clean the issue in the penultimate patch. > Applied

Re: [PATCH 5/6] hw/net: Make NetCanReceive() return a boolean

2020-03-05 Thread David Gibson
On Thu, Mar 05, 2020 at 06:56:49PM +0100, Philippe Mathieu-Daudé wrote: > The NetCanReceive handler return whether the device can or > can not receive new packets. Make it obvious by returning > a boolean type. > > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- >

Re: [PATCH 2/2] via-ide: Also emulate non 100% native mode

2020-03-05 Thread BALATON Zoltan
On Thu, 5 Mar 2020, Mark Cave-Ayland wrote: On 04/03/2020 22:33, BALATON Zoltan wrote: AFAICT this then only leaves the question: why does the firmware set PCI_INTERRUPT_LINE to 9, which is presumably why you are seeing problems running MorphOS under QEMU. Linux does try to handle both true

Re: [PATCH 6/6] hw/net/can: Make CanBusClientInfo::can_receive() return a boolean

2020-03-05 Thread Alistair Francis
On Thu, Mar 5, 2020 at 9:59 AM Philippe Mathieu-Daudé wrote: > > The CanBusClientInfo::can_receive handler return whether the > device can or can not receive new frames. Make it obvious by > returning a boolean type. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis

Re: [PATCH 5/6] hw/net: Make NetCanReceive() return a boolean

2020-03-05 Thread Alistair Francis
On Thu, Mar 5, 2020 at 9:57 AM Philippe Mathieu-Daudé wrote: > > The NetCanReceive handler return whether the device can or > can not receive new packets. Make it obvious by returning > a boolean type. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH] hw/arm/stm32f405: Add preliminary flash interface emulation support

2020-03-05 Thread Alistair Francis
On Sun, Mar 1, 2020 at 12:47 AM Stephanos Ioannidis wrote: > > The flash interface (FLASHIF) peripheral provides a control interface > for the SoC embedded flash memory on the STM32F4xx series devices. > > This commit adds preliminary support for the flash interface peripheral > emulation, in

Re: [PATCH] configure: Improve zstd test

2020-03-05 Thread Alex Bennée
Juan Quintela writes: > Alex Bennée wrote: >> Juan Quintela writes: >> >>> There were one error on the test (missing an s for --exists). >>> But we really need a recent zstd (0.8.1). >>> That version was released in 2016, so it is newer that some of our travis >>> images. Just check for the

Re: [PATCH v2 1/3] iotests: Specify explicit backing format where sensible

2020-03-05 Thread Eric Blake
On 2/27/20 7:08 AM, Eric Blake wrote: The change in libvirt to reject images without explicit backing format has pointed out that a number of tools have been far too reliant on probing in the past.  It's time to set a better example in our own iotests of properly setting this parameter. iotest

Re: [PULL 1/1] qxl: introduce hardware revision 5

2020-03-05 Thread Laszlo Ersek
On 03/05/20 20:09, Yuri Benditovich wrote: > This is the latest release > https://www.spice-space.org/download/windows/qxl-wddm-dod/qxl-wddm-dod-0.19/ "spice-qxl-wddm-dod-0.19-8.1-compatible.zip" solved the issue in my Windows 8.1 and Windows Server 2012 R2 guests.

Re: [PATCH] vfio: avoid SET_ACTION_TRIGGER ioctls

2020-03-05 Thread Alex Williamson
On Fri, 28 Feb 2020 13:08:00 +0100 Roman Kapl wrote: > For MSI-X interrupts, remember what the last used eventfd was (KVM > bypass vs QEMU) and only call vfio_set_irq_signaling if it has changed. > > This not only helps with performance, but it seems that interrupts can > be lost during

[Bug 1743191] Re: Interacting with NetBSD serial console boot blocks no longer works

2020-03-05 Thread Ottavio Caruso
Reverting to Seabios 1.10 (version rel-1.10.3.0-gb76661dd) fixes this problem. Steps: $ cd && mkdir seabios-test && cd seabios-test $ git clone -b 1.10-stable https://github.com/coreboot/seabios.git $ cd seabios $ make $ qemu-system-x86_64 \ -drive

Re: [PATCH v1 1/1] target/riscv: Correctly implement TSR trap

2020-03-05 Thread Palmer Dabbelt
On Thu, 20 Feb 2020 10:41:35 PST (-0800), alistai...@gmail.com wrote: On Mon, Jan 20, 2020 at 9:43 PM Alistair Francis wrote: As reported in: https://bugs.launchpad.net/qemu/+bug/1851939 we weren't correctly handling illegal instructions based on the value of MSTATUS_TSR and the current

Re: [PATCH v2 0/2] Add support for 2nd generation AMD EPYC processors

2020-03-05 Thread Eduardo Habkost
On Thu, Nov 07, 2019 at 06:00:51PM +, Moger, Babu wrote: > The following series adds the support for 2nd generation AMD EPYC Processors > on qemu guests. The model display name for 2nd generation will be EPYC-Rome. > > Also fixes few missed cpu feature bits in 1st generation EPYC models. > >

Re: [PATCH 3/3] virtio-net: implement RX RSS processing

2020-03-05 Thread Yuri Benditovich
On Thu, Mar 5, 2020 at 10:02 PM Michael S. Tsirkin wrote: > On Thu, Mar 05, 2020 at 09:54:31PM +0200, Yuri Benditovich wrote: > > On Thu, Mar 5, 2020 at 3:20 PM Michael S. Tsirkin > wrote: > > > > > > On Wed, Feb 26, 2020 at 07:48:09PM +0200, Yuri Benditovich wrote: > > > > If VIRTIO_NET_F_RSS

[PATCH] linux-user: mremap fails with EFAULT if address range overlaps with stack guard

2020-03-05 Thread Tobias Koch
If the address range starting at old_address overlaps with the stack guard it is invalid and mremap must fail with EFAULT. The musl c library relies on this behavior to detect the stack size, which it does by doing consecutive mremaps until it hits the stack guard. Without this patch, software

Re: [PULL v2 00/10] Merge TPM 2020/03/04

2020-03-05 Thread Peter Maydell
On Thu, 5 Mar 2020 at 19:38, Stefan Berger wrote: > > This series of patches adds support for TPM on ARM. > This PR is based on v5 of Eric's series. > > Regards, > Stefan > > The following changes since commit af4378c39e54705d9b585089de80aae9526ac7e7: > > Merge remote-tracking branch

Re: [PATCH v5 1/3] linux-user: Protect more syscalls

2020-03-05 Thread Laurent Vivier
Le 05/03/2020 à 20:48, Alistair Francis a écrit : > New y2038 safe 32-bit architectures (like RISC-V) don't support old > syscalls with a 32-bit time_t. The kernel defines new *_time64 versions > of these syscalls. Add some more #ifdefs to syscall.c in linux-user to > allow us to compile without

Re: [PATCH] audio: Add sndio backend

2020-03-05 Thread Eric Blake
On 3/4/20 8:50 AM, Brad Smith wrote: Add a sndio backend. sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). The C code is from Alexandre Ratchov and the rest of the bits are from me. Signed-off-by:

[PATCH v2] linux-user: do prlimit selectively

2020-03-05 Thread Tobias Koch
Analogous to what commit 5dfa88f7 did for setrlimit, this commit selectively ignores limits for memory-related resources in prlimit64 calls. This is to prevent too restrictive limits from causing QEMU itself to malfunction. Signed-off-by: Tobias Koch --- linux-user/syscall.c | 5 - 1 file

Re: [PATCH v5 3/3] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

2020-03-05 Thread Laurent Vivier
Le 05/03/2020 à 20:49, Alistair Francis a écrit : > Signed-off-by: Alistair Francis > --- > linux-user/riscv/syscall32_nr.h | 295 +++ > linux-user/riscv/syscall64_nr.h | 301 > linux-user/riscv/syscall_nr.h | 294

Re: [PATCH v5 2/3] linux-user/syscall: Add support for clock_gettime64/clock_settime64

2020-03-05 Thread Laurent Vivier
Le 05/03/2020 à 20:48, Alistair Francis a écrit : > Add support for the clock_gettime64/clock_settime64 syscalls. > > If your host is 64-bit or is 32-bit with the *_time64 syscall then the > timespec will correctly be a 64-bit time_t. Otherwise the host will > return a 32-bit time_t which will be

Re: [PATCH] hw/arm/cubieboard: make sure SOC object isn't leaked

2020-03-05 Thread Niek Linnenbank
Hi Igor, On Tue, Mar 3, 2020 at 10:13 AM Igor Mammedov wrote: > SOC object returned by object_new() is leaked in current code. > Set SOC parent explicitly to board and then unref to SOC object > to make sure that refererence returned by object_new() is taken > care of. > > The SOC object will

Re: [PATCH] RISC-V: Add a missing "," in riscv_excp_names

2020-03-05 Thread Palmer Dabbelt
On Thu, 05 Mar 2020 09:20:31 PST (-0800), phi...@redhat.com wrote: Cc'ing qemu-trivial@ in case there is a pending PR in progress, it might get merged quicker. On Thu, Mar 5, 2020 at 6:19 PM Philippe Mathieu-Daudé wrote: On 3/5/20 5:48 PM, Palmer Dabbelt wrote: > THis would almost certainly

[PULL] RISC-V: Add a missing "," in riscv_excp_names

2020-03-05 Thread Palmer Dabbelt
This would almost certainly cause the exception names to be reported incorrectly. Coverity found the issue (CID 1420223). As per Peter's suggestion, I've also added a comma at the end of the list to avoid the issue reappearing in the future. Fixes: ab67a1d07a ("target/riscv: Add support for the

[PULL] A single RISC-V fixup

2020-03-05 Thread Palmer Dabbelt
merged tag 'pull-target-arm-20200305' Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200305' into staging (2020-03-05 16:47:37 +) are available in the Git repository at: g...@github.com:palmer-dabbelt/qemu.git tags/riscv-for-master-5.0-sf4 for you to fetch

Re: [PATCH 3/3] virtio-net: implement RX RSS processing

2020-03-05 Thread Michael S. Tsirkin
On Thu, Mar 05, 2020 at 09:54:31PM +0200, Yuri Benditovich wrote: > On Thu, Mar 5, 2020 at 3:20 PM Michael S. Tsirkin wrote: > > > > On Wed, Feb 26, 2020 at 07:48:09PM +0200, Yuri Benditovich wrote: > > > If VIRTIO_NET_F_RSS negotiated and RSS is enabled, process > > > incoming packets, calculate

[PATCH v5 1/3] linux-user: Protect more syscalls

2020-03-05 Thread Alistair Francis
New y2038 safe 32-bit architectures (like RISC-V) don't support old syscalls with a 32-bit time_t. The kernel defines new *_time64 versions of these syscalls. Add some more #ifdefs to syscall.c in linux-user to allow us to compile without these old syscalls. Signed-off-by: Alistair Francis ---

[PATCH v5 2/3] linux-user/syscall: Add support for clock_gettime64/clock_settime64

2020-03-05 Thread Alistair Francis
Add support for the clock_gettime64/clock_settime64 syscalls. If your host is 64-bit or is 32-bit with the *_time64 syscall then the timespec will correctly be a 64-bit time_t. Otherwise the host will return a 32-bit time_t which will be rounded to 64-bits. This will be incorrect after y2038.

[PATCH v5 3/3] linux-user/riscv: Update the syscall_nr's to the 5.5 kernel

2020-03-05 Thread Alistair Francis
Signed-off-by: Alistair Francis --- linux-user/riscv/syscall32_nr.h | 295 +++ linux-user/riscv/syscall64_nr.h | 301 linux-user/riscv/syscall_nr.h | 294 +-- 3 files changed, 598 insertions(+), 292

[PATCH v5 0/3] linux-user: generate syscall_nr.sh for RISC-V

2020-03-05 Thread Alistair Francis
This series updates the RISC-V syscall_nr.sh based on the 5.5 kernel. There are two parts to this. One is just adding the new syscalls, the other part is updating the RV32 syscalls to match the fact that RV32 is a 64-bit time_t architectures (y2038) safe. We need to make some changes to

Re: [PATCH 3/3] virtio-net: implement RX RSS processing

2020-03-05 Thread Yuri Benditovich
On Thu, Mar 5, 2020 at 3:20 PM Michael S. Tsirkin wrote: > > On Wed, Feb 26, 2020 at 07:48:09PM +0200, Yuri Benditovich wrote: > > If VIRTIO_NET_F_RSS negotiated and RSS is enabled, process > > incoming packets, calculate packet's hash and place the > > packet into respective RX virtqueue. > > >

Re: [PATCH] hw/arm/stm32f405: Add preliminary RCC emulation support

2020-03-05 Thread Alistair Francis
On Thu, Mar 5, 2020 at 11:30 AM Peter Maydell wrote: > > On Thu, 5 Mar 2020 at 19:24, Alistair Francis wrote: > > > > On Sat, Feb 29, 2020 at 6:12 AM Stephanos Ioannidis > > wrote: > > > > +typedef union { > > > +struct { > > > +uint32_t hsion : 1; > > > +uint32_t hsirdy :

Re: [PATCH] hw/arm/stm32f405: Add preliminary RCC emulation support

2020-03-05 Thread Alistair Francis
= heOn Sat, Feb 29, 2020 at 6:12 AM Stephanos Ioannidis wrote: > > The RCC (reset and clock control) is a hardware peripheral reset and > clock configuration controller available on the STM32F4xx series > devices. > > This commit adds preliminary support for the RCC peripheral emulation, > in

[PULL v2 03/10] tpm: Separate tpm_tis common functions from isa code

2020-03-05 Thread Stefan Berger
From: Eric Auger Move the device agnostic code into tpm_tis_common.c and put the ISA device specific code into tpm_tis_isa.c Signed-off-by: Eric Auger Reviewed-by: Stefan Berger Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Message-id: 20200305165149.618-4-eric.au...@redhat.com

[PULL v2 05/10] tpm: Add the SysBus TPM TIS device

2020-03-05 Thread Stefan Berger
From: Eric Auger Introduce the tpm-tis-device which is a sysbus device and is bound to be used on ARM. Signed-off-by: Eric Auger Reviewed-by: Stefan Berger Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Message-id: 20200305165149.618-6-eric.au...@redhat.com Signed-off-by: Stefan Berger

[PULL v2 09/10] test: tpm-tis: Get prepared to share tests between ISA and sysbus devices

2020-03-05 Thread Stefan Berger
From: Eric Auger ISA and sysbus TPM-TIS devices will share their tests. Only the main() will change (instantiation option is different). Also the base address of the TPM-TIS device is going to be different. on x86 it is located at 0xFED4 while on ARM it can be located at any location,

Re: [kvm-unit-tests PATCH v3 09/14] arm/arm64: ITS: Device and collection Initialization

2020-03-05 Thread Auger Eric
Hi Zenghui, On 2/7/20 6:41 AM, Zenghui Yu wrote: > Hi Eric, > > On 2020/1/28 18:34, Eric Auger wrote: >> Introduce an helper functions to register >> - a new device, characterized by its device id and the >>    max number of event IDs that dimension its ITT (Interrupt >>    Translation Table). 

[PULL v2 10/10] test: tpm-tis: Add Sysbus TPM-TIS device test

2020-03-05 Thread Stefan Berger
From: Eric Auger The tests themselves are the same as the ISA device ones. Only the main() changes as the "tpm-tis-device" device gets instantiated. Also the base address of the device is not 0xFED4 anymore but matches the base address of the ARM virt platform bus. Signed-off-by: Eric Auger

Re: [kvm-unit-tests PATCH v3 06/14] arm/arm64: gicv3: Set the LPI config and pending tables

2020-03-05 Thread Auger Eric
Hi Zenghui, On 2/7/20 3:12 AM, Zenghui Yu wrote: > Hi Eric, > > On 2020/1/28 18:34, Eric Auger wrote: >> Allocate the LPI configuration and per re-distributor pending table. >> Set redistributor's PROPBASER and PENDBASER. The LPIs are enabled >> by default in the config table. >> >> Also

[PULL v2 08/10] test: tpm: pass optional machine options to swtpm test functions

2020-03-05 Thread Stefan Berger
From: Eric Auger We plan to use swtpm test functions on ARM for testing the sysbus TPM-TIS device. However on ARM there is no default machine type. So we need to explictly pass some machine options on startup. Let's allow this by adding a new parameter to both swtpm test functions and update all

[PULL v2 02/10] tpm: Use TPMState as a common struct

2020-03-05 Thread Stefan Berger
From: Eric Auger As we plan to introduce a SysBus TPM TIS device, let's make the TPMState a common struct usable by both the ISADevice and the SysBusDevice. TPMStateISA embeds the struct and inherits from the ISADevice. The prototype of functions bound to be used by both the ISA and SysBus

[PULL v2 07/10] docs/specs/tpm: Document TPM_TIS sysbus device for ARM

2020-03-05 Thread Stefan Berger
From: Eric Auger Update the documentation with recent changes related to the sysbus TPM_TIS device addition and add the command line to be used with arm VIRT. Signed-off-by: Eric Auger Reviewed-by: Stefan Berger Message-id: 20200305165149.618-8-eric.au...@redhat.com Signed-off-by: Stefan

[PULL v2 04/10] tpm: Separate TPM_TIS and TPM_TIS_ISA configs

2020-03-05 Thread Stefan Berger
From: Eric Auger Let's separate the compilation of tpm_tis_common.c from the compilation of tpm_tis_isa.c The common part will be also compiled along with the tpm_tis_sysbus device. Signed-off-by: Eric Auger Reviewed-by: Philippe Mathieu-Daudé Tested-by: Ard Biesheuvel Acked-by: Ard

[PULL v2 06/10] hw/arm/virt: vTPM support

2020-03-05 Thread Stefan Berger
From: Eric Auger Let the TPM TIS SYSBUS device be dynamically instantiable in ARM virt. A device tree node is dynamically created (TPM via MMIO). The TPM Physical Presence interface (PPI) is not supported. To run with the swtmp TPM emulator, the qemu command line must be augmented with:

[PULL v2 01/10] tpm: rename TPM_TIS into TPM_TIS_ISA

2020-03-05 Thread Stefan Berger
From: Eric Auger As we plan to introduce a sysbus TPM_TIS, let's rename TPM_TIS into TPM_TIS_ISA. Signed-off-by: Eric Auger Reviewed-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Message-id:

[PULL v2 00/10] Merge TPM 2020/03/04

2020-03-05 Thread Stefan Berger
This series of patches adds support for TPM on ARM. This PR is based on v5 of Eric's series. Regards, Stefan The following changes since commit af4378c39e54705d9b585089de80aae9526ac7e7: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-03-05' into staging (2020-03-05

Re: [PATCH] hw/arm/stm32f405: Add preliminary RCC emulation support

2020-03-05 Thread Peter Maydell
On Thu, 5 Mar 2020 at 19:24, Alistair Francis wrote: > > On Sat, Feb 29, 2020 at 6:12 AM Stephanos Ioannidis wrote: > > +typedef union { > > +struct { > > +uint32_t hsion : 1; > > +uint32_t hsirdy : 1; > > +uint32_t reserved0 : 1; > > +uint32_t hsitrim : 5; >

Re: Fwd: [RFC PATCH v2] target/ppc: Enable hardfloat for PPC

2020-03-05 Thread Richard Henderson
On 3/4/20 10:43 AM, G 3 wrote: > I am all intrigued by these vector instructions. Apple was really big on using > them back in the day so programs like Quicktime and iTunes definitely use > them. > I'm not sure if the PowerPC's altivec vector instructions map to host vector > instructions

  1   2   3   4   5   >