On Tue, 12 May 2020 10:55:56 -0400
Collin Walling wrote:
> On 5/12/20 3:21 AM, David Hildenbrand wrote:
> > On 09.05.20 01:08, Collin Walling wrote:
> >> +static bool check_sufficient_sccb_len(SCCB *sccb, int size)
> >
> > "has_sufficient_sccb_len" ?
> >
> >> +{
> >> +MachineState *m
When we hotplug vcpus, cpu_update_state is added to vm_change_state_head
in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu()
after
unplug. Then it will cause a use-after-free access. This patch delete it in
kvm_arch_destroy_vcpu() to fix that.
Reproducer:
virsh setvcpu
On Fri, 8 May 2020 19:08:22 -0400
Collin Walling wrote:
> Signed-off-by: Collin Walling
> ---
> linux-headers/asm-s390/kvm.h | 5 +
> 1 file changed, 5 insertions(+)
>
> diff --git a/linux-headers/asm-s390/kvm.h b/linux-headers/asm-s390/kvm.h
> index 0138ccb0d8..b661feafdc 100644
> --- a/
On 5/12/20 3:57 PM, Eric Blake wrote:
> Wouldn't it just be simpler to not dup in the first place?
>
> diff --git i/qemu-nbd.c w/qemu-nbd.c
> index 4aa005004ebd..6ba2544feb3a 100644
> --- i/qemu-nbd.c
> +++ w/qemu-nbd.c
> @@ -916,7 +916,9 @@ int main(int argc, char **argv)
> } else if (pi
Public bug reported:
Hi,
Since commit 5010cec2bc87dafab39b3913c8ca91f88df9c540, building qemu
fails when configured with --static (eg ../configure --target-
list=x86_64-softmmu,x86_64-linux-user --enable-debug --static).
On ubuntu 16.04, it fails to find -lffi and -lselinux.
After I apt-get ins
On 5/12/20 6:01 PM, Cornelia Huck wrote:
> On Mon, 11 May 2020 17:02:06 +0200
> David Hildenbrand wrote:
>
>> On 11.05.20 16:50, Janosch Frank wrote:
>>> On 5/11/20 4:44 PM, David Hildenbrand wrote:
On 11.05.20 16:36, Janosch Frank wrote:
> On 5/9/20 1:08 AM, Collin Walling wrote:
On 5/12/20 4:36 PM, Edgar E. Iglesias wrote:
> From: Tong Ho
>
> This is to fix cpu-abort with 'qemu: fatal: unknown mfs reg d'
> (in the default case) when microblaze guest issues 'MFS Rd,EDR'
> instruction.
>
> Since embeddedsw release 2019.2, XPlm_ExceptionHandler() issues
> the instruction o
сре, 8. апр 2020. у 11:07 Huacai Chen је написао/ла:
>
> Traditionally, MIPS use 4KB page size, but Loongson prefer 16KB page
> size in system emulator. So, let's define TARGET_PAGE_BITS_VARY and
> TARGET_PAGE_BITS_MIN to support variable page size.
>
> Cc: Jiaxun Yang
> Signed-off-by: Huacai Che
сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла:
>
> Loongson processor prefers 16KB page size in system emulator, so let's
> define mc->minimum_page_bits to 14.
>
> Cc: Jiaxun Yang
> Signed-off-by: Huacai Chen
> ---
Huacai, thanks for the efforts regarding this series! I will very
likely a
On Wed, 13 May 2020 09:43:37 +0200
Janosch Frank wrote:
> On 5/12/20 6:01 PM, Cornelia Huck wrote:
> > On Mon, 11 May 2020 17:02:06 +0200
> > David Hildenbrand wrote:
> >
> >> On 11.05.20 16:50, Janosch Frank wrote:
> >>> On 5/11/20 4:44 PM, David Hildenbrand wrote:
> On 11.05.20 1
Hi, Aleksandar,
On Wed, May 13, 2020 at 3:56 PM Aleksandar Markovic
wrote:
>
> сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла:
> >
> > Loongson processor prefers 16KB page size in system emulator, so let's
> > define mc->minimum_page_bits to 14.
> >
> > Cc: Jiaxun Yang
> > Signed-off-by: H
Hello Daniel,
Ok, TigerVNC, added -shared=1 to behave the same
as TightVNC, works greatly, Thanks !
But funny thing, I saw you were part of exchanges
on that topic, noVNC totally fails now.
Despite my keyboard isnt changed, debian VM is
just in QWERTY as if noVNC only send keysyms.
If you
On Tue, May 12, 2020 at 07:56:33AM -0400, Jag Raman wrote:
>
>
> > On May 12, 2020, at 4:48 AM, Daniel P. Berrangé wrote:
> >
> > On Wed, Apr 22, 2020 at 09:13:36PM -0700, elena.ufimts...@oracle.com wrote:
> >> From: Jagannathan Raman
> >>
> >> Allow RAM MemoryRegion to be created from an off
On 12/05/2020 17.51, Eric Blake wrote:
> On 5/12/20 10:13 AM, Thomas Huth wrote:
>
+++ b/qapi/net.json
@@ -453,7 +453,7 @@
# 'l2tpv3' - since 2.1
##
{ 'union': 'Netdev',
- 'base': { 'id': 'str', 'type': 'NetClientDriver' },
+ 'base': { '*id': 's
On Tue, May 12, 2020 at 07:58:17PM +0100, Dr. David Alan Gilbert wrote:
> * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote:
> > > On Mon, 11 May 2020 16:46:45 +0100
> > > "Dr. David Alan Gilbert" wrote:
> > >
> > > > * Daniel P.
On Tue, May 12, 2020 at 08:28:39AM -0400, Jag Raman wrote:
> > On May 12, 2020, at 6:21 AM, Stefan Hajnoczi wrote:
> > On Wed, Apr 22, 2020 at 09:13:47PM -0700, elena.ufimts...@oracle.com wrote:
> >> +uint64_t wait_for_remote(int efd)
> >> +{
> >> +struct pollfd pfd = { .fd = efd, .events = PO
On Wed, May 13, 2020 at 10:38:52AM +0200, B3r3n wrote:
> Hello Daniel,
>
> Ok, TigerVNC, added -shared=1 to behave the same as TightVNC, works greatly,
> Thanks !
>
> But funny thing, I saw you were part of exchanges on that topic, noVNC
> totally fails now.
> Despite my keyboard isnt changed, de
On 12.05.20 21:39, Eric Blake wrote:
> On 5/12/20 6:10 AM, Max Reitz wrote:
>
>
>>> This does not break old code since previously we always reported only
>>> guest visible content
>>> here, but it changes the semantics, and now you cannot allocate
>>> "required" size, you need
>>> to allocate "re
Le 12/05/2020 à 23:05, Tomas Krcka a écrit :
> Am Di., 12. Mai 2020 um 22:09 Uhr schrieb Laurent Vivier :
>>
>> Le 06/05/2020 à 15:21, Tomas Krcka a écrit :
>>> Signed-off-by: Tomas Krcka
>>> ---
>>> linux-user/syscall.c | 34 ++
>>> 1 file changed, 34 insertions(+
Hello Daniel,
I guess it is time for me to commit
suicide...when you dont think about the basics : software version :-(
Was 1.0.4, moved to 1.1.0, no issue
DONT BECOME OLD ! :-)
thanks!
At 10:42 13/05/2020, Daniel P. Berrangé wrote:
On Wed, May 13, 2020 at 10:38:52AM +0200, B3r3n wrote:
>
On 12/05/2020 22.15, Vikram Garhwal wrote:
> The QTests perform five tests on the Xilinx ZynqMP CAN controller:
> Tests the CAN controller in loopback, sleep and snoop mode.
> Tests filtering of incoming CAN messages.
>
> Signed-off-by: Vikram Garhwal
> ---
> tests/qtest/Makefile.include
On Wed, May 13, 2020 at 11:00:38AM +0800, Jason Wang wrote:
>
> On 2020/5/12 下午5:08, Dima Stepanov wrote:
> >On Tue, May 12, 2020 at 11:26:11AM +0800, Jason Wang wrote:
> >>On 2020/5/11 下午5:11, Dima Stepanov wrote:
> >>>On Mon, May 11, 2020 at 11:05:58AM +0800, Jason Wang wrote:
> On 2020/4/30
On Wed, May 13, 2020 at 11:20:50AM +0800, Jason Wang wrote:
>
> On 2020/5/12 下午5:35, Dima Stepanov wrote:
> >On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote:
> >>On 2020/5/11 下午5:25, Dima Stepanov wrote:
> >>>On Mon, May 11, 2020 at 11:15:53AM +0800, Jason Wang wrote:
> On 2020/4/30
* Lukas Straub (lukasstra...@web.de) wrote:
> cpu_synchronize_all_pre_loadvm() marks all vcpus as dirty, so the
> registers are loaded from CPUState before we continue running
> the vm. However if we failover during checkpoint, CPUState is not
> initialized and the registers are loaded with garbage
On Wed, May 13, 2020 at 01:56:18PM +0800, Jason Wang wrote:
>
> On 2020/5/13 下午12:15, Michael S. Tsirkin wrote:
> >On Tue, May 12, 2020 at 12:35:30PM +0300, Dima Stepanov wrote:
> >>On Tue, May 12, 2020 at 11:32:50AM +0800, Jason Wang wrote:
> >>>On 2020/5/11 下午5:25, Dima Stepanov wrote:
> On
Add support for the recently introduced functions
bdrv_co_preadv_part()
and
bdrv_co_pwritev_part()
to the COR-filter driver.
Signed-off-by: Andrey Shinkevich
---
block/copy-on-read.c | 28
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/block/copy-on-
The COR-filter driver should support a redirecting function to refresh
filenames. Otherwise, a file name of the filter will be copied
instead of the one of a data node. It is also true for the function
bdrv_change_backing_file().
Signed-off-by: Andrey Shinkevich
---
block/copy-on-read.c | 18 +++
From: Max Reitz
Add some helper functions for skipping filters in a chain of block
nodes.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block.c | 55 +++
include/block/block_int.h | 3 +++
2 files changed,
From: Max Reitz
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-filtered child; bs->file can be
From: Max Reitz
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
Provide the possibility to pass the 'filter-node-name' parameter to the
block-stream job as it is done for the commit block job. That will be
needed for further iotests implementations.
Signed-off-by: Andrey Shinkevich
---
block/monitor/block-hmp-cmds.c | 4 ++--
block/stream.c |
From: Max Reitz
Use child access functions when iterating through backing chains so
filters do not break the chain.
Signed-off-by: Max Reitz
---
block.c | 40
1 file changed, 28 insertions(+), 12 deletions(-)
diff --git a/block.c b/block.c
index 459412
From: Max Reitz
The commit and mirror block nodes are filters, so they should be marked
as such. (Strictly speaking, BDS.is_filter's documentation states that
a filter's child must be bs->file. The following patch will relax this
restriction, however.)
Signed-off-by: Max Reitz
Reviewed-by: Al
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/copy-on-read.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/block/copy-on-read.c b/block/copy-on-read.c
index 242d3ff..c4fa468 100644
--- a/block/copy-on-read.c
+++ b/block/copy-on-
The patch completes the series with the COR-filter insertion to any
block-stream operation. It also makes changes to the iotests 030 and
141.out.
Signed-off-by: Andrey Shinkevich
---
block/stream.c | 83 --
tests/qemu-iotests/030 | 8 +
From: Max Reitz
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
Signed-off-by: Andrey Shinkevich
---
block/commit.c | 75 ++
1
From: Max Reitz
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
This patch is the first one in the series where the COR-filter node
will be hard-coded for using in the block-stream job. The block jobs
may be run in parallel. Exclude conflicts with filter nodes used for
a concurrent job while checking for the blocked operations. It incurs
changes in the iotests
Provide API for the COR-filter insertion/removal.
Also, drop the filter child permissions for an inactive state when the
filter node is being removed.
Signed-off-by: Andrey Shinkevich
---
block/copy-on-read.c | 102 +++
block/copy-on-read.h | 36 +
The preliminary patch modifies the test 245 to prepare the block-stream
job for using COR-filter. The filter breaks the backing chain being
connected to the underlying node by file child link.
Signed-off-by: Andrey Shinkevich
---
tests/qemu-iotests/245 | 10 +++---
1 file changed, 7 insertio
test_overlapping_3() throttles its active commit job so it can be sure
the job is still busy when it checks that you can't start a conflicting
streaming job.
However, it only sets the commit job back to full speed when it is
ready, which takes a few seconds while it's throttled. We can already
res
With this series, all the block-stream COR operations pass through
the COR-filter. The patches 01-08/15 are taken from the series
"block: Deal with filters" by Max Reitz, the full version of that
can be found in the branches:
https://git.xanclic.moe/XanClic/qemu child-access-functions-v6
On Mon, May 11, 2020 at 10:58:22AM +0200, Cédric Le Goater wrote:
> If an interrupt occurred when the thread was in power-saving mode,
> bits [42:45] of SRR1 indicate the exception that caused exit from
> power-saving mode.
>
> bits [46:47] of SRR1 indicate the power-saving mode in which the
> thr
Am 11.05.2020 um 09:08 hat Lukas Straub geschrieben:
> If qemu in colo secondary mode is stopped, it crashes because
> s->backup_job is canceled twice: First with job_cancel_sync_all()
> in qemu_cleanup() and then in replication_stop().
>
> Fix this by assigning NULL to s->backup_job when the job
On Wed, 13 May 2020 09:26:30 -0400
Pan Nengyuan wrote:
> When we hotplug vcpus, cpu_update_state is added to vm_change_state_head
> in kvm_arch_init_vcpu(). But it forgot to delete in kvm_arch_destroy_vcpu()
> after
> unplug. Then it will cause a use-after-free access. This patch delete it in
>
Am 12.05.2020 um 11:43 hat Daniel P. Berrangé geschrieben:
> On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote:
> > On Mon, 11 May 2020 16:46:45 +0100
> > "Dr. David Alan Gilbert" wrote:
> >
> > > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > > ...
> > > > That way if QE
12.05.2020 21:48, Kevin Wolf wrote:
Am 12.05.2020 um 19:15 hat Vladimir Sementsov-Ogievskiy geschrieben:
11.05.2020 16:58, Kevin Wolf wrote:
If the target is shorter than the source, mirror would copy data until
it reaches the end of the target and then fail with an I/O error when
trying to wri
сре, 13. мај 2020. у 10:25 Huacai Chen је написао/ла:
>
> Hi, Aleksandar,
>
> On Wed, May 13, 2020 at 3:56 PM Aleksandar Markovic
> wrote:
> >
> > сре, 8. апр 2020. у 11:08 Huacai Chen је написао/ла:
> > >
> > > Loongson processor prefers 16KB page size in system emulator, so let's
> > > define
* Laurent Vivier (lviv...@redhat.com) wrote:
> This patch implements HMP version of the virtio QMP commands
>
> Signed-off-by: Laurent Vivier
Reviewed-by: Dr. David Alan Gilbert
With a thought below
> ---
> Makefile| 2 +-
> Makefile.target | 7 +-
> docs/syst
The original coversion function is used for regular and MSA floating
point instructions handling. Since there are some nuanced differences
between regular and MSA floatin point excetion handling, provide two
instances of the conversion function, rather than just a common one.
Inline both of these f
This series contains mostly cosmetic FPU cleanups aimed to
make source code recognition easier for tools like gdb, gcov,
calgrind, and others.
There is also a patch that refactors conversion from ieee to
mips fp exception flags. This refactoring will improve the
performance of almost all fp-relate
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 38 +-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/target
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 37 -
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/target/
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 41 +++-
1 file changed, 40 insertions(+), 1 deletion(-)
diff --git a/targ
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 37 -
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/target/
After demacroing ., these macros
are not needed anymore.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 50
1 file changed, 50 deletions(-)
diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c
index 927bac24ac..e8e50e4bc0 1
The checkpatch complain about "#ifdef 0". Convert corresponding
dead code to comments. In future, these cases could be converted
to some no-nonsense logging/tracing.
Signed-off-by: Aleksandar Markovic
CC: Philippe Mathieu-Daudé
---
hw/mips/mips_malta.c | 20
1 file changed,
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 37 -
1 file changed, 36 insertions(+), 1 deletion(-)
diff --git a/target/
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 40 +++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/targ
After demacroing ., this macro is not
needed anymore.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 39 ---
1 file changed, 39 deletions(-)
diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c
index 2759c9989d..a3a39681f8 10064
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 44 +++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/targ
From: Andrew Melnychenko
Added E1000_ICR_ASSERTED check.
Andrew Melnychenko (1):
e1000e: Added ICR clearing by corresponding IMS bit.
hw/net/e1000e_core.c | 9 +
hw/net/trace-events | 1 +
2 files changed, 10 insertions(+)
--
2.26.2
This is just a cosmetic change to enable tools like gcov, gdb,
callgrind, etc. to better display involved source code.
Signed-off-by: Aleksandar Markovic
---
target/mips/fpu_helper.c | 44 +++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/targ
* Kevin Wolf (kw...@redhat.com) wrote:
> Am 12.05.2020 um 11:43 hat Daniel P. Berrangé geschrieben:
> > On Tue, May 12, 2020 at 11:32:06AM +0200, Lukas Straub wrote:
> > > On Mon, 11 May 2020 16:46:45 +0100
> > > "Dr. David Alan Gilbert" wrote:
> > >
> > > > * Daniel P. Berrangé (berra...@red
From: Andrew Melnychenko
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441
Added ICR clearing if there is IMS bit - according to the note by
section 13.3.27 of the 8257X developers manual.
Signed-off-by: Andrew Melnychenko
---
hw/net/e1000e_core.c | 9 +
hw/net/trace-events
From: Andrew Melnychenko
Added E1000_ICR_ASSERTED check.
Andrew Melnychenko (1):
e1000e: Added ICR clearing by corresponding IMS bit.
hw/net/e1000e_core.c | 10 ++
hw/net/trace-events | 1 +
2 files changed, 11 insertions(+)
--
2.26.2
For now, it is always set to 0. Later patches in this series will
ensure that all callers pass an appropriate combination of flags.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/block.h | 2 ++
include/block/block_int.h | 2 ++
block.c | 11 ++
From: Andrew Melnychenko
Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1707441
Added ICR clearing if there is IMS bit - according to the note by
section 13.3.27 of the 8257X developers manual.
Signed-off-by: Andrew Melnychenko
---
hw/net/e1000e_core.c | 10 ++
hw/net/trace-event
We want to unify child_format and child_file at some point. One of the
important things that set format drivers apart from other drivers is
that they do not expect other format nodes under them (except in the
backing chain), i.e. we must not probe formats inside of formats. That
means we need som
The commit, mirror, and blkreplay block nodes are filters, so they should
be marked as such.
Signed-off-by: Max Reitz
---
block/blkreplay.c | 1 +
block/commit.c| 2 ++
block/mirror.c| 2 ++
3 files changed, 5 insertions(+)
diff --git a/block/blkreplay.c b/block/blkreplay.c
index c96ac8
Based-on: <20200429141126.85159-1-mre...@redhat.com>
(“block: Do not call BlockDriver.bdrv_make_empty() directly”)
Branch: https://github.com/XanClic/qemu.git child-role-v4
Branch: https://git.xanclic.moe/XanClic/qemu.git child-role-v4
v1: https://lists.nongnu.org/archive/html/qemu-block/2019-11/
This structure nearly only contains parent callbacks for child state
changes. It cannot really reflect a child's role, because different
roles may overlap (as we will see when real roles are introduced), and
because parents can have custom callbacks even when the child fulfills a
standard role.
S
This mask will supplement BdrvChildClass when it comes to what role (or
combination of roles) a child takes for its parent. It consists of
BdrvChildRoleBits values (which is an enum).
Because empty enums are not allowed, let us just start with it filled.
Signed-off-by: Max Reitz
---
include/bl
For now, all callers pass 0 and no callee evaluates this value. Later
patches will change both.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/block_int.h | 5 -
block.c | 22 --
block/backup-top.c | 3 ++-
block/blkd
After the series this patch belongs to, we want to have a common
BdrvChildClass that encompasses all of child_file, child_format, and
child_backing. Such a single class needs a single .inherit_options()
implementation, and this patch introduces it.
The next patch will show how the existing implem
For now, all callers (effectively) pass 0 and no callee evaluates thie
value. Later patches will change both.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/block_int.h | 3 ++-
block.c | 40 +++
block/block-backend.c
The other two .inherit_options implementations specify exactly for what
case they are used in their name, so do it for this one as well.
(The actual intention behind this patch is to follow it up with a
generic bdrv_inherited_options() that works for all three cases.)
Signed-off-by: Max Reitz
Re
Any current user of child_file, child_format, and child_backing can and
should use this generic BdrvChildClass instead, as it can handle all of
these cases. However, to be able to do so, the users must pass the
appropriate BdrvChildRole when the child is created/attached. (The
following commits w
Make bdrv_child_cb_detach() call bdrv_backing_detach() for children with
a COW role (and drop the reverse call from bdrv_backing_detach()), so it
can be used for any child (with a proper role set).
Because so far no child has a proper role set, we need a temporary new
callback for child_backing.de
This callback can be used by BDSs that use child_of_bds with the
appropriate BdrvChildRole for their children.
Also, make bdrv_format_default_perms() use it for child_of_bds children
(just a temporary solution until we can drop bdrv_format_default_perms()
altogether).
Signed-off-by: Max Reitz
--
bdrv_format_default_perms() has one code path for backing files, and one
for storage files. We want to pull them out into own functions, so
make sure they are completely distinct before so the next patches will
be a bit cleaner.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block.c | 19
We plan to unify the generic .inherit_options() functions. The
resulting common function will need to decide whether to force-enable
format probing, force-disable it, or leave it as-is. To make this
decision, it will need to know whether the parent node is a format node
or not (because we never w
Commonly, they need to pass the BDRV_CHILD_IMAGE set as the
BdrvChildRole; but there are exceptions for drivers with external data
files (qcow2 and vmdk).
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/bochs.c | 4 ++--
block/cloop.c | 4 ++--
block/crypto.c| 4 ++--
Right now, bdrv_format_default_perms() is used by format parents
(generally). We want to switch to a model where most parents use a
single BdrvChildClass, which then decides the permissions based on the
child role. To do so, we have to split bdrv_format_default_perms() into
separate functions for e
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/block_int.h | 1 -
block.c | 29 -
2 files changed, 30 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 3a9dda9be7..4b09fa1124 100644
--- a/incl
Make bdrv_child_cb_attach() call bdrv_backing_attach() for children with
a COW role (and drop the reverse call from bdrv_backing_attach()), so it
can be used for any child (with a proper role set).
Because so far no child has a proper role set, we need a temporary new
callback for child_backing.at
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/test-bdrv-drain.c | 29 +
tests/test-bdrv-graph-mod.c | 6 --
2 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/tests/test-bdrv-drain.c b/tests/test-bdrv-drain.c
index 15393a0140..91567
We can be less restrictive about pure data children than those with
metadata on them, so let bdrv_default_perms_for_storage() handle
metadata children differently from pure data children.
As explained in the code, the restrictions on metadata children are
strictly stricter than those for pure data
Let child_file's, child_format's, and child_backing's .inherit_options()
implementations fall back to bdrv_inherited_options() to show that it
would really work for all of these cases, if only the parents passed the
appropriate BdrvChildRole and parent_is_format values.
(Also, make bdrv_open_inher
Signed-off-by: Max Reitz
---
include/block/block_int.h | 1 -
block.c | 60 ++-
2 files changed, 3 insertions(+), 58 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 4b09fa1124..0781d43af5 100644
--- a/in
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/block_int.h | 10 --
block.c | 17 +++--
2 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 0781d43af5..6fc5f0d333 10
Replace child_file by child_of_bds in all remaining places (excluding
tests).
Signed-off-by: Max Reitz
---
block.c | 3 ++-
block/backup-top.c | 4 ++--
block/blklogwrites.c | 4 ++--
block/raw-format.c | 15 +--
4 files changed, 19 insertions(+), 7 deletions(-)
Right now, bdrv_format_default_perms() is used by format parents
(generally). We want to switch to a model where most parents use a
single BdrvChildClass, which then decides the permissions based on the
child role. To do so, we have to split bdrv_format_default_perms() into
separate functions for e
Both users (quorum and blkverify) use child_format for
not-really-filtered children, so the appropriate BdrvChildRole in both
cases is DATA. (Note that this will cause bdrv_inherited_options() to
force-allow format probing.)
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
block/blkverify.
bdrv_default_perms() can decide which permission profile to use based on
the BdrvChildRole, so block drivers do not need to select it explicitly.
The blkverify driver now no longer shares the WRITE permission for the
image to verify. We thus have to adjust two places in
test-block-iothread not to
Note that some filters have secondary children, namely blkverify (the
image to be verified) and blklogwrites (the log). This patch does not
touch those children.
Note that for blkverify, the filtered child should not be format-probed.
While there is nothing enforcing this here, in practice, it wi
Split raw_read_options() into one function that actually just reads the
options, and another that applies them. This will allow us to detect
whether the user has specified any options before attaching the file
child (so we can decide on its role based on the options).
Signed-off-by: Max Reitz
Re
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
include/block/block_int.h | 11 ---
block.c | 19 ---
2 files changed, 30 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 6fc5f0d333..e791c40496 100644
--- a/incl
Signed-off-by: Max Reitz
---
include/block/block_int.h | 1 -
block.c | 39 ++-
tests/test-bdrv-drain.c | 8 +++-
3 files changed, 5 insertions(+), 43 deletions(-)
diff --git a/include/block/block_int.h b/include/block/block_int.h
ind
Make all parents of backing files pass the appropriate BdrvChildRole.
By doing so, we can switch their BdrvChildClass over to the generic
child_of_bds, which will do the right thing when given a correct
BdrvChildRole.
Signed-off-by: Max Reitz
---
block.c | 26
1 - 100 of 458 matches
Mail list logo