[PATCH v2 02/27] target/ppc: cpu_init: Remove G2LE init code

2022-02-16 Thread Fabiano Rosas
The G2LE CPU initialization code is the same as the G2. Use the latter for both. Signed-off-by: Fabiano Rosas Reviewed-by: David Gibson --- target/ppc/cpu_init.c | 42 +- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/target/ppc/cpu_init.c

[PATCH v2 05/27] target/ppc: cpu_init: Avoid nested SPR register functions

2022-02-16 Thread Fabiano Rosas
Make sure that every register_*_sprs function only has calls to spr_register* to register individual SPRs. Do not allow nesting. This makes the code easier to follow and a look at init_proc_* should suffice to know what SPRs a CPU has. Signed-off-by: Fabiano Rosas Reviewed-by: David Gibson ---

Re: QEMU's Haiku CI image

2022-02-16 Thread Thomas Huth
On 16/02/2022 16.52, Alexander von Gluck IV wrote: February 16, 2022 6:31 AM, "Thomas Huth" wrote: while researching the different "sed" options on our supported build platform today, I started "make vm-build-haiku.x86_64" in my QEMU build directory for the first time since many months

Re: [PATCH v2] nbd/server: Allow MULTI_CONN for shared writable exports

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
16.02.2022 20:14, Nir Soffer wrote: On Wed, Feb 16, 2022 at 10:08 AM Vladimir Sementsov-Ogievskiy wrote: 16.02.2022 02:24, Eric Blake wrote: On Tue, Feb 15, 2022 at 09:23:36PM +0200, Nir Soffer wrote: On Tue, Feb 15, 2022 at 7:22 PM Eric Blake wrote: According to the NBD spec, a server

Portable inline asm to get address of TLS variable

2022-02-16 Thread Stefan Hajnoczi
Hi, I've been trying to make the inline asm that gets the address of a TLS variable for QEMU coroutines pass QEMU's GitLab CI. https://gitlab.com/stefanha/qemu/-/blob/coroutine-tls-fix/include/qemu/coroutine-tls.h#L89 The code isn't -fPIC-friendly (R_X86_64_TPOFF32 relocations aren't allowed in

Re: [PATCH 1/6] arm: Remove swift-bmc machine

2022-02-16 Thread Cédric Le Goater
On 2/16/22 16:02, Philippe Mathieu-Daudé wrote: On 16/2/22 10:21, Cédric Le Goater wrote: From: Joel Stanley It was scheduled for removal in 7.0. Signed-off-by: Joel Stanley Message-Id: <20220216080947.65955-1-j...@jms.id.au> Signed-off-by: Cédric Le Goater ---   docs/about/deprecated.rst 

Re: QEMU's Haiku CI image

2022-02-16 Thread Daniel P . Berrangé
On Wed, Feb 16, 2022 at 06:16:10PM +0100, Philippe Mathieu-Daudé via wrote: > On 16/2/22 17:32, Thomas Huth wrote: > > On 16/02/2022 16.52, Alexander von Gluck IV wrote: > > > February 16, 2022 6:31 AM, "Thomas Huth" wrote: > > > > > > > > while researching the different "sed" options on our

[PATCH v4 10/18] block/io: introduce block driver snapshot-access API

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Add new block driver handlers and corresponding generic wrappers. It will be used to allow copy-before-write filter to provide reach fleecing interface in further commit. In future this approach may be used to allow reading qcow2 interanal snaphots, for example to export them through NBD.

[PATCH v4 12/18] block: copy-before-write: realize snapshot-access API

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Current scheme of image fleecing looks like this: [guest][NBD export] | | |root | root v v [copy-before-write] -> [temp.qcow2] | target | |file

Re: [PATCH] ppc/spapr: Advertise StoreEOI for POWER10 compat guests

2022-02-16 Thread Daniel Henrique Barboza
On 2/14/22 11:11, Cédric Le Goater wrote: When an interrupt has been handled, the OS notifies the interrupt controller with a EOI sequence. On a POWER9 and POWER10 systems using nit: s/a EOI sequence/an EOI sequence the XIVE interrupt controller, this can be done with a load or a store

Re: [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64

2022-02-16 Thread Peter Maydell
On Wed, 16 Feb 2022 at 17:18, Philippe Mathieu-Daudé wrote: > Thanks for the pointer. And the next section is > https://clang.llvm.org/docs/Toolchain.html#atomics-library :) > >Clang does not currently automatically link against libatomic when > using libgcc_s. You may need to manually

[PULL 07/12] virtiofsd: Move core file creation code in separate function

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Move core file creation bits in a separate function. Soon this is going to get more complex as file creation need to set security context also. And there will be multiple modes of file creation in next patch. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal

[PULL 09/12] virtiofsd: Create new file with security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal This patch adds support for creating new file with security context as sent by client. It basically takes three paths. - If no security context enabled, then it continues to create files without security context. - If security context is enabled and but security.selinux has

[PULL 06/12] virtiofsd, fuse_lowlevel.c: Add capability to parse security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add capability to enable and parse security context as sent by client and put into fuse_req. Filesystems now can get security context from request and set it on files during creation. Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-6-vgo...@redhat.com>

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-16 Thread Daniel P . Berrangé
On Wed, Feb 16, 2022 at 05:40:44PM +, Dr. David Alan Gilbert wrote: > * Thomas Huth (th...@redhat.com) wrote: > > On 16/02/2022 12.01, Dr. David Alan Gilbert wrote: > > > * Gerd Hoffmann (kra...@redhat.com) wrote: > > > >Hi, > > > > > Given the semantic differences from 'i440fx', changing

Re: Portable inline asm to get address of TLS variable

2022-02-16 Thread Florian Weimer
* Stefan Hajnoczi: > I've been trying to make the inline asm that gets the address of a TLS > variable for QEMU coroutines pass QEMU's GitLab CI. > https://gitlab.com/stefanha/qemu/-/blob/coroutine-tls-fix/include/qemu/coroutine-tls.h#L89 > > The code isn't -fPIC-friendly (R_X86_64_TPOFF32

Re: [PATCH] tests/vm: Update haiku test vm to R1/Beta3

2022-02-16 Thread Alexander von Gluck IV
bvirt.box; >> - csum = "41c38b316e0cbdbc66b5dbaf3612b866700a4f35807cb1eb266a5bf83e9e68d5" >> + link = >> "https://app.vagrantup.com/haiku-os/boxes/r1beta3-x86_64/versions/20220216/providers/libvirt.box; >> + csum = "e67d4aacbcc687013d5cc91990ddd86cc5d70a5d284

Re: [PATCH v2 15/15] target/arm: Implement FEAT_LPA2

2022-02-16 Thread Peter Maydell
On Thu, 10 Feb 2022 at 04:05, Richard Henderson wrote: > > This feature widens physical addresses (and intermediate physical > addresses for 2-stage translation) from 48 to 52 bits, when using > 4k or 16k pages. > > This introduces the DS bit to TCR_ELx, which is RES0 unless the > page size is

[PATCH v4 08/18] block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Add a convenient function similar with bdrv_block_status() to get status of dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 ++ include/qemu/hbitmap.h | 12 block/dirty-bitmap.c | 6 ++ util/hbitmap.c

[PATCH v4 15/18] iotests/image-fleecing: add test case with bitmap

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Note that reads zero areas (not dirty in the bitmap) fails, that's correct. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 32 ++-- tests/qemu-iotests/tests/image-fleecing.out | 84 + 2 files changed, 108 insertions(+), 8

[PULL 04/12] virtiofsd: Parse extended "struct fuse_init_in"

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Add some code to parse extended "struct fuse_init_in". And use a local variable "flag" to represent 64 bit flags. This will make it easier to add more features without having to worry about two 32bit flags (->flags and ->flags2) in "fuse_struct_in". Signed-off-by: Vivek Goyal

[PULL 12/12] virtiofsd: Add basic support for FUSE_SYNCFS request

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Greg Kurz Honor the expected behavior of syncfs() to synchronously flush all data and metadata to disk on linux systems. If virtiofsd is started with '-o announce_submounts', the client is expected to send a FUSE_SYNCFS request for each individual submount. In this case, we just create a

[PULL 10/12] virtiofsd: Create new file using O_TMPFILE and set security context

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal If guest and host policies can't work with each other, then guest security context (selinux label) needs to be set into an xattr. Say remap guest security.selinux xattr to trusted.virtiofs.security.selinux. That means setting "fscreate" is not going to help as that's ony

[PATCH v4 13/18] iotests/image-fleecing: add test-case for fleecing format node

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 64 - tests/qemu-iotests/tests/image-fleecing.out | 76 - 2 files changed, 120 insertions(+), 20 deletions(-) diff --git a/tests/qemu-iotests/tests/image-fleecing

[PATCH v4 17/18] qapi: backup: add immutable-source parameter

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
We are on the way to implement internal-backup with fleecing scheme, which includes backup job copying from fleecing block driver node (which is target of copy-before-write filter) to final target of backup. This job doesn't need own filter, as fleecing block driver node is a kind of snapshot,

[PATCH v4 2/3] s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1

2022-02-16 Thread David Miller
TCG implements everything we need to run basic z15 OS+software Signed-off-by: David Miller --- hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/cpu_models.c | 6 +++--- target/s390x/gen-features.c | 7 +-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git

Re: [PATCH v4 2/3] s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1

2022-02-16 Thread David Hildenbrand
On 16.02.22 21:03, David Miller wrote: > TCG implements everything we need to run basic z15 OS+software > > Signed-off-by: David Miller Booting Fedora34 with an upstream kernel (compiled for z15) did work. Reviewed-by: David Hildenbrand Thanks! -- Thanks, David / dhildenb

[PATCH v5 0/3] s390x: Add partial z15 support and tests

2022-02-16 Thread David Miller
Add partial support for s390x z15 ga1 and specific tests for mie3 v4 -> v5: * Readd missing tests/tcg/s390x/mie3-*.c to patch v3 -> v4: * Change popcnt encoding RRE -> RRF_c * Remove redundant code op_sel -> op_loc * Cleanup for checkpatch.pl * Readded mie3-* to Makefile.target v2 -> v3: *

[PATCH v5 1/3] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x

2022-02-16 Thread David Miller
resolves: https://gitlab.com/qemu-project/qemu/-/issues/737 implements: AND WITH COMPLEMENT (NCRK, NCGRK) NAND (NNRK, NNGRK) NOT EXCLUSIVE OR (NXRK, NXGRK) NOR (NORK, NOGRK) OR WITH COMPLEMENT(OCRK, OCGRK) SELECT(SELR, SELGR) SELECT

Re: [PATCH v2] tests/qemu-iotests: Rework the checks and spots using GNU sed

2022-02-16 Thread Eric Blake
On Wed, Feb 16, 2022 at 01:54:54PM +0100, Thomas Huth wrote: > Instead of failing the iotests if GNU sed is not available (or skipping > them completely in the check-block.sh script), it would be better to > simply skip the bash-based tests that rely on GNU sed, so that the other > tests could

Re: [PATCH] tcg: Add 'signed' bit to typecodes

2022-02-16 Thread Richard Henderson
On 2/16/22 17:39, Keith Packard wrote: Commit 7319d83a (tcg: Combine dh_is_64bit and dh_is_signed to dh_typecode) converted the tcg type system to a 3-bit field from two separate 1-bit fields. This subtly lost the 'signed' information from the types as it uses the dh_alias macro to reduce the

Re: Portable inline asm to get address of TLS variable

2022-02-16 Thread Paolo Bonzini
On 2/16/22 18:46, Stefan Hajnoczi wrote: However, I wonder if the compiler might reuse a register that already contains the address. Then we'd have the coroutine problem again when qemu_coroutine_yield() is called between the earlier address calculation and the asm volatile statement. Yes, the

[PULL 02/12] virtiofsd: Fix breakage due to fuse_init_in size change

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Kernel version 5.17 has increased the size of "struct fuse_init_in" struct. Previously this struct was 16 bytes and now it has been extended to 64 bytes in size. Once qemu headers are updated to latest, it will expect to receive 64 byte size struct (for protocol version major

[PULL 00/12] virtiofs queue

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: Merge remote-tracking branch 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 09:57:11 +) are available in the Git repository at

Re: [PATCH v3 2/2] hvf: arm: Handle unknown ID registers as RES0

2022-02-16 Thread Peter Maydell
On Wed, 9 Feb 2022 at 12:41, Alexander Graf wrote: > > Recent Linux versions added support to read ID_AA64ISAR2_EL1. On M1, > those reads trap into QEMU which handles them as faults. > > However, AArch64 ID registers should always read as RES0. Let's > handle them accordingly. > > This fixes

Re: QEMU's Haiku CI image

2022-02-16 Thread Thomas Huth
On 16/02/2022 18.16, Philippe Mathieu-Daudé wrote: On 16/2/22 17:32, Thomas Huth wrote: On 16/02/2022 16.52, Alexander von Gluck IV wrote: February 16, 2022 6:31 AM, "Thomas Huth" wrote: while researching the different "sed" options on our supported build platform today, I started "make

[PATCH v4 01/18] block/block-copy: move copy_bitmap initialization to block_copy_state_new()

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
We are going to complicate bitmap initialization in the further commit. And in future, backup job will be able to work without filter (when source is immutable), so we'll need same bitmap initialization in copy-before-write filter and in backup job. So, it's reasonable to do it in block-copy.

[PATCH v4 16/18] block: blk_root(): return non-const pointer

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
In the following patch we'll want to pass blk children to block-copy. Const pointers are not enough. So, return non const pointer from blk_root(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 2 +- block/block-backend.c | 2 +- 2 files changed, 2

[PATCH v4 3/3] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

2022-02-16 Thread David Miller
tests/tcg/s390x/mie3-compl.c: [N]*K instructions tests/tcg/s390x/mie3-mvcrl.c: MVCRL instruction tests/tcg/s390x/mie3-sel.c: SELECT instruction Signed-off-by: David Miller --- tests/tcg/s390x/Makefile.target | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v4 3/3] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

2022-02-16 Thread David Hildenbrand
On 16.02.22 21:03, David Miller wrote: > tests/tcg/s390x/mie3-compl.c: [N]*K instructions > tests/tcg/s390x/mie3-mvcrl.c: MVCRL instruction > tests/tcg/s390x/mie3-sel.c: SELECT instruction > > Signed-off-by: David Miller > --- > tests/tcg/s390x/Makefile.target | 5 - > 1 file changed, 4

Re: Portable inline asm to get address of TLS variable

2022-02-16 Thread Stefan Hajnoczi
On Wed, 16 Feb 2022 at 18:14, Florian Weimer wrote: > > * Stefan Hajnoczi: > > > I've been trying to make the inline asm that gets the address of a TLS > > variable for QEMU coroutines pass QEMU's GitLab CI. > >

Re: [PATCH v4 3/3] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

2022-02-16 Thread David Hildenbrand
On 16.02.22 21:18, David Miller wrote: > That is strange, if I unstage them show status they are set to be committed: > > null@rygar:~/projects/qemu/build$ git reset --soft HEAD~1 > null@rygar:~/projects/qemu/build$ git status > On branch t2 > Changes to be committed: > (use "git restore

[PATCH v5 3/3] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

2022-02-16 Thread David Miller
tests/tcg/s390x/mie3-compl.c: [N]*K instructions tests/tcg/s390x/mie3-mvcrl.c: MVCRL instruction tests/tcg/s390x/mie3-sel.c: SELECT instruction Signed-off-by: David Miller --- tests/tcg/s390x/Makefile.target | 5 ++- tests/tcg/s390x/mie3-compl.c| 55 +

Re: [PULL 00/30] Misc mostly build system patches for 2022-02-15

2022-02-16 Thread Paolo Bonzini
On 2/16/22 15:41, Peter Maydell wrote: On Wed, 16 Feb 2022 at 14:03, Paolo Bonzini wrote: On 2/16/22 10:56, Peter Maydell wrote: Hi; this fails to build on OpenBSD (on the tests/vm/ setup). Meson thinks it's found OpenGL: OpenGL support (epoxy) : YES 1.5.4 but either it's wrong

[PULL 01/12] virtiofsd: Do not support blocking flock

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Sebastian Hasler With the current implementation, blocking flock can lead to deadlock. Thus, it's better to return EOPNOTSUPP if a user attempts to perform a blocking flock request. Signed-off-by: Sebastian Hasler Message-Id:

[PATCH v4 07/18] block/reqlist: reqlist_find_conflict(): use ranges_overlap()

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Let's reuse convenient helper. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/reqlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/reqlist.c b/block/reqlist.c index 5e320ba649..09fecbd48c 100644 --- a/block/reqlist.c +++ b/block/reqlist.c @@ -13,6 +13,7

Re: [PATCH v4 1/3] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x

2022-02-16 Thread David Hildenbrand
> > +/* SELECT */ > +C(0xb9f0, SELR,RRF_a, MIE3, r2, r3, new, r1_32, loc, 0) > +C(0xb9e3, SELGR, RRF_a, MIE3, r2, r3, r1, 0, loc, 0) > +/* SELECT HIGH */ > +C(0xb9c0, SELFHR, RRF_a, MIE3, r2, r3, new, r1_32h, loc, 0) > + Heh, note how I inverted r2 and r3 in my proposal?

[PATCH v4 18/18] iotests/image-fleecing: test push backup with fleecing

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/tests/image-fleecing | 121 ++-- tests/qemu-iotests/tests/image-fleecing.out | 63 ++ 2 files changed, 152 insertions(+), 32 deletions(-) diff --git a/tests/qemu-iotests/tests/image-fleecing

Re: Portable inline asm to get address of TLS variable

2022-02-16 Thread Florian Weimer
* Stefan Hajnoczi: > On Wed, 16 Feb 2022 at 18:14, Florian Weimer wrote: >> >> * Stefan Hajnoczi: >> >> > I've been trying to make the inline asm that gets the address of a TLS >> > variable for QEMU coroutines pass QEMU's GitLab CI. >> >

Re: [PATCH 6/6] hw/nvme: 64-bit pi support

2022-02-16 Thread Keith Busch
On Mon, Feb 14, 2022 at 01:30:29PM +0100, Klaus Jensen wrote: > @@ -384,6 +389,12 @@ static int nvme_ns_check_constraints(NvmeNamespace *ns, > Error **errp) > return -1; > } > > +if (ns->params.pif != NVME_PI_GUARD_16 && > +ns->params.pif != NVME_PI_GUARD_64) { > +

Re: [PATCH] tcg: Add 'signed' bit to typecodes

2022-02-16 Thread Keith Packard via
Richard Henderson writes: > The signed information is still there, merged with the typecode: > > #define dh_typecode_void 0 > #define dh_typecode_noreturn 0 > #define dh_typecode_i32 2 > #define dh_typecode_s32 3 > #define dh_typecode_i64 4 > #define dh_typecode_s64 5 > #define dh_typecode_ptr 6

Re: [PULL v2 07/35] target/riscv: access cfg structure through DisasContext

2022-02-16 Thread Alistair Francis
On Wed, Feb 16, 2022 at 8:24 PM Philipp Tomsich wrote: > > Alistair, > > This PULL seems not to include the fixup (which you had intended to > squash into it) for the regression introduced (i.e. the condition > being inverted): > >

[PULL 08/12] virtiofsd: Add helpers to work with /proc/self/task/tid/attr/fscreate

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Soon we will be able to create and also set security context on the file atomically using /proc/self/task/tid/attr/fscreate knob. If this knob is available on the system, first set the knob with the desired context and then create the file. It will be created with the context

[PULL 11/12] virtiofsd: Add an option to enable/disable security label

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Provide an option "-o security_label/no_security_label" to enable/disable security label functionality. By default these are turned off. If enabled, server will indicate to client that it is capable of handling one security label during file creation. Typically this is

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-16 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Feb 16, 2022 at 05:40:44PM +, Dr. David Alan Gilbert wrote: > > * Thomas Huth (th...@redhat.com) wrote: > > > On 16/02/2022 12.01, Dr. David Alan Gilbert wrote: > > > > * Gerd Hoffmann (kra...@redhat.com) wrote: > > > > >Hi, > > >

Re: [qemu-web PATCH] Announce Outreachy 2022 May-August

2022-02-16 Thread Thomas Huth
On 15/02/2022 14.46, Stefan Hajnoczi wrote: Add a blog post inviting Outreachy applicants. QEMU has funding to participate in the Outreachy internship program (https://www.outreachy.org/) again this summer. We need to let people know about this so we get applicants! Thanks, pushed now!

Re: [PATCH 03/20] migration: Tracepoint change in postcopy-run bottom half

2022-02-16 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Remove the old two tracepoints and they're even near each other: > > trace_loadvm_postcopy_handle_run_cpu_sync() > trace_loadvm_postcopy_handle_run_vmstart() > > Add trace_loadvm_postcopy_handle_run_bh() with a finer granule trace. > >

[PATCH v4 06/18] block: intoduce reqlist

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Split intersecting-requests functionality out of block-copy to be reused in copy-before-write filter. Note: while being here, fix tiny typo in MAINTAINERS. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/reqlist.h | 67 +++ block/block-copy.c | 116

[PATCH v4 11/18] block: introduce snapshot-access filter

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
The filter simply utilizes snapshot-access API of underlying block node. In further patches we want to use it like this: [guest] [NBD export] || | root | root v file v

[PATCH v4 1/3] s390x/tcg: Implement Miscellaneous-Instruction-Extensions Facility 3 for the s390x

2022-02-16 Thread David Miller
resolves: https://gitlab.com/qemu-project/qemu/-/issues/737 implements: AND WITH COMPLEMENT (NCRK, NCGRK) NAND (NNRK, NNGRK) NOT EXCLUSIVE OR (NXRK, NXGRK) NOR (NORK, NOGRK) OR WITH COMPLEMENT(OCRK, OCGRK) SELECT(SELR, SELGR) SELECT

[PATCH v4 0/3] s390x: Add partial z15 support and tests

2022-02-16 Thread David Miller
Add partial support for s390x z15 ga1 and specific tests for mie3 v3 -> v4: * Change popcnt encoding RRE -> RRF_c * Remove redundant code op_sel -> op_loc * Cleanup for checkpatch.pl * Readded mie3-* to Makefile.target v2 -> v3: * Moved tests to separate patch. * Combined patches into series.

Re: [PATCH 0/6] hw/nvme: enhanced protection information (64-bit guard)

2022-02-16 Thread Keith Busch
On Mon, Feb 14, 2022 at 01:30:23PM +0100, Klaus Jensen wrote: > From: Klaus Jensen > > This adds support for one possible new protection information format > introduced in TP4068 (and integrated in NVMe 2.0): the 64-bit CRC guard > and 48-bit reference tag. This version does not support storage

Re: [PATCH v3 1/2] hvf: arm: Use macros for sysreg shift/masking

2022-02-16 Thread Peter Maydell
On Wed, 9 Feb 2022 at 12:41, Alexander Graf wrote: > > We are parsing the syndrome field for sysregs in multiple places across > the hvf code, but repeat shift/mask operations with hard coded constants > every time. This is an error prone approach and makes it harder to reason > about the

Re: [PATCH v3] tests/qtest: add qtests for npcm7xx sdhci

2022-02-16 Thread Peter Maydell
On Tue, 8 Feb 2022 at 18:18, Patrick Venture wrote: > > From: Shengtan Mao > > Reviewed-by: Hao Wu > Reviewed-by: Chris Rauer > Signed-off-by: Shengtan Mao > Signed-off-by: Patrick Venture > --- Applied to target-arm.next, thanks. -- PMM

[PULL 03/12] linux-headers: Update headers to v5.17-rc1

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Update headers to 5.17-rc1. I need latest fuse changes. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal Message-Id: <20220208204813.682906-3-vgo...@redhat.com> Signed-off-by: Dr. David Alan Gilbert --- include/standard-headers/asm-x86/kvm_para.h | 1 +

Re: [PATCH 3/3] x86: Switch to q35 as the default machine type

2022-02-16 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 16/02/2022 12.01, Dr. David Alan Gilbert wrote: > > * Gerd Hoffmann (kra...@redhat.com) wrote: > > >Hi, > > > > Given the semantic differences from 'i440fx', changing the default > > > > machine type has effects that are equivalent to breaking

[PATCH v4 02/18] block/dirty-bitmap: bdrv_merge_dirty_bitmap(): add return value

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
That simplifies handling failure in existing code and in further new usage of bdrv_merge_dirty_bitmap(). Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- include/block/dirty-bitmap.h| 2 +- block/dirty-bitmap.c| 9 +++--

[PATCH v4 04/18] block/copy-before-write: add bitmap open parameter

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
This brings "incremental" mode to copy-before-write filter: user can specify bitmap so that filter will copy only "dirty" areas. Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 10 +++- block/copy-before-write.c | 51 ++- 2

[PATCH v4 03/18] block/block-copy: block_copy_state_new(): add bitmap parameter

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
This will be used in the following commit to bring "incremental" mode to copy-before-write filter. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block-copy.h | 1 + block/block-copy.c | 14 +- block/copy-before-write.c | 2 +- 3 files changed, 15

[PATCH v4 05/18] block/block-copy: add block_copy_reset()

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Split block_copy_reset() out of block_copy_reset_unallocated() to be used separately later. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Hanna Reitz --- include/block/block-copy.h | 1 + block/block-copy.c | 21 + 2 files changed, 14 insertions(+), 8

[PATCH v5 2/3] s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z15 GA1

2022-02-16 Thread David Miller
TCG implements everything we need to run basic z15 OS+software Signed-off-by: David Miller --- hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/cpu_models.c | 6 +++--- target/s390x/gen-features.c | 7 +-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git

Re: Portable inline asm to get address of TLS variable

2022-02-16 Thread Florian Weimer
* Stefan Hajnoczi: > I'm basically asking whether the _var input operand is treated as > volatile and part of the inline assembly or whether it's just regular > C code that the compiler may optimize with the surrounding function? _var is evaluated outside of the inline assembly, any compiler

Re: [PATCH] tests/tcg/s390x: Build tests with debian11

2022-02-16 Thread Philippe Mathieu-Daudé via
On 16/2/22 12:51, David Hildenbrand wrote: We need a newer compiler to build upcoming tests that test for z15 features with -march=z15. So let's do it similar to arm64 and powerpc, using an environment based on debian11 to build tests only. Cc: Thomas Huth Cc: Cornelia Huck Cc: Richard

[PULL 05/12] virtiofsd: Extend size of fuse_conn_info->capable and ->want fields

2022-02-16 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal ->capable keeps track of what capabilities kernel supports and ->wants keep track of what capabilities filesytem wants. Right now these fields are 32bit in size. But now fuse has run out of bits and capabilities can now have bit number which are higher than 31. That means 32

[PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-16 Thread Vitaly Chikunov
`struct dirent' returned from readdir(3) could be shorter (or longer) than `sizeof(struct dirent)', thus memcpy of sizeof length will overread into unallocated page causing SIGSEGV. Example stack trace: #0 0x559ebeed v9fs_co_readdir_many (/usr/bin/qemu-system-x86_64 + 0x497eed) #1

Re: [PATCH v2 00/15] target/arm: Implement LVA, LPA, LPA2 features

2022-02-16 Thread Peter Maydell
On Thu, 10 Feb 2022 at 04:04, Richard Henderson wrote: > > Changes for v2: > * Introduce FIELD_SEX64, instead of open-coding w/ sextract64. > * Set TCR_EL1 more completely for user-only. > * Continue to bound tsz within aa64_va_parameters; > provide an out-of-bound indicator for raising

Re: [PATCH v2] docs: Add measurement calculation details to amd-memory-encryption.txt

2022-02-16 Thread Daniel P . Berrangé
On Tue, Feb 15, 2022 at 08:52:21AM +0200, Dov Murik wrote: > > > On 04/01/2022 20:00, Daniel P. Berrangé wrote: > > On Mon, Dec 20, 2021 at 10:42:24AM +, Dov Murik wrote: > >> Add a section explaining how the Guest Owner should calculate the > >> expected guest launch measurement for SEV and

Re: [Virtio-fs] [PULL 00/12] virtiofs queue

2022-02-16 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (git) (dgilb...@redhat.com) wrote: > From: "Dr. David Alan Gilbert" > > The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: > > Merge remote-tracking branch > 'remotes/alistair/tags/pull-riscv-to-apply-20220216' in

[PATCH v4 00/18] Make image fleecing more usable

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
v4: Switch to new fleecing scheme, more native for Qemu's block-layer, see new patches 10-12 for details. 01,02: add Hanna's r-b 03: add const, add forgotten bdrv_release_dirty_bitmap() 04: rewrite bitmap parameter parsing 05: add Hanna's r-b 06: tiny wording fixes 07: new 08: fix comments,

[PATCH v4 09/18] block/reqlist: add reqlist_wait_all()

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Add function to wait for all intersecting requests. To be used in the further commit. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Nikita Lapshin Reviewed-by: Hanna Reitz --- include/block/reqlist.h | 8 block/reqlist.c | 8 2 files changed, 16

Re: [PATCH v4 3/3] tests/tcg/s390x: Tests for Miscellaneous-Instruction-Extensions Facility 3

2022-02-16 Thread David Miller
That is strange, if I unstage them show status they are set to be committed: null@rygar:~/projects/qemu/build$ git reset --soft HEAD~1 null@rygar:~/projects/qemu/build$ git status On branch t2 Changes to be committed: (use "git restore --staged ..." to unstage) modified:

[PATCH v4 14/18] iotests.py: add qemu_io_pipe_and_status()

2022-02-16 Thread Vladimir Sementsov-Ogievskiy
Add helper that returns both status and output, to be used in the following commit Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index

Re: Portable inline asm to get address of TLS variable

2022-02-16 Thread Stefan Hajnoczi
On Wed, 16 Feb 2022 at 20:28, Stefan Hajnoczi wrote: > > On Wed, 16 Feb 2022 at 18:14, Florian Weimer wrote: > > > > * Stefan Hajnoczi: > > > > > I've been trying to make the inline asm that gets the address of a TLS > > > variable for QEMU coroutines pass QEMU's GitLab CI. > > >

Re: [Virtio-fs] [PULL 00/12] virtiofs queue

2022-02-16 Thread Vivek Goyal
; > > Merge remote-tracking branch > > 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging > > (2022-02-16 09:57:11 +) > > > > are available in the Git repository at: > > > > https://gitlab.com/

[PATCH v3 5/7] hw/isa/piix4: Resolve global instance variable

2022-02-16 Thread Bernhard Beschow
Now that piix4_set_irq's opaque parameter references own PIIX4State, piix4_dev becomes redundant. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c| 10 +++--- include/hw/southbridge/piix.h | 2 -- 2 files changed, 3 insertions(+), 9

Re: [PATCH v3 2/7] malta: Move PCI interrupt handling from gt64xxx_pci to piix4

2022-02-16 Thread Philippe Mathieu-Daudé via
On 16/2/22 23:45, Bernhard Beschow wrote: Handling PCI interrupts in piix4 increases cohesion and reduces differences between piix4 and piix3. Signed-off-by: Bernhard Beschow --- hw/isa/piix4.c | 55 ++ hw/mips/gt64xxx_pci.c | 60

Re: [PATCH 26/27] target/ppc: cpu_init: Move check_pow and QOM macros to a header

2022-02-16 Thread David Gibson
On Wed, Feb 16, 2022 at 10:06:26AM -0300, Fabiano Rosas wrote: > David Gibson writes: > > > On Tue, Feb 15, 2022 at 06:41:47PM -0300, Fabiano Rosas wrote: > >> These will need to be accessed from other files once we move the CPUs > >> code to separate files. > >> > >> Signed-off-by: Fabiano

[PATCH v16 3/7] migration/dirtyrate: Refactor dirty page rate calculation

2022-02-16 Thread huangy81
From: Hyman Huang(黄勇) abstract out dirty log change logic into function global_dirty_log_change. abstract out dirty page rate calculation logic via dirty-ring into function vcpu_calculate_dirtyrate. abstract out mathematical dirty page rate calculation into do_calculate_dirtyrate, decouple it

[PATCH v16 4/7] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

2022-02-16 Thread huangy81
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util

[PATCH v16 6/7] softmmu/dirtylimit: Implement virtual CPU throttle

2022-02-16 Thread huangy81
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is in service. Signed-off-by: Hyman Huang(黄勇)

[PATCH v16 5/7] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

2022-02-16 Thread huangy81
From: Hyman Huang(黄勇) Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu --- accel/kvm/kvm-all.c| 5 + accel/stubs/kvm-stub.c | 5 + include/sysemu/kvm.h | 2 ++ 3 files changed, 12 insertions(+)

[PATCH v3 7/7] hw/mips/gt64xxx_pci: Resolve gt64120_register()

2022-02-16 Thread Bernhard Beschow
Now that gt64120_register() lost its pic parameter, there is an opportunity to remove it. gt64120_register() is old style by wrapping qdev API, and the new style is to use qdev directly. So take the opportunity and modernize the code. Suggested-by: BALATON Zoltan Signed-off-by: Bernhard Beschow

Re: [PATCH v3] Hexagon (target/hexagon) properly handle NaN in dfmin/dfmax/sfmin/sfmax

2022-02-16 Thread Richard Henderson
On 2/16/22 15:39, Taylor Simpson wrote: The float??_minnum implementation differs from Hexagon for SNaN, it returns NaN, but Hexagon returns the other input. So, we use float??_minimum_number. For double precision, we check for QNaN and raise the invalid flag. I'm surprised that the

Re: [PATCH v2 2/3] spapr: Add SPAPR_CAP_AIL_MODE_3 for AIL mode 3 support for H_SET_MODE hcall

2022-02-16 Thread David Gibson
On Wed, Feb 16, 2022 at 04:39:02PM +1000, Nicholas Piggin wrote: > The behaviour of the Address Translation Mode on Interrupt resource is > not consistently supported by all CPU versions or all KVM versions: > KVM-HV does not support mode 2, and does not support mode 3 on POWER7 or > early POWER9

[PATCH v3 1/7] hw/mips/gt64xxx_pci: Fix PCI IRQ levels to be preserved during migration

2022-02-16 Thread Bernhard Beschow
Based on commit e735b55a8c11dd455e31ccd4420e6c9485191d0c: piix_pci: eliminate PIIX3State::pci_irq_levels PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. The IRQ levels in the PCIBus layer are already preserved during migration. By

[PATCH v3 0/7] malta: Fix PCI IRQ levels to be preserved during migration, cleanup

2022-02-16 Thread Bernhard Beschow
Tested with [1]: qemu-system-mipsel -M malta -kernel vmlinux-3.2.0-4-4kc-malta -hda \ debian_wheezy_mipsel_standard.qcow2 -append "root=/dev/sda1 console=tty0" It was possible to log in as root and `poweroff` the machine. Moreover, I ran: :$ make check Ok: 569

[PATCH v3 4/7] hw/isa/piix4: Pass PIIX4State as opaque parameter for piix4_set_irq()

2022-02-16 Thread Bernhard Beschow
Passing PIIX4State rather than just the qemu_irq allows for resolving the global piix4_dev variable. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

qemu crash 100% CPU with Ubuntu10.04 guest (solved)

2022-02-16 Thread Ben Smith
Hi All, I'm cross-posting this from Reddit qemu_kvm, in case it helps in some way. I know my setup is ancient and unique; let me know if you would like more info. Symptoms: 1. Ubuntu10.04 32-bit guest locks up randomly between 0 and 30 days. 2. The console shows a CPU trace dump, nothing else

Re: [PATCH v2 26/27] target/ppc: cpu_init: Move check_pow and QOM macros to a header

2022-02-16 Thread David Gibson
On Wed, Feb 16, 2022 at 01:24:25PM -0300, Fabiano Rosas wrote: > These will need to be accessed from other files once we move the CPUs > code to separate files. > > The check_pow_hid0 and check_pow_hid0_74xx are too specific to be > moved to a header so I'll deal with them later when splitting

Re: [PATCH v3 7/7] hw/mips/gt64xxx_pci: Resolve gt64120_register()

2022-02-16 Thread BALATON Zoltan
On Wed, 16 Feb 2022, Bernhard Beschow wrote: Now that gt64120_register() lost its pic parameter, there is an opportunity to remove it. gt64120_register() is old style by wrapping qdev API, and the new style is to use qdev directly. So take the opportunity and modernize the code. Suggested-by:

<    1   2   3   4   >