Re: [RFC PATCH v3 05/34] Hexagon (target/hexagon) register names

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > Signed-off-by: Taylor Simpson > --- > target/hexagon/hex_regs.h | 83 > +++ > 1 file changed, 83 insertions(+) > create mode 100644 target/hexagon/hex_regs.h Noting for the record that this apparent out-of-

Issue with submodules on macOS & meson

2020-08-26 Thread Emmanuel Blot
Hi, Using current master 78dca230 w/ Meson/ninja, build fails with capstone dependency. * ../configure --target-list=riscv64-softmmu && ninja fails because capstone is automatically enabled @ configure stage, but capstone is not installed on the host, and the local capstone/ submodule is n

[PATCH] os-posix: Restore firmware location ../share/qemu

2020-08-26 Thread azoff
Prior to commit 6dd2dacedd83d12328afa8559bffb2b9ec5c89ed (v5.0.0), the binary relative path ../share/qemu was searched for firmware, but in that commit, this path got lost. Consider the following use-case: * QEMU is built in a docker image on one system. * QEMU is supposed to be executed on a plet

Re: [PATCH v3 0/8] meson: mingw installation fixes & nsis conversion

2020-08-26 Thread Paolo Bonzini
We should document the difference in the 5.2 changelog then (it's okay to introduce it since the configure option is named differently). Il mer 26 ago 2020, 13:50 Marc-André Lureau ha scritto: > Hi > > On Wed, Aug 26, 2020 at 3:38 PM Paolo Bonzini wrote: > >> Since behavioral changes should be

PTHREAD_MUTEX_ERRORCHECK and fork()

2020-08-26 Thread Christian Schoenebeck
On Freitag, 21. August 2020 15:13:35 CEST Paolo Bonzini wrote: > On 20/08/20 14:00, Christian Schoenebeck wrote: > > One way would be a recursive type and logging a warning, which you > > obviously don't like; another option would be an assertion fault instead > > to make developers immediately awa

Re: [PATCH] Coroutine-aware monitor_cur() with coroutine-specific data

2020-08-26 Thread Kevin Wolf
Am 26.08.2020 um 14:40 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 07.08.2020 um 15:29 hat Markus Armbruster geschrieben: > >> This is just a sketch. It needs comments and a real commit message. > >> > >> As is, it goes on top of Kevin's series. It is meant to be squashed

Re: Issue with submodules on macOS & meson

2020-08-26 Thread Marc-André Lureau
Hi On Wed, Aug 26, 2020 at 5:40 PM Emmanuel Blot wrote: > Hi, > > Using current master 78dca230 w/ Meson/ninja, build fails with capstone > dependency. > > * ../configure --target-list=riscv64-softmmu && ninja > You need to run 'make' (at least once - but still by preference for now). Submodule

[Bug 1893040] Re: External modules retreval using Go1.15 on s390x appears to have checksum and ECDSA verification issues

2020-08-26 Thread Daniel Berrange
Can you provide a *simple* way to demonstrate the problem. ie some simple Go demo program, that doens't involve building kubernetes. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1893040 Title: Ex

Re: [PATCH v5 07/10] block: introduce preallocate filter

2020-08-26 Thread David Edmondson
On Tuesday, 2020-08-25 at 17:11:34 +02, Max Reitz wrote: > On 21.08.20 16:11, Vladimir Sementsov-Ogievskiy wrote: >> It's intended to be inserted between format and protocol nodes to >> preallocate additional space (expanding protocol file) on writes >> crossing EOF. It improves performance for fi

Re: [RFC PATCH v3 06/34] Hexagon (disas) disassembler

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +len = disassemble_hexagon(words, i, buf, PACKET_BUFFER_LEN); > +slen = strlen(buf); > +if (buf[slen - 1] == '\n') { > +buf[slen - 1] = '\0'; > +} > +(*info->fprintf_func)(info->stream, "%s", buf); Normally our disassemblers p

Re: Issue with submodules on macOS & meson

2020-08-26 Thread Emmanuel Blot
On 26 Aug 2020, at 15:50, Marc-André Lureau wrote: H Marc-André, >> You need to run 'make' (at least once - but still by preference for now). > Submodule handling is done by Makefile. Ok, thanks a lot for this tip.

Re: [Fwd] Issue 25164 in oss-fuzz: qemu: Fuzzing build failure

2020-08-26 Thread Alexander Bulekov
On 200825 0958, Paolo Bonzini wrote: > Il lun 24 ago 2020, 00:58 Alexander Bulekov ha scritto: > > > Hi Paolo, > > Our oss-fuzz builds started failing, after the meson merge. I think I > > tracked down the issues: > > 1.) Looking at the build-log here: > > > > https://oss-fuzz-build-logs.storage.

Re: [PATCH v2 2/2] linux-user: Add support for utimensat_time64() and semtimedop_time64()

2020-08-26 Thread Laurent Vivier
Le 25/08/2020 à 16:23, Laurent Vivier a écrit : > Le 25/08/2020 à 09:18, Laurent Vivier a écrit : >> Le 25/08/2020 à 00:30, Filip Bozuta a écrit : >>> This patch introduces functionality for following time64 syscalls: >>> >>> *utimensat_time64() >>> >>> int utimensat(int dirfd, const char *path

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Igor Mammedov
On Wed, 26 Aug 2020 14:36:38 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 26, 2020 at 03:30:34PM +0200, Igor Mammedov wrote: > > On Wed, 26 Aug 2020 13:50:59 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Aug 26, 2020 at 02:38:49PM +0200, Igor Mammedov wrote: > > > > On Fri, 21 Aug

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Eduardo Habkost
On Wed, Aug 26, 2020 at 02:38:49PM +0200, Igor Mammedov wrote: > On Fri, 21 Aug 2020 17:12:19 -0500 > Babu Moger wrote: > > > To support some of the complex topology, we introduced EPYC mode apicid > > decode. > > But, EPYC mode decode is running into problems. Also it can become quite a > > mai

Re: [PATCH v2 6/7] x68: acpi: trigger SMI before sending hotplug Notify event to OSPM

2020-08-26 Thread Igor Mammedov
On Wed, 26 Aug 2020 15:32:07 +0200 Laszlo Ersek wrote: > On 08/26/20 11:24, Laszlo Ersek wrote: > > Hi Igor, > > > > On 08/25/20 19:25, Laszlo Ersek wrote: > > > >> So I would suggest fetching the CNEW array element back into "uid" > >> first, then using "uid" for both the NOTIFY call, and th

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Dr. David Alan Gilbert
* Igor Mammedov (imamm...@redhat.com) wrote: > On Tue, 25 Aug 2020 16:25:21 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Igor Mammedov (imamm...@redhat.com) wrote: > > > On Tue, 25 Aug 2020 09:15:04 +0100 > > > "Dr. David Alan Gilbert" wrote: > > > > > > > * Babu Moger (babu.mo...@amd.com)

Re: [RFC PATCH v3 07/34] Hexagon (target/hexagon) scalar core helpers

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > The majority of helpers are generated. Define the helper functions needed > then include the generated file > > Signed-off-by: Taylor Simpson > --- > target/hexagon/helper.h| 33 > target/hexagon/op_helper.c | 368 >

Re: [RFC PATCH v3 08/34] Hexagon (target/hexagon) GDB Stub

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > GDB register read and write routines > > Signed-off-by: Taylor Simpson > --- > target/hexagon/internal.h | 2 ++ > target/hexagon/cpu.c | 2 ++ > target/hexagon/gdbstub.c | 49 > +++ > 3 files change

Re: [PATCH] numa: hmat: fix cache size check

2020-08-26 Thread Eduardo Habkost
On Fri, Aug 21, 2020 at 06:05:19AM -0400, Igor Mammedov wrote: > when QEMU is started like: > > qemu-system-x86_64 -smp 2 -machine hmat=on \ > -m 2G \ > -object memory-backend-ram,size=1G,id=m0 \ > -object memory-backend-ram,size=1G,id=m1 \ > -numa node,nodeid=0,memdev=m0 \ > -numa node,nodei

Re: [RFC PATCH v3 09/34] Hexagon (target/hexagon) architecture types

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +#ifndef HEXAGON_ARCH_TYPES_H > +#define HEXAGON_ARCH_TYPES_H > + > +#include Do you really need to re-include this? This was done in "qemu/osdep.h". In general, osdep.h must be included first, and it takes care of all of the basic system includes. r

[PATCH v2 2/2] hw/arm/sbsa-ref : Add embedded controller in secure memory

2020-08-26 Thread Graeme Gregory
Add the previously created sbsa-ec device to the sbsa-ref machine in secure memory so the PSCI implementation in ARM-TF can access it, but not expose it to non secure firmware or OS except by via ARM-TF. Signed-off-by: Graeme Gregory --- hw/arm/sbsa-ref.c | 14 ++ 1 file changed, 14

[PATCH v2 0/2] Add an embedded controller to sbsa-ref machine

2020-08-26 Thread Graeme Gregory
This series is to an add embedded controller to the sbsa-ref machine so that PSCI can communicate platform power states to the platform which in this case is QEMU. v1->v2 - broke out the EC itself as hw/misc/sbsa_ec.c as seperate patch - applied review comments to date

[PATCH v2 1/2] hw/misc/sbsa_ec : Add an embedded controller for sbsa-ref

2020-08-26 Thread Graeme Gregory
A difference between sbsa platform and the virt platform is PSCI is handled by ARM-TF in the sbsa platform. This means that the PSCI code there needs to communicate some of the platform power changes down to the qemu code for things like shutdown/reset control. Space has been left to extend the EC

Re: [RFC PATCH v3 10/34] Hexagon (target/hexagon) instruction and packet types

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +struct Instruction { > +semantic_insn_t generate;/* pointer to genptr routine */ > +size1u_t regno[REG_OPERANDS_MAX];/* reg operands including > predicates */ > +size2u_t opcode; > + > +size4u_t iclass:6; > +size4u_t

Re: [RFC PATCH v3 11/34] Hexagon (target/hexagon) register fields

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > Declare bitfields within registers such as user status register (USR) > > Signed-off-by: Taylor Simpson > --- > target/hexagon/reg_fields.h | 40 + > target/hexagon/reg_fields_def.h | 78 > ++

Re: [RFC PATCH v3 12/34] Hexagon (target/hexagon) instruction attributes

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +#define ATTRIB_WIDTH 32 > +#define GET_ATTRIB(opcode, attrib) \ > +(((opcode_attribs[opcode][attrib / ATTRIB_WIDTH])\ > +>> (attrib % ATTRIB_WIDTH)) & 0x1) Can you define GET_ATTRIB in terms of qemu/bitops.h? I'm leery of ATTRIB_WIDTH being sep

Re: [PULL v2 00/34] Block patches

2020-08-26 Thread Peter Maydell
On Wed, 26 Aug 2020 at 08:51, Max Reitz wrote: > > The following changes since commit 30aa19446d82358a30eac3b556b4d6641e00b7c1: > > Merge remote-tracking branch 'remotes/cschoenebeck/tags/pull-9p-20200812' > into staging (2020-08-24 16:39:53 +0100) > > are available in the Git repository at: >

Re: [RFC PATCH v3 13/34] Hexagon (target/hexagon) register map

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +#ifndef HEXAGON_REGMAP_H > +#define HEXAGON_REGMAP_H > + > +/* Name Num Table */ > +DEF_REGMAP(R_16, 16, 0, 1, 2, 3, 4, 5, 6, 7, 16, 17, 18, 19, 20, 21, 22, 23) > +DEF_REGMAP(R__8, 8, 0, 2, 4, 6, 16, 18, 20, 22) > +DEF_REGMAP(R__4, 4, 0, 2

[RFC v6 00/13] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-08-26 Thread Eugenio Pérez
I am able to hit this assertion when a Red Hat 7 guest virtio_net device raises an "Invalidation" of all the TLB entries. This happens in the guest's startup if 'intel_iommu=on' argument is passed to the guest kernel and right IOMMU/ATS devices are declared in qemu's command line. Command line: /h

[RFC v6 01/13] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one

2020-08-26 Thread Eugenio Pérez
Previous name didn't reflect the iommu operation. Signed-off-by: Eugenio Pérez --- hw/arm/smmu-common.c | 2 +- hw/arm/smmuv3.c | 2 +- hw/i386/intel_iommu.c | 4 ++-- include/exec/memory.h | 6 +++--- softmmu/memory.c | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) d

[RFC v6 05/13] hw/arm/smmu: Fill IOMMUTLBEntry notifier type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/arm/smmu-common.c | 2 ++ hw/arm/smmuv3.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index b02ffb8822..88cf1b86ea 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -181,6 +181,7 @@ stati

[RFC v6 04/13] amd_iommu: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/i386/amd_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index 087f601666..c2607e9e91 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -946,6 +946,7 @@ static void amdvi_pa

[RFC v6 02/13] memory: Add IOMMUTLBNotificationType to IOMMUTLBEntry

2020-08-26 Thread Eugenio Pérez
This way we can tell between MAPs and UNMAP, and potentially avoid to send them to a notifier that does not require them. Signed-off-by: Eugenio Pérez --- include/exec/memory.h | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/include/exec/memory.h b/include/

[RFC v6 09/13] intel_iommu: Set IOMMUTLBEntry type in vtd_page_walk_level

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/i386/intel_iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index ed83e496b8..0b3399874f 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -1251,6 +1251,7 @@ static int vtd_page_walk_level

[RFC v6 03/13] hw/alpha/typhoon: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/alpha/typhoon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c index 29d44dfb06..b1e6c4e929 100644 --- a/hw/alpha/typhoon.c +++ b/hw/alpha/typhoon.c @@ -615,6 +615,7 @@ static bool make_iommu_tlbe(hwaddr taddr, hwadd

[RFC v6 06/13] dma/rc4030: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/dma/rc4030.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index 7eddc9a776..8eee12b1cb 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -506,6 +506,7 @@ static IOMMUTLBEntry rc4030_dma_translate(IOMMUMemoryRegion *

[RFC v6 07/13] intel_iommu: Mark IOMMUTLBEntry of page notification as IOMMU_IOTLB_UNMAP type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/i386/intel_iommu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 2ad6b9d796..ed83e496b8 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -1999,6 +1999,7 @@ static void vtd_iotlb_page

[RFC v6 10/13] memory: Notify IOMMU IOTLB based on entry type, not permissions

2020-08-26 Thread Eugenio Pérez
This way the intention is much clearer. Signed-off-by: Eugenio Pérez --- softmmu/memory.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index 961c25b42f..3e68442ca6 100644 --- a/softmmu/memory.c +++ b/softmmu/

[RFC v6 08/13] virtio-iommu: Mark virtio_iommu_translate IOTLB as IOMMU_IOTLB_NONE type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- hw/virtio/virtio-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index 5d56865e56..16267e8096 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -619,6 +619,7 @@ static IOMMUTLBEn

[RFC v6 12/13] intel_iommu: Do not notify regular iotlb to device-iotlb notifiers

2020-08-26 Thread Eugenio Pérez
This improves performance in case of netperf with vhost-net: * TCP_STREAM: From 9049.59Mbit/s to 9049.59Mbit/s (13%) * TCP_RR: From 8464.73 trans/s to 8932.70 trans/s (5.5%) * UDP_RR: From 8562.08 trans/s to 9005.62/s (5.1%) * UDP_STREAM: No change observed (insignificant 0.1% improvement) Sig

[RFC v6 13/13] memory: Skip bad range assertion if notifier is DEVIOTLB type

2020-08-26 Thread Eugenio Pérez
Signed-off-by: Eugenio Pérez --- softmmu/memory.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index 4ed63f4d0d..d2797e996a 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -1915,6 +1915,7 @@ void memory_region_notif

[RFC v6 11/13] memory: Add IOMMU_DEVIOTLB_UNMAP IOMMUTLBNotificationType

2020-08-26 Thread Eugenio Pérez
Adapt intel and vhost to use this new notification type Signed-off-by: Eugenio Pérez --- hw/i386/intel_iommu.c | 2 +- hw/virtio/vhost.c | 2 +- include/exec/memory.h | 9 ++--- softmmu/memory.c | 5 - 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/hw/i386/intel

Re: [PATCH v2 1/1] core/register: Specify instance_size in the TypeInfo

2020-08-26 Thread Eduardo Habkost
On Wed, Aug 26, 2020 at 11:40:28AM +0200, Philippe Mathieu-Daudé wrote: > Le mar. 25 août 2020 19:42, Alistair Francis a > écrit : > > > Reported-by: Eduardo Habkost > > Signed-off-by: Alistair Francis > > --- > > hw/core/register.c | 31 +-- > > 1 file changed,

[PULL 03/18] hw: ehci: check return value of 'usb_packet_map'

2020-08-26 Thread Gerd Hoffmann
From: Li Qiang If 'usb_packet_map' fails, we should stop to process the usb request. Signed-off-by: Li Qiang Message-Id: <20200812161727.29412-1-liq...@163.com> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw

[PULL 09/18] hw/usb: Add U2F key passthru mode

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patch adds the U2F key pass-through mode. The pass-through mode consists of passing all requests made from the guest to the physical security key connected to the host machine and vice versa. In addition, the dedicated pass-through allows to have a U2F security key share

[PULL 02/18] hw: ehci: destroy sglist in error path

2020-08-26 Thread Gerd Hoffmann
From: Li Qiang This may cause resource leak. Signed-off-by: Li Qiang Message-Id: <20200812161712.29361-1-liq...@163.com> Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ehci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 1495e8f7fab1..58cceacbf83

[PULL 05/18] hw/usb: Regroup USB HID protocol values

2020-08-26 Thread Gerd Hoffmann
From: César Belley Group some HID values that are used pretty much everywhere when dealing with HID devices. Signed-off-by: César Belley Message-id: 20200812094135.20550-2-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- include/hw/usb/hid.h | 17 + hw/usb/dev-hid.c

[PULL 18/18] usb: fix setup_len init (CVE-2020-14364)

2020-08-26 Thread Gerd Hoffmann
Store calculated setup_len in a local variable, verify it, and only write it to the struct (USBDevice->setup_len) in case it passed the sanity checks. This prevents other code (do_token_{in,out} functions specifically) from working with invalid USBDevice->setup_len values and overrunning the USBDe

[PULL 04/18] ehci: drop pointless warn_report for guest bugs.

2020-08-26 Thread Gerd Hoffmann
We have a tracepoint at the same place which can be enabled if needed. Buglink: https://bugzilla.redhat.com//show_bug.cgi?id=1859236 Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200722072613.10390-1-kra...@redhat.com> --- hw/usb/hcd-ehci.c | 1 - 1 file change

[PULL 14/18] scripts: Add u2f-setup-gen script

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patch adds the script used to generate setup directories, needed for the device u2f-emulated configuration in directory mode: python u2f-setup-gen.py $DIR qemu -usb -device u2f-emulated,dir=$DIR Signed-off-by: César Belley Message-id: 20200826114209.28821-11-ces

[PULL 08/18] hw/usb: Add U2F key base class implementation

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patch adds the U2F key base class implementation. The U2F key base mainly takes care of the HID interfacing with guest. On the one hand, it retrieves the guest U2FHID packets and transmits them to the variant associated according to the mode: pass-through or emulated. On

[PULL 16/18] hw/usb: Add U2F device autoscan to passthru mode

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patch adds an autoscan to let u2f-passthru choose the first U2F device it finds. The autoscan is performed using libudev with an enumeration of all the hidraw devices present on the host. The first device which happens to be a U2F device is taken to do the passtru. Sign

[PULL 00/18] Usb 20200826 patches

2020-08-26 Thread Gerd Hoffmann
The following changes since commit d1a2b51f868d09ca8489ee9aee9c55632ed8fb92: Merge remote-tracking branch 'remotes/berrange/tags/socket-next-pull-reques= t' into staging (2020-08-25 15:01:43 +0100) are available in the Git repository at: git://git.kraxel.org/qemu tags/usb-202

Re: [PATCH v2] virtio-gpu: fix unmap the already mapped items

2020-08-26 Thread Li Qiang
Li Zhijian 于2020年8月21日周五 下午7:34写道: > > we go here either (!(*iov)[i].iov_base) or (len != l), so we need to consider > to unmap the 'i'th item as well when the 'i'th item is not nil > > Signed-off-by: Li Zhijian > > --- > v2: address Gerd's comments > --- > hw/display/virtio-gpu.c | 3 +++ > 1 f

[PULL 06/18] docs: Add USB U2F key device documentation

2020-08-26 Thread Gerd Hoffmann
From: César Belley Add USB U2F key device documentation: - USB U2F key device - Building - Using u2f-emulated - Using u2f-passthru - Libu2f-emu Signed-off-by: César Belley Message-id: 20200826114209.28821-3-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/u2f.txt | 101

[PULL 12/18] docs/system: Add U2F key to the USB devices examples

2020-08-26 Thread Gerd Hoffmann
From: César Belley Signed-off-by: César Belley Message-id: 20200826114209.28821-9-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/system/usb.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/system/usb.rst b/docs/system/usb.rst index ddfa828d74ae..9a2f1927c451 100

[PULL 01/18] hw: xhci: check return value of 'usb_packet_map'

2020-08-26 Thread Gerd Hoffmann
From: Li Qiang Currently we don't check the return value of 'usb_packet_map', this will cause an UAF issue. This is LP#1891341. Following is the reproducer provided in: -->https://bugs.launchpad.net/qemu/+bug/1891341 cat << EOF | ./i386-softmmu/qemu-system-i386 -device nec-usb-xhci \ -trace usb\

[PULL 11/18] meson: Add U2F key to meson

2020-08-26 Thread Gerd Hoffmann
From: César Belley Signed-off-by: César Belley Message-id: 20200826114209.28821-8-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- configure | 8 +++- meson_options.txt | 1 + hw/usb/Kconfig | 5 + hw/usb/meson.build | 7 +++ meson.build| 7 +++

Re: [RFC v6 00/13] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-08-26 Thread Eugenio Perez Martin
Hi! Sending v6 to see if that is on the same page as what you meant. Making each setting of "type" explicitly IOMMU_IOTLB_NONE if not used in notifications. This is done in different commits in case this helps review of different architectures. I think that this way we have too much freedom betwe

[PULL 13/18] docs/qdev-device-use.txt: Add USB U2F key to the QDEV devices examples

2020-08-26 Thread Gerd Hoffmann
From: César Belley Signed-off-by: César Belley Message-id: 20200826114209.28821-10-cesar.bel...@lse.epita.fr Signed-off-by: Gerd Hoffmann --- docs/qdev-device-use.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt index f8d0d2fe297a..988

Re: Contributor wanting to get started with simple contributions

2020-08-26 Thread Rohit Shinde
Hey Thomas, I didn't really have any specific questions. I wanted to know if there was any part of qemu that I could contribute to. Qemu is overwhelmingly vast and without some pointers, I felt very lost. On Tue, Aug 25, 2020 at 1:51 AM Thomas Huth wrote: > On 25/08/2020 04.26, Rohit Shinde w

[PULL 17/18] usb-host: workaround libusb bug

2020-08-26 Thread Gerd Hoffmann
libusb_get_device_speed() does not work for libusb_wrap_sys_device() devices in v1.0.23. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1871090 Signed-off-by: Gerd Hoffmann Message-id: 20200824110057.32089-1-kra...@redhat.com --- hw/usb/host-libusb.c | 37 ++

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Daniel P . Berrangé
On Wed, Aug 26, 2020 at 04:02:58PM +0200, Igor Mammedov wrote: > On Wed, 26 Aug 2020 14:36:38 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Aug 26, 2020 at 03:30:34PM +0200, Igor Mammedov wrote: > > > On Wed, 26 Aug 2020 13:50:59 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Wed, A

[PULL 10/18] hw/usb: Add U2F key emulated mode

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patch adds the U2F key emulated mode. The emulated mode consists of completely emulating the behavior of a U2F device through software part. Libu2f-emu is used for that. The emulated mode is associated with a device inheriting from u2f-key base. To work, an emulated U2F

[PULL 07/18] hw/usb: Add U2F key base class

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patch adds the specification for the U2F key base class. Used to group the common characteristics, this device class will be inherited by its two variants, corresponding to the two modes: passthrough and emulated This prepares the U2F devices hierarchy which is as follow:

Re: [RFC PATCH v3 14/34] Hexagon (target/hexagon) instruction/packet decode

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +#define DECODE_NEW_TABLE(TAG, SIZE, WHATNOT) \ > +static struct _dectree_table_struct dectree_table_##TAG; All of these little structures should be const. > +typedef struct { > +struct _dectree_table_struct *table_link; > +struct _dectree_

Re: [RFC PATCH v3 15/34] Hexagon (target/hexagon) instruction printing

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +extern void snprint_a_pkt(char *buf, int n, packet_t *pkt); Is there a good reason you're using a fixed size buffer and not returning a GString? r~

[PULL 15/18] hw/usb: Add U2F device check to passthru mode

2020-08-26 Thread Gerd Hoffmann
From: César Belley This patchs adds a check to verify that the device passed through the hidraw property is a U2F device. The check is done by ensuring that the first values of the report descriptor (USAGE PAGE and USAGE) correspond to those of a U2F device. Signed-off-by: César Belley Message

Re: [RFC PATCH v3 16/34] Hexagon (target/hexagon) utility functions

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +extern size16s_t cast8s_to_16s(size8s_t a); > +extern size8s_t cast16s_to_8s(size16s_t a); > +extern size16s_t add128(size16s_t a, size16s_t b); > +extern size16s_t sub128(size16s_t a, size16s_t b); > +extern size16s_t shiftr128(size16s_t a, size4u_t n);

[PATCH v5 2/6] meson: fixes relpath may fail on win32.

2020-08-26 Thread luoyonggang
From: Yonggang Luo On win32, os.path.relpath would raise exception when do the following relpath: C:/msys64/mingw64/x.exe relative to E:/path/qemu-build would fail. So we try catch it for stopping it from raise exception on msys2 Signed-off-by: Yonggang Luo --- scripts/mtest2make.py | 11 +

[PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread luoyonggang
From: Yonggang Luo SIMPLE_PATH_RE should match the full path token. Or the $ and : contained in path would not matched if the path are start with C:/ and E:/ Signed-off-by: Yonggang Luo --- scripts/ninjatool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ninjat

Re: [PATCH v2 6/7] x68: acpi: trigger SMI before sending hotplug Notify event to OSPM

2020-08-26 Thread Laszlo Ersek
On 08/26/20 13:55, Igor Mammedov wrote: > On Wed, 26 Aug 2020 11:24:14 +0200 > Laszlo Ersek wrote: >> (2a) Change the firmware so that it sends a directed SMI as well to >>each CPU, just before sending an INIT-SIPI-SIPI. This should be >>idempotent -- if the broadcast SMI *has*

[PATCH v5 3/6] meson: Mingw64 gcc doesn't recognize system include_type for sdl2

2020-08-26 Thread luoyonggang
From: Yonggang Luo Fixes this for msys2/mingw64 by remove the include_type for sdl2 discovery in meson Signed-off-by: Yonggang Luo --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index f0fe5f8799..1644bbd83c 100644 --- a/meson.bu

[PATCH v5 4/6] configure: Fix include and linkage issue on msys2

2020-08-26 Thread luoyonggang
From: Yonggang Luo On msys2, the -I/e/path/to/qemu -L/e/path/to/qemu are not recognized by the compiler Cause $PWD are result posix style path such as /e/path/to/qemu that can not be recognized by mingw gcc, and `pwd -W` are result Windows style path such as E:/path/to/qemu that can be recogni

[PATCH v5 6/6] meson: Convert undefsym.sh to undefsym.py

2020-08-26 Thread luoyonggang
From: Yonggang Luo undefsym.sh are not msys2 compatible, convert it to python script Signed-off-by: Yonggang Luo --- meson.build | 2 +- scripts/undefsym.py | 56 + scripts/undefsym.sh | 20 3 files changed, 57 insertions(+)

Re: [Fwd] Issue 25164 in oss-fuzz: qemu: Fuzzing build failure

2020-08-26 Thread Paolo Bonzini
On Wed, Aug 26, 2020 at 3:56 PM Alexander Bulekov wrote: > > On 200825 0958, Paolo Bonzini wrote: > > Il lun 24 ago 2020, 00:58 Alexander Bulekov ha scritto: > > > > > Hi Paolo, > > > Our oss-fuzz builds started failing, after the meson merge. I think I > > > tracked down the issues: > > > 1.) Lo

[PATCH v5 5/6] meson: Fixes ninjatool can not be recognized as script under Window/MSYS2

2020-08-26 Thread luoyonggang
From: Yonggang Luo use ninja instead ${build_path}/ninjatool Signed-off-by: Yonggang Luo --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 3b9e79923d..2ad0c58492 100755 --- a/configure +++ b/configure @@ -8222,7 +8222,7 @@ fi mv $cro

Re: [RFC PATCH v3 17/34] Hexagon (target/hexagon/imported) arch import - macro definitions

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > The macro definitions specify instruction attributes that are applied > to each instruction that references the macro. The generator will > recursively apply attributes to each instruction that used the macro. > > Signed-off-by: Taylor Simpson > --- >

Re: [PATCH v5 0/8] Remove EPYC mode apicid decode and use generic decode

2020-08-26 Thread Eduardo Habkost
On Wed, Aug 26, 2020 at 04:03:40PM +0100, Daniel P. Berrangé wrote: > On Wed, Aug 26, 2020 at 04:02:58PM +0200, Igor Mammedov wrote: > > On Wed, 26 Aug 2020 14:36:38 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Aug 26, 2020 at 03:30:34PM +0200, Igor Mammedov wrote: > > > > On Wed, 26 A

Re: [PATCH v5 6/6] meson: Convert undefsym.sh to undefsym.py

2020-08-26 Thread Paolo Bonzini
Careful, the original script: -comm -12 \ - <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \ - <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u) looks for lines that *are* U in the modules. So using filter_lines_set is correct for static libraries but wron

Re: [RFC PATCH v3 24/34] Hexagon (target/hexagon) opcode data structures

2020-08-26 Thread Richard Henderson
On 8/18/20 8:50 AM, Taylor Simpson wrote: > +extern const char *opcode_names[]; > + > +extern const char *opcode_reginfo[]; > +extern const char *opcode_rregs[]; > +extern const char *opcode_wregs[]; const char * const > +extern opcode_encoding_t opcode_encodings[XX_LAST_OPCODE]; const. > +ext

Re: [PATCH v5 4/6] configure: Fix include and linkage issue on msys2

2020-08-26 Thread Paolo Bonzini
I'm a bit wary of this patch, the effects are quite wide-ranging. If we move all the detection of dependencies to meson, it will take a while but we should get a similar effect. However, I'm testing and queuing patches 1 to 3. Paolo On Wed, Aug 26, 2020 at 5:13 PM wrote: > > From: Yonggang Luo

Re: [PATCH 00/77] target/microblaze improvements

2020-08-26 Thread Edgar E. Iglesias
On Tue, Aug 25, 2020 at 01:58:33PM -0700, Richard Henderson wrote: > Well, this is larger than I expected. > Wow, thanks for working on this Richard! I'll run some tests on it and go through the patches. Thanks, Edgar > I started off thinking conversion to decodetree would be quick, > after I

Re: [PATCH v5 6/6] meson: Convert undefsym.sh to undefsym.py

2020-08-26 Thread Yonggang Luo
Gotcha, I am confusing about submitting a patch, This is my script to submit patch, but didn't got the things work. https://wiki.qemu.org/Contribute/SubmitAPatch#Base_patches_against_current_git_master Are very long, but I still didn't got the way how to submit patches properly Windows bat

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Paolo Bonzini
On Wed, Aug 26, 2020 at 5:12 PM wrote: > > From: Yonggang Luo > > SIMPLE_PATH_RE should match the full path token. > Or the $ and : contained in path would not matched if the path are start with > C:/ and E:/ I don't understand this, SIMPLE_PATH_RE is used with re.match which only matches at th

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Yonggang Luo
I can tell you build.ninja can contains $: symbol, that's the escape for Ninja, when ninjatool parse it, it will convert $: -> :, so that's not a problem. This is part of the build.ninja on my computer ``` build version.rc_version.o: CUSTOM_COMMAND_DEP ../qemu.org/version.rc | C$:/CI-Tools/msys64/

Re: [PATCH v5 4/6] configure: Fix include and linkage issue on msys2

2020-08-26 Thread Yonggang Luo
On Wed, Aug 26, 2020 at 11:24 PM Paolo Bonzini wrote: > I'm a bit wary of this patch, the effects are quite wide-ranging. If > we move all the detection of dependencies to meson, it will take a > while but we should get a similar effect. > Only on MINGW the $PWD sematic are changed, so I don't th

Re: meson: problems building under msys2/mingw-w64 native

2020-08-26 Thread Paolo Bonzini
On Wed, Aug 26, 2020 at 12:15 AM Mark Cave-Ayland wrote: > ... > -rw-r--r-- 1 Mark None39424 Aug 25 20:43 vgabios-stdvga.bin > -rw-r--r-- 1 Mark None39424 Aug 25 20:43 vgabios-virtio.bin > -rw-r--r-- 1 Mark None39424 Aug 25 20:43 vgabios-vmware.bin > > > I would expect the majority of

Re: [PATCH v5 4/6] configure: Fix include and linkage issue on msys2

2020-08-26 Thread Paolo Bonzini
On Wed, Aug 26, 2020 at 5:33 PM 罗勇刚(Yonggang Luo) wrote: > > > On Wed, Aug 26, 2020 at 11:24 PM Paolo Bonzini wrote: >> I'm a bit wary of this patch, the effects are quite wide-ranging. If >> we move all the detection of dependencies to meson, it will take a >> while but we should get a similar e

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Paolo Bonzini
On Wed, Aug 26, 2020 at 5:31 PM 罗勇刚(Yonggang Luo) wrote: > > I can tell you build.ninja can contains $: symbol, that's the escape for > Ninja, > when ninjatool parse it, it will convert $: -> :, so that's not a problem. > This is part of the build.ninja on my computer Ok, that's useful. But can

Re: [PATCH v5 4/6] configure: Fix include and linkage issue on msys2

2020-08-26 Thread Yonggang Luo
On Wed, Aug 26, 2020 at 11:36 PM Paolo Bonzini wrote: > On Wed, Aug 26, 2020 at 5:33 PM 罗勇刚(Yonggang Luo) > wrote: > > > > > > On Wed, Aug 26, 2020 at 11:24 PM Paolo Bonzini > wrote: > >> I'm a bit wary of this patch, the effects are quite wide-ranging. If > >> we move all the detection of depe

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Yonggang Luo
On Wed, Aug 26, 2020 at 11:37 PM Paolo Bonzini wrote: > On Wed, Aug 26, 2020 at 5:31 PM 罗勇刚(Yonggang Luo) > wrote: > > > > I can tell you build.ninja can contains $: symbol, that's the escape for > Ninja, > > when ninjatool parse it, it will convert $: -> :, so that's not a > problem. > > This i

Re: Contributor wanting to get started with simple contributions

2020-08-26 Thread John Snow
On 8/24/20 10:26 PM, Rohit Shinde wrote: Hey John, Hi Rohit! I sent this email a couple of weeks ago to the qemu mailing list since I didn't really know who to approach. Sorry, I didn't see a mail. The volume is quite high and I missed it. For Python issues, the usual suspects are: Me

[PATCH v6] meson: Convert undefsym.sh to undefsym.py

2020-08-26 Thread luoyonggang
From: Yonggang Luo undefsym.sh are not msys2 compatible, convert it to python script Signed-off-by: Yonggang Luo --- meson.build | 2 +- scripts/undefsym.py | 57 + scripts/undefsym.sh | 20 3 files changed, 58 insertions(+)

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Paolo Bonzini
On Wed, Aug 26, 2020 at 5:39 PM 罗勇刚(Yonggang Luo) wrote: >> Ok, that's useful. But can you just send the whole file (it's huge but >> you can gzip it or something similar)? >> >> Paolo > > I am OK with that, but where should I post Just pbonz...@redhat.com. Regarding the version.rc_version.o tar

Re: [RFC v6 02/13] memory: Add IOMMUTLBNotificationType to IOMMUTLBEntry

2020-08-26 Thread Peter Xu
On Wed, Aug 26, 2020 at 04:36:40PM +0200, Eugenio Pérez wrote: > This way we can tell between MAPs and UNMAP, and potentially avoid to > send them to a notifier that does not require them. > > Signed-off-by: Eugenio Pérez > --- > include/exec/memory.h | 17 - > 1 file changed, 12

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Yonggang Luo
On Wed, Aug 26, 2020 at 11:41 PM Paolo Bonzini wrote: > On Wed, Aug 26, 2020 at 5:39 PM 罗勇刚(Yonggang Luo) > wrote: > >> Ok, that's useful. But can you just send the whole file (it's huge but > >> you can gzip it or something similar)? > >> > >> Paolo > > > > I am OK with that, but where should I

Re: [PATCH v5 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja

2020-08-26 Thread Yonggang Luo
How about enabling github actions to enable MSYS2 builds in CI. So we won't break msys2 silently.

Re: [RFC v6 03/13] hw/alpha/typhoon: Mark all IOMMUTLBEntry as IOMMU_IOTLB_NONE type

2020-08-26 Thread Peter Xu
On Wed, Aug 26, 2020 at 04:36:41PM +0200, Eugenio Pérez wrote: > Signed-off-by: Eugenio Pérez > --- > hw/alpha/typhoon.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/alpha/typhoon.c b/hw/alpha/typhoon.c > index 29d44dfb06..b1e6c4e929 100644 > --- a/hw/alpha/typhoon.c > +++ b/hw/al

<    1   2   3   4   5   >