Re: [Qemu-devel] [PATCH v5 13/17] target/arm: Split out arm_mmu_idx_el

2019-09-06 Thread Philippe Mathieu-Daudé
On 8/20/19 11:07 PM, Richard Henderson wrote: > Avoid calling arm_current_el() twice. > > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé > --- > target/arm/internals.h | 9 + > target/arm/helper.c| 12 +++- > 2 files changed, 16 insertions(+), 5 dele

Re: [Qemu-devel] [PATCH] Check correct register for clock source

2019-09-06 Thread Cédric Le Goater
On 06/09/2019 03:16, Joel Stanley wrote: > On Fri, 6 Sep 2019 at 01:10, Amithash Prasad wrote: >> >> When WDT_RESTART is written, the data is not the contents >> of the WDT_CTRL register. Hence ensure we are looking at >> WDT_CTRL to check if bit WDT_CTRL_1MHZ_CLK is set or not. >> >> Signed-off-b

[Qemu-devel] [PATCH v2 01/28] s390x/tcg: Reset exception_index to -1 instead of 0

2019-09-06 Thread David Hildenbrand
We use the marker "-1" for "no exception". s390_cpu_do_interrupt() might get confused by that. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 29fc

[Qemu-devel] [PATCH v2 00/28] s390x/tcg: mem_helper: Fault-safe handling

2019-09-06 Thread David Hildenbrand
This is the successor of "[PATCH v1 0/4] s390x/tcg: MOVE (MVC): Fault-safe handling" This series fixes a bunch of issues related to some mem helpers and makes sure that they are fault-safe, meaning no system state is modified in case a fault is triggered. I can spot tons of other issues

[Qemu-devel] [PATCH v2 05/28] s390x/tcg: MVC: Increment the length once

2019-09-06 Thread David Hildenbrand
Let's increment the length once. While at it, cleanup the comment. The memset() example is given as a programming note in the PoP, so drop the description. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 20 1 file changed, 1

[Qemu-devel] [PATCH v2 08/28] s390x/tcg: MVPG: Properly wrap the addresses

2019-09-06 Thread David Hildenbrand
We have to mask of any unused bits. While at it, document what exactly is missing. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index a763482ae0

[Qemu-devel] [PATCH v2 03/28] s390x/tcg: MVCL: Detect destructive overlaps

2019-09-06 Thread David Hildenbrand
We'll have to zero-out unused bit positions, so amke sure to write the addresses back. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c inde

[Qemu-devel] [PATCH v2 02/28] s390x/tcg: MVCL: Zero out unused bits of address

2019-09-06 Thread David Hildenbrand
We have to zero out unused bits in 24 and 31-bit addressing mode. Provide a new helper. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper

[Qemu-devel] [PATCH v2 09/28] s390x/tcg: MVCLU/MVCLE: Process max 4k bytes at a time

2019-09-06 Thread David Hildenbrand
... and indicate cc=3 in case there is work remaining. Keep unicode padding simple. While reworking, properly wrap the addresses. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 54 ++- 1 file changed, 31 insertions(+), 23 deletions(-) diff

[Qemu-devel] [PATCH v2 10/28] s390x/tcg: MVCS/MVCP: Check for special operation exceptions

2019-09-06 Thread David Hildenbrand
Let's perform the documented checks. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 12 1 file changed, 12 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 6d8ebd18fa..041d01d63d 100644 --- a/target/s390x/mem_helper.c +++ b/ta

[Qemu-devel] [PATCH v2 04/28] s390x/tcg: MVCL: Process max 2k bytes at a time

2019-09-06 Thread David Hildenbrand
Process max 2k bytes at a time, writing back registers between the accesses. The instruction is interruptible. "For operands longer than 2K bytes, access exceptions are not recognized for locations more than 2K bytes beyond the current location being processed." MVCL handling is quite

[Qemu-devel] [PATCH v2 12/28] s390x/tcg: MVST: Check for specification exceptions

2019-09-06 Thread David Hildenbrand
Bit position 32-55 of general register 0 must be zero. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index de5e69b500..afcd452a00 100644 --- a/target/s390x/mem_helper.c +

[Qemu-devel] [PATCH v2 11/28] s390x/tcg: MVCS/MVCP: Properly wrap the length

2019-09-06 Thread David Hildenbrand
... and don't perform any move in case the length is zero. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 041d01d63d..de5e69b500 100644 --- a/target/s390x/mem_hel

[Qemu-devel] [PATCH v2 07/28] s390x/tcg: MVPG: Check for specification exceptions

2019-09-06 Thread David Hildenbrand
Perform the checks documented in the PoP. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 3c23c403cd..a763482ae0 100644 --- a/target/s390x/mem_helper.c +++ b/targ

[Qemu-devel] [PATCH v2 06/28] s390x/tcg: MVC: Use is_destructive_overlap()

2019-09-06 Thread David Hildenbrand
Let's use the new helper, that also detects destructive overlaps when wrapping. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2bc2cd09c1..3c23c403cd 10

[Qemu-devel] [PATCH v2 13/28] s390x/tcg: MVST: Fix storing back the addresses to registers

2019-09-06 Thread David Hildenbrand
24 and 31-bit address space handling is wrong when it comes to storing back the addresses to the register. Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 2 +- target/s390x/insn-data.def | 2 +- target/s390x/mem_helper.c | 20 target/s390x/translate.c

[Qemu-devel] [PATCH v2 23/28] s390x/tcg: MVCIN: Fault-safe handling

2019-09-06 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Calculate the accessed range upfront - src is accessed right-to-left. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_hel

[Qemu-devel] [PATCH v2 18/28] s390x/tcg: MVC: Fault-safe handling on destructive overlaps

2019-09-06 Thread David Hildenbrand
The last remaining bit for MVC is handling destructive overlaps in a fault-safe way. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 26

[Qemu-devel] [PATCH v2 17/28] s390x/tcg: MVCS/MVCP: Use access_memmove_idx()

2019-09-06 Thread David Hildenbrand
As we are moving between address spaces, we can use access_memmove_idx() without checking for destructive overlaps (especially of real storage locations): "Each storage operand is processed left to right. The storage-operand-consistency rules are the same as for MOVE (MVC), except that

[Qemu-devel] [PATCH v2 14/28] s390x/tcg: Always use MMU_USER_IDX for CONFIG_USER_ONLY

2019-09-06 Thread David Hildenbrand
Although we basically ignore the index all the time for CONFIG_USER_ONLY, let's simply skip all the checks and always return MMU_USER_IDX in cpu_mmu_index() and get_mem_index(). Signed-off-by: David Hildenbrand --- target/s390x/cpu.h | 4 target/s390x/translate.c | 4 2 files cha

[Qemu-devel] [PATCH v2 24/28] s390x/tcg: MVN: Fault-safe handling

2019-09-06 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index ba8a657e18..5e38b2c4d8 10064

[Qemu-devel] [PATCH v2 19/28] s390x/tcg: MVCLU: Fault-safe handling

2019-09-06 Thread David Hildenbrand
The last remaining bit is padding with two bytes. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index f636f3a011..0366cbc753 100644 --- a/target/s390

[Qemu-devel] [PATCH v2 16/28] s390x/tcg: Fault-safe memmove

2019-09-06 Thread David Hildenbrand
Replace fast_memmove() variants by access_memmove() variants, that first try to probe access to all affected pages (maximum is two pages). In MVCOS, simply always call access_memmove_as() and drop the TODO about LAP. LAP is already handled in the MMU. Get rid of adj_len_to_page(), which is now un

[Qemu-devel] [PATCH v2 15/28] s390x/tcg: Fault-safe memset

2019-09-06 Thread David Hildenbrand
Replace fast_memset() by access_memset(), that first tries to probe access to all affected pages (maximum is two). We'll use the same mechanism for other types of accesses soon. Only in very rare cases (especially TLB_NOTDIRTY), we'll have to fallback to ld/st helpers. Signed-off-by: David Hilden

Re: [Qemu-devel] [PATCH v6 1/4] block: Add zoned device model property

2019-09-06 Thread Stefano Garzarella
On Wed, Sep 04, 2019 at 05:00:57PM -0400, Dmitry Fomichev wrote: > This commit adds Zoned Device Model (as defined in T10 ZBC and > T13 ZAC standards) as a block driver property, along with some > useful access functions. > > A new backend driver permission, BLK_PERM_SUPPORT_HM_ZONED, is also > in

[Qemu-devel] [PATCH v2 22/28] s390x/tcg: NC: Fault-safe handling

2019-09-06 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 88ff6c21ed..49b4879859 10064

[Qemu-devel] [PATCH v2 20/28] s390x/tcg: OC: Fault-safe handling

2019-09-06 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0366cbc753..ff57fec8de 10064

[Qemu-devel] [PATCH v2 21/28] s390x/tcg: XC: Fault-safe handling

2019-09-06 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. While at it, increment the length once. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_h

[Qemu-devel] [PATCH v2 25/28] s390x/tcg: MVZ: Fault-safe handling

2019-09-06 Thread David Hildenbrand
We can process a maximum of 256 bytes, crossing two pages. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 5e38b2c4d8..4c67c6f37e 10064

[Qemu-devel] [PATCH v2 26/28] s390x/tcg: MVST: Fault-safe handling

2019-09-06 Thread David Hildenbrand
Access at most single pages and document why. Using the access helpers might over-indicate watchpoints within the same page, I guess we can live with that. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-

[Qemu-devel] [PATCH v2 27/28] s390x/tcg: MVO: Fault-safe handling

2019-09-06 Thread David Hildenbrand
Each operand can have a maximum length of 16. Make sure to prepare all reads/writes before writing. Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s

[Qemu-devel] [PATCH v2 28/28] tests/tcg: target/s390x: Test MVO

2019-09-06 Thread David Hildenbrand
Let's add the simple test based on the example from the PoP. Signed-off-by: David Hildenbrand --- tests/tcg/s390x/Makefile.target | 1 + tests/tcg/s390x/mvo.c | 25 + 2 files changed, 26 insertions(+) create mode 100644 tests/tcg/s390x/mvo.c diff --git a/test

Re: [Qemu-devel] [PATCH] memory: Set notdirty_mem_ops validator

2019-09-06 Thread Philippe Mathieu-Daudé
On 9/2/19 3:26 AM, Tony Nguyen wrote: > Existing read rejecting validator was mistakenly cleared. > > Reads dispatched to io_mem_notdirty then segfaults as there is no read > handler. > > Signed-off-by: Tony Nguyen > --- > exec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

[Qemu-devel] [PATCH v18 1/6] hw/arm/virt: Introduce RAS platform version and RAS machine option

2019-09-06 Thread Xiang Zheng
From: Dongjiu Geng Support RAS Virtualization feature since version 4.2, disable it by default in the old versions. Also add a machine option which allows user to enable it explicitly. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- hw/arm/virt.c | 33 ++

[Qemu-devel] [PATCH v18 5/6] target-arm: kvm64: inject synchronous External Abort

2019-09-06 Thread Xiang Zheng
From: Dongjiu Geng Introduce kvm_inject_arm_sea() function in which we will setup the type of exception and the syndrome information in order to inject a virtual synchronous external abort. When switching to guest, it will jump to the synchronous external abort vector table entry. The ESR_ELx.DF

[Qemu-devel] [PATCH v18 2/6] docs: APEI GHES generation and CPER record description

2019-09-06 Thread Xiang Zheng
From: Dongjiu Geng Add APEI/GHES detailed design document Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- docs/specs/acpi_hest_ghes.txt | 88 +++ 1 file changed, 88 insertions(+) create mode 100644 docs/specs/acpi_hest_ghes.txt diff --git a/docs/sp

[Qemu-devel] [PATCH v18 0/6] Add ARMv8 RAS virtualization support in QEMU

2019-09-06 Thread Xiang Zheng
In the ARMv8 platform, the CPU error types are synchronous external abort(SEA) and SError Interrupt (SEI). If exception happens in guest, sometimes it's better for guest to perform the recovery, because host does not know the detailed information of guest. For example, if an exception happens in a

[Qemu-devel] [PATCH v18 4/6] KVM: Move hwpoison page related functions into include/sysemu/kvm_int.h

2019-09-06 Thread Xiang Zheng
From: Dongjiu Geng kvm_hwpoison_page_add() and kvm_unpoison_all() will both be used by X86 and ARM platforms, so moving them into "include/sysemu/kvm_int.h" to avoid duplicate code. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- accel/kvm/kvm-all.c | 33 ++

[Qemu-devel] [PATCH v18 6/6] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2019-09-06 Thread Xiang Zheng
From: Dongjiu Geng Add a SIGBUS signal handler. In this handler, it checks the SIGBUS type, translates the host VA delivered by host to guest PA, then fills this PA to guest APEI GHES memory, then notifies guest according to the SIGBUS type. If guest accesses the poisoned memory, it generates Sy

[Qemu-devel] [PATCH v18 3/6] ACPI: Add APEI GHES table generation support

2019-09-06 Thread Xiang Zheng
From: Dongjiu Geng This patch implements APEI GHES Table generation via fw_cfg blobs. Now it only supports ARMv8 SEA, a type of GHESv2 error source. Afterwards, we can extend the supported types if needed. For the CPER section, currently it is memory section because kernel mainly wants userspace

[Qemu-devel] [PATCH v3] ui: add an embedded Barrier client

2019-09-06 Thread Laurent Vivier
This allows to receive mouse and keyboard events from a Barrier server. This is enabled by adding the following parameter on the command line ... -object input-barrier,id=$id,name=$name ... Where $name is the name declared in the screens section of barrier.conf The barrier server (barriers)

[Qemu-devel] Cross-posted : Odd QXL/KVM performance issue with a Windows 7 Guest

2019-09-06 Thread Brad Campbell
On 2/9/19 6:23 pm, Brad Campbell wrote: Here is the holdup : 11725@1567416625.003504:qxl_ring_command_check 0 native 11725@1567416625.102653:qxl_io_write 0 native addr=0 (QXL_IO_NOTIFY_CMD) val=0 size=1 async=0 ~100ms delay prior to each logged QXL_IO_NOTIFY_CMD on the AMD box which explai

Re: [Qemu-devel] [RFC Patch] xen/pt: Emulate FLR capability

2019-09-06 Thread Chao Gao
On Thu, Aug 29, 2019 at 12:21:11PM +0200, Roger Pau Monné wrote: >On Thu, Aug 29, 2019 at 05:02:27PM +0800, Chao Gao wrote: >> Currently, for a HVM on Xen, no reset method is virtualized. So in a VM's >> perspective, assigned devices cannot be reset. But some devices rely on PCI >> reset to recover

Re: [Qemu-devel] QEMU as ISS (Instruction Set Simulator)

2019-09-06 Thread Alex Bennée
Libo Zhou writes: > Hi Alex, > > > I just need to log the registers and memory after the program finishes > its execution. Is it possible to add this functionality myself? You'll need to set some sort of breakpoint on the last instruction so gdb can inspect things before the program is unloade

Re: [Qemu-devel] [RFC Patch] xen/pt: Emulate FLR capability

2019-09-06 Thread Paul Durrant
> -Original Message- > From: Chao Gao > Sent: 06 September 2019 10:01 > To: Roger Pau Monne > Cc: xen-de...@lists.xenproject.org; qemu-devel@nongnu.org; Stefano Stabellini > ; Anthony Perard ; Paul > Durrant > ; Jan Beulich > Subject: Re: [RFC Patch] xen/pt: Emulate FLR capability > >

Re: [Qemu-devel] [PULL 0/4] Docs patches

2019-09-06 Thread Daniel P . Berrangé
On Thu, Sep 05, 2019 at 04:34:33PM +0100, Peter Maydell wrote: > On Thu, 5 Sep 2019 at 14:45, Daniel P. Berrangé wrote: > > > > The following changes since commit 500efcfcf0fe2e0dae1d25637a13435ce7b6e421: > > > > Merge remote-tracking branch 'remotes/rth/tags/pull-or1k-20190904' into > > stagin

Re: [Qemu-devel] [PATCH v3] target/xtensa: linux-user: add call0 ABI support

2019-09-06 Thread Laurent Vivier
Le 26/08/2019 à 21:58, Max Filippov a écrit : > Xtensa binaries built for call0 ABI don't rotate register window on > function calls and returns. Invocation of signal handlers from the > kernel is therefore different in windowed and call0 ABIs. > There's currently no way to determine xtensa ELF bin

Re: [Qemu-devel] [EXTERNAL][PATCH for 4.2 v4 12/12] linux-user: Add support for semtimedop() syscall

2019-09-06 Thread Laurent Vivier
Le 31/07/2019 à 20:22, Aleksandar Markovic a écrit : >> From: Aleksandar Rikalo >> >> Add support for semtimedop() emulation. It is based on invocation >> of safe_semtimedop(). > > Hi, Laurent, > > Aleksandar R. is considering submitting this part too: > > diff --git a/linux-user/syscall.c b/li

Re: [Qemu-devel] slirp, incoming packets get truncated

2019-09-06 Thread Samuel Thibault
Hello, Chris Heinze, le mar. 03 sept. 2019 17:02:15 +0200, a ecrit: > on the guest: > root@guest:~# tcpdump -ni eth0 port 19003 > tcpdump: verbose output suppressed, use -v or -vv for full protocol decode > listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes > 16:49:39.430959

Re: [Qemu-devel] [PATCH v6 1/8] linux-user: Add support for semtimedop() syscall

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Rikalo > > Add support for semtimedop() emulation. It is based on invocation > of safe_semtimedop(). > > Conversion is left out of safe_semtimedop(), since other safe_xxx() > usually don't contain similar conversions. > > S

Re: [Qemu-devel] [PATCH v2 0/5] fixed up semihosting fixups

2019-09-06 Thread Peter Maydell
On Wed, 4 Sep 2019 at 12:22, Alex Bennée wrote: > > Hi Peter, > > Here is version 2 of the ARM semi-hosting cleanup patches. The re-base > had failed due to a change in the gen_exception_internal_insn API > which now takes the PC instead of offset from pc_next. There is also > the a minor indentat

Re: [Qemu-devel] [PATCH v2 0/6] hw/arm: Use ARM_CPU_TYPE_NAME() and object_initialize_child()

2019-09-06 Thread Peter Maydell
On Fri, 23 Aug 2019 at 15:33, Philippe Mathieu-Daudé wrote: > > First we use ARM_CPU_TYPE_NAME() when we should. > > Then is follow up of [1]: > > This series looks at Eduardo suggestions from [2] > and Thomas commit aff39be0ed97 to replace various > object_initialize + qdev_set_parent_bus c

Re: [Qemu-devel] [PATCH 10/14] hw/arm/raspi: Define various blocks base addresses

2019-09-06 Thread Philippe Mathieu-Daudé
On 9/4/19 7:13 PM, Philippe Mathieu-Daudé wrote: > The Raspberry firmware is closed-source. While running it, it > accesses various I/O registers. Logging these accesses as UNIMP > (unimplemented) help to understand what the firmware is doing > (ideally we want it able to boot a Linux kernel). > >

Re: [Qemu-devel] [RFC 2/3] intc/arm_gic: Support PPI injection for more than 256 vpus

2019-09-06 Thread Peter Maydell
On Tue, 3 Sep 2019 at 09:40, Auger Eric wrote: > I guess arm_cpu_kvm_set_irq attempting to inject IRQ/FIQ into KVM is > used with userspace GIC emulation, which is not supported along with > GICv3. But anyway, I guess it does not hurt to set vcpu_index2 in > arm_cpu_kvm_set_irq? Having now got up

Re: [Qemu-devel] [RFC 3/3] virt: Check KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 for smp_cpus > 256

2019-09-06 Thread Peter Maydell
On Tue, 27 Aug 2019 at 17:06, Eric Auger wrote: > > Host kernel within [4.18, 5.3] report an erroneous KVM_MAX_VCPUS=512 > for ARM. The actual capability to instantiate more than 256 vcpus > was fixed in 5.4 with the upgrade of the KVM_IRQ_LINE ABI to support > vcpu id encoded on 12 bits instead o

Re: [Qemu-devel] [PATCH v6 3/8] linux-user: Add support for FIOGETOWN and FIOSETOWN ioctls

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FIOGETOWN and FIOSETOWN ioctls have platform-specific definitions, > hence non-standard definition in QEMU too. > > Other than that, they both have a single integer argument, and their > functionality is emulate

Re: [Qemu-devel] [PATCH v6 5/8] linux-user: Add support for FDMSGON and FDMSGOFF ioctls

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDMSGON and FDMSGOFF switch informational messages of floppy drives > on and off. > > Signed-off-by: Aleksandar Markovic > Reviewed-by: Laurent Vivier > --- > linux-user/ioctls.h | 2 ++ > linux-user/sy

Re: [Qemu-devel] [PATCH v1 00/42] current testing/next queue (podman, docker, ci)

2019-09-06 Thread Alex Bennée
Alex Bennée writes: > Hi All, > > > Please review ;-) The following still need review: unreviewed - 3bf0fc78ddf - Alex Bennée: configure: check if --no-pie is supported first unreviewed - 91debbbd08e - Alex Bennée: tests/docker: add more images to PARTIAL_IMAGES when not on x86_64 unreview

Re: [Qemu-devel] [PATCH v6 6/8] linux-user: Add support for FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls are misc commands > for controlling a floppy drive. > > Signed-off-by: Aleksandar Markovic > --- > linux-user/ioctls.h | 4 > linux-user/syscall_defs

Re: [Qemu-devel] [RFC 2/3] virtiofsd: add DBus server to handle log level changes

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 06:27:32PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > Introduce a DBus server thread that runs alongside the other virtiofsd > > threads. It processes changes to the /org/qemu/virtiofsd object which > > can be accessed at the o

Re: [Qemu-devel] [RFC Patch] xen/pt: Emulate FLR capability

2019-09-06 Thread Roger Pau Monné
On Fri, Sep 06, 2019 at 05:01:09PM +0800, Chao Gao wrote: > On Thu, Aug 29, 2019 at 12:21:11PM +0200, Roger Pau Monné wrote: > >On Thu, Aug 29, 2019 at 05:02:27PM +0800, Chao Gao wrote: > >> Currently, for a HVM on Xen, no reset method is virtualized. So in a VM's > >> perspective, assigned devices

Re: [Qemu-devel] [RFC 0/3] virtiofsd: get/set log level via DBus

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 06:40:21PM +0100, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > It is likely that virtiofsd will need to support "management commands" for > > reconfiguring it at runtime. The first use case was proposed by Eryu Guan > > for > > getting

Re: [Qemu-devel] [PATCH v6 7/8] linux-user: Add support for FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling > formatting of a floppy drive. > > Signed-off-by: Aleksandar Markovic > --- > linux-user/ioctls.h| 3 +++ > linux-user/syscall_def

Re: [Qemu-devel] [RFC 3/3] virtiofsd: add virtiofsctl command-line management tool

2019-09-06 Thread Stefan Hajnoczi
On Fri, Sep 06, 2019 at 12:03:15AM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Sep 5, 2019 at 9:13 PM Dr. David Alan Gilbert > wrote: > > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > virtiofsctl can control a running virtiofsd process: > > > > > > usage: ./virtiofsctl COMMAND [

Re: [Qemu-devel] [RFC 0/3] virtiofsd: get/set log level via DBus

2019-09-06 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Thu, Sep 05, 2019 at 06:40:21PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > It is likely that virtiofsd will need to support "management commands" for > > > reconfiguring it at runtime. The first

Re: [Qemu-devel] [PATCH] hw/arm/raspi: avoid reparenting the sd card during qbus tree reset

2019-09-06 Thread Peter Maydell
On Wed, 4 Sep 2019 at 17:23, Damien Hedde wrote: > > In the raspi machine, the sd card can be on several sd bus (in reality > there is one bus but several controllers). It is initially created in > the "sd-bus" child in the gpio peripheral. Then is moved (parent bus > changes) during machine reset

Re: [Qemu-devel] [PATCH v6 7/8] linux-user: Add support for FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling > formatting of a floppy drive. > > Signed-off-by: Aleksandar Markovic > --- > linux-user/ioctls.h| 3 +++ > linux-user/syscall_def

Re: [Qemu-devel] [PATCH v6 8/8] linux-user: Add support for FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls

2019-09-06 Thread Laurent Vivier
Le 04/09/2019 à 14:59, Aleksandar Markovic a écrit : > From: Aleksandar Markovic > > FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands > for controlling error reporting of a floppy drive. > > Signed-off-by: Aleksandar Markovic > --- > linux-user/ioctls.h| 2 ++ > linu

Re: [Qemu-devel] [RFC 0/3] virtiofsd: get/set log level via DBus

2019-09-06 Thread Daniel P . Berrangé
On Thu, Sep 05, 2019 at 04:21:33PM +0100, Stefan Hajnoczi wrote: > It is likely that virtiofsd will need to support "management commands" for > reconfiguring it at runtime. The first use case was proposed by Eryu Guan for > getting/setting the current log level. > > I promised to try out DBus as

Re: [Qemu-devel] [RFC 2/3] virtiofsd: add DBus server to handle log level changes

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 11:23:28AM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 06:27:32PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > Introduce a DBus server thread that runs alongside the other virtiofsd > > > threads. It processes cha

Re: [Qemu-devel] slirp, incoming packets get truncated

2019-09-06 Thread Chris Heinze
hi, On 9/6/19 11:59 AM, Samuel Thibault wrote: [...] >> 16:49:39.430959 IP 10.0.2.2.33294 > 10.0.2.15.19003: UDP, bad length 9000 > >> 1472 > > Just to be sure: did you configure your guest mru to 9000 ? Does the > emulated network hardware card support jumbo frames? hm! all interfaces (host an

Re: [Qemu-devel] [PATCH 22/36] cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK

2019-09-06 Thread Peter Maydell
On Tue, 3 Sep 2019 at 17:09, Richard Henderson wrote: > > We had two different mechanisms to force a recheck of the tlb. > > Before TLB_RECHECK was introduced, we had a PAGE_WRITE_INV bit > that would immediate set TLB_INVALID_MASK, which automatically > means that a second check of the tlb entry

Re: [Qemu-devel] [RFC 0/3] virtiofsd: get/set log level via DBus

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 11:29:26AM +0100, Stefan Hajnoczi wrote: > On Thu, Sep 05, 2019 at 06:40:21PM +0100, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > It is likely that virtiofsd will need to support "management commands" for > > > reconfiguring it at ru

[Qemu-devel] [qemu-web RFC PATCH] Update to Jekyll 4.0

2019-09-06 Thread Thomas Huth
- Update versions in Gemfile - "has_key?" has to be renamed to "key?" in category_archive_plugin.rb - Add .jekyll-cache to .gitignore file Signed-off-by: Thomas Huth --- .gitignore | 1 + Gemfile | 15 +++ _plugins/category_archiv

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-09-06 Thread Geert Uytterhoeven
On Tue, Jul 9, 2019 at 4:59 PM Bartosz Golaszewski wrote: > pon., 8 lip 2019 o 12:24 Geert Uytterhoeven napisał(a): > > On Mon, Jul 8, 2019 at 11:45 AM Bartosz Golaszewski > > wrote: > > > pt., 5 lip 2019 o 18:05 Geert Uytterhoeven > > > napisał(a): > > > > +static int gpio_virt_agg_set_config

Re: [Qemu-devel] [RFC 2/3] virtiofsd: add DBus server to handle log level changes

2019-09-06 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Sep 06, 2019 at 11:23:28AM +0100, Stefan Hajnoczi wrote: > > On Thu, Sep 05, 2019 at 06:27:32PM +0100, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > Introduce a DBus server thread that runs alon

Re: [Qemu-devel] [PATCH RFC] gpio: Add Virtual Aggregator GPIO Driver

2019-09-06 Thread Geert Uytterhoeven
Hi Bartosz, On Fri, Jul 12, 2019 at 11:27 AM Bartosz Golaszewski wrote: > wt., 9 lip 2019 o 17:59 Geert Uytterhoeven napisał(a): > > On Tue, Jul 9, 2019 at 4:59 PM Bartosz Golaszewski > > wrote: > > > pon., 8 lip 2019 o 12:24 Geert Uytterhoeven > > > napisał(a): > > > > On Mon, Jul 8, 2019 at

Re: [Qemu-devel] slirp, incoming packets get truncated

2019-09-06 Thread Samuel Thibault
Chris Heinze, le ven. 06 sept. 2019 12:54:24 +0200, a ecrit: > i'm not aware of any (canonical) parameters to set a max size for received > packets Ah, right. > i found no way to configure slirp (in qemu) itself except for the DEFINEs in > the if.h. Yes, that's where it is to be configured atm

Re: [Qemu-devel] [PATCH] travis.yml: Install libcap-dev for testing virito-9p

2019-09-06 Thread Thomas Huth
On 05/09/2019 14.18, Greg Kurz wrote: > On Thu, 5 Sep 2019 14:07:01 +0200 > Greg Kurz wrote: > >> On Thu, 5 Sep 2019 13:33:46 +0200 >> Thomas Huth wrote: >> >>> So far we were not testing virtio-9p in Travis yet, since we forgot to >>> install libcap-devel. Do it now to get some more test cover

Re: [Qemu-devel] [PATCH] travis.yml: Install libcap-dev for testing virito-9p

2019-09-06 Thread Thomas Huth
On 05/09/2019 14.07, Greg Kurz wrote: > On Thu, 5 Sep 2019 13:33:46 +0200 > Thomas Huth wrote: > >> So far we were not testing virtio-9p in Travis yet, since we forgot to >> install libcap-devel. Do it now to get some more test coverage. >> >> Signed-off-by: Thomas Huth >> --- > > Acked-by: Gr

[Qemu-devel] [PATCH] tests/Makefile: Do not print the name of the check-block.sh shell script

2019-09-06 Thread Thomas Huth
The check script is already printing out which iotest is currently running, so printing out the name of the check-block.sh shell script looks superfluous here. Signed-off-by: Thomas Huth --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile

[Qemu-devel] [PATCH] tests/qemu-iotests/check: Replace "tests" with "iotests" in final status text

2019-09-06 Thread Thomas Huth
When running "make check -j8" or something similar, the iotests are running in parallel with the other tests. So when they are printing out "Passed all xx tests" or a similar status message at the end, it might not be quite clear that this message belongs to the iotests, since the output might be m

Re: [Qemu-devel] [RFC 2/3] virtiofsd: add DBus server to handle log level changes

2019-09-06 Thread Daniel P . Berrangé
On Fri, Sep 06, 2019 at 12:12:23PM +0100, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Sep 06, 2019 at 11:23:28AM +0100, Stefan Hajnoczi wrote: > > > On Thu, Sep 05, 2019 at 06:27:32PM +0100, Dr. David Alan Gilbert wrote: > > > > * Stefan Hajnoczi (s

Re: [Qemu-devel] [PATCH] travis.yml: Install libcap-dev for testing virito-9p

2019-09-06 Thread Alex Bennée
Thomas Huth writes: > On 05/09/2019 14.07, Greg Kurz wrote: >> On Thu, 5 Sep 2019 13:33:46 +0200 >> Thomas Huth wrote: >> >>> So far we were not testing virtio-9p in Travis yet, since we forgot to >>> install libcap-devel. Do it now to get some more test coverage. >>> >>> Signed-off-by: Thoma

[Qemu-devel] [RFC] libvhost-user: implement VHOST_USER_PROTOCOL_F_KICK_CALL_MSGS

2019-09-06 Thread Johannes Berg
From: Johannes Berg Signed-off-by: Johannes Berg --- contrib/libvhost-user/libvhost-user.c | 61 +++ contrib/libvhost-user/libvhost-user.h | 3 ++ 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-u

Re: [Qemu-devel] [PATCH v2 03/13] qcrypto-luks: rename some fields in QCryptoBlockLUKSHeader

2019-09-06 Thread Daniel P . Berrangé
On Mon, Aug 26, 2019 at 04:50:53PM +0300, Maxim Levitsky wrote: > * key_bytes -> master_key_len > * payload_offset = payload_offset_sector (to emphasise that this isn't byte > offset) > * key_offset -> key_offset_sector - same as above for luks slots > > Signed-off-by: Maxim Levitsky > --- > cr

Re: [Qemu-devel] [PATCH v2 04/13] qcrypto-luks: don't overwrite cipher_mode in header

2019-09-06 Thread Daniel P . Berrangé
On Mon, Aug 26, 2019 at 04:50:54PM +0300, Maxim Levitsky wrote: > This way we can store the header we loaded, which > will be used in key management code > > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v2 05/13] qcrypto-luks: simplify masterkey and masterkey length

2019-09-06 Thread Daniel P . Berrangé
On Mon, Aug 26, 2019 at 04:50:55PM +0300, Maxim Levitsky wrote: > Let the caller allocate masterkey > Always use master key len from the header > > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 44 +--- > 1 file changed, 21 insertions(+), 23

Re: [Qemu-devel] [PATCH v2 06/13] qcrypto-block: pass keyslot index rather that pointer to the keyslot

2019-09-06 Thread Daniel P . Berrangé
On Mon, Aug 26, 2019 at 04:50:56PM +0300, Maxim Levitsky wrote: > Another minor refactoring > > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/crypto/block-luks.c b/crypto/block-luks.c > index 331377293d..

Re: [Qemu-devel] [PATCH v2 07/13] qcrypto-luks: use the parsed encryption settings in QCryptoBlockLUKS

2019-09-06 Thread Daniel P . Berrangé
On Mon, Aug 26, 2019 at 04:50:57PM +0300, Maxim Levitsky wrote: > Prior to that patch, the parsed encryptio settings ^^encryption > were alrady stored into the QCryptoBlockLUKS but not ^^already > used anywhere but in qcrypto_block_luks_get_info > > Usi

[Qemu-devel] [PATCH v3 3/4] target/arm: remove run time semihosting checks

2019-09-06 Thread Alex Bennée
Now we do all our checking and use a common EXCP_SEMIHOST for semihosting operations we can make helper code a lot simpler. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - fix re-base conflicts - hoist EXCP_SEMIHOST check - comment cleanups v5 - move CONFIG_TCG ifdefs

[Qemu-devel] [PATCH v3 2/4] target/arm: handle A-profile semihosting at translate time

2019-09-06 Thread Alex Bennée
As for the other semihosting calls we can resolve this at translate time. Signed-off-by: Alex Bennée --- v2 - update for change to gen_exception_internal_insn API v3 - update for decode tree, merge T32 & A32 commits - dropped r-b due to changes --- target/arm/translate.c | 19

[Qemu-devel] [PATCH v3 4/4] atomic_template: fix indentation in GEN_ATOMIC_HELPER

2019-09-06 Thread Alex Bennée
From: "Emilio G. Cota" Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- accel/tcg/atomic_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.

[Qemu-devel] [PATCH v3 0/4] semihosting fixes

2019-09-06 Thread Alex Bennée
Hi Peter, I've re-based and re-tested on the post-decodetree changes. In the end I merged the A32/T32 patches and dropped Richard's r-b as the code has changed a bit. Alex Bennée (3): target/arm: handle M-profile semihosting at translate time target/arm: handle A-profile semihosting at transl

[Qemu-devel] [PATCH v3 1/4] target/arm: handle M-profile semihosting at translate time

2019-09-06 Thread Alex Bennée
We do this for other semihosting calls so we might as well do it for M-profile as well. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- v2 - update for change to gen_exception_internal_insn API v3 - update for decode tree --- target/arm/m_helper.c | 18 ++ ta

Re: [Qemu-devel] [PATCH v3 2/4] target/arm: handle A-profile semihosting at translate time

2019-09-06 Thread Peter Maydell
On Fri, 6 Sep 2019 at 13:47, Alex Bennée wrote: > > As for the other semihosting calls we can resolve this at translate > time. > > Signed-off-by: Alex Bennée > > --- > v2 > - update for change to gen_exception_internal_insn API > v3 > - update for decode tree, merge T32 & A32 commits > - d

Re: [Qemu-devel] [PULL 4/9] block: workaround for unaligned byte range in fallocate()

2019-09-06 Thread Andrey Shinkevich
Many thanks Andrey On 05/09/2019 21:21, Eric Blake wrote: > From: Andrey Shinkevich > > Revert the commit 118f99442d 'block/io.c: fix for the allocation failure' > and use better error handling for file systems that do not support > fallocate() for an unaligned byte range. Allow falling back to

[Qemu-devel] [PATCH] migration: Fix postcopy bw for recovery

2019-09-06 Thread Peter Xu
We've got max-postcopy-bandwidth parameter but it's not applied correctly after a postcopy recovery so the recovered migration stream will still eat the whole net bandwidth. Fix that up. Reported-by: Xiaohui Li Signed-off-by: Peter Xu --- migration/migration.c | 3 ++- 1 file changed, 2 insert

Re: [Qemu-devel] [PATCH v2 08/13] qcrypto-luks: extract store and load header

2019-09-06 Thread Daniel P . Berrangé
On Mon, Aug 26, 2019 at 04:50:58PM +0300, Maxim Levitsky wrote: > Signed-off-by: Maxim Levitsky > --- > crypto/block-luks.c | 166 +++- > 1 file changed, 102 insertions(+), 64 deletions(-) > > diff --git a/crypto/block-luks.c b/crypto/block-luks.c > index

Re: [Qemu-devel] [PATCH] memory: Set notdirty_mem_ops validator

2019-09-06 Thread Eric Blake
On 9/6/19 3:28 AM, Philippe Mathieu-Daudé wrote: > On 9/2/19 3:26 AM, Tony Nguyen wrote: >> Existing read rejecting validator was mistakenly cleared. >> >> Reads dispatched to io_mem_notdirty then segfaults as there is no read >> handler. >> >> Signed-off-by: Tony Nguyen >> --- >> exec.c | 2 +- >

  1   2   3   >