Re: [PATCH 10/13] block: add generic infrastructure for x-blockdev-amend qmp command

2020-01-21 Thread Markus Armbruster
Maxim Levitsky writes: > blockdev-amend will be used similiar to blockdev-create > to allow on the fly changes of the structure of the format based block > devices. > > Current plan is to first support encryption keyslot management for luks > based formats (raw and embedded in qcow2) > >

Re: [GSoC/Outreachy QEMU project proposal] Measure and Analyze QEMU Performance

2020-01-21 Thread Lukáš Doktor
Dne 18. 01. 20 v 15:08 Aleksandar Markovic napsal(a): > Hi, everybody. > > I am going to propose several ideas for QEMU participation in GSoC/Outreachy > in next few days. This is the first one. Please feel free to give an honest > feedback. > > Yours, > Aleksandar > Hello Aleksandr, sounds

Re: [RFC PATCH] qapi: Incorrect attempt to fix building with MC146818RTC=n

2020-01-21 Thread Paolo Bonzini
On 21/01/20 06:49, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 13/01/20 15:01, Markus Armbruster wrote: >>> Philippe Mathieu-Daudé writes: >>> When configured with --without-default-devices and setting MC146818RTC=n, the build fails: LINK

Re: [PATCH v4 4/7] python/qemu/machine: Allow to use other serial consoles than default

2020-01-21 Thread Philippe Mathieu-Daudé
On 1/21/20 12:51 AM, Philippe Mathieu-Daudé wrote: Currently the QEMU Python module limits the QEMUMachine class to use the first serial console. Some machines/guest might use another console than the first one as the 'boot console'. For example the Raspberry Pi uses the second (AUX) console.

Re: [PATCH 1/2] pvpanic: introduce crashloaded for pvpanic

2020-01-21 Thread Markus Armbruster
zhenwei pi writes: > Add bit 1 for pvpanic. This bit means that guest hits a panic, but > guest wants to handle error by itself. Typical case: Linux guest runs > kdump in panic. It will help us to separate the abnormal reboot from > normal operation. > > Signed-off-by: zhenwei pi > --- >

Re: [PATCH v3 64/84] ppc/{ppc440_bamboo,sam460ex}: drop RAM size fixup

2020-01-21 Thread Igor Mammedov
On Mon, 20 Jan 2020 18:02:57 +0100 (CET) BALATON Zoltan wrote: > On Mon, 20 Jan 2020, Igor Mammedov wrote: > > If user provided non-sense RAM size, board will complain and > > continue running with max RAM size supported or sometimes > > crash like this: > > %QEMU -M bamboo -m 1 > >

Re: [PATCH v4 5/7] tests/boot_linux_console: Test booting U-Boot on the Raspberry Pi 2

2020-01-21 Thread Philippe Mathieu-Daudé
On 1/21/20 7:57 AM, Gerd Hoffmann wrote: On Tue, Jan 21, 2020 at 12:51:57AM +0100, Philippe Mathieu-Daudé wrote: This test runs U-Boot on the Raspberry Pi 2. U-Boot is built by the Debian project, see:

Re: [PATCH 2/2] pvpanic: implement crashloaded event handling

2020-01-21 Thread Markus Armbruster
zhenwei pi writes: > Handle bit 1 write, then post event to monitor. > > Suggested by Paolo, declear a new event, using GUEST_PANICKED could > cause upper layers to react by shutting down or rebooting the guest. > > In advance for extention, add GuestPanicInformation in event message. > >

Re: [PATCH 1/2] aspeed/scu: Create separate write callbacks

2020-01-21 Thread Philippe Mathieu-Daudé
On 1/21/20 2:33 AM, Joel Stanley wrote: This splits the common write callback into separate ast2400 and ast2500 implementations. This makes it clearer when implementing differing behaviour. Signed-off-by: Joel Stanley --- hw/misc/aspeed_scu.c | 80

Re: [PATCH 2/2] aspeed/scu: Implement chip ID register

2020-01-21 Thread Philippe Mathieu-Daudé
On 1/21/20 2:33 AM, Joel Stanley wrote: This returns a fixed but non-zero value for the chip id. Signed-off-by: Joel Stanley --- hw/misc/aspeed_scu.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index

Re: [PATCH 00/15] Replace current_machine by qdev_get_machine()

2020-01-21 Thread Markus Armbruster
Quick pointer to prior discussion: Message-ID: <87ftqh1ae5@dusky.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2019-04/msg02860.html

[PATCH 0/2] RISC-V TIME CSR for privileged mode

2020-01-21 Thread Anup Patel
This series adds emulation of TIME CSRs for privileged mode. With this series, we see approximately 25+% improvement in hackbench numbers for non-virtualized (or Host) Linux and 40+% improvement in hackbench numbers for Guest/VM Linux. These patches are based on

[PATCH 1/2] target/riscv: Emulate TIME CSRs for privileged mode

2020-01-21 Thread Anup Patel
Currently, TIME CSRs are emulated only for user-only mode. This patch add TIME CSRs emulation for privileged mode. For privileged mode, the TIME CSRs will return value provided by rdtime callback which is registered by QEMU machine/platform emulation (i.e. CLINT emulation). If rdtime callback is

[PATCH 2/2] hw/riscv: Provide rdtime callback for TCG in CLINT emulation

2020-01-21 Thread Anup Patel
This patch extends CLINT emulation to provide rdtime callback for TCG. This rdtime callback will be called wheneven TIME CSRs are read in privileged modes. Signed-off-by: Anup Patel --- hw/riscv/sifive_clint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/riscv/sifive_clint.c

Re: [PATCH v10 2/2] docs: qcow2: introduce compression type feature

2020-01-21 Thread Vladimir Sementsov-Ogievskiy
20.01.2020 22:46, Eric Blake wrote: > On 1/20/20 11:13 AM, Vladimir Sementsov-Ogievskiy wrote: >> The patch add new additional field to qcow2 header: compression_type, > > s/add/adds a/ > s/to/to the/ > >> which specifies compression type. If field is absent or zero, default >> compression type

Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation

2020-01-21 Thread Max Reitz
On 20.01.20 18:20, Vladimir Sementsov-Ogievskiy wrote: > 20.01.2020 20:04, Max Reitz wrote: >> On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote: >>> This test checks that bug is really fixed by previous commit. >>> >>> Cc: qemu-sta...@nongnu.org # v4.2.0 >>> Signed-off-by: Vladimir

How to set a limit and clear Avocado cache?

2020-01-21 Thread Philippe Mathieu-Daudé
Hello, Today I ran out of space in my /home, I ran the 'baobab' tool and while the first bigger directory was obvious to me (~/.ccache), the second wasn't: ~/avocado/data/cache/by_location/, with various GiB. Note, this directory is not listed in my config... $ avocado config | fgrep

Re: [PATCH v3 04/10] hbitmap: drop meta bitmaps as they are unused

2020-01-21 Thread Vladimir Sementsov-Ogievskiy
20.01.2020 22:53, Eric Blake wrote: > On 1/20/20 11:28 AM, Vladimir Sementsov-Ogievskiy wrote: > I'm a bit not follow what you mean. I can just note, that dirty-bitmap.c part of meta bitmaps was recently removed, and hbitmap.c part I forgot to remove... >>> >>> Yes, but who used

Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation

2020-01-21 Thread Vladimir Sementsov-Ogievskiy
21.01.2020 12:14, Max Reitz wrote: > On 20.01.20 18:20, Vladimir Sementsov-Ogievskiy wrote: >> 20.01.2020 20:04, Max Reitz wrote: >>> On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote: This test checks that bug is really fixed by previous commit. Cc: qemu-sta...@nongnu.org #

[PATCH 0/2] Prevent uninitialized warnings

2020-01-21 Thread mrezanin
From: Miroslav Rezanina Using -Wmaybe-uninitialized when optimalization is enabled can cause several warnings during build. This will break build in case -Werror is used. This series fixes two cases of this warnings that can happen during build of QEMU. Miroslav Rezanina (2): test-logging:

[PATCH 2/2] aspeed/i2c: Prevent uninitialized warning

2020-01-21 Thread mrezanin
From: Miroslav Rezanina Compiler reports uninitialized warning for cmd_flags variable. Adding NULL initialization to prevent this warning. Signed-off-by: Miroslav Rezanina --- hw/i2c/aspeed_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i2c/aspeed_i2c.c

[PATCH 1/2] test-logging: Fix -Werror=maybe-uninitialized warning

2020-01-21 Thread mrezanin
From: Miroslav Rezanina Checking for uninitialized variables raises warning for file path variables in test_logfile_write and test_logfile_lock functions. To suppress this warning, initialize varibles to NULL. This is safe change as result of g_build_filename is stored to them before any usage.

Re: [PATCH] spapr: Migrate CAS reboot flag

2020-01-21 Thread Greg Kurz
On Tue, 21 Jan 2020 14:43:32 +1100 David Gibson wrote: > On Mon, Jan 20, 2020 at 09:04:38AM +0100, Greg Kurz wrote: > > On Fri, 17 Jan 2020 16:44:27 +0100 > > Greg Kurz wrote: > > > > > On Fri, 17 Jan 2020 19:16:08 +1000 > > > David Gibson wrote: > > > > > > > On Thu, Jan 16, 2020 at

Re: [PATCH v3 06/10] block/dirty-bitmap: add _next_dirty API

2020-01-21 Thread Vladimir Sementsov-Ogievskiy
20.01.2020 19:30, Vladimir Sementsov-Ogievskiy wrote: > 20.01.2020 16:14, Max Reitz wrote: >> On 19.12.19 11:03, Vladimir Sementsov-Ogievskiy wrote: >>> We have bdrv_dirty_bitmap_next_zero, let's add corresponding >>> bdrv_dirty_bitmap_next_dirty, which is more comfortable to use than >>> bitmap

Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation

2020-01-21 Thread Max Reitz
On 21.01.20 10:23, Vladimir Sementsov-Ogievskiy wrote: > 21.01.2020 12:14, Max Reitz wrote: >> On 20.01.20 18:20, Vladimir Sementsov-Ogievskiy wrote: >>> 20.01.2020 20:04, Max Reitz wrote: On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote: > This test checks that bug is really fixed

[PATCH v5 1/6] iotests: remove 'linux' from default supported platforms

2020-01-21 Thread Thomas Huth
From: John Snow verify_platform will check an explicit whitelist and blacklist instead. The default will now be assumed to be allowed to run anywhere. For tests that do not specify their platforms explicitly, this has the effect of enabling these tests on non-linux platforms. For tests that

[PATCH v5 0/6] Enable more iotests during "make check-block"

2020-01-21 Thread Thomas Huth
As discussed here: https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg00697.html and here: https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg01388.html it would be good to have some more valuable iotests enabled in the "auto" group to get better iotest coverage during "make

[PATCH v5 3/6] iotests: Test 183 does not work on macOS and OpenBSD

2020-01-21 Thread Thomas Huth
In the long run, we might want to add test 183 to the "auto" group (but it still fails occasionally, so we cannot do that yet). However, when running 183 in Cirrus-CI on macOS, or with our vm-build-openbsd target, it currently always fails with an "Timeout waiting for return on handle 0" error.

[PATCH v5 2/6] iotests: Test 041 only works on certain systems

2020-01-21 Thread Thomas Huth
041 works fine on Linux, FreeBSD, NetBSD and OpenBSD, but fails on macOS. Let's mark it as only supported on the systems where we know that it is working fine. Reviewed-by: Max Reitz Signed-off-by: Thomas Huth --- tests/qemu-iotests/041 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

[PATCH v5 6/6] iotests: Enable more tests in the 'auto' group to improve test coverage

2020-01-21 Thread Thomas Huth
According to Kevin, tests 030, 040 and 041 are among the most valuable tests that we have, so we should always run them if possible, even if they take a little bit longer. According to Max, it would be good to have a test for iothreads and migration. 127 and 256 seem to be good candidates for

[PATCH v5 4/6] iotests: Check for the availability of the required devices in 267 and 127

2020-01-21 Thread Thomas Huth
We are going to enable 127 in the "auto" group, but it only works if virtio-scsi and scsi-hd are available - which is not the case with QEMU binaries like qemu-system-tricore for example, so we need a proper check for the availability of these devices here. A very similar problem exists in iotest

[PATCH v5 5/6] iotests: Skip Python-based tests if QEMU does not support virtio-blk

2020-01-21 Thread Thomas Huth
We are going to enable some of the python-based tests in the "auto" group, and these tests require virtio-blk to work properly. Running iotests without virtio-blk likely does not make too much sense anyway, so instead of adding a check for the availability of virtio-blk to each and every test

[PATCH] s390x/event-facility: fix error propagation

2020-01-21 Thread Cornelia Huck
We currently check (by error) if the passed-in Error pointer errp is non-null and return after realizing the first child of the event facility in that case. Symptom is that 'virsh shutdown' does not work, as the sclpquiesce device is not realized. Fix this by (correctly) checking the local Error

Re: [PATCH] s390x/event-facility: fix error propagation

2020-01-21 Thread David Hildenbrand
On 21.01.20 10:55, Cornelia Huck wrote: > We currently check (by error) if the passed-in Error pointer errp > is non-null and return after realizing the first child of the > event facility in that case. Symptom is that 'virsh shutdown' > does not work, as the sclpquiesce device is not realized. >

Re: [PATCH 1/2] test-logging: Fix -Werror=maybe-uninitialized warning

2020-01-21 Thread Thomas Huth
On 21/01/2020 10.28, mreza...@redhat.com wrote: > From: Miroslav Rezanina > > Checking for uninitialized variables raises warning for file path > variables in test_logfile_write and test_logfile_lock functions. > > To suppress this warning, initialize varibles to NULL. This is safe > change as

Re: [PATCH 006/104] virtiofsd: Trim down imported files

2020-01-21 Thread Xiao Yang
On 2019/12/13 0:37, Dr. David Alan Gilbert (git) wrote: - res = fuse_buf_copy(_buf, buf, - FUSE_BUF_FORCE_SPLICE | FUSE_BUF_SPLICE_NONBLOCK); - if (res< 0) { - if (res == -EAGAIN || res == -EINVAL) { - /* -

Re: [PATCH] s390x/event-facility: fix error propagation

2020-01-21 Thread Christian Borntraeger
On 21.01.20 10:55, Cornelia Huck wrote: > We currently check (by error) if the passed-in Error pointer errp > is non-null and return after realizing the first child of the > event facility in that case. Symptom is that 'virsh shutdown' > does not work, as the sclpquiesce device is not realized.

Re: [PATCH 2/2] aspeed/i2c: Prevent uninitialized warning

2020-01-21 Thread Thomas Huth
On 21/01/2020 10.28, mreza...@redhat.com wrote: > From: Miroslav Rezanina > > Compiler reports uninitialized warning for cmd_flags variable. > > Adding NULL initialization to prevent this warning. > > Signed-off-by: Miroslav Rezanina > --- > hw/i2c/aspeed_i2c.c | 2 +- > 1 file changed, 1

Re: [PATCH] s390x/event-facility: fix error propagation

2020-01-21 Thread Thomas Huth
On 21/01/2020 10.55, Cornelia Huck wrote: > We currently check (by error) if the passed-in Error pointer errp > is non-null and return after realizing the first child of the > event facility in that case. Symptom is that 'virsh shutdown' > does not work, as the sclpquiesce device is not realized.

[PATCH] riscv: Fix bug in setting xPIE of CSR for MRET and SRET instructions

2020-01-21 Thread Ian Jiang
According to the RISC-V specification, when executing an MRET or SRET instruction, xPIE in mstatus or sstatus should be set to 1. The orginal QEMU does not give the right operations. This patch fix the problem. Signed-off-by: Ian Jiang --- target/riscv/op_helper.c | 4 ++-- 1 file changed, 2

Re: [PATCH v2 3/5] linux-user/i386: Emulate x86_64 vsyscalls

2020-01-21 Thread Alex Bennée
Richard Henderson writes: > On 1/20/20 1:48 AM, Alex Bennée wrote: >>> +default: >>> +sigsegv: >> >> this label looks a little extraneous. >> >> Otherwise: >> >> Reviewed-by: Alex Bennée >> > > Look a little further down: > >> +default: >> +sigsegv: >> +/* Like

Re: [PATCH v3 08/10] nbd/server: introduce NBDExtentArray

2020-01-21 Thread Vladimir Sementsov-Ogievskiy
20.01.2020 23:20, Eric Blake wrote: > On 12/19/19 4:03 AM, Vladimir Sementsov-Ogievskiy wrote: >> Introduce NBDExtentArray class, to handle extents list creation in more >> controlled way and with less OUT parameters in functions. > > s/less/fewer/ > >> >> Signed-off-by: Vladimir

Re: [PATCH v5 0/6] Enable more iotests during "make check-block"

2020-01-21 Thread Max Reitz
On 21.01.20 10:51, Thomas Huth wrote: > As discussed here: > > https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg00697.html > > and here: > > https://lists.gnu.org/archive/html/qemu-devel/2019-10/msg01388.html > > it would be good to have some more valuable iotests enabled in the >

Re: [PATCH 2/2] iotests: add test for backup-top failure on permission activation

2020-01-21 Thread Vladimir Sementsov-Ogievskiy
21.01.2020 12:41, Max Reitz wrote: > On 21.01.20 10:23, Vladimir Sementsov-Ogievskiy wrote: >> 21.01.2020 12:14, Max Reitz wrote: >>> On 20.01.20 18:20, Vladimir Sementsov-Ogievskiy wrote: 20.01.2020 20:04, Max Reitz wrote: > On 16.01.20 16:54, Vladimir Sementsov-Ogievskiy wrote: >>

Re: [PATCH 1/2] target/riscv: Emulate TIME CSRs for privileged mode

2020-01-21 Thread Alistair Francis
On Tue, Jan 21, 2020 at 7:03 PM Anup Patel wrote: > > Currently, TIME CSRs are emulated only for user-only mode. This > patch add TIME CSRs emulation for privileged mode. > > For privileged mode, the TIME CSRs will return value provided > by rdtime callback which is registered by QEMU

Re: [PATCH 2/2] aspeed/i2c: Prevent uninitialized warning

2020-01-21 Thread Cédric Le Goater
On 1/21/20 11:02 AM, Thomas Huth wrote: > On 21/01/2020 10.28, mreza...@redhat.com wrote: >> From: Miroslav Rezanina >> >> Compiler reports uninitialized warning for cmd_flags variable. >> >> Adding NULL initialization to prevent this warning. >> >> Signed-off-by: Miroslav Rezanina >> --- >>

Re: [PATCH 2/2] hw/riscv: Provide rdtime callback for TCG in CLINT emulation

2020-01-21 Thread Alistair Francis
On Tue, Jan 21, 2020 at 7:04 PM Anup Patel wrote: > > This patch extends CLINT emulation to provide rdtime callback for > TCG. This rdtime callback will be called wheneven TIME CSRs are > read in privileged modes. > > Signed-off-by: Anup Patel Reviewed-by: Alistair Francis Alistair > --- >

Re: [PATCH] riscv: Fix bug in setting xPIE of CSR for MRET and SRET instructions

2020-01-21 Thread Alistair Francis
On Tue, Jan 21, 2020 at 8:08 PM Ian Jiang wrote: > > According to the RISC-V specification, when executing an MRET or SRET > instruction, xPIE in mstatus or sstatus should be set to 1. The orginal > QEMU does not give the right operations. > This patch fix the problem. > > Signed-off-by: Ian

Re: [PATCH 0/6] Fix more GCC9 -O3 warnings

2020-01-21 Thread Paolo Bonzini
On 20/01/20 20:02, Philippe Mathieu-Daudé wrote: > Hi Paolo, > > On 1/18/20 8:24 PM, Paolo Bonzini wrote: >> On 18/12/19 07:05, Markus Armbruster wrote: >>> "Chubb, Peter (Data61, Kensington NSW)" >>> writes: >>> > "Philippe" == Philippe Mathieu-Daudé writes: Philippe> Fix

Re: [PATCH 2/2] pvpanic: implement crashloaded event handling

2020-01-21 Thread Paolo Bonzini
On 20/01/20 20:12, Eric Blake wrote: >> +# >> +# Example: >> +# >> +# <- { "event": "GUEST_CRASHLOADED", >> +#  "data": { "action": "run" } } >> +# >> +## >> +{ 'event': 'GUEST_CRASHLOADED', >> +  'data': { 'action': 'GuestPanicAction', '*info': >> 'GuestPanicInformation' } } >> + >> +## >>  

Re: [PATCH 1/2] pvpanic: introduce crashloaded for pvpanic

2020-01-21 Thread Paolo Bonzini
On 21/01/20 09:22, Markus Armbruster wrote: > zhenwei pi writes: > >> Add bit 1 for pvpanic. This bit means that guest hits a panic, but >> guest wants to handle error by itself. Typical case: Linux guest runs >> kdump in panic. It will help us to separate the abnormal reboot from >> normal

Re: riscv: How to check floating point support is currently enabled?

2020-01-21 Thread Alistair Francis
On Tue, Jan 21, 2020 at 11:12 AM Ian Jiang wrote: > > The function riscv_cpu_fp_enabled() is used for checking whether floating > point support is currently enabled. In fact it checks the FS field in the > mstatus MSR. > > target/riscv/cpu_helper.c > 76 bool riscv_cpu_fp_enabled(CPURISCVState

Re: [PATCH 006/104] virtiofsd: Trim down imported files

2020-01-21 Thread Dr. David Alan Gilbert
* Xiao Yang (yangx...@cn.fujitsu.com) wrote: > On 2019/12/13 0:37, Dr. David Alan Gilbert (git) wrote: > > - res = fuse_buf_copy(_buf, buf, > > - FUSE_BUF_FORCE_SPLICE | FUSE_BUF_SPLICE_NONBLOCK); > > - if (res< 0) { > > - if (res == -EAGAIN || res == -EINVAL)

Re: [PATCH v2 0/6] buildsys: Build faster (mostly tools and linux-user)

2020-01-21 Thread Paolo Bonzini
On 18/01/20 15:22, Philippe Mathieu-Daudé wrote: >> >> Supersedes: <20200109153939.27173-1-phi...@redhat.com> > >   ^ testing latest patchew feature, v2 has different subject name >     than v1, but patchew successfully linked them :) Appreciated! You've now demonstrated the case where the

Re: [PULL 0/5] 9p patches 2020-01-20

2020-01-21 Thread Peter Maydell
On Mon, 20 Jan 2020 at 17:06, Greg Kurz wrote: > > The following changes since commit 43d1455cf84283466e5c22a217db5ef4b8197b14: > > qapi: Fix code generation with Python 3.5 (2020-01-20 12:17:38 +) > > are available in the Git repository at: > > https://github.com/gkurz/qemu.git

Re: [PATCH 2/2] aspeed/i2c: Prevent uninitialized warning

2020-01-21 Thread Miroslav Rezanina
- Original Message - > From: "Cédric Le Goater" > To: "Thomas Huth" , mreza...@redhat.com, > qemu-devel@nongnu.org > Cc: "peter maydell" , "Andrew Jeffery" > , "Joel Stanley" , > qemu-triv...@nongnu.org > Sent: Tuesday, January 21, 2020 11:44:14 AM > Subject: Re: [PATCH 2/2]

Re: [PATCH v2 5/6] hw/core: Restrict reset handlers API to system-mode

2020-01-21 Thread Philippe Mathieu-Daudé
On 1/20/20 12:07 PM, Alex Bennée wrote: Philippe Mathieu-Daudé writes: The user-mode code does not use this API, restrict it to the system-mode. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/Makefile.objs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v1 15/36] target/riscv: Convert mstatus to pointers

2020-01-21 Thread Alistair Francis
On Wed, Jan 8, 2020 at 11:30 AM Palmer Dabbelt wrote: > > On Mon, 09 Dec 2019 10:11:19 PST (-0800), Alistair Francis wrote: > > To handle the new Hypervisor CSR register aliasing let's use pointers. > > For some reason I thought we were making this explicit? In other words, > requiring that all

[PATCH v2 00/10] Cleanups around the 'current_machine' global variable

2020-01-21 Thread Philippe Mathieu-Daudé
v1 was "Replace current_machine by qdev_get_machine()": https://www.mail-archive.com/qemu-devel@nongnu.org/msg669611.html But Markus objected, see: https://www.mail-archive.com/qemu-devel@nongnu.org/msg670122.html and older discussion:

[PATCH v2 02/10] hw/ppc/spapr_rtas: Access MachineState via SpaprMachineState argument

2020-01-21 Thread Philippe Mathieu-Daudé
We received a SpaprMachineState argument. Since SpaprMachineState inherits of MachineState, use it instead of calling qdev_get_machine. Reviewed-by: Greg Kurz Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v2 01/10] hw/ppc/spapr_rtas: Use local MachineState variable

2020-01-21 Thread Philippe Mathieu-Daudé
Since we have the MachineState already available locally, use it instead of the global current_machine. Reviewed-by: Greg Kurz Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé --- hw/ppc/spapr_rtas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 04/10] target/arm/kvm: Use CPUState::kvm_state in kvm_arm_pmu_supported()

2020-01-21 Thread Philippe Mathieu-Daudé
KVMState is already accessible via CPUState::kvm_state, use it. Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- target/arm/kvm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index b87b59a02a..8d82889150

[PATCH v2 07/10] qdev: Abort if the root machine container is missing

2020-01-21 Thread Philippe Mathieu-Daudé
The QEMU device API (qdev) relies on having the '/machine' container always available. If it is missing, QEMU will later crash dereferencing a NULL pointer, we will get a SEGV, open a debugger, look at the backtrace, and figure out we messed with QOM. Or we can use g_assert() which abort,

[PATCH v2 03/10] hw/ppc/spapr_rtas: Remove local variable

2020-01-21 Thread Philippe Mathieu-Daudé
We only access this variable in the RTAS_SYSPARM_SPLPAR_CHARACTERISTICS case. Use it in place and remove the local declaration. Suggested-by: Greg Kurz Signed-off-by: Philippe Mathieu-Daudé --- v2: Do not reduce MachineState variable scope (David Gibson) --- hw/ppc/spapr_rtas.c | 5 ++--- 1

[PATCH v2 08/10] accel: Introduce the current_accel() wrapper

2020-01-21 Thread Philippe Mathieu-Daudé
The accel/ code only access the MachineState::accel field. As we simply want to access the accelerator, not the machine, add a current_accel() wrapper. Suggested-by: Paolo Bonzini Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- v2: Reworded description using 'wrapper'

[PATCH v2 05/10] target/s390x: Remove duplicated ifdef macro

2020-01-21 Thread Philippe Mathieu-Daudé
Commit ae71ed8610 replaced the use of global max_cpus variable with a machine property, but introduced a unnecessary ifdef, as this block is already in the 'not CONFIG_USER_ONLY' branch part: 86 #if defined(CONFIG_USER_ONLY) 87 ... 106 #else /* !CONFIG_USER_ONLY */ 107 ... 292

[PATCH v2 09/10] accel: Replace current_machine->accelerator by current_accel() wrapper

2020-01-21 Thread Philippe Mathieu-Daudé
We actually want to access the accelerator, not the machine, so use the current_accel() wrapper instead. Suggested-by: Paolo Bonzini Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- v2: - Reworded description - Remove unused include in arm/kvm64 --- accel/kvm/kvm-all.c

Re: [PATCH v3 2/5] migration: Create MigrationState active field

2020-01-21 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> Right now, there is no easy way to dectect if we have already >> cancelled/finished/failed a migration. This field is setup to true >> when we start a migration, and it is set to false as soon as we stop >> it. >>

[PATCH v2 06/10] qom/object: Display more helpful message when a parent is missing

2020-01-21 Thread Philippe Mathieu-Daudé
QEMU object model is scarse in documentation. Some calls are recursive, and it might be hard to figure out even trivial issues. We can avoid developers to waste time in a debugging session by displaying a simple error message. This commit is also similar to e02bdf1cecd2 ("Display more helpful

[PATCH v2 10/10] accel/tcg: Sanitize include path

2020-01-21 Thread Philippe Mathieu-Daudé
Commit af0440ae852 moved the qemu_tcg_configure() function, but introduced extraneous 'include/' in the includes path. As it is not necessary, remove it. Signed-off-by: Philippe Mathieu-Daudé --- v2: New patch --- accel/tcg/tcg-all.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: Proposal for handling .hx files with Sphinx

2020-01-21 Thread Peter Maydell
On Tue, 21 Jan 2020 at 06:40, Markus Armbruster wrote: > John Snow writes: > > Still, I do want to ask: Are we sure we want to double-down on keeping > > the .hx files around instead of trying to move to a more generic data > > format? > > One the one hand, I'd prefer to invest as little as

Re: [PATCH v3 3/5] migration: Don't wait in semaphore for thread we know has finished

2020-01-21 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> If p->quit is true for any channel, we know that it has finished for >> any reason. So don't wait for it, just continue. >> >> Signed-off-by: Juan Quintela >> >> --- >> >> I could be convinced that the right

Re: [PATCH v1 17/36] target/riscv: Set VS bits in mideleg for Hyp extension

2020-01-21 Thread Alistair Francis
On Wed, Jan 8, 2020 at 12:07 PM Palmer Dabbelt wrote: > > On Mon, 09 Dec 2019 10:11:24 PST (-0800), Alistair Francis wrote: > > Signed-off-by: Alistair Francis > > --- > > target/riscv/csr.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/target/riscv/csr.c

Re: [PATCH] Makefile: add missing mkdir MANUAL_BUILDDIR

2020-01-21 Thread Miroslav Rezanina
On Mon, Jan 20, 2020 at 04:34:00PM +, Stefan Hajnoczi wrote: > The MANUAL_BUILDDIR directory is automatically created by sphinx-build > for the other targets. The index.html target does not use sphinx-build > so we must manually create the directory to avoid the following error: > > GEN

Re: [Qemu-devel] [RFC PATCH] Implement qemu_thread_yield for posix, use it in mttcg to handle EXCP_YIELD

2020-01-21 Thread Nicholas Piggin
Alex Bennée's on December 20, 2019 11:11 pm: > > Nicholas Piggin writes: > >> This is a bit of proof of concept in case mttcg becomes more important >> yield could be handled like this. You can have by accident or deliberately >> force vCPUs onto the same physical CPU and cause inversion issues

Re: [PATCH v1 17/36] target/riscv: Set VS bits in mideleg for Hyp extension

2020-01-21 Thread Anup Patel
On Tue, Jan 21, 2020 at 4:43 PM Alistair Francis wrote: > > On Wed, Jan 8, 2020 at 12:07 PM Palmer Dabbelt > wrote: > > > > On Mon, 09 Dec 2019 10:11:24 PST (-0800), Alistair Francis wrote: > > > Signed-off-by: Alistair Francis > > > --- > > > target/riscv/csr.c | 3 +++ > > > 1 file changed,

Re: Making QEMU easier for management tools and applications

2020-01-21 Thread Stefan Hajnoczi
On Tue, Jan 21, 2020 at 06:42:47AM +0100, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Wed, Jan 15, 2020 at 01:15:17PM +0100, Markus Armbruster wrote: > >> Christophe de Dinechin writes: > >> >> On 15 Jan 2020, at 10:20, Markus Armbruster wrote: > >> *

Re: [PATCH v4 00/15] io_uring: add Linux io_uring AIO engine

2020-01-21 Thread Stefan Hajnoczi
On Mon, Jan 20, 2020 at 10:35:33AM +, Stefan Hajnoczi wrote: > On Tue, Jan 14, 2020 at 10:59:06AM +, Stefan Hajnoczi wrote: > > v13: > > * Drop unnecessary changes in Patch 8 [Stefano] > > > > v12: > > * Reword BlockdevAioOptions QAPI schema commit description [Markus] > > * Increase

Re: [PATCH v5 00/15] io_uring: add Linux io_uring AIO engine

2020-01-21 Thread Stefan Hajnoczi
On Mon, Jan 20, 2020 at 02:18:43PM +, Stefan Hajnoczi wrote: > v5: > * Add back BDRV_O_IO_URING check that was dropped accidentally in v3 >[Kevin] > > v4: > * Drop unnecessary changes in Patch 8 [Stefano] > > v3: > * Reword BlockdevAioOptions QAPI schema commit description [Markus] >

Re: [PATCH 016/104] virtiofsd: Open vhost connection instead of mounting

2020-01-21 Thread Dr. David Alan Gilbert
* Misono Tomohiro (misono.tomoh...@jp.fujitsu.com) wrote: > > From: "Dr. David Alan Gilbert" > > > > When run with vhost-user options we conect to the QEMU instead > > via a socket. Start this off by creating the socket. > > > > Signed-off-by: Dr. David Alan Gilbert > > --- > > > > +/*

Re: [PATCH 0/3] Use only trace_event_get_state_backends() to check trace enablement

2020-01-21 Thread Stefan Hajnoczi
On Mon, Jan 20, 2020 at 03:11:39PM +, Peter Maydell wrote: > Currently docs/devel/tracing.txt recommends checking the > TRACE_FOO_ENABLED macro to see if the FOO event is enabled, > for the purpose of skipping expensive computations that > are only used in trace output. > > This is no longer

Re: [PATCH 2/2] aspeed/i2c: Prevent uninitialized warning

2020-01-21 Thread Thomas Huth
On 21/01/2020 11.44, Cédric Le Goater wrote: > On 1/21/20 11:02 AM, Thomas Huth wrote: >> On 21/01/2020 10.28, mreza...@redhat.com wrote: >>> From: Miroslav Rezanina >>> >>> Compiler reports uninitialized warning for cmd_flags variable. >>> >>> Adding NULL initialization to prevent this warning.

Re: Proposal for handling .hx files with Sphinx

2020-01-21 Thread Peter Maydell
On Tue, 21 Jan 2020 at 11:12, Peter Maydell wrote: > > On Tue, 21 Jan 2020 at 06:40, Markus Armbruster wrote: > > John Snow writes: > > > Still, I do want to ask: Are we sure we want to double-down on keeping > > > the .hx files around instead of trying to move to a more generic data > > >

Re: [PATCH] Makefile: add missing mkdir MANUAL_BUILDDIR

2020-01-21 Thread Peter Maydell
On Tue, 21 Jan 2020 at 11:06, Miroslav Rezanina wrote: > > On Mon, Jan 20, 2020 at 04:34:00PM +, Stefan Hajnoczi wrote: > > The MANUAL_BUILDDIR directory is automatically created by sphinx-build > > for the other targets. The index.html target does not use sphinx-build > > so we must

Re: Making QEMU easier for management tools and applications

2020-01-21 Thread Marc-André Lureau
Hi On Tue, Jan 21, 2020 at 3:32 PM Stefan Hajnoczi wrote: > > On Tue, Jan 21, 2020 at 06:42:47AM +0100, Markus Armbruster wrote: > > Stefan Hajnoczi writes: > > > > > On Wed, Jan 15, 2020 at 01:15:17PM +0100, Markus Armbruster wrote: > > >> Christophe de Dinechin writes: > > >> >> On 15 Jan

Re: [PATCH v3 3/5] qcow2: Use bs->bl.request_alignment when updating an L1 entry

2020-01-21 Thread Max Reitz
On 18.01.20 20:09, Alberto Garcia wrote: > When updating an L1 entry the qcow2 driver writes a (512-byte) sector > worth of data to avoid a read-modify-write cycle. Instead of always > writing 512 bytes we should follow the alignment requirements of the > storage backend. > > (the only exception

Re: [PATCH v3 4/5] qcow2: Don't require aligned offsets in qcow2_co_copy_range_from()

2020-01-21 Thread Max Reitz
On 18.01.20 20:09, Alberto Garcia wrote: > qemu-img's convert_co_copy_range() operates at the sector level and > block_copy() operates at the cluster level so this condition is always > true, but it is not necessary to restrict this here, so let's leave it > to the driver implementation return an

Re: [PATCH v3 5/5] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-21 Thread Max Reitz
On 18.01.20 20:09, Alberto Garcia wrote: > This replaces all remaining instances in the qcow2 code. > > Signed-off-by: Alberto Garcia > --- > block/qcow2.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) Reviewed-by: Max Reitz signature.asc Description: OpenPGP digital

Re: [PATCH v3 0/5] Misc BDRV_SECTOR_SIZE updates

2020-01-21 Thread Max Reitz
On 18.01.20 20:09, Alberto Garcia wrote: > This series gets rid of all the remaining instances of hardcoded > sector sizes in the qcow2 code and adds a check for images whose > virtual size is not a multiple of the sector size. > > See the individual patches for details. Thanks, applied to my

[PULL 1/1] m68k: Fix regression causing Single-Step via GDB/RSP to not single step

2020-01-21 Thread Laurent Vivier
A regression that was introduced, with the refactor to TranslatorOps, drops two lines that update the PC when single-stepping is being performed. Fixes: 11ab74b01e0a ("target/m68k: Convert to TranslatorOps") Reported-by: Lucien Murray-Pitts Suggested-by: Lucien Murray-Pitts Suggested-by:

[PULL 0/1] M68k for 5.0 patches

2020-01-21 Thread Laurent Vivier
The following changes since commit d83bbedab5a2758fbb7866c06472feb3f3bf079b: Makefile: add missing mkdir MANUAL_BUILDDIR (2020-01-21 11:56:17 +) are available in the Git repository at: git://github.com/vivier/qemu-m68k.git tags/m68k-for-5.0-pull-request for you to fetch changes up to

[PATCH v2 003/109] virtiofsd: Add auxiliary .c's

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add most of the non-main .c files we need from upstream fuse-3.8.0 Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- tools/virtiofsd/buffer.c | 321 tools/virtiofsd/fuse_log.c | 40 +++

[PATCH v2 000/109] virtiofs daemon [all]

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This is a full set for virtiofsd - a daemon that implements the user space side of virtiofs. I've addressed most review comments from V1; we've got 95 Reviewed-by's out of 110 - I'd like to get a PULL out ASAP. The set pulls in a big chunk of the upstream

[PATCH v2 002/109] virtiofsd: Pull in kernel's fuse.h

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Update scripts/update-linux-headers.sh to add fuse.h and use it to pull in fuse.h from the kernel; from v5.5-rc1 Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé --- include/standard-headers/linux/fuse.h | 891 ++

[PATCH v2 006/109] virtiofsd: Trim down imported files

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There's a lot of the original fuse code we don't need; trim them down. Signed-off-by: Dr. David Alan Gilbert with additional trimming by: Signed-off-by: Misono Tomohiro Reviewed-by: Daniel P. Berrangé --- tools/virtiofsd/buffer.c | 71 +--

[PATCH v2 005/109] virtiofsd: Add passthrough_ll

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" passthrough_ll is one of the examples in the upstream fuse project and is the main part of our daemon here. It passes through requests from fuse to the underlying filesystem, using syscalls as directly as possible. >From libfuse fuse-3.8.0 Signed-off-by: Dr.

[PATCH v2 009/109] virtiofsd: remove unused notify reply support

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Notify reply support is unused by virtiofsd. The code would need to be updated to validate input buffer sizes. Remove this unused code since changes to it are untestable. Signed-off-by: Stefan Hajnoczi Reviewed-by: Daniel P. Berrangé ---

[PATCH v2 004/109] virtiofsd: Add fuse_lowlevel.c

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" fuse_lowlevel is one of the largest files from the library and does most of the work. Add it separately to keep the diff sizes small. Again this is from upstream fuse-3.8.0 Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé ---

[PATCH v2 010/109] virtiofsd: Fix fuse_daemonize ignored return values

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" QEMU's compiler enables warnings/errors for ignored values and the (void) trick used in the fuse code isn't enough. Turn all the return values into a return value on the function. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Daniel P. Berrangé ---

[PATCH v2 013/109] vitriofsd/passthrough_ll: fix fallocate() ifdefs

2020-01-21 Thread Dr. David Alan Gilbert (git)
From: Xiao Yang 1) Use correct CONFIG_FALLOCATE macro to check if fallocate() is supported.(i.e configure script sets CONFIG_FALLOCATE intead of HAVE_FALLOCATE if fallocate() is supported) 2) Replace HAVE_POSIX_FALLOCATE with CONFIG_POSIX_FALLOCATE. Signed-off-by: Xiao Yang Signed-off-by:

  1   2   3   4   5   >