[PATCH v7 1/3] hw/block/nvme: add dulbe support

2020-10-27 Thread Klaus Jensen
From: Klaus Jensen Add support for reporting the Deallocated or Unwritten Logical Block Error (DULBE). Rely on the block status flags reported by the block layer and consider any block with the BDRV_BLOCK_ZERO flag to be deallocated. Multiple factors affect when a Write Zeroes command result

[PATCH 22/29] vl: initialize displays before preconfig loop

2020-10-27 Thread Paolo Bonzini
Displays should be available before the monitor starts, so that it is possible to use the graphical console to interact with the monitor itself. This patch is quite ugly, but all this is temporary. The double call to qemu_init_displays will go away as soon we can unify machine initialization

[PATCH 29/29] vl: allow -incoming defer with -preconfig

2020-10-27 Thread Paolo Bonzini
Now that there is no RUN_STATE_PRECONFIG anymore that can conflict with RUN_STATE_INMIGRATE, we can allow -incoming defer with -preconfig. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index

[PATCH 17/29] vl: separate qemu_create_early_backends

2020-10-27 Thread Paolo Bonzini
"Early" backends are created before the machine and can be used as machine options. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 123 +++ 1 file changed, 65 insertions(+), 58 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index

[PATCH 07/29] vl: extract qemu_init_subsystems

2020-10-27 Thread Paolo Bonzini
Group a bunch of subsystem initializations that can be done right after command line parsing. Remove initializations that can be done simply as global variable initializers. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 94 1 file changed,

[PATCH 25/29] vl: start VM via qmp_cont

2020-10-27 Thread Paolo Bonzini
Complement the previous patch by starting the VM with a QMP command. Later, the user will be able to do the same, invoking two commands "finish-machine-init" and "cont" instead of "x-exit-preconfig". Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [RFC] Using gitlab for upstream qemu repo?

2020-10-27 Thread Paolo Bonzini
On 27/10/20 14:14, Michael Roth wrote: > My only concern would be what the lag time might be between updates to > qemu-web.git and the actual website update if the mirroring doesn't > right away. Probably not a huge deal but might be good to know what the > upper bound is if we want to verify the

[PATCH for-6.0 v3 19/20] iotests: Enable fuse for many tests

2020-10-27 Thread Max Reitz
Many tests (that do not support generic protocols) can run just fine with FUSE-exported images, so allow them to. Note that this is no attempt at being definitely complete. There are some tests that might be modified to run on FUSE, but this patch still skips them. This patch only tries to pick

[PATCH for-6.0 v3 09/20] iotests: Use convert -n in some cases

2020-10-27 Thread Max Reitz
qemu-img convert (without -n) can often be replaced by a combination of _make_test_img + qemu-img convert -n. Doing so allows converting to protocols that do not allow direct file creation, such as FUSE exports. The only problem is that for formats other than qcow2 and qed (qcow1 at least), this

Re: [PATCH v2 3/6] configure: add option to enable LTO

2020-10-27 Thread Daniele Buono
Ok, no problem. I can definitely disable the check on GCC. Paolo, would you like me to disable checks on AR/linker for lto too? If so, should I add some of this information on a document, perhaps docs/devel/lto.rst, so it is written somewhere for future uses? -- Btw, using lto with gcc I found

Re: [PATCH 1/4] semihosting: Move ARM semihosting code to shared directories

2020-10-27 Thread Peter Maydell
On Mon, 26 Oct 2020 at 21:29, Keith Packard wrote: > > This commit renames two files which provide ARM semihosting support so > that they can be shared by other architectures: > > 1. target/arm/arm-semi.c -> hw/semihosting/common-semi.c > 2. linux-user/arm/semihost.c ->

Re: [PATCH 1/9] qapi: replace List[str] by IfCond

2020-10-27 Thread John Snow
On 10/15/20 12:52 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Wrap the 'if' condition in a higher-level object. Not only this is allows more type safety but also further refactoring without too much chrun. The following patches will extend the syntax of 'if' and will have

Re: [PATCH v12 14/14] block: apply COR-filter to block-stream jobs

2020-10-27 Thread Andrey Shinkevich
On 27.10.2020 19:13, Vladimir Sementsov-Ogievskiy wrote: 22.10.2020 21:13, Andrey Shinkevich wrote: This patch completes the series with the COR-filter insertion for block-stream operations. Adding the filter makes it possible for copied regions to be discarded in backing files during the

Re: [RESEND PATCH 7/9] hw/riscv: microchip_pfsoc: Map debug memory

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:53 AM Bin Meng wrote: > > From: Bin Meng > > Somehow HSS needs to access address 0 [1] for the DDR calibration data > which is in the chipset's debug memory. Let's map the debug memory. > > [1] See the config_copy() calls in various places in ddr_setup() in > the

[PATCH 03/29] vl: extract validation of -smp to machine.c

2020-10-27 Thread Paolo Bonzini
Once smp_parse is done, the validation operates on the MachineState. There is no reason for that code to be in vl.c. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 23 +++ include/hw/boards.h | 1 + softmmu/vl.c| 20 ++-- 3 files changed, 26

Re: [PATCH 4/4] qemu-storage-daemon: QAPIfy --chardev

2020-10-27 Thread Eric Blake
On 10/26/20 5:10 AM, Markus Armbruster wrote: > From: Kevin Wolf > > This removes the dependency on QemuOpts from the --chardev option of > the storage daemon. > > Help on option parameters is still wrong. Marked FIXME. > > There are quite a few differences between qemu-system-FOO -chardev, >

[PATCH for-6.0 v3 13/20] iotests: Restrict some Python tests to file

2020-10-27 Thread Max Reitz
Most Python tests are restricted to the file protocol (without explicitly saying so), but these are the ones that would break ./check -fuse -qcow2. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- tests/qemu-iotests/206 | 3 ++- tests/qemu-iotests/242 | 3 ++- 2 files changed, 4

[PATCH for-6.0 v3 05/20] fuse: (Partially) implement fallocate()

2020-10-27 Thread Max Reitz
This allows allocating areas after the (old) EOF as part of a growing resize, writing zeroes, and discarding. Signed-off-by: Max Reitz --- block/export/fuse.c | 84 + 1 file changed, 84 insertions(+) diff --git a/block/export/fuse.c

Re: [PATCH v2] hw/riscv: microchip_pfsoc: IOSCBCTRL memmap entry

2020-10-27 Thread Alistair Francis
On Sun, Oct 18, 2020 at 6:58 PM Bin Meng wrote: > > Hi Ivan, > > On Sat, Oct 17, 2020 at 1:10 AM Ivan Griffin wrote: > > > > Adding the PolarFire SoC IOSCBCTRL memory region to prevent QEMU > > reporting a STORE/AMO Access Fault. > > > > This region is used by the PolarFire SoC port of U-Boot to

Re: [RESEND PATCH 8/9] hw/riscv: microchip_pfsoc: Correct DDR memory map

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:48 AM Bin Meng wrote: > > From: Bin Meng > > When system memory is larger than 1 GiB (high memory), PolarFire SoC > maps it at address 0x10__. Address 0xC000_ and above is > aliased to the same 1 GiB low memory with different cache attributes. > > At present

[PULL 09/12] nbd: Allow export of multiple bitmaps for one device

2020-10-27 Thread Eric Blake
With this, 'qemu-nbd -B b0 -B b1 -f qcow2 img.qcow2' can let you sniff out multiple bitmaps from one server. qemu-img as client can still only read one bitmap per client connection, but other NBD clients (hello libnbd) can now read multiple bitmaps in a single pass. Signed-off-by: Eric Blake

[PULL 03/12] block: Simplify QAPI_LIST_ADD

2020-10-27 Thread Eric Blake
There is no need to rely on the verbosity of the gcc/clang compiler extension of g_new(typeof(X), 1) when we can instead use the standard g_malloc(sizeof(X)). In general, we like g_new over g_malloc for returning type X rather than void* to let the compiler catch more potential typing mistakes,

[PATCH 04/29] vl: remove bogus check

2020-10-27 Thread Paolo Bonzini
There is no reason to prevent -preconfig -daemonize. Of course if no monitor is defined there will be no way to start the VM, but that is a user error. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index

[PATCH 11/29] vl: extract various command line desugaring snippets to a new function

2020-10-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index c2a5ee61f9..6749109b29 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -126,6 +126,7 @@ static const char

[PATCH 10/29] vl: preconfig and loadvm are mutually exclusive

2020-10-27 Thread Paolo Bonzini
Just like -incoming. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 3316c5534c..c2a5ee61f9 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -124,6 +124,7 @@ static const char *mem_path;

[RFC PATCH v2 00/37] cleanup qemu_init and make sense of command line processing

2020-10-27 Thread Paolo Bonzini
The main improvements with respect to v1 are: - further extraction of various phases of command line processing and VM creation to separate function; - removing the preconfig main_loop: the VM is effectively always starting as if -preconfig was specified, it just executes automatically if

[PATCH 24/29] migration, vl: start migration via qmp_migrate_incoming

2020-10-27 Thread Paolo Bonzini
Make qemu_start_incoming_migration local to migration/migration.c. By using the runstate instead of a separate flag, vl need not do anything to setup deferred incoming migration. qmp_migrate_incoming also does not need the deferred_incoming flag anymore, because "-incoming PROTOCOL" will clear

[PATCH 21/29] vl: separate qemu_resolve_machine_memdev

2020-10-27 Thread Paolo Bonzini
This is a bit nasty: the machine is storing a string and later resolving it. We probably want to remove the memdev property and instead make this a memory-set command. "-M memdev" can be handled as a legacy option that is special cased by machine_set_property. Signed-off-by: Paolo Bonzini ---

Re: [PATCH v6 11/11] qapi: Use QAPI_LIST_ADD() where possible

2020-10-27 Thread Eric Blake
On 10/27/20 10:36 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 10/27/20 5:09 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> Anywhere we create a list of just one item or by prepending items (typically because order doesn't matter), we can use the now-public

Re: [PATCH] virtiofsd: Fix the help message of posix lock

2020-10-27 Thread Dr. David Alan Gilbert
* Jiachen Zhang (zhangjiachen.jay...@bytedance.com) wrote: > The commit 88fc107956a5812649e5918e0c092d3f78bb28ad disabled remote > posix locks by default. But the --help message still says it is enabled > by default. So fix it to output no_posix_lock. > > Signed-off-by: Jiachen Zhang Thanks!

[PATCH for-6.0 v3 03/20] fuse: Implement standard FUSE operations

2020-10-27 Thread Max Reitz
This makes the export actually useful instead of only producing errors whenever it is accessed. Signed-off-by: Max Reitz --- block/export/fuse.c | 242 1 file changed, 242 insertions(+) diff --git a/block/export/fuse.c b/block/export/fuse.c index

[PATCH for-6.0 v3 07/20] iotests: Do not needlessly filter _make_test_img

2020-10-27 Thread Max Reitz
In most cases, _make_test_img does not need a _filter_imgfmt on top. It does that by itself. (The exception is when IMGFMT has been overwritten but TEST_IMG has not. In such cases, we do need a _filter_imgfmt on top to filter the test's original IMGFMT from TEST_IMG.) Signed-off-by: Max Reitz

[PATCH for-6.0 v3 10/20] iotests/046: Avoid renaming images

2020-10-27 Thread Max Reitz
This generally does not work on non-file protocols. It is better to create the image with the final name from the start, and most tests do this already. Let 046 follow suit. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- tests/qemu-iotests/046 | 5 +++-- tests/qemu-iotests/046.out

Re: [RESEND PATCH 4/9] hw/riscv: microchip_pfsoc: Connect the IOSCB module

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:52 AM Bin Meng wrote: > > From: Bin Meng > > Previously IOSCB_CFG was created as an unimplemented device. With > the new IOSCB model, its memory range is already covered by the > IOSCB hence remove the previous unimplemented device creation in > the SoC codes. > >

Re: [PATCH v12 14/14] block: apply COR-filter to block-stream jobs

2020-10-27 Thread Vladimir Sementsov-Ogievskiy
27.10.2020 20:48, Andrey Shinkevich wrote: On 27.10.2020 19:13, Vladimir Sementsov-Ogievskiy wrote: 22.10.2020 21:13, Andrey Shinkevich wrote: This patch completes the series with the COR-filter insertion for block-stream operations. Adding the filter makes it possible for copied regions to

[PATCH 19/29] vl: separate qemu_create_machine

2020-10-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 111 +++ 1 file changed, 59 insertions(+), 52 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 0c390b979e..38ad3cc895 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -133,6 +133,8 @@

[PATCH 15/29] vl: extract default devices to separate functions

2020-10-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 216 +++ 1 file changed, 114 insertions(+), 102 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index bc85318b23..b627b3138b 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -125,7 +125,9 @@

[PATCH 26/29] hmp: introduce cmd_available

2020-10-27 Thread Paolo Bonzini
Combine the RUN_STATE_PRECONFIG and cmd_can_preconfig checks into a single function, to avoid repeating the same expression (or its negation after applying DeMorgan's rule) over and over again. Signed-off-by: Paolo Bonzini --- monitor/hmp.c | 18 ++ 1 file changed, 10

Re: [PULL 31/38] device-core: use RCU for list of children of a bus

2020-10-27 Thread Paolo Bonzini
Maxim has already posted a fix for the test, Kevin should pull it. Paolo Il mar 27 ott 2020, 20:34 Eric Blake ha scritto: > On 10/12/20 3:33 PM, Paolo Bonzini wrote: > > From: Maxim Levitsky > > > > This fixes the race between device emulation code that tries to find > > a child device to

Re: [RESEND PATCH 3/9] hw/misc: Add Microchip PolarFire SoC IOSCB module support

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:50 AM Bin Meng wrote: > > From: Bin Meng > > This creates a model for PolarFire SoC IOSCB [1] module. It actually > contains lots of sub-modules like various PLLs to control different > peripherals. Only the mininum capabilities are emulated to make the > HSS DDR memory

Re: [PATCH 2/9] qapi: move gen_if/gen_endif to IfCond

2020-10-27 Thread John Snow
On 10/15/20 12:52 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Move the generating function to the IfCond class. (avoid cluttering and potential missuse of global functions, allow access to private members etc) Signed-off-by: Marc-André Lureau --- scripts/qapi/common.py

[PATCH 08/29] vl: move prelaunch part of qemu_init to new functions

2020-10-27 Thread Paolo Bonzini
The final part of qemu_init, starting with the completion of board init, is already relatively clean. Split it out of qemu_init so that qemu_init keeps only the messy parts. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 250 +++ 1 file changed,

Re: [PATCH v12 14/14] block: apply COR-filter to block-stream jobs

2020-10-27 Thread Andrey Shinkevich
On 27.10.2020 20:57, Vladimir Sementsov-Ogievskiy wrote: 27.10.2020 20:48, Andrey Shinkevich wrote: On 27.10.2020 19:13, Vladimir Sementsov-Ogievskiy wrote: 22.10.2020 21:13, Andrey Shinkevich wrote: This patch completes the series with the COR-filter insertion for block-stream operations.

[PATCH 02/29] semihosting: fix order of initialization functions

2020-10-27 Thread Paolo Bonzini
qemu_semihosting_console_init uses semihosting.chardev which is set by qemu_semihosting_connect_chardevs. Thus qemu_semihosting_connect_chardevs has to be called first. Both have to be called after processing -serial and friends though, so that the semihosting console can connect to a

[PATCH 12/29] vl: create "-net nic -net user" default earlier

2020-10-27 Thread Paolo Bonzini
Create it together with other default backends, even though the processing is done later. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 6749109b29..f64f7e 100644 ---

Re: [PATCH 0/4] qemu-storage-daemon: QAPIfy --chardev the stupid way

2020-10-27 Thread Paolo Bonzini
On 26/10/20 11:10, Markus Armbruster wrote: > Kevin's "[PATCH v2 0/6] qemu-storage-daemon: QAPIfy --chardev" > involves surgery to the QAPI generator. Some (most?) of it should go > away if we deprecate the "data" wrappers due to simple unions in QMP. > > Do we really need to mess with the code

[PATCH for-6.0 v3 08/20] iotests: Do not pipe _make_test_img

2020-10-27 Thread Max Reitz
Executing _make_test_img as part of a pipe will undo all variable changes it has done. As such, this could not work with FUSE (because we want to remember all of our exports and their qemu instances). Replace the pipe by a temporary file in 071 and 174 (the two tests that can run on FUSE).

[PATCH for-6.0 v3 06/20] fuse: Implement hole detection through lseek

2020-10-27 Thread Max Reitz
This is a relatively new feature in libfuse (available since 3.8.0, which was released in November 2019), so we have to add a dedicated check whether it is available before making use of it. Signed-off-by: Max Reitz --- configure | 8 - meson.build | 20

Re: [PATCH 01/20] loader.c: Add support Motrola S-record format.

2020-10-27 Thread Alistair Francis
On Thu, Aug 27, 2020 at 5:39 AM Yoshinori Sato wrote: > > Signed-off-by: Yoshinori Sato > --- > include/hw/loader.h | 14 +++ > hw/core/loader.c| 208 > 2 files changed, 222 insertions(+) > > diff --git a/include/hw/loader.h

Re: [PATCH 3/9] qapi: start building an 'if' predicate tree

2020-10-27 Thread John Snow
On 10/15/20 12:52 PM, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau The following patches are going to express conditions in some target language agostic way. For that, let's start building a predicate tree of configuration options. The tree will be less expressive than full C

[PULL 00/12] NBD patches for 2020-10-27 soft-freeze

2020-10-27 Thread Eric Blake
The following changes since commit 725ca3313a5b9cbef89eaa1c728567684f37990a: Merge remote-tracking branch 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20201026' into staging (2020-10-27 14:29:52 +) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git

Re: [PATCH 1/4] semihosting: Move ARM semihosting code to shared directories

2020-10-27 Thread Keith Packard
Peter Maydell writes: >> +specific_ss.add(when: 'CONFIG_TCG', if_true: files ('common-semi.c')) > > I think this adds this file to the compilation for all TCG targets; > you only want it for targets which have Arm-semihosting-ABI compatible > semihosting. (Various other targets either don't have

[PATCH 01/29] trace: remove argument from trace_init_file

2020-10-27 Thread Paolo Bonzini
It is not needed, all the callers are just saving what was retrieved from -trace and trace_init_file can retrieve it on its own. Signed-off-by: Paolo Bonzini --- bsd-user/main.c | 6 ++ linux-user/main.c| 6 ++ qemu-img.c

[PATCH 14/29] vl: move semihosting command line fallback to qemu_finish_machine_init

2020-10-27 Thread Paolo Bonzini
Move more sane parts of the huge qemu_init function out of it. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 53d53ef206..bc85318b23 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@

[PATCH 20/29] vl: separate qemu_apply_machine_options

2020-10-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 66 +--- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 38ad3cc895..9a3c92387e 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -2700,6 +2700,41 @@

[PATCH for-6.0 v3 01/20] meson: Detect libfuse

2020-10-27 Thread Max Reitz
Signed-off-by: Max Reitz --- configure | 7 +++ meson.build | 6 ++ meson_options.txt | 2 ++ 3 files changed, 15 insertions(+) diff --git a/configure b/configure index 83610b0db8..fc315deebe 100755 --- a/configure +++ b/configure @@ -448,6 +448,7 @@ meson="" ninja=""

[PATCH for-6.0 v3 02/20] fuse: Allow exporting BDSs via FUSE

2020-10-27 Thread Max Reitz
block-export-add type=fuse allows mounting block graph nodes via FUSE on some existing regular file. That file should then appears like a raw disk image, and accesses to it result in accesses to the exported BDS. Right now, we only implement the necessary block export functions to set it up and

Re: [PATCH V4 1/6] target/riscv: Merge m/vsstatus and m/vsstatush into one uint64_t unit

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 11:47 AM Richard Henderson wrote: > > On 10/26/20 4:55 AM, Yifei Jiang wrote: > > -qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mstatus ", env->mstatus); > > +qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mstatus ", > > (target_ulong)env->mstatus); > > This is

[PATCH for-6.0 v3 17/20] iotests: Give access to the qemu-storage-daemon

2020-10-27 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/check | 11 +++ tests/qemu-iotests/common.rc | 17 + 2 files changed, 28 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 678b6e4910..3c1fa4435a 100755 --- a/tests/qemu-iotests/check

[PATCH for-6.0 v3 16/20] storage-daemon: Call bdrv_close_all() on exit

2020-10-27 Thread Max Reitz
Otherwise, exports and block devices are not properly shut down and closed, unless the users explicitly issues blockdev-del and block-export-del commands for each of them. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- storage-daemon/qemu-storage-daemon.c | 3 +++ 1 file changed, 3

Re: [Libguestfs] [libnbd PATCH] info: Add support for new 'qemu-nbd -A' qemu:allocation-depth

2020-10-27 Thread Richard W.M. Jones
On Tue, Oct 27, 2020 at 10:33:48AM -0500, Eric Blake wrote: > On 10/16/20 10:23 AM, Eric Blake wrote: > > A rather trivial decoding; we may enhance it further if qemu extends > > things to give an integer depth alongside its tri-state encoding. > > --- > > > > I'll wait to push this to libnbd

Re: [PATCH] hw/sd: Zero out function selection fields before being populated

2020-10-27 Thread Niek Linnenbank
Hello Philippe, Bin, Thanks for your support on this. I've just tried this patch and unfortunately it doesn't seem to resolve the issue, at least on my machine. This is the output that I get when running the avocado test for NetBSD9.0: (5/5)

Re: [RESEND PATCH 5/9] hw/misc: Add Microchip PolarFire SoC SYSREG module support

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:56 AM Bin Meng wrote: > > From: Bin Meng > > This creates a minimum model for Microchip PolarFire SoC SYSREG > module. It only implements the ENVM_CR register to tell guest > software that eNVM is running at the configured divider rate. > > Signed-off-by: Bin Meng

Re: QEMU and kvm on big.LITTLE aarch64

2020-10-27 Thread Peter Maydell
On Tue, 27 Oct 2020 at 20:28, Michal Schulz wrote: > Recently I have attempted to to run qemu-system-aarch64, version 5.1.0, on an > aarch64 machine. It is Pinebook Pro with RK3399 big.LITTLE SOC, running > Manjaro linux, kernel version 5.9.1-3. When using tcg everything works just > fine, but

Re: [qemu-web PATCH v2 01/16] Convert files to UNIX line endings

2020-10-27 Thread Thomas Huth
On 27/10/2020 14.20, Daniel P. Berrangé wrote: > Signed-off-by: Daniel P. Berrangé > --- > assets/css/style-desktop.css | 586 - > assets/css/style-mobile.css | 750 ++--- > assets/css/style.css | 1184 +- > index.html

Re: [RESEND PATCH 2/9] hw/riscv: microchip_pfsoc: Connect DDR memory controller modules

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:46 AM Bin Meng wrote: > > From: Bin Meng > > Connect DDR SGMII PHY module and CFG module to the PolarFire SoC. > > Signed-off-by: Bin Meng > --- > > hw/riscv/Kconfig | 1 + > hw/riscv/microchip_pfsoc.c | 18 ++ >

Re: [RESEND PATCH 6/9] hw/riscv: microchip_pfsoc: Connect the SYSREG module

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:43 AM Bin Meng wrote: > > From: Bin Meng > > Previously SYSREG was created as an unimplemented device. Now that > we have a simple SYSREG module, connect it. > > Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Alistair > --- > > hw/riscv/Kconfig

[PATCH 06/29] vl: move various initialization routines out of qemu_init

2020-10-27 Thread Paolo Bonzini
Some very simple initialization routines can be nested in existing subsystem-level functions, do that to simplify qemu_init. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 3 +++ include/hw/qdev-core.h | 8 migration/migration.c | 4 softmmu/qdev-monitor.c | 6 --

[PATCH 13/29] vl: load plugins as late as possible

2020-10-27 Thread Paolo Bonzini
There is no need to load plugins in the middle of default device processing, move -plugin handling just before preconfig is entered. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git

[PATCH 23/29] vl: move -global check earlier

2020-10-27 Thread Paolo Bonzini
The check has no effect after both builtin and user-specified devices have been created. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index a46f1b9164..ae2854d8af 100644 --- a/softmmu/vl.c +++

[PATCH 27/29] remove preconfig state

2020-10-27 Thread Paolo Bonzini
The preconfig state is only used if -incoming is not specified, which makes the RunState state machine more tricky than it need be. However there is already an equivalent condition which works even with -incoming, namely qdev_hotplug. Use it instead of a separate runstate. Signed-off-by: Paolo

[PATCH for-6.0 v3 20/20] iotests/308: Add test for FUSE exports

2020-10-27 Thread Max Reitz
We have good coverage of the normal I/O paths now, but what remains is a test that tests some more special cases: Exporting an image on itself (thus turning a formatted image into a raw one), some error cases, and non-writable and non-growable exports. Signed-off-by: Max Reitz Reviewed-by: Kevin

[PATCH for-6.0 v3 14/20] iotests: Let _make_test_img guess $TEST_IMG_FILE

2020-10-27 Thread Max Reitz
When most iotests want to create a test image that is named differently from the default $TEST_IMG, they do something like this: TEST_IMG="$TEST_IMG.base" _make_test_img $options This works fine with the "file" protocol, but not so much for anything else: _make_test_img tries to create an

[PATCH for-6.0 v3 12/20] iotests/091: Use _cleanup_qemu instad of "wait"

2020-10-27 Thread Max Reitz
If the test environment has some other child processes running (like a storage daemon that provides a FUSE export), then "wait" will never finish. Use wait=yes _cleanup_qemu instead. (We need to discard the output so there is no change to the reference output.) Signed-off-by: Max Reitz

Re: [PATCH v1 12/16] target/riscv: cpu_helper: Remove compile time XLEN checks

2020-10-27 Thread Alistair Francis
On Mon, Oct 26, 2020 at 1:56 AM Bin Meng wrote: > > On Fri, Oct 23, 2020 at 11:45 PM Alistair Francis > wrote: > > > > Signed-off-by: Alistair Francis > > --- > > target/riscv/cpu.h| 6 ++--- > > target/riscv/cpu_helper.c | 52 --- > > 2 files

[PATCH v7 3/3] hw/block/nvme: add the dataset management command

2020-10-27 Thread Klaus Jensen
From: Klaus Jensen Add support for the Dataset Management command and the Deallocate attribute. Deallocation results in discards being sent to the underlying block device. Whether of not the blocks are actually deallocated is affected by the same factors as Write Zeroes (see previous commit).

[PATCH v7 2/3] nvme: add namespace I/O optimization fields to shared header

2020-10-27 Thread Klaus Jensen
From: Klaus Jensen This adds the NPWG, NPWA, NPDG, NPDA and NOWS family of fields to the shared nvme.h header for use by later patches. Signed-off-by: Klaus Jensen Cc: Stefan Hajnoczi Cc: Fam Zheng Reviewed-by: Stefan Hajnoczi --- include/block/nvme.h | 7 ++- 1 file changed, 6

[PATCH 18/29] vl: separate qemu_create_late_backends

2020-10-27 Thread Paolo Bonzini
"Late" backends are created after the machine. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 64 ++-- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 109036c089..0c390b979e 100644 ---

Re: [PATCH V4 1/6] target/riscv: Merge m/vsstatus and m/vsstatush into one uint64_t unit

2020-10-27 Thread Richard Henderson
On 10/26/20 4:55 AM, Yifei Jiang wrote: > -qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mstatus ", env->mstatus); > +qemu_fprintf(f, " %s " TARGET_FMT_lx "\n", "mstatus ", > (target_ulong)env->mstatus); This is truncating mstatus to target_ulong, i.e. breaking the output for riscv32. You

Re: [qemu-web PATCH v2 06/16] Rework display of screenshots to use a carousel slider

2020-10-27 Thread Paolo Bonzini
On 27/10/20 14:20, Daniel P. Berrangé wrote: > We have a number of screenshots to display, with three fitted across the > width of the screen. The screenshots dominate the usage of screen real > estate on the front page, with other relevant information off the bottom > of the page. > > As a step

[PATCH for-6.0 v3 00/20] block/export: Allow exporting BDSs via FUSE

2020-10-27 Thread Max Reitz
v1: https://lists.nongnu.org/archive/html/qemu-block/2019-12/msg00451.html v2: https://lists.nongnu.org/archive/html/qemu-block/2020-09/msg01611.html Branch: https://github.com/XanClic/qemu.git fuse-exports-v3 Branch: https://git.xanclic.moe/XanClic/qemu.git fuse-exports-v3 Hi, Ever since I

[PATCH for-6.0 v3 04/20] fuse: Allow growable exports

2020-10-27 Thread Max Reitz
These will behave more like normal files in that writes beyond the EOF will automatically grow the export size. As an optimization, keep the RESIZE permission for growable exports so we do not have to take it for every post-EOF write. (This permission is not released when the export is

[PATCH for-6.0 v3 18/20] iotests: Allow testing FUSE exports

2020-10-27 Thread Max Reitz
This pretends FUSE exports are a kind of protocol. As such, they are always tested under the format node. This is probably the best way to test them, actually, because this will generate more I/O load and more varied patterns. Signed-off-by: Max Reitz --- tests/qemu-iotests/check |

QEMU and kvm on big.LITTLE aarch64

2020-10-27 Thread Michal Schulz
Dear Qemu friends! I have been using qemu for years for low-level development of software (bare metal for raspberrypi or operating systems such as AROS for x86, x86-64, ppc). Since I am busy with my new project - a JIT translator of M68k running on bare metal aarch64 machines, I’ve started

Re: [PATCH V4 0/6] Support RISC-V migration

2020-10-27 Thread Alistair Francis
On Mon, Oct 26, 2020 at 4:58 AM Yifei Jiang wrote: > > This patches supported RISC-V migration based on tcg accel. And we have > verified related migration features such as snapshot and live migration. > > A few weeks ago, we submitted RFC patches about supporting RISC-V migration > based on kvm

Re: [PATCH V4 1/6] target/riscv: Merge m/vsstatus and m/vsstatush into one uint64_t unit

2020-10-27 Thread Alistair Francis
On Mon, Oct 26, 2020 at 4:58 AM Yifei Jiang wrote: > > mstatus/mstatush and vsstatus/vsstatush are two halved for RISCV32. > This patch expands mstatus and vsstatus to uint64_t instead of > target_ulong so that it can be saved as one unit and reduce some > ifdefs in the code. > > Signed-off-by:

[PATCH v7 0/3] hw/block/nvme: dulbe and dsm support

2020-10-27 Thread Klaus Jensen
From: Klaus Jensen This adds support for the Deallocated or Unwritten Logical Block error recovery feature as well as the Dataset Management command. v7: - Handle negative return value from bdrv_block_status. - bdrv_get_info may not be supported on all block drivers, so do not consider

[PATCH 09/29] vl: extract various command line validation snippets to a new function

2020-10-27 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + softmmu/vl.c | 78 +++ 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index d84b84463c..f5e559c493 100644 --- a/hw/core/machine.c

[PATCH 05/29] vl: split various early command line options to a separate function

2020-10-27 Thread Paolo Bonzini
Various options affect the global state of QEMU including the rest of qemu_init, and they need to be called very early. Group them together in a function that is called at the beginning. Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 202 --- 1

Re: [PATCH 3/4] char: Flat alternative to overly nested chardev-add arguments

2020-10-27 Thread Eric Blake
On 10/26/20 5:10 AM, Markus Armbruster wrote: > chardev-add's arguments use an annoying amount of nesting. Example: > > {"execute": "chardev-add", > "arguments": { > "id":"sock0", >"backend": { >"type": "socket", >"data": { >

[PATCH 16/29] vl: move CHECKPOINT_INIT after preconfig

2020-10-27 Thread Paolo Bonzini
Move CHECKPOINT_INIT right before the machine initialization is completed. Everything before is essentially an extension of command line parsing. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- softmmu/vl.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[PATCH 28/29] vl: remove separate preconfig main_loop

2020-10-27 Thread Paolo Bonzini
Move post-preconfig initialization to the x-exit-preconfig. If preconfig is not requested, just exit preconfig mode immediately with the QMP command. As a result, the preconfig loop will run with accel_setup_post and os_setup_post restrictions (xen_restrict, chroot, etc.) already done.

[PATCH for-6.0 v3 11/20] iotests: Derive image names from $TEST_IMG

2020-10-27 Thread Max Reitz
Avoid creating images with custom filenames in $TEST_DIR, because non-file protocols may want to keep $TEST_IMG (and all other test images) in some other directory. Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf --- tests/qemu-iotests/200 | 3 +-- tests/qemu-iotests/200.out | 4 ++--

[PATCH for-6.0 v3 15/20] iotests/287: Clean up subshell test image

2020-10-27 Thread Max Reitz
287 creates an image in a subshell (thanks to the pipe) to see whether that is possible with compression_type=zstd. If _make_test_img were to modify any global state, this global state would then be lost before we could cleanup the image. When using FUSE as the test protocol, this global state

Re: [PULL 31/38] device-core: use RCU for list of children of a bus

2020-10-27 Thread Eric Blake
On 10/12/20 3:33 PM, Paolo Bonzini wrote: > From: Maxim Levitsky > > This fixes the race between device emulation code that tries to find > a child device to dispatch the request to (e.g a scsi disk), > and hotplug of a new device to that bus. > > Note that this doesn't convert all the readers

Re: [PATCH 1/4] semihosting: Move ARM semihosting code to shared directories

2020-10-27 Thread Alistair Francis
On Mon, Oct 26, 2020 at 2:34 PM Keith Packard via wrote: > > This commit renames two files which provide ARM semihosting support so > that they can be shared by other architectures: > > 1. target/arm/arm-semi.c -> hw/semihosting/common-semi.c > 2. linux-user/arm/semihost.c ->

Re: [RESEND PATCH 1/9] hw/misc: Add Microchip PolarFire SoC DDR Memory Controller support

2020-10-27 Thread Alistair Francis
On Tue, Oct 27, 2020 at 7:48 AM Bin Meng wrote: > > From: Bin Meng > > The PolarFire SoC DDR Memory Controller mainly includes 2 modules, > called SGMII PHY module and the CFG module, as documented in the > chipset datasheet. > > This creates a single file that groups these 2 modules, providing

[Bug 1898883] Re: qemu-system-riscv64 failed to load binary kernel into memory

2020-10-27 Thread Alistair Francis
Just an update on this. You can use -bios to load your image, which will load it to address 0x8000. In QEMU 5.1 `-bios none -kernel Image` will load the Image to 0x8002/0x8004 depending on XLEN. QEMU 5.2 will now correctly load the above mentioned Image to address 0x8000 if you

[PULL 12/12] nbd: Add 'qemu-nbd -A' to expose allocation depth

2020-10-27 Thread Eric Blake
Allow the server to expose an additional metacontext to be requested by savvy clients. qemu-nbd adds a new option -A to expose the qemu:allocation-depth metacontext through NBD_CMD_BLOCK_STATUS; this can also be set via QMP when using block-export-add. qemu as client is hacked into viewing the

Re: [PATCH 1/4] semihosting: Move ARM semihosting code to shared directories

2020-10-27 Thread Keith Packard
Peter Maydell writes: >> arm_ss.add(when: 'CONFIG_TCG', if_true: files ('common-semi.c')) >> riscv_ss.add(files('common-semi.c')) >> >> This appears to work in my testing (building arm, risc-v and x86_64 >> configs). > > I'm not a kconfig expert but it might be preferable to have

  1   2   3   4   5   6   >