Re: [EXT] [PATCH v2 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-10 Thread Auger Eric
Hi Bharat, On 5/11/20 8:38 AM, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Sent: Friday, May 8, 2020 11:01 PM >> To: eric.auger@gmail.com; eric.au...@redhat.com; qemu-devel@nongnu.org; >> qemu-...@nongnu.org; peter.mayd...@linaro.org; m...@redhat.co

Re: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread chen huacai
Hi, Philippe and Alexandar, On Mon, May 11, 2020 at 2:38 PM Philippe Mathieu-Daudé wrote: > > On 5/11/20 8:21 AM, Aleksandar Markovic wrote: > > пон, 11. мај 2020. у 03:11 chen huacai је > > написао/ла: > >> > >> Hi, Philippe, > >> > >> On Mon, May 11, 2020 at 5:06 AM Philippe Mathieu-Daudé >

RE: [EXT] [PATCH v2 2/5] virtio-iommu: Implement RESV_MEM probe request

2020-05-10 Thread Bharat Bhushan
Hi Eric, > -Original Message- > From: Eric Auger > Sent: Friday, May 8, 2020 11:01 PM > To: eric.auger@gmail.com; eric.au...@redhat.com; qemu-devel@nongnu.org; > qemu-...@nongnu.org; peter.mayd...@linaro.org; m...@redhat.com; jean- > phili...@linaro.org; Bharat Bhushan ; > pet...@redh

Re: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread Philippe Mathieu-Daudé
On 5/11/20 8:21 AM, Aleksandar Markovic wrote: пон, 11. мај 2020. у 03:11 chen huacai је написао/ла: Hi, Philippe, On Mon, May 11, 2020 at 5:06 AM Philippe Mathieu-Daudé wrote: We always miswrote the Fuloong machine... Fix its name. Add an machine alias to the previous name for backward co

Re: [PATCH] spapr: Add a new level of NUMA for GPUs

2020-05-10 Thread David Gibson
On Fri, May 08, 2020 at 12:59:27PM -0500, Reza Arbab wrote: > NUMA nodes corresponding to GPU memory currently have the same > affinity/distance as normal memory nodes. Add a third NUMA associativity > reference point enabling us to give GPU nodes more distance. > > Before, `numactl -H` output in

Re: [PATCH qemu] spapr: Add PVR setting capability

2020-05-10 Thread David Gibson
On Tue, May 05, 2020 at 04:18:40PM +1000, Alexey Kardashevskiy wrote: > > > On 05/05/2020 15:50, David Gibson wrote: > > On Tue, May 05, 2020 at 10:56:17AM +1000, Alexey Kardashevskiy wrote: > >> > >> > >> On 04/05/2020 21:30, Greg Kurz wrote: > >>> On Fri, 17 Apr 2020 14:11:05 +1000 > >>> Alexey

Re: [PATCH RESEND v3 0/2] Makefile: libfdt: build only the strict necessary

2020-05-10 Thread David Gibson
On Wed, Apr 15, 2020 at 10:16:52AM +0200, Claudio Fontana wrote: > On 4/14/20 4:03 AM, David Gibson wrote: > > On Sat, Apr 11, 2020 at 11:31:48AM +0200, Claudio Fontana wrote: > >> v2 -> v3: > >> > >> * changed into a 2 patch series; in the second patch we remove the old > >> compatibility gunks

Re: [PATCH 09/12] hw/pci-host/bonito: Map the different PCI ranges more detailled

2020-05-10 Thread Philippe Mathieu-Daudé
On 5/11/20 8:12 AM, Aleksandar Markovic wrote: нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: Better describe the Bonito64 MEM HI/LO and I/O PCI ranges, add more PCI regions as unimplemented. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 30

Re: [PATCH 11/12] hw/pci-host/bonito: Set the Config register reset value with FIELD_DP32

2020-05-10 Thread Philippe Mathieu-Daudé
On 5/11/20 8:17 AM, Aleksandar Markovic wrote: нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: Describe some Config registers fields with the registerfields API. Use the FIELD_DP32() macro to set the BONGENCFG register bits at reset. Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH v5 00/18] nvme: refactoring and cleanups

2020-05-10 Thread Klaus Jensen
On May 5 07:48, Klaus Jensen wrote: > From: Klaus Jensen > > Changes since v5 > > No functional changes, just updated Reviewed-by tags. Also, I screwed up > the CC list when sending v4. > > Philippe and Keith, please add a Reviewed-by to > > * "nvme: factor out pmr setup" an

Re: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread Aleksandar Markovic
пон, 11. мај 2020. у 03:11 chen huacai је написао/ла: > > Hi, Philippe, > > On Mon, May 11, 2020 at 5:06 AM Philippe Mathieu-Daudé > wrote: > > > > We always miswrote the Fuloong machine... Fix its name. > > Add an machine alias to the previous name for backward > > compatibility. > > > > Sugges

Re: Abort in mch_update_pciexbar

2020-05-10 Thread Philippe Mathieu-Daudé
On 5/11/20 6:59 AM, Alexander Bulekov wrote: Hello, While fuzzing, I found an input that triggers an assertion failure in mch_update_pciexbar: #6 0x7f38d387c55a in abort /build/glibc-GwnBeO/glibc-2.30/stdlib/abort.c:79:7 #7 0x55c27e94ffd0 in mch_update_pciexbar hw/pci-host/q35.c:331:9 #8 0x55c27

Re: [PATCH 11/12] hw/pci-host/bonito: Set the Config register reset value with FIELD_DP32

2020-05-10 Thread Aleksandar Markovic
нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: > > Describe some Config registers fields with the registerfields > API. Use the FIELD_DP32() macro to set the BONGENCFG register > bits at reset. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 21

Re: [PATCH 09/12] hw/pci-host/bonito: Map the different PCI ranges more detailled

2020-05-10 Thread Aleksandar Markovic
нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: > > Better describe the Bonito64 MEM HI/LO and I/O PCI ranges, > add more PCI regions as unimplemented. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 30 ++ > 1 file changed, 2

Re: [PATCH 10/12] hw/pci-host/bonito: Better describe the I/O CS regions

2020-05-10 Thread Aleksandar Markovic
нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: > > Better describe the I/O CS regions, add the ROMCS region. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 13 +++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > Reviewed-by: Aleksandar

Re: [PATCH 08/12] hw/pci-host/bonito: Map all the Bonito64 I/O range

2020-05-10 Thread Aleksandar Markovic
нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: > > To ease following guest accesses to the Bonito64 chipset, > map its I/O range as UnimplementedDevice. > We can now see the accesses to unimplemented peripheral > using the '-d unimp' command line option. > > Signed-off-by: Philip

Re: [PATCH 07/12] hw/pci-host/bonito: Map peripheral using physical address

2020-05-10 Thread Aleksandar Markovic
нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: > > Peripherals are mapped at physical address on busses. > Only CPU/IOMMU can use virtual addresses. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-

Re: [PATCH 01/12] MAINTAINERS: Add Huacai Chen as fuloong2e co-maintainer

2020-05-10 Thread Aleksandar Markovic
нед, 10. мај 2020. у 23:01 Philippe Mathieu-Daudé је написао/ла: > > From: Huacai Chen > > I submitted the MIPS/fuloong2e support about ten years ago, and > after that I became a MIPS kernel developer. Last year, Philippe > Mathieu- Daudé asked me that whether I can be a reviewer of > MIPS/fuloon

Assertion failure in net_tx_pkt_add_raw_fragment through e1000e

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in net_tx_pkt_add_raw_fragment through the e1000e: _Bool net_tx_pkt_add_raw_fragment(struct NetTxPkt *, hwaddr, size_t): Assertion `pkt->max_raw_frags > pkt->raw_frags' failed. #8 0x7f2930b0d091 in __assert_fail /build/gl

Assertion failure in pci_bus_get_irq_level through ich9_lpc_update_apic

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in pci_bus_get_irq_level through ich9_lpc_update_apic: int pci_bus_get_irq_level(PCIBus *, int): Assertion `irq_num < bus->nirq' failed. #8 0x7fc7d4fa4091 in __assert_fail /build/glibc-GwnBeO/glibc-2.30/assert/assert.c:10

Re: [RFC v2 7/9] virito-pci: implement queue_enabled method

2020-05-10 Thread Cindy Lu
On Sat, May 9, 2020 at 8:02 PM Philippe Mathieu-Daudé wrote: > > Typo "virtio-pci" in patch subject. > Thanks Philippe, I will fix this > On 5/8/20 6:32 PM, Cindy Lu wrote: > > From: Jason Wang > > > > With version 1, we can detect whether a queue is enabled via > > queue_enabled. > > > > Signed-

Abort in mch_update_pciexbar

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in mch_update_pciexbar: #6 0x7f38d387c55a in abort /build/glibc-GwnBeO/glibc-2.30/stdlib/abort.c:79:7 #7 0x55c27e94ffd0 in mch_update_pciexbar hw/pci-host/q35.c:331:9 #8 0x55c27e94db38 in mch_write_config hw/pci-host/q35.c:4

Null-pointer dereference through virtio-balloon

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers a null-ptr dereference in aio_bh_enqueue, through virtio-balloon. Based on the stacktrace below, I am not positive that this is specific to virtio-balloon, however I have not encountered the same issue for any of the other virtio devices I am fuz

[PATCH v8] audio/jack: add JACK client audiodev

2020-05-10 Thread Geoffrey McRae
This commit adds a new audiodev backend to allow QEMU to use JACK as both an audio sink and source. Signed-off-by: Geoffrey McRae --- audio/Makefile.objs| 5 + audio/audio.c | 1 + audio/audio_template.h | 2 + audio/jackaudio.c | 677 +

Re: [PATCH] net: use peer when purging queue in qemu_flush_or_purge_queue_packets()

2020-05-10 Thread Alexander Bulekov
On 200511 1204, Jason Wang wrote: > The sender of packet will be checked in the qemu_net_queue_purge() but > we use NetClientState not its peer when trying to purge the incoming > queue in qemu_flush_or_purge_packets(). This will trigger the assert > in virtio_net_reset since we can't pass the send

[Bug 1877526] Re: KVM internal crash

2020-05-10 Thread Prashant
Unfortunately, I am not is a position to upgraded (due to various reasons). The case passes with RHEL 7.3, so, but I need to find the issue RHEL 6.6. (to be sure I don't the bug is NOT in my code). Is there a way that I can keep patching the KVM up to the newer versions, and then, find the versi

Assertion failure through virtio_blk_req_complete

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion through virtio-blk.c: void address_space_unmap(AddressSpace *, void *, hwaddr, int, hwaddr): Assertion `mr != NULL' failed #8 0x7fa947707091 in __assert_fail /build/glibc-GwnBeO/glibc-2.30/assert/assert.c:101:3 #9 0x55ec68a73a97

Re: Assertion Failure in virtio_net_reset

2020-05-10 Thread Jason Wang
On 2020/5/11 上午10:59, Alexander Bulekov wrote: Hello, While fuzzing, I found an input that triggers an assertion failure in virtio-net.c: hw/net/virtio-net.c:533: void virtio_net_reset(VirtIODevice *): Assertion `!virtio_net_get_subqueue(nc)->async_tx.elem' failed. #9 0x55a33fa31b78 in virti

[PATCH] net: use peer when purging queue in qemu_flush_or_purge_queue_packets()

2020-05-10 Thread Jason Wang
The sender of packet will be checked in the qemu_net_queue_purge() but we use NetClientState not its peer when trying to purge the incoming queue in qemu_flush_or_purge_packets(). This will trigger the assert in virtio_net_reset since we can't pass the sender check. Fix by using the peer. Reporte

Assertion failure through vring_split_desc_read

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure through virtio-rng -> vring_split_desc_read. Maybe this is related to: Message-ID: <20200511033001.dzvtbdhl3oz5p...@mozz.bu.edu> Assertion failure through virtio_lduw_phys_cached #8 0x7fe6a9acf091 in __assert_fail /build/g

Assertion failure through virtio_lduw_phys_cached

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in address_space_lduw_le_cached: void address_space_stw_le_cached(MemoryRegionCache *, hwaddr, uint32_t, MemTxAttrs, MemTxResult *): Assertion `addr < cache->len && 2 <= cache->len - addr' failed. #8 0x7f53dabda091 in __as

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: If vhost-user daemon is used as a backend for the vhost device, then we should consider a possibility of disconnect at any moment. If such disconnect happened in the vhost_migration_log() routine the vhost device structure will be clean up. At the start

Re: [PATCH v2 4/5] vhost: check vring address before calling unmap

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Since disconnect can happen at any time during initialization not all vring buffers (for instance used vring) can be intialized successfully. If the buffer was not initialized then vhost_memory_unmap call will lead to SIGSEGV. Add checks for the vring a

Re: [PATCH v2 2/5] vhost: introduce wrappers to set guest notifiers for virtio device

2020-05-10 Thread Jason Wang
On 2020/4/30 下午9:36, Dima Stepanov wrote: Introduce new wrappers to set/reset guest notifiers for the virtio device in the vhost device module: vhost_dev_assign_guest_notifiers ->set_guest_notifiers(..., ..., true); vhost_dev_drop_guest_notifiers ->set_guest_notifiers(..., ...,

Assertion Failure in virtio_net_reset

2020-05-10 Thread Alexander Bulekov
Hello, While fuzzing, I found an input that triggers an assertion failure in virtio-net.c: hw/net/virtio-net.c:533: void virtio_net_reset(VirtIODevice *): Assertion `!virtio_net_get_subqueue(nc)->async_tx.elem' failed. #9 0x55a33fa31b78 in virtio_net_reset hw/net/virtio-net.c:533:13 #10 0x55a33f

Re: [PATCH 6/6] target/ppc: Don't update radix PTE R/C bits with gdbstub

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:27:15PM +0200, Greg Kurz wrote: > gdbstub shouldn't silently change guest visible state when doing address > translation. While here drop a not very useful comment. > > This was found while reading the code. I could verify that this affects > both powernv and pseries, bu

Re: [PATCH] target/ppc: Add support for scv and rfscv instructions

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 09:53:28PM +1000, Nicholas Piggin wrote: > POWER9 adds scv and rfscv instructions and the system call vectored > interrupt. Linux does not support this instruction yet but it has > been tested with a modified kernel that runs on real hardware. > > Signed-off-by: Nicholas Pi

Re: [PATCH 07/10] exec: Move all RAMBlock functions to 'exec/ramblock.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:55PM +0200, Philippe Mathieu-Daudé wrote: > The RAMBlock API was dispersed in 3 different headers. > One of these headers, "exec/ram_addr.h", is restricted > to target dependent code. However these functions are > not target specific. Move all functions into a single >

Re: [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:53PM +0200, Philippe Mathieu-Daudé wrote: > Move these generic functions to a more common place, with other > functions related to host page size. Document a little. > > Cc: Alexey Kardashevskiy > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibs

Re: [PATCH 10/10] exec: Move cpu_physical_memory_* functions to 'exec/memory-internal.h'

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:39:58PM +0200, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David Gibson > --- > include/exec/memory-internal.h | 305 - > include/exec/ram_addr.h| 303 +-

Re: [PATCH 0/6] target/ppc: Various clean-up and fixes for radix64

2020-05-10 Thread David Gibson
On Thu, May 07, 2020 at 07:26:32PM +0200, Greg Kurz wrote: > First three patches of this series are simple cleanups. The other > ones fix some regressions introduced by Cedric's recent addition > of partition-scoped translation. 1-5/6 applied to ppc-for-5.1. I have some comments on 6/6. -- Davi

Re: [PATCH] ppc/pnv: Fix NMI system reset SRR1 value

2020-05-10 Thread David Gibson
On Fri, May 08, 2020 at 10:43:05AM +0200, Greg Kurz wrote: > On Thu, 7 May 2020 23:51:54 +1000 > David Gibson wrote: > > > On Thu, May 07, 2020 at 09:48:24PM +1000, Nicholas Piggin wrote: > > > Commit a77fed5bd926 ("ppc/pnv: Add support for NMI interface") got the > > Please note that the culpri

Re: [PATCH v3 08/10] target/ppc: Use tcg_gen_gvec_rotlv

2020-05-10 Thread David Gibson
On Fri, May 08, 2020 at 08:10:53AM -0700, Richard Henderson wrote: > Cc: David Gibson > Signed-off-by: Richard Henderson Acked-by: David Gibson > --- > target/ppc/helper.h | 4 > target/ppc/int_helper.c | 17 - > target/ppc/translate/vmx-impl.

Re: [PATCH 09/11] target/cpu: Restrict handlers using hwaddr type to system-mode

2020-05-10 Thread David Gibson
On Sat, May 09, 2020 at 03:09:08PM +0200, Philippe Mathieu-Daudé wrote: > Restrict the following handlers to system-mode: > - do_unaligned_access > - do_transaction_failed > - get_phys_page_debug > - get_phys_page_attrs_debug > > Signed-off-by: Philippe Mathieu-Daudé ppc parts Acked-by: David G

Re: [PATCH 05/11] target/ppc: Restrict PPCVirtualHypervisorClass to system-mode

2020-05-10 Thread David Gibson
On Sat, May 09, 2020 at 03:09:04PM +0200, Philippe Mathieu-Daudé wrote: > The code related to PPC Virtual Hypervisor is pointless in user-mode. > > Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson > --- > target/ppc/cpu.h| 4 ++-- > target/ppc/kvm_ppc.h

Re: [PATCH 06/12] hw/pci-host/bonito: Fix DPRINTF() format strings

2020-05-10 Thread chen huacai
Reviewed-by: Huacai Chen On Mon, May 11, 2020 at 5:07 AM Philippe Mathieu-Daudé wrote: > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/pci-host/bonito.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c > index b9bfe

Re: [PATCH 05/12] hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge

2020-05-10 Thread chen huacai
Reviewed-by: Huacai Chen On Mon, May 11, 2020 at 5:03 AM Philippe Mathieu-Daudé wrote: > > From: Philippe Mathieu-Daudé > > Ease the kconfig selection by introducing CONFIG_PCI_BONITO to select > the Bonito North Bridge. > > Reviewed-by: Aleksandar Markovic > Signed-off-by: Philippe Mathieu-Da

Re: [PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread chen huacai
Hi, Philippe, On Mon, May 11, 2020 at 5:06 AM Philippe Mathieu-Daudé wrote: > > We always miswrote the Fuloong machine... Fix its name. > Add an machine alias to the previous name for backward > compatibility. > > Suggested-by: Aleksandar Markovic > Signed-off-by: Philippe Mathieu-Daudé > --- >

Re: [PATCH 03/12] hw/mips/fuloong2e: Move code and update a comment

2020-05-10 Thread chen huacai
Reviewed-by: Huacai Chen On Mon, May 11, 2020 at 5:03 AM Philippe Mathieu-Daudé wrote: > > Move the RAM-related call closer to the RAM creation block, > rename the ROM comment. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/mips/mips_fulong2e.c | 5 ++--- > 1 file changed, 2 insertions(+

Re: [PATCH 02/12] hw/mips/fuloong2e: Rename PMON BIOS name

2020-05-10 Thread chen huacai
Hi, Philippe, On Mon, May 11, 2020 at 5:05 AM Philippe Mathieu-Daudé wrote: > > I'm not sure where 'pmon_fulong2e.bin' comes from. As I always > found this bios named 'pmon_2e.bin', rename the definition. > The Fuloong BIOS doesn't integrated in QEMU, so its name can be anything. So, let's keep

Re: [PATCH v2 5/5] vhost: add device started check in migration set log

2020-05-10 Thread Raphael Norwitz
On Thu, May 7, 2020 at 11:35 AM Dima Stepanov wrote: > > What do you think? > Apologies - I tripped over the if (dev->started && r < 0) check. Never-mind my point with race conditions and failing migrations. Rather than modifying vhost_dev_set_log(), it may be clearer to put a check after vhost_

[NOTFORMERGE PATCH 12/12] POC hw/pci-host/bonito: Fix BONGENCFG value after a warm-reset

2020-05-10 Thread Philippe Mathieu-Daudé
The CPUSELFRESET bit should only be set on COLD reset. To have the PMON firmware behave correctly after WARM reset, we need to clear this bit. Signed-off-by: Philippe Mathieu-Daudé --- Cc: Damien Hedde --- hw/pci-host/bonito.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[PATCH 11/12] hw/pci-host/bonito: Set the Config register reset value with FIELD_DP32

2020-05-10 Thread Philippe Mathieu-Daudé
Describe some Config registers fields with the registerfields API. Use the FIELD_DP32() macro to set the BONGENCFG register bits at reset. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/hw/p

[PATCH 10/12] hw/pci-host/bonito: Better describe the I/O CS regions

2020-05-10 Thread Philippe Mathieu-Daudé
Better describe the I/O CS regions, add the ROMCS region. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 90a6c52a38..335c7787eb 100644 --- a/hw/pci

[PATCH 09/12] hw/pci-host/bonito: Map the different PCI ranges more detailled

2020-05-10 Thread Philippe Mathieu-Daudé
Better describe the Bonito64 MEM HI/LO and I/O PCI ranges, add more PCI regions as unimplemented. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/

[PATCH 07/12] hw/pci-host/bonito: Map peripheral using physical address

2020-05-10 Thread Philippe Mathieu-Daudé
Peripherals are mapped at physical address on busses. Only CPU/IOMMU can use virtual addresses. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index 10ead31e4f..7ed

[PATCH 06/12] hw/pci-host/bonito: Fix DPRINTF() format strings

2020-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c index b9bfe3c417..10ead31e4f 100644 --- a/hw/pci-host/bonito.c +++ b/hw/pci-host/bonito.c @@ -239,7 +239,7 @@ static

[PATCH 04/12] hw/mips/fuloong2e: Fix typo in Fuloong machine name

2020-05-10 Thread Philippe Mathieu-Daudé
We always miswrote the Fuloong machine... Fix its name. Add an machine alias to the previous name for backward compatibility. Suggested-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- docs/system/target-mips.rst | 2 +- default-configs/mips64el-softmmu.mak |

[PATCH 02/12] hw/mips/fuloong2e: Rename PMON BIOS name

2020-05-10 Thread Philippe Mathieu-Daudé
I'm not sure where 'pmon_fulong2e.bin' comes from. As I always found this bios named 'pmon_2e.bin', rename the definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_fulong2e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_

[PATCH 08/12] hw/pci-host/bonito: Map all the Bonito64 I/O range

2020-05-10 Thread Philippe Mathieu-Daudé
To ease following guest accesses to the Bonito64 chipset, map its I/O range as UnimplementedDevice. We can now see the accesses to unimplemented peripheral using the '-d unimp' command line option. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/bonito.c | 3 +++ hw/pci-host/Kconfig | 1 +

[PATCH 01/12] MAINTAINERS: Add Huacai Chen as fuloong2e co-maintainer

2020-05-10 Thread Philippe Mathieu-Daudé
From: Huacai Chen I submitted the MIPS/fuloong2e support about ten years ago, and after that I became a MIPS kernel developer. Last year, Philippe Mathieu- Daudé asked me that whether I can be a reviewer of MIPS/fuloong2e, and I promised that I will do some QEMU work in the next year (i.e., 2020

[PATCH 03/12] hw/mips/fuloong2e: Move code and update a comment

2020-05-10 Thread Philippe Mathieu-Daudé
Move the RAM-related call closer to the RAM creation block, rename the ROM comment. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/mips_fulong2e.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index f067fa9720..4e1a3

[PATCH 05/12] hw/pci-host: Use CONFIG_PCI_BONITO to select the Bonito North Bridge

2020-05-10 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Ease the kconfig selection by introducing CONFIG_PCI_BONITO to select the Bonito North Bridge. Reviewed-by: Aleksandar Markovic Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/Kconfig | 1 + hw/pci-host/Kconfig | 4 hw/pci-host/Makefile.objs

[PATCH 00/12] hw/mips/fuloong2e: PoC to fix hang after reboot

2020-05-10 Thread Philippe Mathieu-Daudé
The PMON firmware behave differently regarding it is run after a cold/warm reset. A simple bit flip fix the issue, however we need to know the type of reset to set it. Currently QEMU only supports COLD reset. This series contains various of my current Fuloong queue, - Welcome Huacai Chen as co-mai

[PATCH] hw/registerfields: Prefix local variables with underscore in macros

2020-05-10 Thread Philippe Mathieu-Daudé
One can name a local variable holding a value as 'v', but it currently clashes with the registerfields macros. To save others to debug the same mistake, prefix the macro's local variables with an underscore. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/registerfields.h | 40 +

Re: [PATCH v4 08/10] hw/core/resettable: add support for warm reset

2020-05-10 Thread Philippe Mathieu-Daudé
Hi Damien, On 8/21/19 6:33 PM, Damien Hedde wrote: Add the RESET_TYPE_WARM reset type. Expand the actual implementation to support several types. I used values which can be or'ed together. This way we can what reset has been triggered. Documentation is added in a following patch. Signed-off-b

Re: [PATCH 0/3] plugins: Move declarations around and rename 'hwaddr' argument

2020-05-10 Thread Emilio G. Cota
On Sun, May 10, 2020 at 19:11:16 +0200, Philippe Mathieu-Daudé wrote: > Rename qemu_plugin_hwaddr_is_io() 'hwaddr' argument to later > allow declaration of the 'hwaddr' type to be poisoned (see [*]). > > [*] https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg02254.html > "exec/cpu: Poiso

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-10 Thread Heiko Sieger
I upgraded to QEMU emulator version 5.0.50 Using q35-5.1 (the latest) and the following libvirt configuration: 50331648 50331648 24 hvm /usr/sha

[PATCH 10/10] ui/gtk: use native keyboard scancodes on Windows

2020-05-10 Thread Volker Rümelin
Since GTK 3.22 the function gdk_event_get_scancode() is available. On Windows this function returns keyboard scancodes and some extended flags. These raw keyboard scancodes are much better suited for this use case than the half-cooked win32 virtual-key codes because scancodes report the key positio

[PATCH 09/10] ui/gtk: don't pass on win keys without keyboard grab

2020-05-10 Thread Volker Rümelin
This patch applies commit c68f74b02e "win32: do not handle win keys when the keyboard is not grabbed" from project spice-gtk to ui/gtk.c. Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 5a25e3fa4c..a

[PATCH 08/10] ui/sdl2-input: use trace-events to debug key events

2020-05-10 Thread Volker Rümelin
Signed-off-by: Volker Rümelin --- ui/sdl2-input.c | 3 +++ ui/trace-events | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ui/sdl2-input.c b/ui/sdl2-input.c index 1f9fe831b3..f068382209 100644 --- a/ui/sdl2-input.c +++ b/ui/sdl2-input.c @@ -27,6 +27,7 @@ #include "ui/console.h" #include

[PATCH 04/10] ui/gtk: remove unused code

2020-05-10 Thread Volker Rümelin
This code was last used before commit 2ec78706d1 "ui: convert GTK and SDL1 frontends to keycodemapdb". Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 9 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 5de2a75691..c70bfc2be4 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -

[Bug 1877794] Re: Constant Folding on 64-bit Subtraction causes SIGILL on linux-user glxgears ppc64le to x86_64 by way of generating bad shift instruction with c=-1

2020-05-10 Thread Catherine A. Frederick
I'm on 5.0-rc4 add a few patches implementing a subset of drm/amdgpu support, with mesa-utils 8.4.0-1. Important note I guess: I can't get the crash to trigger under llvmpipe/softrast, I can only get it on RadeonSI. I valgrind'd qemu only to not find anything on the host-side. I'm 99% sure this isn

[PATCH 06/10] ui/sdl2: fix handling of AltGr key on Windows

2020-05-10 Thread Volker Rümelin
Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by: Volker Rümelin --- ui/sdl2.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/ui/sdl2.c b/ui/sdl2.c index 3c9424eb42..ec1cb8131f 100644 --- a/ui/sdl2.c +

[PATCH 07/10] ui/sdl2: start in full screen with grab enabled

2020-05-10 Thread Volker Rümelin
To do it's work the sdl_grab_start() function needs a pointer to a sdl2_console structure. Signed-off-by: Volker Rümelin --- ui/sdl2.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/sdl2.c b/ui/sdl2.c index ec1cb8131f..c88ac97a79 100644 --- a/ui/sdl2.c +++ b/ui/s

Re: [PATCH 2/2] 9pfs: fix init_in_iov_from_pdu truncating size

2020-05-10 Thread Christian Schoenebeck
On Sonntag, 10. Mai 2020 19:18:21 CEST Christian Schoenebeck wrote: > Commit SHA-1 16724a173049ac29c7b5ade741da93a0f46edff7 introduced > truncating the response to the currently available transport buffer > size, which was supposed to fix an 9pfs error on Xen boot where > transport buffer might sti

[PATCH 02/10] ui/gtk: fix handling of AltGr key on Windows

2020-05-10 Thread Volker Rümelin
Wire up the keyboard hooking code on Windows to fix the AltGr key and improve keyboard grabbing. Signed-off-by: Volker Rümelin --- ui/gtk.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 83f2f5d49b..68c63532b1 100644 -

[PATCH 05/10] ui/gtk: remove unused variable ignore_keys

2020-05-10 Thread Volker Rümelin
Since the removal of GTK2 code the code around ignore_keys is unused. See commit 1a01716a30 "gtk: Avoid accel key leakage into guest on console switch" why it was needed before. Signed-off-by: Volker Rümelin --- ui/gtk.c | 9 - 1 file changed, 9 deletions(-) diff --git a/ui/gtk.c b/ui/g

[PATCH 01/10] ui/win32-kbd-hook: handle AltGr in a hook procedure

2020-05-10 Thread Volker Rümelin
Import win32 keyboard hooking code from project spice-gtk. This patch removes the extra left control key up/down input events inserted by Windows for the right alt key up/down input events with international keyboard layouts. Additionally there's some code to grab the keyboard. The next patches wi

[PATCH 03/10] ui/gkt: release all keys on grab-broken-event

2020-05-10 Thread Volker Rümelin
There is no way to grab the Ctrl-Alt-Del key combination on Windows. This key combination will leave all three keys in a stuck condition. This patch uses the grab-broken-event to release the keys. Signed-off-by: Volker Rümelin --- ui/gtk.c | 16 1 file changed, 16 insertions(+)

Patches for ui/gtk and ui/sdl

2020-05-10 Thread Volker Rümelin
It's rather difficult to test qemu patches in guests on Windows with important keys missing. These patches mainly fix the guest keyboard on Windows. With best regards, Volker

[PATCH 1/2] xen-9pfs: Fix log messages of reply errors

2020-05-10 Thread Christian Schoenebeck
If delivery of some 9pfs response fails for some reason, log the error message by mentioning the 9P protocol reply type, not by client's request type. The latter could be misleading that the error occurred already when handling the request input. Signed-off-by: Christian Schoenebeck --- hw/9pfs/

[PATCH 0/2] 9pfs: regression init_in_iov_from_pdu truncating size

2020-05-10 Thread Christian Schoenebeck
Stefano, looks like your original patch needs some more fine tuning: https://bugs.launchpad.net/bugs/1877688 Please check if the assumptions I made about Xen are correct, and please also test whether these changes still work for you with Xen as intended by you. Christian Schoenebeck (2): xen-9

[PATCH 2/2] 9pfs: fix init_in_iov_from_pdu truncating size

2020-05-10 Thread Christian Schoenebeck
Commit SHA-1 16724a173049ac29c7b5ade741da93a0f46edff7 introduced truncating the response to the currently available transport buffer size, which was supposed to fix an 9pfs error on Xen boot where transport buffer might still be smaller than required for response. Unfortunately this change broke s

[Bug 1856335] Re: Cache Layout wrong on many Zen Arch CPUs

2020-05-10 Thread Damir
Hello, I took a look today at the layouts when using 1950X (which previously worked, and yes, admittedly, I am using Windows / coreinfo), and any basic config (previously something simple as Sockets=1,Cores=8, Theads=1 (now also Dies=1) worked, but now, the topology presents as if all cores share

Re: [PATCH] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-05-10 Thread Ani Sinha
> On Apr 29, 2020, at 9:02 PM, Igor Mammedov wrote: > > On Fri, 24 Apr 2020 14:44:48 -0400 > Eduardo Habkost wrote: > >> On Fri, Apr 24, 2020 at 03:23:56PM +, Ani Sinha wrote: >>> >>> On Apr 22, 2020, at 4:15 PM, Ani Sinha wrote: > On Apr 21, 2020, at 8:32 PM

[PATCH 1/3] qemu/plugin: Trivial code movement

2020-05-10 Thread Philippe Mathieu-Daudé
Move the qemu_plugin_event enum declaration earlier. This will make the next commit easier to review. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/plugin.h | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/include/qemu/plugin.h b/inc

[PATCH 3/3] qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument const

2020-05-10 Thread Philippe Mathieu-Daudé
Rename qemu_plugin_hwaddr_is_io() address argument 'haddr' similarly to qemu_plugin_hwaddr_device_offset(), and make it const. Signed-off-by: Philippe Mathieu-Daudé --- Having the variable named similarly to the 'hwaddr' typedef is slighly confusing. Also if we declare 'hwaddr' typedef poisoned,

[PATCH 2/3] qemu/plugin: Move !CONFIG_PLUGIN stubs altogether

2020-05-10 Thread Philippe Mathieu-Daudé
Simplify the ifdef'ry by moving all stubs together. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/plugin.h | 33 +++-- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index e45f950fe3..ab790ad105 1

[PATCH 0/3] plugins: Move declarations around and rename 'hwaddr' argument

2020-05-10 Thread Philippe Mathieu-Daudé
Rename qemu_plugin_hwaddr_is_io() 'hwaddr' argument to later allow declaration of the 'hwaddr' type to be poisoned (see [*]). [*] https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg02254.html "exec/cpu: Poison 'hwaddr' type in user-mode emulation" Philippe Mathieu-Daudé (3): qemu/plug

some fun with -vga virtio or -display gtk,gl=on

2020-05-10 Thread Michael Tokarev
Hi! I'm seeing somewhat strange behavior of the mentioned options. First is -vga virtio and regular gtk display - qemu opens initial window of size 640x480 (I think anyway), and this window stays of that size, at least while booting windows 10 (it uses stdvga driver), - it is not being resized wh

[PATCH 5/7] hw/misc/empty_slot: Convert debug printf() to trace event

2020-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 19 --- hw/core/trace-events | 4 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 576b276c4b..d28f7f99c9 100644 --- a/hw/core/empty_slot.c +++

[PATCH 4/7] hw/misc/empty_slot: Add a 'name' qdev property

2020-05-10 Thread Philippe Mathieu-Daudé
Add a 'name' qdev property so when multiple slots are accessed, we can notice which one is accessed. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 0df086fe

[PATCH 3/7] hw/misc/empty_slot: Convert 'size' field as qdev property

2020-05-10 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/core/empty_slot.c b/hw/core/empty_slot.c index 5ab426e965..0df086fe98 100644 --- a/hw/core/empty_slot.c +++ b/hw/core/empty_slot.c @@ -12,6 +12,7 @

[PATCH 6/7] hw/misc/empty_slot: Move the 'hw/misc' and cover in MAINTAINERS

2020-05-10 Thread Philippe Mathieu-Daudé
As this device model is very similar to the UnimplementedDevice, maintain them altogether. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/empty_slot.h| 9 - include/hw/misc/empty_slot.h | 19 +++ hw/mips/mips_malta.c | 2 +- hw/{core => misc}/e

[PATCH 2/7] hw/misc/empty_slot: Lower address space priority

2020-05-10 Thread Philippe Mathieu-Daudé
Empty slots model RAZ/WI access on a bus. Since we can still (hot) plug devices on the bus, lower the slot priority, so device added later is accessed first. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/empty_slot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core

[PATCH 0/7] hw/misc/empty_slot: Spring cleaning

2020-05-10 Thread Philippe Mathieu-Daudé
New Spring, new opportunity to clean this device :) (v1 was in 2018, v2 in 2019). - lower device priority - follow qdev model and use properties - convert to trace events - describe with slot name - move under hw/misc/ and cover in MAINTAINERS Peter, I hope you are OK adding it wit UNIMP device,

[PATCH 7/7] hw/misc/empty_slot: Name the slots when created

2020-05-10 Thread Philippe Mathieu-Daudé
Directly set the slot name when creating the device, to display the device name in trace events. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/empty_slot.h | 2 +- hw/mips/mips_malta.c | 2 +- hw/misc/empty_slot.c | 2 +- hw/sparc/sun4m.c | 10 +++--

[PATCH 1/7] hw/sparc/sun4m: Use UnimplementedDevice for I/O devices

2020-05-10 Thread Philippe Mathieu-Daudé
These devices are not slots on a bus, but real I/O devices that we do not implement. As the ISDN ROM would be a ROMD device, also model it as UnimplementedDevice. Reviewed-by: Artyom Tarasenko Signed-off-by: Philippe Mathieu-Daudé --- hw/sparc/sun4m.c | 11 +++ 1 file changed, 7 inserti

Re: [PATCH v6 00/14] LUKS: encryption slot management using amend interface

2020-05-10 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200510134037.18487-1-mlevi...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200510134037.18487-1-mlevi...@redhat.com Subject: [PATCH v6 00/14] LUKS: encryption slot management

  1   2   >