On 3/24/2022 4:35 PM, Gerd Hoffmann wrote:
On Tue, Mar 22, 2022 at 01:20:24PM +0100, Gerd Hoffmann wrote:
Hi,
At the time I did try a gross hack that (IIRC) disabled the
rom_reset logic, and munged x86_bios_rom_init so that it would
force load it straight at the RAM location.
Sounds reaso
Coverity is now rejecting incomplete types in the modeling file.
Just use a random number (in the neighborhood of the actual one)
for the size of a GIOChannel.
Signed-off-by: Paolo Bonzini
---
scripts/coverity-scan/model.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scr
On 29.03.22 18:49, Li Zhang wrote:
Update what I observed.
It seems that aqmp is not stable when running test cases.
So I revert the patches as the following, iotest40/41 test cases work
well.
Thanks for bisecting. I haven’t seen this problem before, so I didn’t
look into it; CC-ing John, p
From: Michael Qiu
Currently, when VM poweroff, it will trigger vdpa
device(such as mlx bluefield2 VF) reset many times(with 1 datapath
queue pair and one control queue, triggered 3 times), this
leads to below issue:
vhost VQ 2 ring restore failed: -22: Invalid argument (22)
This because in vhos
On Thu, Mar 31, 2022 at 2:36 PM Palmer Dabbelt wrote:
>
> On Wed, 30 Mar 2022 20:23:21 PDT (-0700), alistai...@gmail.com wrote:
> > On Thu, Mar 31, 2022 at 3:11 AM Idan Horowitz
> > wrote:
> >>
> >> On Wed, 30 Mar 2022 at 19:11, Palmer Dabbelt wrote:
> >> >
> >> >
> >> > Presumably you mean "re
On Thu, Mar 31, 2022 at 3:11 AM Palmer Dabbelt wrote:
>
> The ISA doesn't allow bare mappings to be cached, as the caches are
> translations and bare mppings are not translated. We cache these
> translations in QEMU in order to utilize the TLB code, but that leaks
> out to the guest.
>
> Suggeste
Using a register array will allow us to represent old-mode and new-mode
I2C registers by using the same underlying register array, instead of
adding an entire new set of variables to represent new mode.
As part of this, we also do additional cleanup to use ARRAY_FIELD_
macros instead of FIELD_ mac
On Mon, Mar 14, 2022 at 07:10:10PM -0300, Fabiano Rosas wrote:
> David Gibson writes:
>
> > On Tue, Mar 08, 2022 at 10:23:59PM -0300, Fabiano Rosas wrote:
> >> QEMU reports MMU support to the guest via the ibm,architecture-vec-5
> >> property of the /chosen node. Byte number 26 specifies Radix Ta
Occasionally a peripheral will have different operating modes, where the
MMIO layout changes, but some of the register fields have the same offsets
and behaviors.
To help support this, we add SHARED_FIELD_XX macros that create SHIFT,
LENGTH, and MASK macros for the fields that are shared across re
The Aspeed I2C controller is used across other SKUs that have different
reserved bits for the ctrl_global_rsvd register.
Signed-off-by: Joe Komlodi
Change-Id: I606c5933c527274a9d2b0afe559b2e895767636c
---
hw/arm/aspeed_ast2600.c | 2 ++
hw/i2c/aspeed_i2c.c | 4
include/hw/i2c/as
Hi all,
This series migrates the Aspeed I2C controller to use the register API,
and then adds new mode support.
New mode has some behavior changes and a register layout change compared
to old mode.
The series starts by adding "shared field" macros to help simplify logic
when adding new mode.
Gen
This cleans up some of the field accessing, setting, and clearing
bitwise operations, and wraps them in macros instead.
Signed-off-by: Joe Komlodi
Change-Id: I33018d6325fa04376e7c29dc4a49ab389a8e333a
---
hw/i2c/aspeed_i2c.c | 393 ++--
1 file changed, 196
On Wed, 30 Mar 2022 20:23:21 PDT (-0700), alistai...@gmail.com wrote:
On Thu, Mar 31, 2022 at 3:11 AM Idan Horowitz wrote:
On Wed, 30 Mar 2022 at 19:11, Palmer Dabbelt wrote:
>
>
> Presumably you mean "revert" here? That might be the right way to go,
> just to avoid breaking users (even if w
Moves register definitions and short commonly used inlined functiosn to
the header file to help tidy up the implementation file.
Signed-off-by: Joe Komlodi
Change-Id: I34dff7485b6bbe3c9482715ccd94dbd65dc5f324
---
hw/i2c/aspeed_i2c.c | 266 ---
include/hw/i
Signed-off-by: Joe Komlodi
Change-Id: I566eb09f4b9016e24570572f367627f6594039f5
---
hw/i2c/aspeed_i2c.c | 3 +++
hw/i2c/trace-events | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/i2c/aspeed_i2c.c b/hw/i2c/aspeed_i2c.c
index 948d8dc2bb..f179f78ee9 100644
--- a/hw/i2c/asp
On AST2600, I2C has a secondary mode, called "new mode", which changes
the layout of registers, adds some minor behavior changes, and
introduces a new way to transfer data called "packet mode".
Most of the bit positions of the fields are the same between old and new
mode, so we use SHARED_FIELD_XX
On 2022/3/31 8:15, Si-Wei Liu wrote:
On 3/30/2022 3:02 AM, 08005...@163.com wrote:
From: Michael Qiu
Currently, when VM poweroff, it will trigger vdpa
device(such as mlx bluefield2 VF) reset many times(with 1 datapath
queue pair and one control queue, triggered 3 times), this
leads to bel
On 2022/3/31 8:15, Si-Wei Liu wrote:
On 3/30/2022 3:02 AM, 08005...@163.com wrote:
From: Michael Qiu
Currently, when VM poweroff, it will trigger vdpa
device(such as mlx bluefield2 VF) reset many times(with 1 datapath
queue pair and one control queue, triggered 3 times), this
leads to bel
On Thu, Mar 31, 2022 at 3:11 AM Idan Horowitz wrote:
>
> On Wed, 30 Mar 2022 at 19:11, Palmer Dabbelt wrote:
> >
> >
> > Presumably you mean "revert" here? That might be the right way to go,
> > just to avoid breaking users (even if we fix the kernel bug, it'll take
> > a while to get everyone t
On Thu, Mar 31, 2022 at 11:24 AM Weiwei Li wrote:
>
>
> 在 2022/3/31 上午8:11, Alistair Francis 写道:
> > On Wed, Mar 30, 2022 at 10:52 PM Weiwei Li wrote:
> >>
> >> 在 2022/3/30 下午6:24, ~eopxd 写道:
> >>> According to v-spec, tail agnostic behavior can be either kept as
> >>> undisturbed or set elements
On Tue, Mar 29, 2022 at 3:24 AM Mayuresh Chitale
wrote:
>
> Smstateen extension specifies a mechanism to close
> the potential covert channels that could cause security issues.
>
> This patch adds the CSRs defined in the specification and
> the corresponding predicates and read/write functions.
>
> -Original Message-
> From: lizhij...@fujitsu.com
> Sent: Thursday, March 31, 2022 9:15 AM
> To: Zhang, Chen ; Jason Wang
>
> Cc: qemu-dev ; Like Xu
> Subject: Re: [PATCH 2/4] net/colo: Fix a "double free" crash to clear the
> conn_list
>
>
> connection_track_table
> -+-
Michael,
Others has already received the patch, don't know why. Anyway, I will
repost another version(V3).
Here is the V2 patch, see below:
From: Michael Qiu
Currently, when VM poweroff, it will trigger vdpa
device(such as mlx bluefield2 VF) reset many times(with 1 datapath
queue pair and o
On 2022/3/29 上午4:19, Richard Henderson wrote:
On 3/28/22 06:57, Xiaojuan Yang wrote:
1.This patch Add loongarch interrupt and exception handle.
2.Rename the user excp to the exccode from the csr defintions.
Signed-off-by: Xiaojuan Yang
Signed-off-by: Song Gao
---
linux-user/loongarch64/cp
On Wed, Mar 30, 2022 at 09:17:15PM -0300, Daniel Henrique Barboza wrote:
> 'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't
> understand that and it returns warnings as such for this function:
>
> ==55240== Thread 1:
> ==55240== Conditional jump or move depends on uninitialised va
On Wed, Mar 30, 2022 at 09:17:14PM -0300, Daniel Henrique Barboza wrote:
> Valgrind isn't convinced that we are initializing the values we assign
> to env->spr[spr] because it doesn't understand that the 'val' union is
> being written by the kvm_vcpu_ioctl() that follows (via struct
> kvm_one_reg).
On 2022/3/29 上午4:18, Mark Cave-Ayland wrote:
On 28/03/2022 13:57, Xiaojuan Yang wrote:
This patch realize the PCH-PIC interrupt controller.
Signed-off-by: Xiaojuan Yang
Signed-off-by: Song Gao
---
hw/intc/Kconfig | 4 +
hw/intc/loongarch_pch_pic.c | 488
在 2022/3/31 上午8:11, Alistair Francis 写道:
On Wed, Mar 30, 2022 at 10:52 PM Weiwei Li wrote:
在 2022/3/30 下午6:24, ~eopxd 写道:
According to v-spec, tail agnostic behavior can be either kept as
undisturbed or set elements' bits to all 1s. To distinguish the
difference of tail policies, QEMU shoul
On 2022/3/29 上午4:16, Richard Henderson wrote:
On 3/28/22 06:57, Xiaojuan Yang wrote:
+void helper_idle(CPULoongArchState *env)
+{
+ CPUState *cs = env_cpu(env);
+
+ cs->halted = 1;
+ cpu_reset_interrupt(cs, CPU_INTERRUPT_WAKE);
+ do_raise_exception(env, EXCP_HLT, 0);
+}
Why are y
Hi Mark,
On 2022/3/29 上午4:15, Mark Cave-Ayland wrote:
+
+#define TYPE_LOONGARCH_IPI "loongarch_ipi"
+OBJECT_DECLARE_SIMPLE_TYPE(LoongArchIPI, LOONGARCH_IPI)
+
+typedef struct IPICore {
+ uint32_t status;
+ uint32_t en;
+ uint32_t set;
+ uint32_t clear;
+ /* 64bit buf divide into 2
connection_track_table
-+--
key1 | conn|---+
-+-- |
key2 | conn|--+|
-+--
On 2022/3/29 上午4:12, Richard Henderson wrote:
On 3/28/22 06:57, Xiaojuan Yang wrote:
+static void output_empty(DisasContext *ctx, arg_empty *a,
+ const char *mnemonic)
+{
+}
No, you must still do
output(ctx, mnemonic, "");
+static bool trans_tlbwr(DisasContext
On 2022/3/29 上午3:46, Richard Henderson wrote:
On 3/28/22 06:57, Xiaojuan Yang wrote:
+void cpu_loongarch_store_constant_timer_config(LoongArchCPU *cpu,
+ uint64_t value)
+{
+ CPULoongArchState *env = &cpu->env;
+ uint64_t now, next;
+
+ en
On Mon, 28 Mar 2022 16:30:16 +0200
Paolo Bonzini wrote:
> Do not make assumptions on the parent type of the SCSIDevice, instead
> use object_dynamic_cast all the way up to the CcwDevice. This is cleaner
> because there is no guarantee that the bus is on a virtio-scsi device;
> that is only the c
On Thu, Mar 24, 2022 at 7:08 PM Daniel P. Berrangé wrote:
>
> On Wed, Mar 23, 2022 at 06:13:46PM +0100, Ralf Ramsauer wrote:
> > The -bios option is silently ignored if used in combination with
> > -enable-kvm.
> > The reason is that the machine starts in S-Mode, and the bios typically
> > runs
'lpcr' is used as an input of kvm_get_one_reg(). Valgrind doesn't
understand that and it returns warnings as such for this function:
==55240== Thread 1:
==55240== Conditional jump or move depends on uninitialised value(s)
==55240==at 0xB011E4: kvmppc_enable_cap_large_decr (kvm.c:2546)
==55240=
On Wed, Mar 30, 2022 at 5:59 AM Atish Patra wrote:
>
> The Linux kernel parses the ISA extensions from "riscv,isa" DT
> property. It used to parse only the single letter base extensions
> until now. A generic ISA extension parsing framework was proposed[1]
> recently that can parse multi-letter IS
Changes from v1:
- patch 1: init 'val' union in a single statement
- all patches:
* added Philippe's R-b
* changed initialization format from {0} to { }
- v1 link: https://lists.gnu.org/archive/html/qemu-devel/2022-03/msg07234.html
Daniel Henrique Barboza (4):
target/ppc: initialize 'val' un
Init 'sregs' to avoid Valgrind complaints about uninitialized bytes
from kvmppc_put_books_sregs():
==54059== Thread 3:
==54059== Syscall param ioctl(generic) points to uninitialised byte(s)
==54059==at 0x55864E4: ioctl (in /usr/lib64/libc.so.6)
==54059==by 0xD1FA23: kvm_vcpu_ioctl (kvm-all
Init the struct to avoid Valgrind complaints about unitialized bytes,
such as this one:
==39549== Syscall param ioctl(generic) points to uninitialised byte(s)
==39549==at 0x55864E4: ioctl (in /usr/lib64/libc.so.6)
==39549==by 0xD1F7EF: kvm_vm_ioctl (kvm-all.c:3035)
==39549==by 0xAF8F5B
On 3/30/2022 3:02 AM, 08005...@163.com wrote:
From: Michael Qiu
Currently, when VM poweroff, it will trigger vdpa
device(such as mlx bluefield2 VF) reset many times(with 1 datapath
queue pair and one control queue, triggered 3 times), this
leads to below issue:
vhost VQ 2 ring restore faile
The sscofpmf extension was ratified as a part of priv spec v1.12.
Mark the csr_ops accordingly.
Signed-off-by: Atish Patra
---
target/riscv/csr.c | 90 ++
1 file changed, 60 insertions(+), 30 deletions(-)
diff --git a/target/riscv/csr.c b/target/riscv
On Wed, Mar 30, 2022 at 12:14 PM Weiwei Li wrote:
>
> The spec for vmvr.v says: 'the instructions operate as if EEW=SEW,
> EMUL = NREG, effective length evl= EMUL * VLEN/SEW.'
>
> So the start byte for vstart != 0 should take sew into account
>
> Signed-off-by: Weiwei Li
> Signed-off-by: Junqiang
Valgrind isn't convinced that we are initializing the values we assign
to env->spr[spr] because it doesn't understand that the 'val' union is
being written by the kvm_vcpu_ioctl() that follows (via struct
kvm_one_reg).
This results in Valgrind complaining about uninitialized values every
time we u
On Wed, Mar 30, 2022 at 10:52 PM Weiwei Li wrote:
>
>
> 在 2022/3/30 下午6:24, ~eopxd 写道:
> > According to v-spec, tail agnostic behavior can be either kept as
> > undisturbed or set elements' bits to all 1s. To distinguish the
> > difference of tail policies, QEMU should be able to simulate the tail
The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions,
and 'cofpmf' for Count OverFlow and Privilege Mode Filtering)
extension allows the perf to handle overflow interrupts and filtering
support. This patch provides a framework for programmable
counters to leverage the extension. A
All the hpmcounters and the fixed counters (CY, IR, TM) can be represented
as a unified counter. Thus, the predicate function doesn't need handle each
case separately.
Simplify the predicate function so that we just handle things differently
between RV32/RV64 and S/HS mode.
Reviewed-by: Bin Meng
Qemu virt machine can support few cache events and cycle/instret counters.
It also supports counter overflow for these events.
Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine
capabilities. There are some dummy nodes added for testing as well.
Signed-off-by: Atish Patra
Si
From: Atish Patra
Qemu can monitor the following cache related PMU events through
tlb_fill functions.
1. DTLB load/store miss
3. ITLB prefetch miss
Increment the PMU counter in tlb_fill function.
Reviewed-by: Alistair Francis
Signed-off-by: Atish Patra
Signed-off-by: Atish Patra
---
target
From: Atish Patra
The PMU counters are supported via cpu config "Counters" which doesn't
indicate the correct purpose of those counters.
Rename the config property to pmu to indicate that these counters
are performance monitoring counters. This aligns with cpu options for
ARM architecture as wel
From: Atish Patra
mcycle/minstret are actually WARL registers and can be written with any
given value. With SBI PMU extension, it will be used to store a initial
value provided from supervisor OS. The Qemu also need prohibit the counter
increment if mcountinhibit is set.
Support mcycle/minstret
The RISC-V privilege specification provides flexibility to implement
any number of counters from 29 programmable counters. However, the QEMU
implements all the counters.
Make it configurable through pmu config parameter which now will indicate
how many programmable counters should be implemented b
From: Atish Patra
As per the privilege specification v1.11, mcountinhibit allows to start/stop
a pmu counter selectively.
Reviewed-by: Bin Meng
Reviewed-by: Alistair Francis
Signed-off-by: Atish Patra
Signed-off-by: Atish Patra
---
target/riscv/cpu.h | 2 ++
target/riscv/cpu_bits.h |
From: Atish Patra
With SBI PMU extension, user can use any of the available hpmcounters to
track any perf events based on the value written to mhpmevent csr.
Add read/write functionality for these csrs.
Reviewed-by: Alistair Francis
Reviewed-by: Bin Meng
Signed-off-by: Atish Patra
Signed-off-
From: Atish Patra
The predicate function calculates the counter index incorrectly for
hpmcounterx. Fix the counter index to reflect correct CSR number.
Fixes: e39a8320b088 ("target/riscv: Support the Virtual Instruction fault")
Reviewed-by: Alistair Francis
Reviewed-by: Bin Meng
Signed-off-by
From: Atish Patra
Currently, the predicate function for PMU related CSRs only works if
virtualization is enabled. It also does not check mcounteren bits before
before cycle/minstret/hpmcounterx access.
Support supervisor mode access in the predicate function as well.
Reviewed-by: Alistair Franc
From: Philippe Mathieu-Daudé
The TPMState structure hold an array of TPM_TIS_NUM_LOCALITIES
TPMLocality loc[], having TPM_TIS_NUM_LOCALITIES defined as '5'.
tpm_tis_locality_from_addr() returns up to 3 bits, so 7.
While unlikely, Coverity is right to report an overrun. Assert
we are in range to
The latest version of the SBI specification includes a Performance Monitoring
Unit(PMU) extension[1] which allows the supervisor to start/stop/configure
various PMU events. The Sscofpmf ('Ss' for Privileged arch and Supervisor-level
extensions, and 'cofpmf' for Count OverFlow and Privilege Mode Fil
I'm tired of this pattern being everywhere. Let's add a helper.
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 aaa77b5105..329297bfe4 100644
Finally we can strictly unshare write on source node, as all write must
go through copy-before-write filter. For this to work:
- Declare independent close, so that blockdev-del transaction action
may detach children of removed node at prepare phase (that's for
filter removement). We can do
Add an alternative method to check block graph, to be used in further
commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 17 +
1 file changed, 17 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index c
We need this blk only for probing - let's create it only when we are
going to probe.
That's significant for further changes: we'll need to avoid permission
update during open() when possible (to refresh them later of course).
But blk_unref() leads to permission update. Instead of implementing
extr
Currently for block exports we report empty blk names. That's not good.
Let's try to find corresponding block export and report its id.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 4
block/export/export.c | 13 +
include/block/export.h
Less typing: let's use imgfmt by default if user doesn't specify
neither -f nor --image-opts.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index fc
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/export/export.c | 18 ++
include/sysemu/block-backend-global-state.h | 1 +
2 files changed, 19 insertions(+)
diff --git a/block/export/export.c b/block/export/export.c
index 7253af3bc3..66e62f0074 10064
Demonstrate new API for filter insertion and removal.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/tests/filter-insertion | 253 ++
tests/qemu-iotests/tests/filter-insertion.out | 5 +
2 files changed, 258 insertions(+)
create mode 100755 tests/qemu-i
We'll need this functionality as part of external transaction, so make
the whole function to be transaction action. For this we need to
introduce a transaction action helper: bdrv_drained(), which calls
bdrv_drained_begin() and postpone bdrv_drained_end() to .clean() phase.
Signed-off-by: Vladimir
Support blockdev-replace in a transaction.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c| 4 ++--
blockdev.c | 29 -
include/block/block-global-state.h | 2 ++
qapi/transaction.json | 15
We'll need get non-const child pointer for graph modifications in
further commits.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/block-backend.c | 2 +-
include/sysemu/block-backend-global-state.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
To be reused soon.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 13 +
blockdev.c | 14 --
include/block/block_int-io.h | 1 +
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/block.c b/block.c
index 17c0
Add a test for transaction support of blockdev-add.
Test is format-agnostic, so limit it to qcow2 to avoid extra test runs.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
.../tests/blockdev-add-transaction| 52 +++
.../tests/blockdev-add-transaction.out| 6
Support blockdev-del in a transaction.
The tricky thing is how we update permissions: not after every
blockdev-del operation, but after group of such operations. Soon we'll
support blockdev-add and new blockdev-replace in the same manner, and
we'll be able to do a wide range of block-graph modifyi
Look at qmp_transaction(): dev_list is not obvious name for list of
actions. Let's look at qapi spec, this argument is "actions". Let's
follow the common practice of using same argument names in qapi scheme
and code.
To be honest, rename props to properties for same reason.
Next, we have to renam
Add a command that can replace bs in following BdrvChild structures:
- qdev blk root child
- block-export blk root child
- any child BlockDriverState selected by child-name
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 65 ++
Let's simplify things:
First, actions generally don't need and access to common
BlkActionState structure. The only exclusion are backup actions that
need block_job_txn.
Next, for transaction actions of Transaction API is more native to
allocated state structure in the action itself.
So, do the f
Now copy-before-write filter has weak permission model: when it has no
parents, it share write permission on source. Otherwise we just can't
blockdev-add it, when existing user of source has write permission.
The situation is bad, it means that copy-before-write filter doesn't
guarantee that all w
Drop this simple wrapper used only in one place. We have too many graph
modifying functions even without it.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/block.c b/block.c
index 34e89b277f..656e596e0c
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 177f3ff989..b44f0ca101 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -2386,7 +2386,7 @@ void qmp_transaction(TransactionActionList *a
Use new flag to avoid permission updates where possible during
blockdev_add, so that a bunch of add/del (and soon, new 'replace')
command may be done before actual permission update to avoid
intermediate permission conflicts.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c
Only backup supports GROUPED mode. Make this logic more clear. And
avoid passing extra thing to each action.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 88 --
1 file changed, 19 insertions(+), 69 deletions(-)
diff --git a/blo
The only caller is bdrv_root_unref_child(), let's just do the logic
directly in it. It simplifies further convertion of
bdrv_root_unref_child() to transaction action.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 45 ++---
1 file changed, 18 in
Further bdrv_replace_node will refresh permissions anyway, so we can
avoid intermediate permission conflicts.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index ca0b629bec..17c057a962 100644
---
We are going to add more block-graph modifying transaction actions,
and block-graph modifying functions are already based on Transaction
API.
Next, we'll need to separately update permissions after several
graph-modifying actions, and this would be simple with help of
Transaction API.
So, now let
Actually what we chose is a primary child. Let's stress it in the code.
We are going to drop indirect pointer logic here in future. Actually
this commit simplifies the future work: we drop use of indirection in
the assertion now.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/snapshot.c
Now nodes are removed during block-graph update transactions now? Look
at bdrv_replace_child_tran: bdrv_unref() is simply postponed to commit
phase.
What is the problem with it?
We want to make copy-before-write permissions strict: it should unshare
write always, not only when it has at least one
We'll need them in further commits in blockdev.c for new transaction
block-graph modifying API.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c| 7 +++
include/block/block-global-state.h | 4
2 files changed, 7 insertions(+), 4 deletions(-)
diff --gi
Now the function can remove any child, so give it more common name.
Drop assertions and drop bs argument which becomes unused. Function
would be reused in a further commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 22 --
1 file changed, 8 insertions(+), 14 de
To be used in further commit.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 48
1 file changed, 48 insertions(+)
diff --git a/block.c b/block.c
index be19964f89..1900cdf277 100644
--- a/block.c
+++ b/block.c
@@ -2907,6 +2907,54 @@ sta
Make the informal rules formal. In further commit we'll add
corresponding assertions.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
include/block/block-common.h | 42
1 file changed, 42 insertions(+)
diff --git a/include/block/block-common.h b/include/bloc
We are going to increase usage of collecting nodes in a list to then
update, and calling bdrv_topological_dfs() each time is not convenient,
and not correct as we are going to interleave graph modifying with
filling the node list.
So, let's switch to a function that takes any list of nodes, adds a
Allow passing external Transaction pointer, stop creating extra
Transaction objects.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 31 ---
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/block.c b/block.c
index 656e596e0c..f3ed351360 100644
Now the indirection is not actually used, we can safely reduce it to
simple pointer.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/snapshot.c | 39 +--
1 file changed, 17 insertions(+), 22 deletions(-)
diff --git a/block/snapshot.c b/block/snapshot.c
bdrv_pass_through is used as filter, even all node variables has
corresponding names. We want to append it, so it should be
backing-child-based filter like mirror_top.
So, in test_update_perm_tree, first child should be DATA, as we don't
want filters with two filtered children.
bdrv_exclusive_writ
That's a preparation to previously reverted
"block: Let replace_child_noperm free children". Drop it too, we don't
need it for a new approach.
This reverts commit 82b54cf51656bf3cd5ed1ac549e8a1085a0e3290.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 81 +++--
Almost all drivers call bdrv_open_child() similarly. Let's create a
helper for this.
The only not updated driver that call bdrv_open_child() to set
bs->file is raw-format, as it sometimes want to have filtered child but
don't set drv->is_filter to true.
Possibly we should implement drv->is_filter
bs->file and bs->backing are a kind of duplication of part of
bs->children. But very useful diplication, so let's not drop them at
all:)
We should manage bs->file and bs->backing in same place, where we
manage bs->children, to keep them in sync.
Moreover, generic io paths are unprepared to BdrvCh
We do add COW child to the node. In future we are going to forbid
adding COW child to the node that doesn't support backing. So, fix it
here now.
Don't worry about setting bs->backing itself: it further commit we'll
update the block-layer to automatically set/unset this field in generic
code.
Si
We don't need to remove bs->file, generic layer takes care of it. No
other driver cares to remove bs->file on failure by hand.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block/blklogwrites.c | 4
1 file changed, 4 deletions(-)
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
i
test_parallel_perm_update() does two things that we are going to
restrict in the near future:
1. It updates bs->file field by hand. bs->file will be managed
automatically by generic code (together with bs->children list).
Let's better refactor our "tricky" bds to have own state where one
That's a preparation to previously reverted
"block: Let replace_child_noperm free children". Drop it too, we don't
need it for a new approach.
This reverts commit be64bbb0149748f3999c49b13976aafb8330ea86.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
block.c | 23 +++
1 fi
1 - 100 of 419 matches
Mail list logo