Re: [PATCH v2 0/2] net: tap: check file descriptor can be used

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 04:57:35PM +0200, Laurent Vivier wrote: > v2: Add patch from Daniel to check the fd can be used > > I have updated Daniel's patch not to check for EINVAL on TUNGETIFF > as I think we can avoid this special case because TUNGETIFF > is available since kernel

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-30 Thread Peter Xu
On Tue, Jun 30, 2020 at 05:23:31PM +0800, Jason Wang wrote: > > > Ok, we had a dedicated mr for interrupt: > > > > > > memory_region_add_subregion_overlap(MEMORY_REGION(_dev_as->iommu), > > > VTD_INTERRUPT_ADDR_FIRST, > > > _dev_as->iommu_ir, 1); > > > > > > So it should be fine. I guess the

[PATCH 1/2] target/mips: Remove identical if/else branches

2020-06-30 Thread Aleksandar Markovic
Remove the segment: if (other_tc == other->current_tc) { tccause = other->CP0_Cause; } else { tccause = other->CP0_Cause; } Original contributor can't remember what was his intention. Signed-off-by: Aleksandar Markovic --- target/mips/cp0_helper.c | 9

[PATCH 0/2] target mips: Misc fixes and improvements

2020-06-30 Thread Aleksandar Markovic
A collection of pendind fixes and improvements. Aleksandar Markovic (2): target/mips: Remove identical if/else branches MAINTAINERS: Adjust MIPS maintainership MAINTAINERS | 10 +- target/mips/cp0_helper.c | 9 + 2 files changed, 6 insertions(+), 13

Re: [PATCH 2/2] target/riscv: Do amo*.w insns operate with 32 bits

2020-06-30 Thread LIU Zhiwei
On 2020/6/30 23:00, Richard Henderson wrote: On 6/29/20 6:07 AM, LIU Zhiwei wrote: +static bool +gen_amo_w(DisasContext *ctx, arg_atomic *a, + void(*func)(TCGv, TCGv, TCGv, TCGArg, MemOp), + MemOp mop, bool sign) { TCGv src1 = tcg_temp_new(); TCGv src2 =

Re: [PATCH] KVM: x86: believe what KVM says about WAITPKG

2020-06-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200630151150.536580-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] KVM: x86: believe what KVM says about WAITPKG Type: series Message-id:

[PATCH v3 1/9] hw/pci-host: add pci-intack write method

2020-06-30 Thread P J P
From: Prasad J Pandit Add pci-intack mmio write method to avoid NULL pointer dereference issue. Reported-by: Lei Sun Reviewed-by: Li Qiang Signed-off-by: Prasad J Pandit --- hw/pci-host/prep.c | 8 1 file changed, 8 insertions(+) Update v3: Add Reviewed-by: ... ->

hw/arm/aspeed: Why aspeed_machine_init uses empty SD cards?

2020-06-30 Thread Philippe Mathieu-Daudé
Hi Cédric, Eddie, I'm trying to understand commits 2bea128c3d0 and a29e3e12707, the Aspeed machines always add SD cards on the SD bus, even if there are no block drive to attach to. Is that what you want? Expected behavior from the board is to create the SoC, the SoC creates the SDHCI which

Re: [PATCH] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Laurent Vivier
On 30/06/2020 14:35, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 02:00:06PM +0200, Laurent Vivier wrote: >> On 30/06/2020 13:03, Daniel P. Berrangé wrote: >>> On Tue, Jun 30, 2020 at 12:35:46PM +0200, Laurent Vivier wrote: On 30/06/2020 12:03, Jason Wang wrote: > > On

Re: [PATCH] linux-user/elfload: use MAP_FIXED in pgb_reserved_va

2020-06-30 Thread Peter Maydell
On Tue, 30 Jun 2020 at 11:36, Alex Bennée wrote: > > Given we assert the requested address matches what we asked we should > also make that clear in the mmap flags. Otherwise we see failures in > the GitLab environment for some currently unknown but allowable > reason. Adding MAP_FIXED will mean

Re: [PATCH 5/5] hw/i2c: Document the I2C qdev helpers

2020-06-30 Thread Peter Maydell
On Tue, 30 Jun 2020 at 11:15, Markus Armbruster wrote: > > Philippe Mathieu-Daudé writes: > > > In commit d88c42ff2c we added new prototype but neglected to > > add their documentation. Fix that. > > > > Reported-by: Peter Maydell > > Signed-off-by: Philippe Mathieu-Daudé > > + * This

[PATCH v7 02/17] hw/sd/sdcard: Update coding style to make checkpatch.pl happy

2020-06-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé To make the next commit easier to review, clean this code first. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c

[PATCH v7 00/17] hw/sd/sdcard: Fix CVE-2020-13253 & cleanups

2020-06-30 Thread Philippe Mathieu-Daudé
Patches 5 & 6 fix CVE-2020-13253. The rest are (accumulated) cleanups. Since v6: Handle -ENOMEDIUM error Since v5: Fix incorrect use of sd_addr_to_wpnum() in sd_reset() Missing review: [PATCH 01/15] MAINTAINERS: Cc qemu-block mailing list [PATCH 03/15] hw/sd/sdcard: Move some definitions to use

[PATCH v7 01/17] MAINTAINERS: Cc qemu-block mailing list

2020-06-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We forgot to include the qemu-block mailing list while adding this section in commit 076a0fc32a7. Fix this. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS

[PATCH v7 17/17] hw/sd/sdcard: Simplify realize() a bit

2020-06-30 Thread Philippe Mathieu-Daudé
We don't need to check if sd->blk is set twice. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 304fa4143a..8ef6715665 100644 --- a/hw/sd/sd.c +++

[PATCH v7 08/17] hw/sd/sdcard: Call sd_addr_to_wpnum where it is used, consider zero size

2020-06-30 Thread Philippe Mathieu-Daudé
Avoid setting 'sect' variable just once (its name is confuse anyway). Directly set 'sd->wpgrps_size'. Special case when size is zero. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index

Re: [PATCH 0/7] hw/mips/malta: Rework to allow more than 2GB of RAM on 64-bit

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 3:36 PM, Thomas Huth wrote: > On 30/06/2020 13.17, Aleksandar Markovic wrote: >> >> >> уторак, 30. јун 2020., Philippe Mathieu-Daudé > > је написао/ла: >> >>     On 6/30/20 1:01 PM, Aleksandar Markovic wrote: >> > >> > >> > уторак, 30. јун 2020.,

Re: [PATCH 01/10] modules: Provide macros making it easier to identify module exports

2020-06-30 Thread Christophe de Dinechin
On 2020-06-30 at 11:38 CEST, Michael S. Tsirkin wrote... > On Fri, Jun 26, 2020 at 06:42:58PM +0200, Christophe de Dinechin wrote: >> In order to facilitate the move of large chunks of functionality to >> load modules, it is simpler to create a wrapper with the same name >> that simply relays

Re: [PATCH 00/10] hw/block/nvme: namespace types and zoned namespaces

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 2:59 PM, Niklas Cassel wrote: > On Tue, Jun 30, 2020 at 12:01:29PM +0200, Klaus Jensen wrote: >> From: Klaus Jensen >> >> Hi all, > > Hello Klaus, > >> >> This series adds support for TP 4056 ("Namespace Types") and TP 4053 >> ("Zoned Namespaces") and is an alternative implementation

Re: [PATCH 2/2] target/riscv: Do amo*.w insns operate with 32 bits

2020-06-30 Thread Richard Henderson
On 6/29/20 6:07 AM, LIU Zhiwei wrote: > +static bool > +gen_amo_w(DisasContext *ctx, arg_atomic *a, > + void(*func)(TCGv, TCGv, TCGv, TCGArg, MemOp), > + MemOp mop, bool sign) > { > TCGv src1 = tcg_temp_new(); > TCGv src2 = tcg_temp_new(); > > gen_get_gpr(src1,

Re: [PATCH 2/2] xen: cleanup unrealized flash devices

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/24/20 2:18 PM, Paul Durrant wrote: > From: Paul Durrant > > The generic pc_machine_initfn() calls pc_system_flash_create() which creates > 'system.flash0' and 'system.flash1' devices. These devices are then realized > by pc_system_flash_map() which is called from pc_system_firmware_init()

[PATCH 2/2] MAINTAINERS: Adjust MIPS maintainership

2020-06-30 Thread Aleksandar Markovic
Paul Burton and Aurelien Jarno removed for not being present. Huacai Chen and Jiaxun Yang step in as reinforcement. CC: Paul Burton CC: Aurelien Jarno Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-06-30 Thread Auger Eric
Hi Peter, On 6/26/20 3:53 PM, Auger Eric wrote: > Hi Peter, > > On 6/25/20 5:30 PM, Peter Maydell wrote: >> On Thu, 11 Jun 2020 at 17:16, Eric Auger wrote: >>> >>> At the moment each entry in the IOTLB corresponds to a page sized >>> mapping (4K, 16K or 64K), even if the page belongs to a

[PATCH 1/2] target-i386: sev: provide proper error reporting for query-sev-capabilities

2020-06-30 Thread Paolo Bonzini
The query-sev-capabilities was reporting errors through error_report; change it to use Error** so that the cause of the failure is clearer. Signed-off-by: Paolo Bonzini --- target/i386/monitor.c | 10 +- target/i386/sev-stub.c | 3 ++- target/i386/sev.c | 18 +-

Re: [PATCH v2 4/9] i386: hvf: Implement CPU kick

2020-06-30 Thread Paolo Bonzini
On 30/06/20 17:50, Roman Bolshakov wrote: > On Tue, Jun 30, 2020 at 02:33:42PM +0200, Paolo Bonzini wrote: >> On 30/06/20 12:28, Roman Bolshakov wrote: >>> @@ -966,6 +964,20 @@ int hvf_vcpu_exec(CPUState *cpu) >>> return ret; >>> } >>> >>> +void hvf_vcpu_kick(CPUState *cpu) >>> +{ >>> +

Re: [PATCH v4 3/7] ccid: build smartcard as module

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 06:07:51PM +0200, Gerd Hoffmann wrote: > > >> static const TypeInfo qcrypto_tls_creds_x509_info = { > > >> .parent = TYPE_QCRYPTO_TLS_CREDS, > > >> .name = TYPE_QCRYPTO_TLS_CREDS_X509, > > >> .module_name = "gnu-tls", > > >> ... > > >> } > > > >

Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 5:38 PM, Aleksandar Markovic wrote: > уто, 30. јун 2020. у 16:52 Philippe Mathieu-Daudé је > написао/ла: >> >> Hi, >> >> This series add a new 'malta-strict' machine, that aims to properly >> model the real hardware (which is not what the current 'malta' >> machine models). >> >> As a

Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Laurent Vivier
On 30/06/2020 18:06, Greg Kurz wrote: > On Tue, 30 Jun 2020 16:57:36 +0200 > Laurent Vivier wrote: > >> qemu_set_nonblock() checks that the file descriptor can be used and, if >> not, crashes QEMU. An assert() is used for that. The use of assert() is >> used to detect programming error and the

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-06-30 Thread Dr. David Alan Gilbert
* Christophe de Dinechin (dinec...@redhat.com) wrote: > > On 2020-06-30 at 11:05 CEST, Dr. David Alan Gilbert wrote... > > * Christophe de Dinechin (dinec...@redhat.com) wrote: > >> The recorder library provides support for low-cost continuous > >> recording of events, which can then be replayed.

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-06-30 Thread Ahmed Karaman
On Tue, Jun 30, 2020 at 11:52 AM Aleksandar Markovic wrote: > > > As far as I know, this is how Ahmed test bed is setup: > > > > 1) Fresh installation on Ubuntu 18.04 on an Inter 64-bit host. > > 2) Install QEMU build prerequisite packages. > > 3) Install perf (this step is not necessary for

[PATCH v2 12/12] block/nvme: Use per-queue AIO context

2020-06-30 Thread Philippe Mathieu-Daudé
To be able to use multiple queues on the same hardware, we need to have each queue able to receive IRQ notifications in the correct AIO context. The AIO context and the notification handler have to be proper to each queue, not to the block driver. Move aio_context and irq_notifier from

[PATCH v2 08/12] block/nvme: Replace qemu_try_blockalign(bs) by qemu_try_memalign(pg_sz)

2020-06-30 Thread Philippe Mathieu-Daudé
qemu_try_blockalign() is a generic API that call back to the block driver to return its page alignment. As we call from within the very same driver, we already know to page alignment stored in our state. Remove indirections and use the value from BDRVNVMeState. This change is required to later

[PATCH v2 05/12] block/nvme: Rename local variable

2020-06-30 Thread Philippe Mathieu-Daudé
We are going to modify the code in the next commit. Renaming the 'resp' variable to 'id' first makes the next commit easier to review. No logical changes. Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff

[PATCH 0/2] error-reporting for query-sev-capabilities

2020-06-30 Thread Paolo Bonzini
In some cases, such as if the kvm-amd "sev" module parameter is set to 0, SEV will be unavailable but query-sev-capabilities will still return all the information. This tricks libvirt into erroneously reporting that SEV is available. This series checks for the actual usability of the feature and

Re: [PATCH 0/2] error-reporting for query-sev-capabilities

2020-06-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200630154521.552874-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 0/2] error-reporting for query-sev-capabilities Type: series Message-id:

Re: [PATCH v3 3/4] hw/block/nvme: Fix pmrmsc register size

2020-06-30 Thread Klaus Jensen
On Jun 30 17:16, Philippe Mathieu-Daudé wrote: > On 6/30/20 5:10 PM, Andrzej Jakowski wrote: > > On 6/30/20 4:04 AM, Philippe Mathieu-Daudé wrote: > >> The Persistent Memory Region Controller Memory Space Control > >> register is 64-bit wide. See 'Figure 68: Register Definition' > >> of the 'NVM

Re: [PATCH v2 3/6] hw/mips/malta: Introduce MaltaMachineClass::max_ramsize

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 4:52 PM, Philippe Mathieu-Daudé wrote: > The maximum RAM size is tied to the machine. First add the > MaltaMachineClass, and add 'max_ramsize' to it. Set it to > the current value of 2 GB, and adapt the code checking for > the requested RAM is usable by the machine. > > Signed-off-by:

Re: [PATCH v2 2/2] MAINTAINERS: Adjust MIPS maintainership

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 6:46 PM, Aleksandar Markovic wrote: > Paul Burton and Aurelien Jarno removed for not being present. > > Huacai Chen and Jiaxun Yang step in as new energy. > > CC: Paul Burton > CC: Aurelien Jarno > Signed-off-by: Aleksandar Markovic > --- > MAINTAINERS | 15 ++- > 1

Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware

2020-06-30 Thread Aleksandar Markovic
уто, 30. јун 2020. у 19:16 Philippe Mathieu-Daudé је написао/ла: > > On 6/30/20 6:55 PM, Aleksandar Markovic wrote: > > уто, 30. јун 2020. у 18:46 Philippe Mathieu-Daudé је > > написао/ла: > >> > >> On 6/30/20 5:38 PM, Aleksandar Markovic wrote: > >>> уто, 30. јун 2020. у 16:52 Philippe

[Bug 1885350] Re: RISCV dynamic rounding mode is not behaving correctly

2020-06-30 Thread Alistair Francis
** Changed in: qemu Assignee: (unassigned) => Alistair Francis (alistair2323) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1885350 Title: RISCV dynamic rounding mode is not behaving

[PATCH v2 05/12] vhost: check the existence of vhost_set_iotlb_callback

2020-06-30 Thread Cindy Lu
From: Jason Wang Add the check of vhost_set_iotlb_callback before calling Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 5fd25fe520..10304b583e

[PATCH v2 08/12] vhost: introduce new VhostOps vhost_vq_get_addr

2020-06-30 Thread Cindy Lu
This patch introduces new VhostOps vhost_vq_get_addr_op callback to get the vring addr from the backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h

[PATCH v2 07/12] vhost: implement vhost_dev_start method

2020-06-30 Thread Cindy Lu
use the vhost_dev_start callback to send the status to backend Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 10304b583e..32809e54b5 100644 --- a/hw/virtio/vhost.c +++

[PATCH v2 06/12] vhost: introduce new VhostOps vhost_dev_start

2020-06-30 Thread Cindy Lu
This patch introduces new VhostOps vhost_dev_start callback which allows the vhost_net set the start/stop status to backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h

[PATCH v2 11/12] block/nvme: Simplify nvme_create_queue_pair() arguments

2020-06-30 Thread Philippe Mathieu-Daudé
nvme_create_queue_pair() doesn't require BlockDriverState anymore. Replace it by BDRVNVMeState and AioContext to simplify. Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[PATCH v2 07/12] block/nvme: Replace qemu_try_blockalign0 by qemu_try_blockalign/memset

2020-06-30 Thread Philippe Mathieu-Daudé
In the next commit we'll get rid of qemu_try_blockalign(). To ease review, first replace qemu_try_blockalign0() by explicit calls to qemu_try_blockalign() and memset(). Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 16 +--- 1 file changed, 9

Re: [PATCH 00/10] hw/block/nvme: namespace types and zoned namespaces

2020-06-30 Thread Keith Busch
On Tue, Jun 30, 2020 at 04:09:46PM +0200, Philippe Mathieu-Daudé wrote: > What I see doable for the following days is: > - hw/block/nvme: Fix I/O BAR structure [3] > - hw/block/nvme: handle transient dma errors > - hw/block/nvme: bump to v1.3 These look like sensible patches to rebase future

Re: [PATCH v2 3/3] scsi-disk: Add support for the GET LBA STATUS 16 command

2020-06-30 Thread Paolo Bonzini
On 29/06/20 18:02, Eric Blake wrote: > - allocation implies that data comes from this layer of a backing chain, > rather than deferring to a backing image > > - allocation implies that storage is reserved (that is, not sparse) > > It sounds like we are trying to represent the second question

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread David CARLIER
1/ It does not compile on Haiku has dirent does not contain d_type field (among other things). 2/ does not support drm anyway. 3/ Haiku is less portable than a illumos or NetBSD system, even with the BSD compatibility layer. On Tue, 30 Jun 2020 at 16:48, Gerd Hoffmann wrote: > > On Tue, Jun 30,

Re: [PATCH v2 05/18] hw/block/nvme: Introduce the Namespace Types definitions

2020-06-30 Thread Niklas Cassel
On Tue, Jun 30, 2020 at 06:57:16AM +0200, Klaus Jensen wrote: > On Jun 18 06:34, Dmitry Fomichev wrote: > > From: Niklas Cassel > > > > Define the structures and constants required to implement > > Namespace Types support. > > > > Signed-off-by: Niklas Cassel > > Signed-off-by: Dmitry Fomichev

Re: [PATCH] KVM: x86: believe what KVM says about WAITPKG

2020-06-30 Thread Maxim Levitsky
On Tue, 2020-06-30 at 11:11 -0400, Paolo Bonzini wrote: > Currently, QEMU is overriding KVM_GET_SUPPORTED_CPUID's answer for > the WAITPKG bit depending on the "-overcommit cpu-pm" setting. This is a > bad idea because it does not even check if the host supports it, but it > can be done in

Re: [PATCH v4 3/7] ccid: build smartcard as module

2020-06-30 Thread Gerd Hoffmann
> >> static const TypeInfo qcrypto_tls_creds_x509_info = { > >> .parent = TYPE_QCRYPTO_TLS_CREDS, > >> .name = TYPE_QCRYPTO_TLS_CREDS_X509, > >> .module_name = "gnu-tls", > >> ... > >> } > > > > Not as-is. You'll need module load hooks in more places then and some > >

[PATCH v2 1/2] target/mips: Remove identical if/else branches

2020-06-30 Thread Aleksandar Markovic
Remove the segment: if (other_tc == other->current_tc) { tccause = other->CP0_Cause; } else { tccause = other->CP0_Cause; } Original contributor can't remember what was his intention. Bug: 1885718 Signed-off-by: Aleksandar Markovic ---

Re: [PATCH v2 05/18] hw/block/nvme: Introduce the Namespace Types definitions

2020-06-30 Thread Keith Busch
On Tue, Jun 30, 2020 at 10:02:15AM +, Niklas Cassel wrote: > On Mon, Jun 29, 2020 at 07:12:47PM -0700, Alistair Francis wrote: > > On Wed, Jun 17, 2020 at 2:47 PM Dmitry Fomichev > > wrote: > > > +uint16_tctrlid; > > > > Shouldn't this be CNTID? > > From the NVMe spec: >

Re: [PATCH v2 1/2] target/mips: Remove identical if/else branches

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 6:46 PM, Aleksandar Markovic wrote: > Remove the segment: > > if (other_tc == other->current_tc) { > tccause = other->CP0_Cause; > } else { > tccause = other->CP0_Cause; > } > > Original contributor can't remember what was his intention. > > Bug:

Re: [PATCH 2/2] xen: cleanup unrealized flash devices

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 5:44 PM, Paul Durrant wrote: >> -Original Message- >> From: Philippe Mathieu-Daudé >> Sent: 30 June 2020 16:26 >> To: Paul Durrant ; xen-de...@lists.xenproject.org; >> qemu-devel@nongnu.org >> Cc: Eduardo Habkost ; Michael S. Tsirkin >> ; Paul Durrant >> ; Jason Andryuk ;

[PATCH v2 12/12] vhost-vdpa: introduce vhost-vdpa net client

2020-06-30 Thread Cindy Lu
This patch set introduces a new net client type: vhost-vdpa. vhost-vdpa net client will set up a vDPA device which is specified by a "vhostdev" parameter. Signed-off-by: Lingshan Zhu Signed-off-by: Tiwei Bie Signed-off-by: Cindy Lu --- include/net/vhost-vdpa.h | 22 net/Makefile.objs

RE: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model

2020-06-30 Thread Sai Pavan Boddu
Hi Gred, > -Original Message- > From: Gerd Hoffmann > Sent: Tuesday, June 30, 2020 1:09 AM > To: Sai Pavan Boddu > Cc: Markus Armbruster ; Peter Maydell > ; Thomas Huth ; Eduardo > Habkost ; qemu-devel@nongnu.org; Alistair Francis > ; Paolo Bonzini ; Ying > Fang ; 'Marc-André Lureau' >

Re: [PATCH v7 07/21] multi-process: add co-routines to communicate with remote

2020-06-30 Thread Stefan Hajnoczi
On Sat, Jun 27, 2020 at 10:09:29AM -0700, elena.ufimts...@oracle.com wrote: > From: Elena Ufimtseva > > process to avoid blocking the main loop during the message exchanges. > To be used by proxy device. The nested aio_poll() in this patch could be a problem. I've highlighted it here so that

[PATCH v2 02/12] block/nvme: Avoid further processing if trace event not enabled

2020-06-30 Thread Philippe Mathieu-Daudé
Avoid further processing if TRACE_NVME_SUBMIT_COMMAND_RAW is not enabled. This is an untested intend of performance optimization. Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/nvme.c b/block/nvme.c index

[PATCH v2 00/12] block/nvme: Various cleanups required to use multiple queues

2020-06-30 Thread Philippe Mathieu-Daudé
Hi, This series is mostly code rearrangement (cleanups) to be able to split the hardware code from the block driver code, to be able to use multiple queues on the same hardware, or multiple block drivers on the same hardware. Missing review: 1, 2, 5, 6, 8, 12. Since v1: - rebased - use SCALE_MS

[PATCH v2 01/12] block/nvme: Replace magic value by SCALE_MS definition

2020-06-30 Thread Philippe Mathieu-Daudé
Use self-explicit SCALE_MS definition instead of magic value. Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/nvme.c b/block/nvme.c index 374e268915..2f5e3c2adf 100644 --- a/block/nvme.c +++ b/block/nvme.c @@

[PATCH v2 03/12] block/nvme: Let nvme_create_queue_pair() fail gracefully

2020-06-30 Thread Philippe Mathieu-Daudé
As nvme_create_queue_pair() is allowed to fail, replace the alloc() calls by try_alloc() to avoid aborting QEMU. Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/block/nvme.c

RE: [PATCH 2/2] xen: cleanup unrealized flash devices

2020-06-30 Thread Paul Durrant
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: 30 June 2020 16:26 > To: Paul Durrant ; xen-de...@lists.xenproject.org; > qemu-devel@nongnu.org > Cc: Eduardo Habkost ; Michael S. Tsirkin > ; Paul Durrant > ; Jason Andryuk ; Paolo Bonzini > ; > Richard Henderson > Subject:

Re: [PATCH v2 1/2] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Greg Kurz
On Tue, 30 Jun 2020 16:57:36 +0200 Laurent Vivier wrote: > qemu_set_nonblock() checks that the file descriptor can be used and, if > not, crashes QEMU. An assert() is used for that. The use of assert() is > used to detect programming error and the coredump will allow to debug > the problem. > >

[PATCH v2 2/2] MAINTAINERS: Adjust MIPS maintainership

2020-06-30 Thread Aleksandar Markovic
Paul Burton and Aurelien Jarno removed for not being present. Huacai Chen and Jiaxun Yang step in as new energy. CC: Paul Burton CC: Aurelien Jarno Signed-off-by: Aleksandar Markovic --- MAINTAINERS | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git

[PATCH v2 0/2] target mips: Misc fixes and improvements

2020-06-30 Thread Aleksandar Markovic
A collection of pending fixes and improvements. v1->v2: - minor content and commit message changes Aleksandar Markovic (2): target/mips: Remove identical if/else branches MAINTAINERS: Adjust MIPS maintainership MAINTAINERS | 15 ++- target/mips/cp0_helper.c |

Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 6:55 PM, Aleksandar Markovic wrote: > уто, 30. јун 2020. у 18:46 Philippe Mathieu-Daudé је > написао/ла: >> >> On 6/30/20 5:38 PM, Aleksandar Markovic wrote: >>> уто, 30. јун 2020. у 16:52 Philippe Mathieu-Daudé је >>> написао/ла: Hi, This series add a new

[PATCH v2 11/12] vhost-vdpa: introduce vhost-vdpa backend

2020-06-30 Thread Cindy Lu
Currently we have 2 types of vhost backends in QEMU: vhost kernel and vhost-user. The above patch provides a generic device for vDPA purpose, this vDPA device exposes to user space a non-vendor-specific configuration interface for setting up a vhost HW accelerator, this patch set introduces a

[PATCH v2 10/12] vhost: introduce new VhostOps vhost_get_device_id

2020-06-30 Thread Cindy Lu
This patch introduces new VhostOps vhost_get_device_id callback which can get the device id from backend Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h

[PATCH v2 09/12] vhost: implement vhost_vq_get_addr method

2020-06-30 Thread Cindy Lu
use vhost_vq_get_addr callback to get the vq address from backend Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 28 +++- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 32809e54b5..1e083a8976 100644 ---

Re: [PATCH v2 00/12] vDPA support in qemu

2020-06-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200630174937.25560-1-l...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!

[PATCH v2 10/12] block/nvme: Replace BDRV_POLL_WHILE by AIO_WAIT_WHILE

2020-06-30 Thread Philippe Mathieu-Daudé
BDRV_POLL_WHILE() is defined as: #define BDRV_POLL_WHILE(bs, cond) ({ \ BlockDriverState *bs_ = (bs); \ AIO_WAIT_WHILE(bdrv_get_aio_context(bs_), \ cond); }) As we will remove the BlockDriverState use in the next commit, start by using the

Re: [PATCH v7 1/8] mac_oldworld: Allow loading binary ROM image

2020-06-30 Thread Mark Cave-Ayland
On 29/06/2020 19:55, BALATON Zoltan wrote: > The beige G3 Power Macintosh has a 4MB firmware ROM. Fix the size of > the rom region and fall back to loading a binary image with -bios if > loading ELF image failed. This allows testing emulation with a ROM > image from real hardware as well as using

[PATCH v2 04/12] block/nvme: Define QUEUE_INDEX macros to ease code review

2020-06-30 Thread Philippe Mathieu-Daudé
Use definitions instead of '0' or '1' indexes. Also this will be useful when using multi-queues later. Reviewed-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git

Re: [PATCH v7 5/8] mac_oldworld: Change PCI address of macio to match real hardware

2020-06-30 Thread Mark Cave-Ayland
On 29/06/2020 19:55, BALATON Zoltan wrote: > The board firmware expect these to be at fixed addresses and programs > them without probing, this patch puts the macio device at the expected > PCI address. > > Signed-off-by: BALATON Zoltan > --- > hw/ppc/mac_oldworld.c | 2 +- > 1 file changed, 1

Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware

2020-06-30 Thread Aleksandar Markovic
уто, 30. јун 2020. у 16:52 Philippe Mathieu-Daudé је написао/ла: > > Hi, > > This series add a new 'malta-strict' machine, that aims to properly > model the real hardware (which is not what the current 'malta' > machine models). > > As a bonus for Debian builders, a 'malta-unleashed' machine RFC

Re: [PATCH v2] coverity: provide Coverity-friendly MIN_CONST and MAX_CONST

2020-06-30 Thread Paolo Bonzini
On 29/06/20 18:28, Eric Blake wrote: > Coverity has problems seeing through __builtin_choose_expr, which > result in it abandoning analysis of later functions that utilize a > definition that used MIN_CONST or MAX_CONST, such as in qemu-file.c: > > 50DECLARE_BITMAP(may_free, MAX_IOV_SIZE); >

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-30 Thread Peter Xu
On Tue, Jun 30, 2020 at 10:41:10AM +0800, Jason Wang wrote: > > /* According to ATS spec table 2.4: > > * S = 0, bits 15:12 = range size: 4K > > * S = 1, bits 15:12 = xxx0 range size: 8K > > * S = 1, bits 15:12 = xx01 range size: 16K > > * S = 1, bits

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread Peter Maydell
On Tue, 30 Jun 2020 at 09:24, Gerd Hoffmann wrote: > > On Tue, Jun 30, 2020 at 08:44:24AM +0200, Philippe Mathieu-Daudé wrote: > > +Gerd > > > > On 6/29/20 11:48 PM, David CARLIER wrote: > > > From 157a0374093371719de42e99364352d64190f52a Mon Sep 17 00:00:00 2001 > > > From: David Carlier > > >

Re: [PATCH v7 06/21] multi-process: define MPQemuMsg format and transmission functions

2020-06-30 Thread Stefan Hajnoczi
On Sat, Jun 27, 2020 at 10:09:28AM -0700, elena.ufimts...@oracle.com wrote: > +void mpqemu_msg_send(MPQemuMsg *msg, QIOChannel *ioc) > +{ > +Error *local_err = NULL; > +struct iovec send[2]; > +int *fds = NULL; > +size_t nfds = 0; > + > +send[0].iov_base = msg; > +

Re: [PATCH v2 4/9] i386: hvf: Implement CPU kick

2020-06-30 Thread Roman Bolshakov
On Tue, Jun 30, 2020 at 02:33:42PM +0200, Paolo Bonzini wrote: > On 30/06/20 12:28, Roman Bolshakov wrote: > > @@ -966,6 +964,20 @@ int hvf_vcpu_exec(CPUState *cpu) > > return ret; > > } > > > > +void hvf_vcpu_kick(CPUState *cpu) > > +{ > > +X86CPU *x86_cpu = X86_CPU(cpu); > > +

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-06-30 Thread Peter Maydell
On Fri, 26 Jun 2020 at 14:53, Auger Eric wrote: > On 6/25/20 5:30 PM, Peter Maydell wrote: > > Rather than looping around doing multiple hash table lookups like > > this, why not just avoid including the tg and level in the > > key equality test? > > > > If I understand the

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread David CARLIER
Otherwise, if it is ok if not all patches are accepted (like this one) but at least most of them would be nice then Haikuport can decrease needed local patches. Regards. On Tue, 30 Jun 2020 at 16:55, David CARLIER wrote: > > 1/ It does not compile on Haiku has dirent does not contain d_type >

Re: [PATCH] KVM: x86: believe what KVM says about WAITPKG

2020-06-30 Thread Paolo Bonzini
On 30/06/20 18:07, Maxim Levitsky wrote: > I think we need to keep some form of this hack, since the kernel doesn't > report CPUID_7_0_ECX_WAITPKG via > KVM_GET_SUPPORTED_CPUID, so for this to work, we need to fix the kernel to > report it. > But to support older kernels that don't report this

Re: [PATCH v6 4/5] 9pfs: T_readdir latency optimization

2020-06-30 Thread Greg Kurz
On Tue, 30 Jun 2020 17:16:40 +0200 Christian Schoenebeck wrote: > On Montag, 29. Juni 2020 18:39:02 CEST Greg Kurz wrote: > > On Wed, 03 Jun 2020 19:16:08 +0200 > > > > Christian Schoenebeck wrote: > > > On Sonntag, 19. April 2020 17:06:17 CEST Christian Schoenebeck wrote: > > > > Make top

Re: [PATCH v2 0/6] hw/mips/malta: Add the 'malta-strict' machine, matching Malta hardware

2020-06-30 Thread Aleksandar Markovic
уто, 30. јун 2020. у 18:46 Philippe Mathieu-Daudé је написао/ла: > > On 6/30/20 5:38 PM, Aleksandar Markovic wrote: > > уто, 30. јун 2020. у 16:52 Philippe Mathieu-Daudé је > > написао/ла: > >> > >> Hi, > >> > >> This series add a new 'malta-strict' machine, that aims to properly > >> model the

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread Gerd Hoffmann
> > > > -util-obj-$(CONFIG_POSIX) += drm.o > > > > +util-obj-$(CONFIG_LINUX) += drm.o > > > > Can't see anything linux-specific there. Also note that FreeBSD (and > > possibly other *BSDs too) have drm support. So CONFIG_POSIX looks > > correct to me. > > This change was my suggestion; I

[PATCH v2 00/12] vDPA support in qemu

2020-06-30 Thread Cindy Lu
vDPA device is a device that uses a datapath which complies with the virtio specifications with vendor specific control path. vDPA devices can be both physically located on the hardware or emulated by software. This PATCH introduce the vDPA support in qemu TODO 1) vIOMMU support 2) live migration

[PATCH v2 06/12] block/nvme: Use union of NvmeIdCtrl / NvmeIdNs structures

2020-06-30 Thread Philippe Mathieu-Daudé
We allocate an unique chunk of memory then use it for two different structures. By using an union, we make it clear the data is overlapping (and we can remove the casts). Suggested-by: Stefan Hajnoczi Signed-off-by: Philippe Mathieu-Daudé --- block/nvme.c | 31 +++

Re: [PATCH v7 0/8] Mac Old World ROM experiment

2020-06-30 Thread Mark Cave-Ayland
On 29/06/2020 19:55, BALATON Zoltan wrote: > This is now a minimal set of patches needed to make it possible to > experiment with a firmware ROM from real hardware. After finding out > that the board firmware does not probe PCI devices but expects them at > known fixed addresses we only need to

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread Gerd Hoffmann
On Tue, Jun 30, 2020 at 10:46:59AM +0200, Philippe Mathieu-Daudé wrote: > On 6/30/20 10:23 AM, Gerd Hoffmann wrote: > > On Tue, Jun 30, 2020 at 08:44:24AM +0200, Philippe Mathieu-Daudé wrote: > >> +Gerd > >> > >> On 6/29/20 11:48 PM, David CARLIER wrote: > >>> From

[PATCH 2/2] target-i386: sev: fail query-sev-capabilities if QEMU cannot use SEV

2020-06-30 Thread Paolo Bonzini
In some cases, such as if the kvm-amd "sev" module parameter is set to 0, SEV will be unavailable but query-sev-capabilities will still return all the information. This tricks libvirt into erroneously reporting that SEV is available. Check the actual usability of the feature and return the

Re: [PATCH RESEND 6/9] hw/arm/smmu-common: Manage IOTLB block entries

2020-06-30 Thread Auger Eric
Hi Peter, On 6/30/20 5:50 PM, Peter Maydell wrote: > On Fri, 26 Jun 2020 at 14:53, Auger Eric wrote: >> On 6/25/20 5:30 PM, Peter Maydell wrote: >>> Rather than looping around doing multiple hash table lookups like >>> this, why not just avoid including the tg and level in the >>> key equality

Re: hw/misc/aspeed_scu: 5d971f9e breaks Supermicro AST2400

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 5:32 PM, Erik Smit wrote: > Hi Philippe, > > On Tue, 30 Jun 2020 at 17:29, Philippe Mathieu-Daudé wrote: >> >> Hi Erik, >> >> On 6/30/20 5:11 PM, Erik Smit wrote: >>> Hello, >>> >>> 5d971f9e memory: Revert "memory: accept mismatching sizes in >>> memory_region_access_valid" breaks

[PATCH v2 01/12] net: introduce qemu_get_peer

2020-06-30 Thread Cindy Lu
This is a small function that can get the peer from given NetClientState and queue_index Signed-off-by: Cindy Lu --- include/net/net.h | 1 + net/net.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 39085d9444..e7ef42d62b 100644

[PATCH v2 02/12] vhost_net: use the function qemu_get_peer

2020-06-30 Thread Cindy Lu
user the qemu_get_peer to replace the old process Signed-off-by: Cindy Lu Reviewed-by: Laurent Vivier --- hw/net/vhost_net.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 6b82803fa7..4096d64aaf 100644 ---

[PATCH v2 04/12] virtio-pci: implement queue_enabled method

2020-06-30 Thread Cindy Lu
From: Jason Wang With version 1, we can detect whether a queue is enabled via queue_enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[PATCH v2 03/12] virtio-bus: introduce queue_enabled method

2020-06-30 Thread Cindy Lu
From: Jason Wang This patch introduces queue_enabled() method which allows the transport to implement its own way to report whether or not a queue is enabled. Signed-off-by: Jason Wang Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 6 ++ include/hw/virtio/virtio-bus.h | 4

Re: [PATCH v6 4/5] 9pfs: T_readdir latency optimization

2020-06-30 Thread Christian Schoenebeck
On Dienstag, 30. Juni 2020 18:39:57 CEST Greg Kurz wrote: > On Tue, 30 Jun 2020 17:16:40 +0200 > > Christian Schoenebeck wrote: > > On Montag, 29. Juni 2020 18:39:02 CEST Greg Kurz wrote: > > > On Wed, 03 Jun 2020 19:16:08 +0200 > > > > > > Christian Schoenebeck wrote: > > > > On Sonntag, 19.

<    1   2   3   4   5   >