Re: vnc clipboard support

2021-01-28 Thread Christophe de Dinechin
Christophe (Typos are from my iPhone) > Le 28 janv. 2021 à 21:24, Marc-André Lureau a > écrit : > >  > Hi > >> On Thu, Jan 28, 2021 at 9:14 PM Gerd Hoffmann wrote: >> Hi folks, >> >> I'm looking for a good way to implement cut+paste support for vnc. >> >> The vnc core protocol has supp

Re: vnc clipboard support

2021-01-28 Thread Gerd Hoffmann
On Thu, Jan 28, 2021 at 05:35:04PM +, Daniel P. Berrangé wrote: > On Thu, Jan 28, 2021 at 06:12:24PM +0100, Gerd Hoffmann wrote: > > Hi folks, > > > > I'm looking for a good way to implement cut+paste support for vnc. > > > > The vnc core protocol has support for text/plain cut+paste, and t

Re: [PATCH] target/rx: Fix compiler errors for build with sanitizers

2021-01-28 Thread Laurent Vivier
Le 28/01/2021 à 18:21, Stefan Weil a écrit : > gcc (Debian 10.2.1-6) 10.2.1 20210110 aborts builds with enabled sanitizers: > > ../../../target/rx/op_helper.c: In function ‘helper_scmpu’: > ../../../target/rx/op_helper.c:213:24: error: ‘tmp1’ may be used > uninitialized in this function [-Werror=

Re: [PATCH] vfio/migrate: Move switch of dirty tracking into vfio_memory_listener

2021-01-28 Thread Paolo Bonzini
On 28/01/21 21:02, Dr. David Alan Gilbert wrote: * Paolo Bonzini (pbonz...@redhat.com) wrote: On 11/01/21 08:34, Keqian Zhu wrote: +static void vfio_listener_log_start(MemoryListener *listener, +MemoryRegionSection *section, +

[PATCH v2 3/3] nbd: make nbd_read* return -EIO on error

2021-01-28 Thread Roman Kagan
NBD reconnect logic considers the error code from the functions that read NBD messages to tell if reconnect should be attempted or not: it is attempted on -EIO, otherwise the client transitions to NBD_CLIENT_QUIT state (see nbd_channel_error). This error code is propagated from the primitives like

[PATCH v2 2/3] block/nbd: only enter connection coroutine if it's present

2021-01-28 Thread Roman Kagan
When an NBD block driver state is moved from one aio_context to another (e.g. when doing a drain in a migration thread), nbd_client_attach_aio_context_bh is executed that enters the connection coroutine. However, the assumption that ->connection_co is always present here appears incorrect: the con

[PATCH v2 1/3] block/nbd: only detach existing iochannel from aio_context

2021-01-28 Thread Roman Kagan
When the reconnect in NBD client is in progress, the iochannel used for NBD connection doesn't exist. Therefore an attempt to detach it from the aio_context of the parent BlockDriverState results in a NULL pointer dereference. The problem is triggerable, in particular, when an outgoing migration

[PATCH v2 0/3] block/nbd: fix crashers in reconnect while migrating

2021-01-28 Thread Roman Kagan
During the final phase of migration the NBD reconnection logic may encounter situations it doesn't expect during regular operation. This series addresses some of them that make qemu crash. They are reproducible when a vm with a secondary drive attached via nbd with non-zero "reconnect-delay" runs

Re: [PATCH 0/3] block/nbd: fix crashers in reconnect while migrating

2021-01-28 Thread Roman Kagan
On Fri, Jan 29, 2021 at 08:51:39AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 28.01.2021 23:14, Roman Kagan wrote: > > During the final phase of migration the NBD reconnection logic may > > encounter situations it doesn't expect during regular operation. > > > > This series addresses some of the

Re: [PATCH] vhost-user: Check for iotlb callback in iotlb_miss

2021-01-28 Thread Jason Wang
On 2021/1/29 下午3:22, Eugenio Perez Martin wrote: On Fri, Jan 29, 2021 at 4:29 AM Jason Wang wrote: On 2021/1/28 下午5:37, Eugenio Perez Martin wrote: Hi Jason. On Thu, Jan 28, 2021 at 3:32 AM Jason Wang wrote: On 2021/1/28 上午4:44, Eugenio Pérez wrote: Not registering this can lead to vhos

Re: [PATCH] vhost-user: Check for iotlb callback in iotlb_miss

2021-01-28 Thread Eugenio Perez Martin
On Fri, Jan 29, 2021 at 4:29 AM Jason Wang wrote: > > > On 2021/1/28 下午5:37, Eugenio Perez Martin wrote: > > Hi Jason. > > > > On Thu, Jan 28, 2021 at 3:32 AM Jason Wang wrote: > >> > >> On 2021/1/28 上午4:44, Eugenio Pérez wrote: > >>> Not registering this can lead to vhost_backend_handle_iotlb_ms

Re: [PATCH 1/3] block/nbd: only detach existing iochannel from aio_context

2021-01-28 Thread Roman Kagan
On Fri, Jan 29, 2021 at 08:37:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 28.01.2021 23:14, Roman Kagan wrote: > > When the reconnect in NBD client is in progress, the iochannel used for > > NBD connection doesn't exist. Therefore an attempt to detach it from > > the aio_context of the paren

[Bug 1913505] Re: Windows XP slow on Apple M1

2021-01-28 Thread Thomas Huth
Did you compile QEMU on your own? If so, which parameters did you use for the "configure" script? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1913505 Title: Windows XP slow on Apple M1 Status in

[PATCH] hw/block/nvme: refactor zone state check for read

2021-01-28 Thread Klaus Jensen
From: Gollu Appalanaidu Align with nvme_check_zone_write. Remove unnecessary storing status value and return at the end of the function, if error occurs return immediately if applicable. Signed-off-by: Gollu Appalanaidu Reviewed-by: Klaus Jensen --- hw/block/nvme.c | 17 +++-- 1

Re: [PATCH] target/rx: Fix compiler errors for build with sanitizers

2021-01-28 Thread Thomas Huth
On 28/01/2021 18.21, Stefan Weil wrote: gcc (Debian 10.2.1-6) 10.2.1 20210110 aborts builds with enabled sanitizers: ../../../target/rx/op_helper.c: In function ‘helper_scmpu’: ../../../target/rx/op_helper.c:213:24: error: ‘tmp1’ may be used uninitialized in this function [-Werror=maybe-uniniti

Re: [PATCH 0/3] block/nbd: fix crashers in reconnect while migrating

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 23:14, Roman Kagan wrote: During the final phase of migration the NBD reconnection logic may encounter situations it doesn't expect during regular operation. This series addresses some of them that make qemu crash. They are reproducible when a vm with a secondary drive attached via n

Re: [PATCH 3/3] nbd: make nbd_read* return -EIO on error

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 23:14, Roman Kagan wrote: NBD reconnect logic considers the error code from the functions that read NBD messages to tell if reconnect should be attempted or not: it is attempted on -EIO, otherwise the client transitions to NBD_CLIENT_QUIT state (see nbd_channel_error). This error code

Re: [PATCH] tests/acceptance: Re-enable the microblaze test

2021-01-28 Thread Thomas Huth
On 28/01/2021 20.34, Wainer dos Santos Moschetta wrote: Hi, On 1/28/21 12:28 PM, Thomas Huth wrote: The microblaze kernel sometimes gets stuck during boot (ca. 1 out of 200 times), so we disabled the corresponding acceptance tests some months ago. However, it's likely better to check that the k

Re: [PATCH 2/3] block/nbd: only enter connection coroutine if it's present

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 23:14, Roman Kagan wrote: When an NBD block driver state is moved from one aio_context to another (e.g. when doing a drain in a migration thread), nbd_client_attach_aio_context_bh is executed that enters the connection coroutine. However, the assumption that ->connection_co is always

Re: [PATCH 1/3] block/nbd: only detach existing iochannel from aio_context

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 23:14, Roman Kagan wrote: When the reconnect in NBD client is in progress, the iochannel used for NBD connection doesn't exist. Therefore an attempt to detach it from the aio_context of the parent BlockDriverState results in a NULL pointer dereference. The problem is triggerable, in

Re: [PULL 14/53] block: apply COR-filter to block-stream jobs

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 21:38, Philippe Mathieu-Daudé wrote: Hi Andrey, On 1/26/21 3:19 PM, Max Reitz wrote: From: Andrey Shinkevich This patch completes the series with the COR-filter applied to block-stream operations. Adding the filter makes it possible in future implement discarding copied regions in

[PATCH] tests/Makefile.include: export PYTHON for check-block.sh

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
check-block.sh called by make check-block rely on PYTHON variable being set. Fixes: f203080bbd9f9e5b31041b1f2afcd6040c5aaec5 Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi! As Peter reported, build fails on platforms where python3 is not /usr/bin/python3.. This patch should help. At least it

Re: [PATCH v7 09/13] confidential guest support: Update documentation

2021-01-28 Thread David Gibson
On Fri, Jan 15, 2021 at 04:36:46PM +0100, Cornelia Huck wrote: > On Thu, 14 Jan 2021 10:58:07 +1100 > David Gibson wrote: > > > Now that we've implemented a generic machine option for configuring various > > confidential guest support mechanisms: > > 1. Update docs/amd-memory-encryption.txt to

Re: [PATCH v7 02/13] confidential guest support: Introduce new confidential guest support class

2021-01-28 Thread David Gibson
On Thu, Jan 21, 2021 at 09:08:07AM +, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > On Mon, Jan 18, 2021 at 06:51:24PM +, Dr. David Alan Gilbert wrote: > > > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > > Several architectures have mech

Re: [PATCH v7 10/13] spapr: Add PEF based confidential guest support

2021-01-28 Thread David Gibson
On Fri, Jan 15, 2021 at 04:41:51PM +0100, Cornelia Huck wrote: > On Thu, 14 Jan 2021 10:58:08 +1100 > David Gibson wrote: > > > Some upcoming POWER machines have a system called PEF (Protected > > Execution Facility) which uses a small ultravisor to allow guests to > > run in a way that they can'

Re: [PATCH v7 08/13] confidential guest support: Move SEV initialization into arch specific code

2021-01-28 Thread David Gibson
On Mon, Jan 18, 2021 at 09:03:36AM +0100, Cornelia Huck wrote: > On Mon, 18 Jan 2021 14:03:08 +1100 > David Gibson wrote: > > > On Fri, Jan 15, 2021 at 02:24:25PM +0100, Cornelia Huck wrote: > > > On Thu, 14 Jan 2021 10:58:06 +1100 > > > David Gibson wrote: > > > > > > > While we've abstracte

Re: [PATCH] vhost-user: Check for iotlb callback in iotlb_miss

2021-01-28 Thread Jason Wang
On 2021/1/28 下午5:37, Eugenio Perez Martin wrote: Hi Jason. On Thu, Jan 28, 2021 at 3:32 AM Jason Wang wrote: On 2021/1/28 上午4:44, Eugenio Pérez wrote: Not registering this can lead to vhost_backend_handle_iotlb_msg and vhost_device_iotlb_miss if backend issue a miss after qemu vhost device

RE: [PATCH 02/10] Fix the qemu crash when guest shutdown during checkpoint

2021-01-28 Thread Rao, Lei
The state will be set RUN_STATE_COLO in colo_do_checkpoint_transaction(). If the guest executes power off or shutdown at this time and the QEMU main thread will call vm_shutdown(), it will set the state to RUN_STATE_SHUTDOWN. The state switch from RUN_STATE_COLO to RUN_STATE_SHUTDOWN is not defin

[Bug 1913667] [NEW] FPE in npcm7xx_clk_update_pll

2021-01-28 Thread Alexander Bulekov
Public bug reported: I've been working on integrating the generic-fuzzer with ARM machines on OSS-Fuzz so we can fuzz devices on architectures beyond i386 devices. Since I saw that there is some active development for the Nuvoton machines, I thought it might be useful to fuzz the NPCM750 machine

[Bug 1913668] [NEW] FPE in npcm7xx_pwm_calculate_freq

2021-01-28 Thread Alexander Bulekov
Public bug reported: Reproducer: cat << EOF | ./qemu-system-aarch64 -M npcm750-evb \ -accel qtest -qtest stdio write 0xf0103008 0x4 0x0900 write 0xf010300c 0x4 0x EOF Trace: ../hw/misc/npcm7xx_pwm.c:94:17: runtime error: division by zero SUMMARY: UndefinedBehaviorSanitizer: undefined-

[Bug 1913669] [NEW] FPE in npcm7xx_adc_convert

2021-01-28 Thread Alexander Bulekov
Public bug reported: Reproducer: cat << EOF | ./qemu-system-aarch64 -M npcm750-evb \ -accel qtest -qtest stdio write 0xf000c000 0x4 0x02400200 clock_step EOF Trace: ../hw/adc/npcm7xx_adc.c:60:51: runtime error: division by zero SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../hw/adc/np

Re: [Bug 1909418] Re: QEMU: Heap Overflow vulnerability in SDHCI Component

2021-01-28 Thread Alexander Bulekov
This was found by OSS-Fuzz as well. Yankable reproducer: +CC Phil. I know you mentioned you don't have time to fix many of the sdhci bugs, but this one seems like a large heap write, and the original reporter provided some analysis. On 210107 0307, Muhammad Ramdhan wrote: > ** Information type ch

[PATCH v2 5/6] hw/i2c: Add a QTest for NPCM7XX SMBus Device

2021-01-28 Thread wuhaotsh--- via
This patch adds a QTest for NPCM7XX SMBus's single byte mode. It sends a byte to a device in the evaluation board, and verify the retrieved value is equivalent to the sent value. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu --- tests/qtest/meson.build | 1 +

[PATCH v2 6/6] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-01-28 Thread wuhaotsh--- via
This patch implements the FIFO mode of the SMBus module. In FIFO, the user transmits or receives at most 16 bytes at a time. The FIFO mode allows the module to transmit large amount of data faster than single byte mode. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu Review

[PATCH v2 4/6] hw/arm: Add I2C sensors and EEPROM for GSJ machine

2021-01-28 Thread wuhaotsh--- via
Add AT24 EEPROM and temperature sensors for GSJ machine. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu --- default-configs/devices/arm-softmmu.mak | 1 + hw/arm/npcm7xx_boards.c | 27 + 2 files changed, 28 insertions(+) diff --gi

[PATCH v2 1/6] hw/arm: Remove GPIO from unimplemented NPCM7XX

2021-01-28 Thread wuhaotsh--- via
NPCM7XX GPIO devices have been implemented in hw/gpio/npcm7xx-gpio.c. So we removed them from the unimplemented devices list. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/arm/npcm7xx.c b/h

[PATCH v2 2/6] hw/i2c: Implement NPCM7XX SMBus Module Single Mode

2021-01-28 Thread wuhaotsh--- via
This commit implements the single-byte mode of the SMBus. Each Nuvoton SoC has 16 System Management Bus (SMBus). These buses compliant with SMBus and I2C protocol. This patch implements the single-byte mode of the SMBus. In this mode, the user sends or receives a byte each time. The SMBus device

[PATCH v2 0/6] hw/i2c: Add NPCM7XX SMBus Device

2021-01-28 Thread wuhaotsh--- via
This patch set implements the System manager bus (SMBus) module in NPCM7XX SoC. Basically, it emulates the data transactions of the module, not the SDA/SCL levels. We have also added a QTest which contains read and write operations for both single-byte and FIFO mode, and added basic I2C devices for

[PATCH v2 3/6] hw/arm: Add I2C sensors for NPCM750 eval board

2021-01-28 Thread wuhaotsh--- via
Add I2C temperature sensors for NPCM750 eval board. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu --- hw/arm/npcm7xx_boards.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 3fdd5cab01..47a2

Re: [PATCH 4/7] ppc/pnv: Simplify pnv_bmc_create()

2021-01-28 Thread David Gibson
On Thu, Jan 28, 2021 at 08:46:01AM +0100, Cédric Le Goater wrote: > On 1/28/21 1:46 AM, Joel Stanley wrote: > > On Tue, 26 Jan 2021 at 17:14, Cédric Le Goater wrote: > >> > >> and reuse pnv_bmc_set_pnor() to share the setting of the PNOR. > >> > >> Signed-off-by: Cédric Le Goater > >> --- > >> h

Re: [PATCH v2 3/3] spapr_numa.c: fix ibm,max-associativity-domains calculation

2021-01-28 Thread David Gibson
On Thu, Jan 28, 2021 at 02:42:13PM -0300, Daniel Henrique Barboza wrote: > The current logic for calculating 'maxdomain' making it a sum of > numa_state->num_nodes with spapr->gpu_numa_id. spapr->gpu_numa_id is > used as a index to determine the next available NUMA id that a > given NVGPU can use.

Re: [PATCH] target/ppc: Fix truncation of env->hflags

2021-01-28 Thread David Gibson
On Sun, Jan 24, 2021 at 09:38:04AM -1000, Richard Henderson wrote: > On 1/23/21 6:46 PM, David Gibson wrote: > > On Sat, Jan 23, 2021 at 05:24:22PM -1000, Richard Henderson wrote: > >> Use the cs_base field, because it happens to be the same > >> size as hflags (and MSR, from which hflags is derive

Re: [PATCH v2 2/3] spapr_numa.c: create spapr_numa_initial_nvgpu_numa_id() helper

2021-01-28 Thread David Gibson
On Thu, Jan 28, 2021 at 02:42:12PM -0300, Daniel Henrique Barboza wrote: > We'll need to check the initial value given to spapr->gpu_numa_id when > building the rtas DT, so put it in a helper for easier access and to > avoid repetition. > > Tested-by: Cédric Le Goater > Reviewed-by: Greg Kurz >

Re: [PATCH 1/3] spapr: move spapr_machine_using_legacy_numa() to spapr_numa.c

2021-01-28 Thread David Gibson
On Thu, Jan 28, 2021 at 12:17:29PM -0300, Daniel Henrique Barboza wrote: > This function is used only in spapr_numa.c. > > Signed-off-by: Daniel Henrique Barboza Applied to ppc-for-6.0, thanks. > --- > hw/ppc/spapr.c | 9 - > hw/ppc/spapr_numa.c| 9 + > include/hw/p

Re: [PATCH 3/7] ppc/pnv: Use skiboot addresses to load kernel and ramfs

2021-01-28 Thread David Gibson
On Thu, Jan 28, 2021 at 08:02:41AM +0100, Cédric Le Goater wrote: > On 1/28/21 1:45 AM, Joel Stanley wrote: > > On Tue, 26 Jan 2021 at 17:11, Cédric Le Goater wrote: > >> > >> The current settings are useful to load large kernels (with debug) but > >> it moves the initrd image in a memory region n

Re: [PATCH 4/7] ppc/pnv: Simplify pnv_bmc_create()

2021-01-28 Thread David Gibson
On Thu, Jan 28, 2021 at 01:04:28PM +0100, Greg Kurz wrote: > On Thu, 28 Jan 2021 08:46:01 +0100 > Cédric Le Goater wrote: > > > On 1/28/21 1:46 AM, Joel Stanley wrote: > > > On Tue, 26 Jan 2021 at 17:14, Cédric Le Goater wrote: > > >> > > >> and reuse pnv_bmc_set_pnor() to share the setting of t

Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass

2021-01-28 Thread Richard Henderson
On 1/27/21 11:28 PM, Claudio Fontana wrote: > +/* > + * NB: this should be covered by CONFIG_TCG, but it is unsafe to do it > here, > + * as this header is included by both ss_specific and ss_common code, > + * leading to potential differences in the data structure between > modul

Re: [PATCH v14 00/22] i386 cleanup PART 2

2021-01-28 Thread Richard Henderson
On 1/27/21 11:27 PM, Claudio Fontana wrote: > Claudio Fontana (17): > target/riscv: remove CONFIG_TCG, as it is always TCG > accel/tcg: split TCG-only code from cpu_exec_realizefn > target/arm: do not use cc->do_interrupt for KVM directly > cpu: move cc->do_interrupt to tcg_ops > cpu: mov

Re: [PATCH v14 18/22] accel: introduce AccelCPUClass extending CPUClass

2021-01-28 Thread Richard Henderson
On 1/28/21 6:29 AM, Philippe Mathieu-Daudé wrote: > On 1/28/21 5:08 PM, Alex Bennée wrote: >> >> Claudio Fontana writes: >> >>> On 1/28/21 2:03 PM, Philippe Mathieu-Daudé wrote: On 1/28/21 10:28 AM, Claudio Fontana wrote: >> > + > +#define TYPE_ACCEL_CPU "accel-" CPU_RESOLVING_TYPE >

Re: [PATCH v4 00/23] target-arm: Implement ARMv8.5-MemTag, user mode

2021-01-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210128224141.638790-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210128224141.638790-1-richard.hender...@linaro.org Subject: [PATCH v4 00/23]

Re: [PATCH v14 04/22] cpu: Move synchronize_from_tb() to tcg_ops

2021-01-28 Thread Richard Henderson
On 1/28/21 8:58 AM, Alex Bennée wrote: > Looking at the function here I wonder if we should be worried about the > thumb state? Peter? > > static void arm_cpu_set_pc(CPUState *cs, vaddr value) > { > ARMCPU *cpu = ARM_CPU(cs); > CPUARMState *env = &cpu->env; > > if (is_a64(env)) { >

[PATCH v4 22/23] target/arm: Enable MTE for user-only

2021-01-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index db81a12418..43933550c3 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -204,6 +204,21 @@ static void arm_cpu_reset(DeviceSta

[PATCH v4 20/23] linux-user/aarch64: Signal SEGV_MTEAERR for async tag check error

2021-01-28 Thread Richard Henderson
The real kernel collects _TIF_MTE_ASYNC_FAULT into the current thread's state on any kernel entry (interrupt, exception etc), and then delivers the signal in advance of resuming the thread. This means that while the signal won't be delivered immediately, it will not be delayed forever -- at minimu

[PATCH v4 23/23] tests/tcg/aarch64: Add mte smoke tests

2021-01-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/tcg/aarch64/mte.h | 60 +++ tests/tcg/aarch64/mte-1.c | 28 +++ tests/tcg/aarch64/mte-2.c | 45 +++ tests/tcg/aarch64/mte-3.c | 51 ++ t

[PATCH v4 11/23] exec: Add support for TARGET_TAGGED_ADDRESSES

2021-01-28 Thread Richard Henderson
The AArch64 Linux ABI has always enabled TBI, but has historically required that pointer tags be removed before a syscall. This has changed in the lead-up to ARMv8.5-MTE, in a way that affects the ABI generically and not specifically to MTE. This patch allows the target to indicate that (1) there

[PATCH v4 18/23] linux-user/aarch64: Pass syndrome to EXC_*_ABORT

2021-01-28 Thread Richard Henderson
A proper syndrome is required to fill in the proper si_code. Use page_get_flags to determine permission vs translation for user-only. Signed-off-by: Richard Henderson --- v3: Use syndrome.h, arm_deliver_fault. --- linux-user/aarch64/cpu_loop.c | 24 +--- target/arm/tlb_helper

[PATCH v4 19/23] linux-user/aarch64: Signal SEGV_MTESERR for sync tag check fault

2021-01-28 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/aarch64/target_signal.h | 2 ++ linux-user/aarch64/cpu_loop.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/linux-user/aarch64/target_signal.h b/linux-user/aarch64/target_signal.h index ddd73169f0..777fb667fe 100644 --- a/linux-user/

[PATCH v4 17/23] target/arm: Split out syndrome.h from internals.h

2021-01-28 Thread Richard Henderson
Move everything related to syndromes to a new file, which can be shared with linux-user. Signed-off-by: Richard Henderson --- target/arm/internals.h | 245 +--- target/arm/syndrome.h | 273 + 2 files changed, 274 insertions

[PATCH v4 06/23] linux-user: Check for overflow in access_ok

2021-01-28 Thread Richard Henderson
Verify that addr + size - 1 does not wrap around. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/qemu.h | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/linux-user/qemu.h b/linux-user/qemu.h index 17aa992165..441ba6a78b 100644 --

[PATCH v4 14/23] target/arm: Use the proper TBI settings for linux-user

2021-01-28 Thread Richard Henderson
We were fudging TBI1 enabled to speed up the generated code. Now that we've improved the code generation, remove this. Also, tidy the comment to reflect the current code. The pauth test was testing a kernel address (-1) and making incorrect assumptions about TBI1; stick to userland addresses. Sig

[PATCH v4 05/23] exec: Improve types for guest_addr_valid

2021-01-28 Thread Richard Henderson
Return bool not int; pass abi_ulong not 'unsigned long'. All callers use abi_ulong already, so the change in type has no effect. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/cpu_ldst.h b/include/exec

[PATCH v4 13/23] target/arm: Improve gen_top_byte_ignore

2021-01-28 Thread Richard Henderson
Use simple arithmetic instead of a conditional move when tbi0 != tbi1. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index ffc

[PATCH v4 15/23] linux-user/aarch64: Implement PR_MTE_TCF and PR_MTE_TAG

2021-01-28 Thread Richard Henderson
These prctl fields are required for the function of MTE. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 9 ++ linux-user/syscall.c| 43 + 2 files changed, 52 insertions(+) diff --git a/linux-user/aarch64/target_syscall

[PATCH v4 21/23] target/arm: Add allocation tag storage for user mode

2021-01-28 Thread Richard Henderson
Use the now-saved PAGE_ANON and PAGE_MTE bits, and the per-page saved data. Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index d55f

[PATCH v4 07/23] linux-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-01-28 Thread Richard Henderson
These constants are only ever used with access_ok, and friends. Rather than translating them to PAGE_* bits, let them equal the PAGE_* bits to begin. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/qemu.h | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-)

[PATCH v4 08/23] bsd-user: Tidy VERIFY_READ/VERIFY_WRITE

2021-01-28 Thread Richard Henderson
These constants are only ever used with access_ok, and friends. Rather than translating them to PAGE_* bits, let them equal the PAGE_* bits to begin. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- bsd-user/qemu.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) d

[PATCH v4 12/23] linux-user/aarch64: Implement PR_TAGGED_ADDR_ENABLE

2021-01-28 Thread Richard Henderson
This is the prctl bit that controls whether syscalls accept tagged addresses. See Documentation/arm64/tagged-address-abi.rst in the linux kernel. Signed-off-by: Richard Henderson --- linux-user/aarch64/target_syscall.h | 4 target/arm/cpu-param.h | 3 +++ target/arm/cpu.h

[PATCH v4 16/23] linux-user/aarch64: Implement PROT_MTE

2021-01-28 Thread Richard Henderson
Remember the PROT_MTE bit as PAGE_MTE/PAGE_TARGET_2. Otherwise this does not yet have effect. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v3: Do not overlap PAGE_TARGET_2 with PAGE_RESERVED. --- include/exec/cpu-all.h| 1 + linux-user/syscall_defs.h | 1 + target/arm/c

[PATCH v4 03/23] exec: Use uintptr_t for guest_base

2021-01-28 Thread Richard Henderson
This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 +- bsd-user/main.c| 4 ++-- linux-user/elfload.c | 4 ++-- linux-user/main.c | 4 ++-- 4 files changed, 7

[PATCH v4 09/23] linux-user: Do not use guest_addr_valid for h2g_valid

2021-01-28 Thread Richard Henderson
This is the only use of guest_addr_valid that does not begin with a guest address, but a host address being transformed to a guest address. We will shortly adjust guest_addr_valid to handle guest memory tags, and the host address should not be subjected to that. Move h2g_valid adjacent to the oth

[PATCH v4 04/23] exec: Use uintptr_t in cpu_ldst.h

2021-01-28 Thread Richard Henderson
This is more descriptive than 'unsigned long'. No functional change, since these match on all linux+bsd hosts. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h

[PATCH v4 10/23] linux-user: Fix guest_addr_valid vs reserved_va

2021-01-28 Thread Richard Henderson
We must always use GUEST_ADDR_MAX, because even 32-bit hosts can use -R to restrict the memory address of the guest. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/c

[PATCH v4 00/23] target-arm: Implement ARMv8.5-MemTag, user mode

2021-01-28 Thread Richard Henderson
The kernel abi was finally merged into 5.10. Changes for v4: * Revamp "Add support for TARGET_TAGGED_ADDRESSES". There are now two sets of functions in include/exec/, one for tagged and one for untagged addresses. The former takes a CPUState, and does not assume current_cpu is a th

[PATCH v4 01/23] tcg: Introduce target-specific page data for user-only

2021-01-28 Thread Richard Henderson
This data can be allocated by page_alloc_target_data() and released by page_set_flags(start, end, prot | PAGE_RESET). This data will be used to hold tag memory for AArch64 MTE. Signed-off-by: Richard Henderson --- v3: Add doc comments; tweak alloc so that the !PAGE_VALID case is clear. --- incl

[PATCH v4 02/23] linux-user: Introduce PAGE_ANON

2021-01-28 Thread Richard Henderson
Record whether the backing page is anonymous, or if it has file backing. This will allow us to get close to the Linux AArch64 ABI for MTE, which allows tag memory only on ram-backed VMAs. The real ABI allows tag memory on files, when those files are on ram-backed filesystems, such as tmpfs. We w

Re: [PATCH 2/2] utils/fifo8: add VMSTATE_FIFO8_TEST macro

2021-01-28 Thread Peter Maydell
On Thu, 28 Jan 2021 at 22:17, Mark Cave-Ayland wrote: > > Rewrite the existing VMSTATE_FIFO8 macro to use VMSTATE_FIFO8_TEST as per the > standard pattern in include/migration/vmstate.h. > > Signed-off-by: Mark Cave-Ayland > --- > include/qemu/fifo8.h | 16 ++-- > 1 file changed, 10

[PATCH 2/2] utils/fifo8: add VMSTATE_FIFO8_TEST macro

2021-01-28 Thread Mark Cave-Ayland
Rewrite the existing VMSTATE_FIFO8 macro to use VMSTATE_FIFO8_TEST as per the standard pattern in include/migration/vmstate.h. Signed-off-by: Mark Cave-Ayland --- include/qemu/fifo8.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/qemu/fifo8.h b/inc

[PATCH 1/2] utils/fifo8: change fatal errors from abort() to assert()

2021-01-28 Thread Mark Cave-Ayland
Developer errors are better represented with assert() rather than abort(). Also improve the strictness of the checks by using range checks within the assert() rather than converting the existing equality checks to inequality checks. Signed-off-by: Mark Cave-Ayland Reviewed-by: Claudio Fontana Re

[PATCH 0/2] utils/fifo8: minor updates

2021-01-28 Thread Mark Cave-Ayland
This patchset contains a couple of minor updates to QEMU's Fifo8 implementation conceived whilst working on the next revision of the ESP series. Patch 1 has already been reviewed on-list whilst patch 2 adds a new VMSTATE_FIFO8_TEST macro which is required to allow the updated ESP series to handle

Re: [PATCH] Add support for building on ARM Macs

2021-01-28 Thread Peter Maydell
On Thu, 28 Jan 2021 at 21:14, John Arbuckle wrote: > > Adds support for building QEMU on ARM-based Macintoshes. > This patch has been tested on an M1 Mac running Mac OS 11.1 > and on a 64-bit x86 Mac running Mac OS 10.12. > > Signed-off-by: John Arbuckle There are already patches on-list working

Re: [PATCH 0/1] tests/acceptance/boot_linux: Switch to Fedora 32

2021-01-28 Thread Daniele Buono
On 1/28/2021 3:19 PM, Wainer dos Santos Moschetta wrote: Hi, On 1/26/21 10:09 PM, Daniele Buono wrote: Local acceptance tests run with "make check-acceptance" are now showing some cases canceled like the following: (01/39) tests/acceptance/boot_linux.py:BootLinuxX8664.test_pc_i440fx_tcg: CAN

Re: [PATCH] hw/arm/smmuv3: Fix addr_mask for range-based invalidation

2021-01-28 Thread Auger Eric
Hi Zenghui, On 1/28/21 9:25 AM, Auger Eric wrote: > Hi Zenghui, > > On 12/25/20 10:50 AM, Zenghui Yu wrote: >> When performing range-based IOTLB invalidation, we should decode the TG >> field into the corresponding translation granule size so that we can pass >> the correct invalidation range to

Re: [PATCH v6 67/72] target/riscv: rvv-1.0: set mstatus.SD bit when writing vector CSRs

2021-01-28 Thread Alistair Francis
On Tue, Jan 12, 2021 at 2:30 AM wrote: > > From: Frank Chang > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/target/riscv/csr.c b/target/riscv/csr.c > index 28c1

Re: [PATCH] gdbstub: Fix handle_query_xfer_auxv

2021-01-28 Thread Alex Bennée
Richard Henderson writes: > The main problem was that we were treating a guest address > as a host address with a mere cast. > > Use the correct interface for accessing guest memory. Do not > allow offset == auxv_len, which would result in an empty packet. > > Fixes: 51c623b0de1 ("gdbstub: add

Re: [PATCH v6 36/72] target/riscv: rvv-1.0: floating-point move instruction

2021-01-28 Thread Alistair Francis
On Tue, Jan 12, 2021 at 2:16 AM wrote: > > From: Frank Chang > > NaN-boxed the scalar floating-point register based on RVV 1.0's rules. > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 16 ++-- > 1 file chang

Re: [PATCH v6 34/72] target/riscv: rvv-1.0: register gather instructions

2021-01-28 Thread Alistair Francis
On Tue, Jan 12, 2021 at 2:10 AM wrote: > > From: Frank Chang > > * Add vrgatherei16.vv instruction. > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/helper.h | 4 > target/riscv/insn32.decode | 1 + > target/ris

Re: [PATCH v6 14/72] target/riscv: rvv-1.0: update check functions

2021-01-28 Thread Alistair Francis
On Tue, Jan 12, 2021 at 1:54 AM wrote: > > From: Frank Chang > > Update check functions with RVV 1.0 rules. > > Signed-off-by: Frank Chang Reviewed-by: Alistair Francis Alistair > --- > target/riscv/insn_trans/trans_rvv.c.inc | 732 > 1 file changed, 499 insertions(

[PATCH] Add support for building on ARM Macs

2021-01-28 Thread John Arbuckle
Adds support for building QEMU on ARM-based Macintoshes. This patch has been tested on an M1 Mac running Mac OS 11.1 and on a 64-bit x86 Mac running Mac OS 10.12. Signed-off-by: John Arbuckle --- configure | 49 +++-- 1 file changed, 39 insertions(+),

Re: [PATCH v3 1/9] hw/block: m25p80: Add ISSI SPI flash support

2021-01-28 Thread Alistair Francis
On Mon, Jan 25, 2021 at 10:01 PM Bin Meng wrote: > > From: Bin Meng > > This adds the ISSI SPI flash support. The number of dummy cycles in > fast read, fast read dual output and fast read quad output commands > is currently using the default 8. Likewise, the same default value > is used for fast

Re: vnc clipboard support

2021-01-28 Thread BALATON Zoltan
On Fri, 29 Jan 2021, Marc-André Lureau wrote: I also had recently some thoughts about how to implement clipboard sharing in a more general way for QEMU. I admit I like Christophe's suggestion ("it's somebody else problem"), but it falls short to me as I don't know of a common open-source remotin

Re: [PATCH v9 04/11] slirp: feature detection for smbd

2021-01-28 Thread Joelle van Dyne
On Mon, Jan 25, 2021 at 11:30 PM Philippe Mathieu-Daudé wrote: > > On 1/26/21 2:24 AM, Joelle van Dyne wrote: > > Replace Windows specific macro with a more generic feature detection > > macro. Allows slirp smb feature to be disabled manually as well. > > > > Signed-off-by: Joelle van Dyne > > --

Re: vnc clipboard support

2021-01-28 Thread Marc-André Lureau
Hi On Thu, Jan 28, 2021 at 9:14 PM Gerd Hoffmann wrote: > Hi folks, > > I'm looking for a good way to implement cut+paste support for vnc. > > The vnc core protocol has support for text/plain cut+paste, and there > is an extension adding support for other formats. That'll cover one > part of

Re: [PATCH 0/1] tests/acceptance/boot_linux: Switch to Fedora 32

2021-01-28 Thread Wainer dos Santos Moschetta
Hi, On 1/26/21 10:09 PM, Daniele Buono wrote: Local acceptance tests run with "make check-acceptance" are now showing some cases canceled like the following: (01/39) tests/acceptance/boot_linux.py:BootLinuxX8664.test_pc_i440fx_tcg: CANCEL: Failed to download/prepare boot image (0.25 s) Turns

[PATCH] gdbstub: Fix handle_query_xfer_auxv

2021-01-28 Thread Richard Henderson
The main problem was that we were treating a guest address as a host address with a mere cast. Use the correct interface for accessing guest memory. Do not allow offset == auxv_len, which would result in an empty packet. Fixes: 51c623b0de1 ("gdbstub: add support to Xfer:auxv:read: packet") Signe

[PATCH 1/3] block/nbd: only detach existing iochannel from aio_context

2021-01-28 Thread Roman Kagan
When the reconnect in NBD client is in progress, the iochannel used for NBD connection doesn't exist. Therefore an attempt to detach it from the aio_context of the parent BlockDriverState results in a NULL pointer dereference. The problem is triggerable, in particular, when an outgoing migration

[PATCH 3/3] nbd: make nbd_read* return -EIO on error

2021-01-28 Thread Roman Kagan
NBD reconnect logic considers the error code from the functions that read NBD messages to tell if reconnect should be attempted or not: it is attempted on -EIO, otherwise the client transitions to NBD_CLIENT_QUIT state (see nbd_channel_error). This error code is propagated from the primitives like

[PATCH 0/3] block/nbd: fix crashers in reconnect while migrating

2021-01-28 Thread Roman Kagan
During the final phase of migration the NBD reconnection logic may encounter situations it doesn't expect during regular operation. This series addresses some of them that make qemu crash. They are reproducible when a vm with a secondary drive attached via nbd with non-zero "reconnect-delay" runs

[PATCH 2/3] block/nbd: only enter connection coroutine if it's present

2021-01-28 Thread Roman Kagan
When an NBD block driver state is moved from one aio_context to another (e.g. when doing a drain in a migration thread), nbd_client_attach_aio_context_bh is executed that enters the connection coroutine. However, the assumption that ->connection_co is always present here appears incorrect: the con

Re: [PULL 0/8] Block layer patches

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 21:19, Peter Maydell wrote: On Wed, 27 Jan 2021 at 19:58, Kevin Wolf wrote: The following changes since commit bf159f0bdc7b8e7aa8342dedb3829ca744c1b612: Merge remote-tracking branch 'remotes/edgar/tags/edgar/xilinx-next-2021-01-27.for-upstream' into staging (2021-01-27 17:40:2

Re: [PATCH] iotests/297: pylint: ignore too many statements

2021-01-28 Thread Vladimir Sementsov-Ogievskiy
28.01.2021 23:04, Vladimir Sementsov-Ogievskiy wrote: Ignore two complains, which now lead to 297 failure on testenv.py and testrunner.py. Fixes: 2e5a2f57db481f18fcf70be2a36b1417370b8476 Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628 Signed-off-by: Vladimir Sementsov-Ogievskiy --- Forget to

  1   2   3   4   >