Patchew URL: https://patchew.org/QEMU/20190810041255.6820-1-jan.bo...@gmail.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Subject: [Qemu-devel] [RFC PATCH v2 00/39] rewrite MMX/SSE instruction
translation
Message-id: 20190810041255.6820-
Introduce code generators required by SSE instructions.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 440
1 file changed, 440 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 12d2ac2eb5..681fa1aee2 100644
--- a
Add all the SSE instruction entries to insn.h.
Signed-off-by: Jan Bobek
---
target/i386/insn.h | 158 +
1 file changed, 158 insertions(+)
diff --git a/target/i386/insn.h b/target/i386/insn.h
index 6506ff3137..6e0c75b9f7 100644
--- a/target/i386/insn.h
Code generators defined using these macros rely on a gvec operation
(i.e. tcg_gen_gvec_*).
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index d721bb5142..36f2579654 10
The memory-pointer operand has a known limitation (see the commit
introducing M* operands for details); the workaround involves
declaring write-memory operands as read-memory instead.
Note: This changeset is intended for development only and shall not be
included in the final patch series.
Signed
The memory-pointer operand decodes the indirect form of ModR/M byte,
loads the effective address into a register and passes that register
as the operand.
Note: This operand has a known flaw: if an instruction is writing to
memory (rather than reading), this operand cannot and will not load
the eff
Instruction "translators" are responsible for decoding and loading
instruction operands, calling the passed-in code generator, and
storing the operands back (if applicable). Once a translator returns,
the instruction has been translated to TCG ops, hence the name.
Signed-off-by: Jan Bobek
---
ta
These address the SSE/AVX-technology register file. Offset of the
entire corresponding register is passed as the operand value,
regardless of operand-size suffix.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 45 +
1 file changed, 45 insertions(+)
Add all MMX instruction entries to insn.h.
Signed-off-by: Jan Bobek
---
target/i386/insn.h | 131 +
1 file changed, 131 insertions(+)
diff --git a/target/i386/insn.h b/target/i386/insn.h
index 4b48c0c0e1..6506ff3137 100644
--- a/target/i386/insn.h
+++
Introduce the immediate-byte operand, which loads a byte from the
instruction stream and passes its value as the operand.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 8
1 file changed, 8 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 0da06
Use the translator macros to define translators required by SSE
instructions.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 33 +
1 file changed, 33 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 5802b324f0..12d2ac2eb5
In this context, "code generators" are functions that receive decoded
instruction operands and emit TCG ops implementing the correct
instruction functionality. Introduce the naming macros first, actual
generator macros will be added later.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 1
Use the translator macros to define instruction translators required
by MMX instructions.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 16
1 file changed, 16 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 36f2579654..3475727380 1006
These address the MMX-technology register file; the corresponding
cpu_env offset is passed as the operand value. Notably, offset of the
entire register is pased at all times, regardless of the operand-size
suffix.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 37
The PINSRW family of instructions have a peculiar second operand:
32-bit general-purpose register file is addressed, but if the operand
is indirect, only 16 bits are loaded from memory. Reflect this by the
RdMw operand.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 6 ++
1 file chan
Code generators defined using these macros rely on a helper function
(as emitted by gen_helper_*).
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 19b92d61
The MOVHLPS instruction has a special operand: it reads the high
quadword of the source operand (hence it requires the full
double-quadword width), but if the operand is indirect, only 64-bits
are read from memory. Introduce UdqMq operand to address this case.
Signed-off-by: Jan Bobek
---
target
This operand attempts to capture the "indirect" or "memory" operand in
a generic way. It significatly reduces the amount code that needs to
be written in order to read operands from memory to temporary storage
and write them back.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 78 +++
These address the general-purpose register file. The corresponding
32-bit or 64-bit register is passed as the operand value.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 65 +
1 file changed, 65 insertions(+)
diff --git a/target/i386/translate.c
insnop_t and the init, prepare and finalize functions form the basis
of instruction operand decoding. Introduce macros for defining a
generic instruction operand; use cases for operand decoding will be
introduced later with instruction translators.
Signed-off-by: Jan Bobek
---
target/i386/transl
Define code generators required for MMX instructions.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 114
1 file changed, 114 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 3475727380..aa6fb8b013 100644
--- a/t
This header is intended to eventually list all supported instructions
along with some useful details (e.g. mnemonics, opcode, operands etc.)
It shall be used (along with some preprocessor magic) anytime we need
to automatically generate code for every instruction.
Signed-off-by: Jan Bobek
---
ta
It is helpful to introduce aliases for some general gvec operations as
it makes a couple of instruction code generators simpler (added
later).
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/tra
It turns out it is useful to be able to declare operand name
aliases. Introduce a macro to capture this functionality.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 0bee728
The variable pc_start is already a member of DisasContext. Remove the
superfluous local variable.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 131
1 file changed, 65 insertions(+), 66 deletions(-)
diff --git a/target/i386/translate.c b/target/
Introduce a helper function to take care of instruction CPUID checks.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 45 +
1 file changed, 45 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 03b49411e5..508d584584
Some functions added later are generated by preprocessor macros and
end up being unused (e.g. not all operands can serve as a destination
operand). Disable unused function warnings for the new code until I
figure out how I want to solve this particular issue.
Note: This changeset is intended for d
Many operands can only decode successfully if the ModR/M byte has the
direct form (i.e. MOD=3). Capture this common aspect by introducing a
special operand-initialization statement wrapper.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 9 +
1 file changed, 9 insertions(+)
diff
gvec operations require that all vectors be aligned on 16-byte
boundary; make sure the MM/XMM/YMM/ZMM register file is aligned as
neccessary.
Reviewed-by: Richard Henderson
Signed-off-by: Jan Bobek
---
target/i386/cpu.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t
This function serves as the point-of-intercept for all newly
implemented instructions. If no new implementation exists, fall back
to gen_sse.
Note: This changeset is intended for development only and shall not be
included in the final patch series.
Signed-off-by: Jan Bobek
---
target/i386/trans
Reduce scope of the local variable prefixes to enforce use of prefix
from DisasContext instead.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 113
1 file changed, 57 insertions(+), 56 deletions(-)
diff --git a/target/i386/translate.c b/target/i3
There already is a variable dflag in DisasContext, so reduce the scope
of the local variable dflag to enforce use of the one in DisasContext.
Suggested-by: Richard Henderson
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 184
1 file changed, 92 i
The old code uses bitshifts and bitwise-and all over the place for
decoding ModR/M fields. Avoid doing that by introducing proper
decoding macros.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/target/i386/translate.c b/t
Similar in spirit to the already present gen_(ld,st)(q,o)_env_A0, it
will prove useful in later commits for smaller-sized vector loads.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 12
1 file changed, 12 insertions(+)
diff --git a/target/i386/translate.c b/target/i386/tra
From: Richard Henderson
Treat this the same as we already do for other rex bits.
Signed-off-by: Richard Henderson
---
target/i386/translate.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index d74dbfd
The variable is_xmm does not change value after assignment, so make
this fact explicit by marking it const.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/target/i386/translate.c b/target/i386/translate.
The variable b1 does not change value once assigned. Make this fact
explicit by marking it const.
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index b1ba2
From: Richard Henderson
We can compute cur_eip from values present within DisasContext.
Signed-off-by: Richard Henderson
---
target/i386/translate.c | 89 -
1 file changed, 44 insertions(+), 45 deletions(-)
diff --git a/target/i386/translate.c b/target/
The variable aflag is not used in most of disas_insn; make this clear
by explicitly reducing its scope to the block where it is used.
Suggested-by: Richard Henderson
Signed-off-by: Jan Bobek
---
target/i386/translate.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tar
From: Richard Henderson
Treat this value the same as we do for rex_b and rex_x.
Signed-off-by: Richard Henderson
---
target/i386/translate.c | 85 +
1 file changed, 44 insertions(+), 41 deletions(-)
diff --git a/target/i386/translate.c b/target/i386/tra
This is a v2 of the patch series posted in [1]. Patches 1-9 are just
cleanups; patches 10-39 are something actually interesting. Compared
to v1, I started using preprocessor more extensively to generate
repetitive boilerplate code; opinions/alternatives are welcome and
appreciated.
I tried to elim
On Fri, Aug 9, 2019 at 8:43 AM Richard Henderson
wrote:
>
> These are now generated by decodetree itself.
>
> Signed-off-by: Richard Henderson
Reviewed-by: Alistair Francis
Alistair
> ---
> target/riscv/translate.c | 19 +--
> 1 file changed, 1 insertion(+), 18 deletions(-)
>
On Fri, Aug 9, 2019 at 8:42 AM Richard Henderson
wrote:
>
> We can tell that a decodetree input file is "secondary" when it
> uses an argument set marked "!extern". This indicates that at
> least one of the insn translation functions will have already
> been declared by the "primary" input file,
On Fri, Aug 9, 2019 at 12:26 AM Bin Meng wrote:
>
> When CADENCE_GEM_ERR_DEBUG is turned on, there are several
> compilation errors in DB_PRINT(). Fix them.
>
> While we are here, update to use appropriate modifiers in
> the same DB_PRINT() call.
>
> Signed-off-by: Bin Meng
Reviewed-by: Alistair
On Fri, Aug 9, 2019 at 2:22 AM Alex Bennée wrote:
>
> We should avoid including the whole of softfloat headers in cpu.h and
> explicitly include it only where we will be calling softfloat
> functions. We can use the -types.h and -helpers.h in cpu.h for the few
> bits that are global.
>
> Signed-of
On Thu, Aug 8, 2019 at 9:43 AM Alex Bennée wrote:
>
> We should avoid including the whole of softfloat headers in cpu.h and
> explicitly include it only where we will be calling softfloat
> functions. We can use the -types.h and -helpers.h in cpu.h for the few
> bits that are global.
>
> Signed-of
On Thu, Aug 8, 2019 at 2:52 AM liuzhiwei wrote:
>
> Hi all,
>
> My workmate and I have been working on Vector & Dsp extension, and
> I'd like to share develop status with folks.
Cool!
>
> The spec references for Vector extension is riscv-v-spec-0.7.1, and
> riscv-p-spec-0.5 for DSP ex
On Wed, Aug 7, 2019 at 12:49 AM Bin Meng wrote:
>
> Current SiFive PRCI model only works with sifive_e machine, as it
> only emulates registers or PRCI block in the FE310 SoC.
>
> Rename the file name to make it clear that it is for sifive_e.
>
> Signed-off-by: Bin Meng
> ---
>
> Changes in v2: N
On Wed, Aug 7, 2019 at 7:50 PM Bin Meng wrote:
>
> For RV32, the root page table's PPN has 22 bits hence its address
> bits could be larger than the maximum bits that target_ulong is
> able to represent. Use hwaddr instead.
>
> Signed-off-by: Bin Meng
Reviewed-by: Alistair Francis
Alistair
>
As promised, an experiment in unifying the checks.
I believe that I've tested for all of the same conditions, modulo the
timing at which they are emitted. As before, only one error is reported,
so if multiple errors exist you can't rely on which error is seen.
I think there's value in splitting
On 8/9/19 10:43 AM, Palmer Dabbelt wrote:
> Acked-by: Palmer Dabbelt
>
> I assume you're taking this along with the rest though your tree.
Yes, that was my plan.
r~
On Fri, Aug 9, 2019 at 12:11 PM Kevin Wolf wrote:
> bdrv_create options specified with -o have no effect when skipping image
> creation with -n, so this doesn't make sense. Warn against the misuse
> and deprecate the combination so we can make it a hard error later.
>
> Signed-off-by: Kevin Wolf
Hi, there isn't really a development branch; if '-S 0' didn't help
alleviate the problem there may be other problems at hand, or the APFS
implementation of SEEK_DATA is causing us even more problems in new
versions.
You could try Yan-Jie Wang's patch that was posted in #20, but until
it's posted t
Hi Peter, Paolo, Alex, Thomas :)
On 7/2/19 4:08 PM, Peter Maydell wrote:
> On Mon, 1 Jul 2019 at 20:49, Philippe Mathieu-Daudé wrote:
[...]
>> $ git backport-diff -u v3 -r target-arm.next..v4
>> Key:
>> [] : patches are identical
>> [] : number of functional differences between upstream/d
Backup jobs may yield prior to installing their handler, because of the
job_co_entry shim which guarantees that a job won't begin work until
we are ready to start an entire transaction.
Unfortunately, this makes proving correctness about transactional
points-in-time for backup hard to reason about
On 8/9/19 9:18 AM, Vladimir Sementsov-Ogievskiy wrote:
> Hi!
>
> Hmm, hacking around backup I have a question:
>
> What prevents guest write request after job_start but before setting
> write notifier?
>
> code path:
>
> qmp_drive_backup or transaction with backup
>
> job_start
>
On 8/8/19 5:48 AM, Dr. David Alan Gilbert wrote:
> * Singh, Brijesh (brijesh.si...@amd.com) wrote:
>> On 8/7/19 6:06 AM, Dr. David Alan Gilbert wrote:
>>> * Singh, Brijesh (brijesh.si...@amd.com) wrote:
AMD SEV migration flow requires that target machine's public Diffie-Hellman
key (PDH)
On 24.07.19 19:12, Max Reitz wrote:
> Hi,
>
> See the previous cover letter for the reason for patches 6 through 9:
> https://lists.nongnu.org/archive/html/qemu-block/2019-07/msg00563.html
>
> But no only some bdrv_has_zero_init() implementations are wrong, some
> callers also use it the wrong wa
On 25.07.19 18:27, Max Reitz wrote:
> On 25.07.19 17:30, Maxim Levitsky wrote:
>> On Wed, 2019-07-24 at 19:12 +0200, Max Reitz wrote:
>>> Add a test case for converting an empty image (which only returns zeroes
>>> when read) to a preallocated encrypted qcow2 image.
>>> qcow2_has_zero_init() should
* Singh, Brijesh (brijesh.si...@amd.com) wrote:
> The sev_save_outgoing_page() provide the implementation to encrypt the
> guest private pages during the transit. The routines uses the SEND_START
> command to create the outgoing encryption context on the first call then
> uses the SEND_UPDATE_DATA
69f47505ee has changed qcow2 in such a way that the commit job run in
test 141 (and 144[1]) returns before it emits the READY event. However,
141 also runs with qed, where the order is still the other way around.
Just filter out the {"return": {}} so the test passes for qed again.
[1] 144 only ru
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote:
> Move migration helpers for strings under include/, so they can be used
> outside of migration/
>
> Signed-off-by: Marc-André Lureau
> Reviewed-by: Juan Quintela
I've queued this one (just 1/2) for the migration pull I'll do as soon
as 4
Thanks. I will report this to Go/gcc upstream.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1839325
Title:
Go programs crash on qemu-sh4 due to issues with atomics
Status in QEMU:
New
Bug desc
On Fri, 09 Aug 2019 08:41:53 PDT (-0700), richard.hender...@linaro.org wrote:
These are now generated by decodetree itself.
Signed-off-by: Richard Henderson
---
target/riscv/translate.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/target/riscv/transla
I just did an objdump -x of the /usr/lib/sh4-linux-gnu/libgo.so.14,
which will be the shipped version from the Debian package, and in the
section header it has:
24 .bss 000191f8 00fe74ec 00fe74ec 00fd74ec 2**2
ALLOC
and in the symbol table it has:
00ff98f4 l O
Add the HWCAP2_* bits from kernel version v5.3-rc3.
Enable the bits corresponding to ARMv8.5-CondM and ARMv8.5-FRINT.
Signed-off-by: Richard Henderson
---
linux-user/elfload.c | 31 +++
1 file changed, 27 insertions(+), 4 deletions(-)
---
The HWCAP2_FLAGM2 and HWCAP2
On 8/9/19 11:13 AM, Max Reitz wrote:
> Signed-off-by: Max Reitz
> Reviewed-by: Vladimir Sementsov-Ogievskiy
> ---
> block/qcow2.c | 9 +
> 1 file changed, 9 insertions(+)
>
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Vir
On 8/9/19 11:13 AM, Max Reitz wrote:
> Add some helper functions for skipping filters in a chain of block
> nodes.
>
> Signed-off-by: Max Reitz
> Reviewed-by: Vladimir Sementsov-Ogievskiy
> ---
> include/block/block_int.h | 3 +++
> block.c | 55 ++
On 8/9/19 11:13 AM, Max Reitz wrote:
> There are BDS children that the general block layer code can access,
> namely bs->file and bs->backing. Since the introduction of filters and
> external data files, their meaning is not quite clear. bs->backing can
> be a COW source, or it can be an R/W-filt
On 09.08.19 17:32, Vladimir Sementsov-Ogievskiy wrote:
> Since previous commit, copy_range supports max_transfer, so we don't
> need to handle it by hand.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/backup.c | 11 ++-
> 1 file changed, 2 insertions(+), 9 deletions(-)
R
On 09.08.19 17:32, Vladimir Sementsov-Ogievskiy wrote:
> copy_range ignores these limitations, let's improve it.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/io.c | 48
> 1 file changed, 40 insertions(+), 8 deletions(-)
Reviewed-
The non-8-aligned pointer is the runtime.work.empty field. The
compilation that I have of this binary has put the 'runtime.work' struct
at 0x6bfadc, which is only 4-aligned, and this won't work as the lfstack
fields it starts with are supposed to be 8-aligned. So it looks to me
like the compiler ha
On Wed, Aug 07, 2019 at 10:22:41AM +0200, Julia Suvorova wrote:
> Using FLR becomes convenient in cases where resetting the bus is
> impractical, for example, when debugging the behavior of individual
> functions.
>
> Signed-off-by: Julia Suvorova
> ---
> hw/virtio/virtio-pci.c | 10 ++
>
Add a test for committing an overlay in a sub directory to one of the
images in its backing chain, using both relative and absolute filenames.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/020 | 36
tests/qemu-iotests/020.out | 10 ++
2 files ch
Parts of the block layer treat BDS.backing_file as if it were whatever
the image header says (i.e., if it is a relative path, it is relative to
the overlay), other parts treat it like a cache for
bs->backing->bs->filename (relative paths are relative to the CWD).
Considering bs->backing->bs->filena
Currently, check_to_replace_node() only allows mirror to replace a node
in the chain of the source node, and only if it is the first non-filter
node below the source. Well, technically, the idea is that you can
exactly replace a quorum child by mirroring from quorum.
This has (probably) two reaso
This patch adds some test cases how mirroring relates to filters. One
of them tests what happens when you mirror off a filtered COW node, two
others use the mirror filter node as basically our only example of an
implicitly created filter node so far (besides the commit filter).
Signed-off-by: Max
This adds two tests for cases where our old check_to_replace_node()
function failed to detect that executing this job with these parameters
would result in a cyclic graph.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/041 | 124 +
complete_and_wait() and wait_ready() currently only work for mirror
jobs. Let them work for active commit jobs, too.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/iotests.py | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qe
We have to perform an active commit whenever the top node has a parent
that has taken the WRITE permission on it.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/block
When looking for a dirty bitmap to share, we should handle filters by
just including them in the search (so they do not break backing chains).
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Eric Blake
---
nbd/server.c | 6 +++---
1 file changed, 3 insertions(+)
This is useful in other files like blockdev.c to determine for example
whether a node can be written to or not.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/block/block_int.h | 3 +++
block.c | 6 ++
2 files changed, 5 insertions(+), 4 del
If the top node's driver does not provide snapshot functionality and we
want to fall back to a node down the chain, we need to snapshot all
non-COW children. For simplicity's sake, just do not fall back if there
is more than one such child.
bdrv_snapshot_goto() becomes a bit weird because we may
Signed-off-by: Max Reitz
---
tests/qemu-iotests/040 | 61 ++
tests/qemu-iotests/040.out | 4 +--
2 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index a0a0db8889..558fdb9a09 100755
--- a/tests
This changes iotest 204's output, because blkdebug on top of a COW node
used to make qemu-img map disregard the rest of the backing chain (the
backing chain was broken by the filter). With this patch, the
allocation in the base image is reported correctly.
Signed-off-by: Max Reitz
---
qemu-img.
If a node whose driver does not provide VM state functions has a
metadata child, the VM state should probably go there; if it is a
filter, the VM state should probably go there. It follows that we
should generally go down to the primary child.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Semen
With bdrv_filtered_rw_bs(), we can easily handle this default filter
behavior in bdrv_co_block_status().
blkdebug wants to have an additional assertion, so it keeps its own
implementation, except bdrv_co_block_status_from_file() needs to be
inlined there.
Suggested-by: Eric Blake
Signed-off-by:
This includes some permission limiting (for example, we only need to
take the RESIZE permission for active commits where the base is smaller
than the top).
Signed-off-by: Max Reitz
---
block/mirror.c | 117 ++---
blockdev.c | 47 +-
If the driver does not support .bdrv_co_flush() so bdrv_co_flush()
itself has to flush the children of the given node, it should not flush
just bs->file->bs, but in fact all children.
In any case, the BLKDBG_EVENT() should be emitted on the primary child,
because that is where a blkdebug node woul
This patch adds some tests on how commit copes with filter nodes.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/040 | 177 +
tests/qemu-iotests/040.out | 4 +-
2 files changed, 179 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/040 b/te
Because of the recent changes that make the stream job independent of
the base node and instead track the node above it, we have to split that
"bottom" node into two cases: The bottom COW node, and the node directly
above the base node (which may be an R/W filter or the bottom COW node).
Signed-of
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/backup.c | 9 +
blockdev.c | 19 +++
2 files changed, 20 insertions(+), 8 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index ecadb61af3..7854d7575b 100644
--- a/block/backup.c
Use the child access functions in the block status inquiry functions as
appropriate.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/io.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/block/io.c b/block/io.c
index 4d6cf4b3c
We want to make it explicit where bs->backing is used, and we have done
so. The old role of backing_bs() is now effectively taken by
bdrv_filtered_cow_bs().
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/block/block_int.h | 5 -
1 file changed, 5 deletions(-
query-block, query-named-block-nodes, and query-blockstats now return
any filtered child under "backing", not just bs->backing or COW
children. This is so that filters do not interrupt the reported backing
chain. This changes the output for iotest 184, as the throttled node
now appears as a backi
This allows us to differentiate between filters and nodes with COW
backing files: Filters cannot be used as overlays at all (for this
function).
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --
Filters cannot compress data themselves but they have to implement
.bdrv_co_pwritev_compressed() still (or they cannot forward compressed
writes). Therefore, checking whether
bs->drv->bdrv_co_pwritev_compressed is non-NULL is not sufficient to
know whether the node can actually handle compressed w
This includes some permission limiting (for example, we only need to
take the RESIZE permission if the base is smaller than the top).
Signed-off-by: Max Reitz
---
block/block-backend.c | 16 +---
block/commit.c| 96 +++
blockdev.c|
In order to make filters work in backing chains, the associated
functions must be able to deal with them and freeze all filter links, be
they COW or R/W filter links.
In the process, rename these functions to reflect that they now act on
generalized chains of filter nodes instead of backing chains
If the driver does not implement bdrv_get_allocated_file_size(), we
should fall back to cumulating the allocated size of all non-COW
children instead of just bs->file.
Suggested-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Max Reitz
---
block.c | 22 --
1 file changed, 20
1 - 100 of 281 matches
Mail list logo