On Mon, Oct 12, 2015 at 10:49 PM, Xiao Guangrong
wrote:
>
>
> On 10/13/2015 11:38 AM, Dan Williams wrote:
>>
>> On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong
>> wrote:
>>>
>>> On 10/13/2015 12:36 AM, Dan Williams wrote:
Static namespaces can be emitted without a label. Linux needs th
On 10/13/2015 01:42 PM, Michael S. Tsirkin wrote:
On Tue, Oct 13, 2015 at 01:13:18PM +0800, Xiao Guangrong wrote:
#endif
This header is too small to be worth it.
nvdimm_get_built_list seems to be the only interface -
just stick it in the header you have under include.
Other functions
On Tue, Oct 13, 2015 at 01:17:20PM +0800, Xiao Guangrong wrote:
> >Would it worth including / copying the ACPICA header files directly?
> >
> >https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/acpi/actbl1.h
> >https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.gi
On 10/13/2015 01:57 PM, Michael S. Tsirkin wrote:
On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote:
On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote:
On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote:
Changelog in v3:
There is huge change in this version, thank I
On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote:
>
>
> On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote:
> >On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote:
> >>Changelog in v3:
> >>There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo,
> >>Michael
On 10/13/2015 11:38 AM, Dan Williams wrote:
On Mon, Oct 12, 2015 at 8:14 PM, Xiao Guangrong
wrote:
On 10/13/2015 12:36 AM, Dan Williams wrote:
Static namespaces can be emitted without a label. Linux needs this to
support existing "label-less" bare metal NVDIMMs.
This is Linux specific? A
On Mon 12 Oct 2015 10:29:35 PM CEST, Max Reitz wrote:
>> -if (has_snapshot_node_name &&
>> -bdrv_lookup_bs(snapshot_node_name, snapshot_node_name, NULL)) {
>> -error_setg(errp, "New snapshot node name already in use");
>
> There's a difference from v6 here...
[...]
>> -opti
On Tue, Oct 13, 2015 at 01:13:18PM +0800, Xiao Guangrong wrote:
> >
> >> #endif
> >
> >This header is too small to be worth it.
> >nvdimm_get_built_list seems to be the only interface -
> >just stick it in the header you have under include.
> >
>
> Other functions are introudced and included into
On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote:
On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote:
Changelog in v3:
There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo,
Michael for their valuable comments, the patchset finally gets better shape.
Thanks!
Th
On 10/13/2015 12:40 AM, Dan Williams wrote:
On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong
wrote:
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT)
Currently, we only support PMEM mode. Each device has 3 structures:
- SPA structure, defines the PMEM region info
- M
On 10/12/2015 07:27 PM, Michael S. Tsirkin wrote:
On Sun, Oct 11, 2015 at 11:52:55AM +0800, Xiao Guangrong wrote:
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT)
Currently, we only support PMEM mode. Each device has 3 structures:
- SPA structure, defines the PMEM re
On Mon, Oct 12, 2015 at 1:41 PM, Beniamino Galvani wrote:
> On Sun, Oct 11, 2015 at 09:21:32AM -0700, Peter Crosthwaite wrote:
>> Hi John and Beniamino,
>>
>> This patch series adds bear-minimum Allwinner SATA support.
>
> Hi Peter,
>
> can you suggest a qemu command line to test this?
>
-drive f
On Mon, Oct 12, 2015 at 4:09 PM, John Snow wrote:
> Is there any spec or documentation I can cross-reference this against?
>
Not that I know of. I am running off a combination of experiments
(looking at messages from P1) and the Linux driver source.
> I gather this exists within the vendor-speci
On Mon, Oct 12, 2015 at 3:32 PM, John Snow wrote:
>
>
> On 10/11/2015 12:21 PM, Peter Crosthwaite wrote:
>> Add the Allwinner A10 AHCI controller module to the SoC.
>>
>> Signed-off-by: Peter Crosthwaite
>> ---
>> hw/arm/allwinner-a10.c | 11 +++
>> include/hw/arm/allwinner-a10.h
Detect attempts to declare two object members that would result
in the same C member name, by keying the 'seen' dictionary off
of the C name rather than the qapi name. It also requires passing
info through some of the check() methods.
This fixes two previously-broken tests, and the resulting erro
Right now, simple unions have a quirk of using 'kind' in the C
struct to match the QMP wire name 'type'. This has resulted in
messy clients each doing special cases. While we plan to
eventually rename things to match, it is better in the meantime
to consolidate the quirks into a special subclass,
A future patch will move some error checking from the parser
to the various QAPISchema*.check() methods, which run only
after parsing completes. It will thus be possible to create
a python instance representing an implicit QAPI type that
parses fine but will fail validation during check(). Since
With the previous commit, we have two different locations for
detecting member name clashes - one at parse time, and another
at QAPISchema*.check() time. Consolidate some of the checks
into a single place, which is also in line with our TODO to
eventually move all of the parse time semantic checki
Rather than having all callers pass a name, type, and optional
flag, have them instead pass a QAPISchemaObjectTypeMember which
already has all that information.
This will allow a future patch to simplify alternates to use
a special tag 'qtype_code type'. In the meantime, it requires
a hack to cre
Future commits will migrate semantic checking away from parsing
and over to the various QAPISchema*.check() methods. But to
report an error message about an incorrect semantic use of a
member of an object type, it helps to know which type, command,
or event owns the member. In particular, when a
Pending prerequisite: Markus' qapi-next branch (which has my
subset A patches):
git://repo.or.cz/qemu/armbru.git pull-qapi-2015-10-12
https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg02796.html
Also available as a tag at this location:
git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanup
For simple unions, we were creating the implicit 'type' tag
member during the QAPISchemaObjectTypeVariants constructor.
This is different from every other implicit QAPISchemaEntity
object, which get created by QAPISchema methods. Hoist the
creation to the caller (renaming _make_tag_enum() to
_make
A future patch will enable error reporting from the various
QAPISchema*.check() methods. But to report an error related
to an implicit type, we'll need to associate a location with
the type (the same location as the top-level entity that is
causing the creation of the implicit type), and once we d
Previously, qapi-types and qapi-visit filtered out implicit
objects during visit_object_type() by using 'info' (works since
implicit objects do not [yet] have associated info); meanwhile
qapi-introspect filtered out all schema types on the first pass
by returning a python type from visit_begin(), w
qapi-schema-test was already testing that we could have a
command returning int, but burned a command name in the whitelist.
Merge the redundant positive test returns-int, and pick a name
that reduces the whitelist size.
Signed-off-by: Eric Blake
---
v8: (no v7) hoist from subset C into B
v6: ne
The next few patches will start migrating error checking from
ad hoc parse methods into the QAPISchema*.check() methods. But
for an error message to display, we first have to fix the
overall 'try' to catch those errors. We also want to enable a
few more assertions, such as making sure every attem
It should be fairly obvious that qapi base classes need to
form an acyclic graph, since QMP cannot specify the same
key more than once, while base classes are included as flat
members alongside other members added by the child. But the
old check_member_clash() parser function was not prepared to
c
Similar to the previous commit, move the detection of a collision
in enum values from parse time to QAPISchemaEnumType.check().
This happens to also detect collisions in union branch names,
so for a decent error message, we have to determine if the enum
is implicit (and if so where the real collisi
Rather than just asserting that we can parse an empty enum,
let's also make sure we can compile it, by including it in
qapi-schema-test.
Signed-off-by: Eric Blake
---
v8: (no v7) hoist from subset C into B
v6: new patch; could be hoisted earlier alongside subset B v7 3/14
---
tests/Makefile
Commit ac88219a had several TODO markers about whether we needed
to automatically create the corresponding array type alongside
any other type. It turns out that most of the time, we don't!
As part of lazy creation of array types, this patch now assigns
an 'info' to array types at their point of
Rename alternate-clash to alternate-clash-members, and add a
new test alternate-clash-type. While similar to the earlier
addition of union-clash-type, we have one major difference: a
future patch will be simplifying alternates to not need an
implict AlternateKind enum, but we still need to detect
The alternate-good.json test was already covered by
qapi-schema-test.json. As future commits will be tweaking
how alternates are laid out, removing the duplicate test now
reduces churn.
Signed-off-by: Eric Blake
---
v8: no change
v7: new patch
---
tests/Makefile| 1 -
As of commit 8c3f8e77, we test compilation of forward references
for a struct base type (UserDefOne), flat union base type
(UserDefUnionBase), and flat union branch type
(UserDefFlatUnion2). The only remaining forward reference being
tested for parsing in flat-union-reverse-define was a forward
enu
On 10/12/2015 10:22 AM, Eric Blake wrote:
>
>>> +def check(self, schema, info, tag_type, seen, flat):
>>> QAPISchemaObjectTypeMember.check(self, schema, info, [], seen)
seen gets modified here...
>>> assert self.name in tag_type.values
>>> +if flat:
>>> +
Quoting Denis V. Lunev (2015-10-07 05:32:21)
> From: Yuri Pudgorodskiy
>
> Implemented with base64-encoded strings in qga json protocol.
> Glib portable GIOChannel is used for data I/O.
>
> Optinal stdin parameter of guest-exec command is now used as
> stdin content for spawned subprocess.
>
>
On 10/13/2015 12:43 AM, Eric Blake wrote:
On 10/10/2015 09:52 PM, Xiao Guangrong wrote:
This patch is generated by this script:
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
| xargs sed -i "s/PC_DIMM/DIMM/g"
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trac
On 10/12/2015 06:08 PM, Michael S. Tsirkin wrote:
On Sun, Oct 11, 2015 at 11:52:40AM +0800, Xiao Guangrong wrote:
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesyste
On 10/13/2015 12:36 AM, Dan Williams wrote:
On Sun, Oct 11, 2015 at 9:33 PM, Xiao Guangrong
wrote:
On 10/11/2015 05:17 AM, Dan Williams wrote:
On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong
wrote:
[..]
== Test ==
In host
1) create memory backed file, e.g # dd if=zero of=/tmp/n
On Fri, Oct 09, 2015 at 02:15:32PM +0200, Kevin Wolf wrote:
> This is the final step in converting all of the BlockDriverState
> pointers that block drivers use to BdrvChild.
>
> After this patch, bs->children contains the full list of child nodes
> that are referenced by a given BDS, and these ch
On Fri, Oct 09, 2015 at 02:15:31PM +0200, Kevin Wolf wrote:
> It is unused now.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
> Reviewed-by: Fam Zheng
> ---
> block.c | 34 --
> include/block/block.h | 4 ---
On Fri, Oct 09, 2015 at 02:15:30PM +0200, Kevin Wolf wrote:
> This patch removes the temporary duplication between bs->file and
> bs->file_child by converting everything to BdrvChild.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
> Reviewed-by: Fam Zheng
On Mon, 10/12 20:18, Jeff Cody wrote:
> In commit fe646693acc13ac48b98435d14149ab04dc597bc, the option
> printout format changed.
>
> This updates the VMDK test 059.out to the correct output.
>
> Signed-off-by: Jeff Cody
> ---
> tests/qemu-iotests/059.out | 12 ++--
> 1 file changed, 6
On Fri, Oct 09, 2015 at 02:15:29PM +0200, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
> Reviewed-by: Fam Zheng
> ---
> block/quorum.c | 65
> ++
> 1 file changed, 34 insertions(+),
On Fri, Oct 09, 2015 at 02:15:28PM +0200, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
> Reviewed-by: Fam Zheng
> ---
> block/blkverify.c | 41 +
> 1 file changed, 21 insertions(+), 20 deletions(-)
@Stefan Bader,
The host OS is ubuntu 12.04, and we upgraded the QEMU to 2.0.0 from ubuntu
cloud-archive repo.
https://wiki.ubuntu.com/ServerTeam/CloudArchive
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/
On Fri, Oct 09, 2015 at 02:15:27PM +0200, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
> Reviewed-by: Fam Zheng
> ---
> block/vmdk.c | 99
> +++-
> 1 file changed, 51 insertions(+),
On Fri, Oct 09, 2015 at 02:15:26PM +0200, Kevin Wolf wrote:
> Store the BdrvChild for bs->file. At this point, bs->file_child->bs just
> duplicates the bs->file pointer. Later, it will completely replace it.
>
> Signed-off-by: Kevin Wolf
> Reviewed-by: Max Reitz
> Reviewed-by: Alberto Garcia
>
In commit fe646693acc13ac48b98435d14149ab04dc597bc, the option
printout format changed.
This updates the VMDK test 059.out to the correct output.
Signed-off-by: Jeff Cody
---
tests/qemu-iotests/059.out | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/qemu-i
On 10/10/2015 12:34 AM, Sergey Fedorov wrote:
@@ -2936,6 +2927,10 @@ static inline void
gen_intermediate_code_internal(AlphaCPU *cpu,
tcg_gen_insn_start(ctx.pc);
num_insns++;
+if (unlikely(cpu_breakpoint_test(cs, ctx.pc, BP_ANY))) {
+gen_excp(&ctx, EXCP_D
Signed-off-by: Jeff Cody
---
tests/qemu-iotests/041 | 4 ++--
tests/qemu-iotests/051 | 3 ++-
tests/qemu-iotests/051.out | 2 +-
tests/qemu-iotests/067 | 3 ++-
tests/qemu-iotests/067.out | 5 +
tests/qemu-iotests/081 | 3 ++-
tests/qemu-iotests/081.out | 2 +-
7 files changed
If a node-name is not specified, automatically generate the node-name.
Generated node-names will use the "block" sub-system identifier.
Reviewed-by: Eric Blake
Reviewed-by: John Snow
Signed-off-by: Jeff Cody
---
block.c | 19 ---
1 file changed, 12 insertions(+), 7 deletions(-
Signed-off-by: Jeff Cody
---
tests/qemu-iotests/common.filter | 5 +
1 file changed, 5 insertions(+)
diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter
index d6d05de..cfdb633 100644
--- a/tests/qemu-iotests/common.filter
+++ b/tests/qemu-iotests/common.filter
@@
Multiple sub-systems in QEMU may find it useful to generate IDs
for objects that a user may reference via QMP or HMP. This patch
presents a standardized way to do it, so that automatic ID generation
follows the same rules.
This patch enforces the following rules when generating an ID:
1.) Guaran
Changes from v2:
Patch 1: Fixed prototype for id_generate() (thanks Alberto)
Used *const instead of * const (thanks Eric, Markus)
Updated function comment (thanks Markus)
Made random in range 0-99 instead of 0-98 (thanks, Marksu)
Patch 2: Cleaned
Is there any spec or documentation I can cross-reference this against?
I gather this exists within the vendor-specific reserved region from
0xA0 to 0xFF just prior to the port registers, so this all /looks/ like
it's right, I just don't have any way to verify it.
On 10/11/2015 12:21 PM, Peter Cro
On 10/12/2015 01:41 PM, Daniel P. Berrange wrote:
> The README file is usually the first thing consulted when a user
> or developer obtains a copy of the QEMU source. The current QEMU
> README is lacking immediately useful information and so not very
> friendly for first time encounters. It eithe
On 10/11/2015 12:21 PM, Peter Crosthwaite wrote:
> Add the Allwinner A10 AHCI controller module to the SoC.
>
> Signed-off-by: Peter Crosthwaite
> ---
> hw/arm/allwinner-a10.c | 11 +++
> include/hw/arm/allwinner-a10.h | 5 +
> 2 files changed, 16 insertions(+)
>
> diff -
I referred to
https://lists.nongnu.org/archive/html/qemu-devel/2014-09/msg00279.html in V3,
but probably it was a different issue. Anyway, I tested VExpress SMP with 4.3
linux kernel and it doesn't work without V3 fix and with old TimerBlock variant.
--
Dmitry
On 10/12/2015 08:50 PM, Paolo Bonzini wrote:
In this mode, referring an invalid element of the source forces the
result to false (table 4-7, last column) but referring an invalid
element of the destination forces the result to true, so the outer
loop should still be run even if some elements of t
Current ARM MPTimer implementation uses QEMUTimer for the actual timer,
this implementation isn't complete and mostly tries to duplicate of what
generic ptimer is already doing fine.
Conversion to ptimer brings the following benefits and fixes:
- Simple timer pausing implementation
Changing the prologue to the beginning of the code_gen_buffer
changes the direction of the "return" branch. Need to change
the logic to match.
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tcg/ppc/tcg-tar
I happened to notice the ppc backend had a dependency on the placement
of the prologue, which has just changed. There is a 32 byte window at
code_gen_buffer + 16MB where we might do the wrong thing.
The second patch reduces the code size reserved for performing goto_tb
from 7 insns to 4. We prob
Prefer the instruction that isn't required to modify cr0.
Signed-off-by: Richard Henderson
---
tcg/ppc/tcg-target.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c
index cee13e0..2c72565 100644
--- a/tcg/ppc/t
Restrict the size of code_gen_buffer to 2GB on ppc64, which
lets us assert that everything is reachable with addis+addi
from tb_ret_addr. This lets us use a max of 4 insns for goto_tb
instead of 7.
Emit the indirect branch portion of goto_tb up front, which
means we only have to update two insns
On 12 October 2015 at 21:55, Alexander Gordeev wrote:
> Currently PCI IO address 0 is not allowed even though
> the IO space starts from 0. As result, PCI IO is not
> possible to use at all.
I don't see any reason for us not to allow 0 IO addresses,
but I'm not sure how your your conclusion follo
On Sun, Oct 11, 2015 at 09:21:32AM -0700, Peter Crosthwaite wrote:
> Hi John and Beniamino,
>
> This patch series adds bear-minimum Allwinner SATA support.
Hi Peter,
can you suggest a qemu command line to test this?
Beniamino
On 12.10.2015 11:16, Alberto Garcia wrote:
> One of the limitations of the 'blockdev-snapshot-sync' command is that
> it does not allow passing BlockdevOptions to the newly created
> snapshots, so they are always opened using the default values.
>
> Extending the command to allow passing options i
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
tests/qemu-iotests/118 | 638 +
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
3 files changed, 644 insertions(+)
create mode 100755 tests/qemu-iotests/118
create mode
Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
hmp-commands.hx | 20 +---
hmp.c | 22 +-
2 files changed, 38 insertions(+), 4 deletions(-)
diff --g
Introduce a new QMP command 'blockdev-change-medium' which is intended
to replace the 'change' command for block devices. The existing function
qmp_change_blockdev() is accordingly renamed to
qmp_blockdev_change_medium().
Signed-off-by: Max Reitz
---
blockdev.c| 7 ---
inclu
blk_dev_change_media_cb() is called for all potential tray movements;
however, it is possible to request closing the tray but nothing actually
happening (on a floppy disk drive without a medium).
Thus, the actual tray status should be inquired before sending a
tray-moved event (and an event should
Signed-off-by: Max Reitz
---
blockdev.c | 30 ++
qapi/block-core.json | 15 +++
qmp-commands.hx | 45 +
3 files changed, 90 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index a4ce1df..6d0a5eb
Hello,
An OOB r/w access issue was reported by Mr Gerben Lubbe(CC'd here).
The GDB(1) stub protocol supports commands 'm/M' to read & write 'len' bytes
from/to the stub memory area. In that, the 'len' parameter value supplied by
the host gdb(1) is not validated against the local buffer size
On 12.10.2015 11:16, Alberto Garcia wrote:
> The 'snapshot-node-name' parameter of blockdev-snapshot-sync allows
> setting the node name of the image that is going to be created.
>
> Before creating the image, external_snapshot_prepare() checks that the
> name is not already being used. The check
Signed-off-by: Max Reitz
---
blockdev.c | 23 +++
qapi/block-core.json | 16
qmp-commands.hx | 35 +++
3 files changed, 74 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index b90b1d6..a4ce1df 100644
--- a/bl
Signed-off-by: Max Reitz
---
blockdev.c | 49 +
qapi/block-core.json | 23 +++
qmp-commands.hx | 39 +++
3 files changed, 111 insertions(+)
diff --git a/blockdev.c b/blockdev.c
Use separate code paths for the two overloaded functions of the 'change'
HMP command, and invoke the 'blockdev-change-medium' QMP command if used
on a block device (by calling qmp_blockdev_change_medium()).
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
---
hmp.c | 27 +++-
Most of the options which blockdev_init() parses for both the
BlockBackend and the root BDS are valid for just the root BDS as well
(e.g. read-only). This patch allows specifying these options even if not
creating a BlockBackend.
Signed-off-by: Max Reitz
---
blockdev.c | 160
Implement 'eject' by calling blockdev-open-tray and
blockdev-remove-medium.
Signed-off-by: Max Reitz
---
blockdev.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/blockdev.c b/blockdev.c
index 706e7e1..ff3b353 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1952,16
These options are only relevant for the user of a whole BDS tree (like a
guest device or a block job) and should thus be moved into the
BlockBackend.
Signed-off-by: Max Reitz
---
block.c| 125 -
block/backup.c | 17
Add an option to qmp_blockdev_change_medium() which allows changing the
read-only status of the block device whose medium is changed.
Some drives do not have a inherently fixed read-only status; for
instance, floppy disks can be set read-only or writable independently of
the drive. Some users may
Do not use "rudimentary" BDSs for empty drives any longer (for
freshly created drives).
After a follow-up patch, empty drives will generally use a NULL BDS, not
only the freshly created drives.
Signed-off-by: Max Reitz
---
blockdev.c | 72 ++--
Implement 'change' on block devices by calling blockdev-open-tray,
blockdev-remove-medium, blockdev-insert-medium (a variation of that
which does not need a node-name) and blockdev-close-tray.
Signed-off-by: Max Reitz
---
blockdev.c | 180 +
As the comment above bdrv_get_stats() says, BlockAcctStats is something
which belongs to the device instead of each BlockDriverState. This patch
therefore moves it into the BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
b
And a helper function for that, which directly takes a pointer to the
BDS to be inserted instead of its node-name (which will be used for
implementing 'change' using blockdev-insert-medium).
Signed-off-by: Max Reitz
---
blockdev.c | 54 ++
There are several BlockBackend functions which, in theory, cannot fail.
This patch makes them cope with the BlockDriverState pointer being NULL
by making them fall back to some default action like ignoring the value
in setters and returning the default in getters.
Signed-off-by: Max Reitz
---
bl
blk_bs() will not necessarily return a non-NULL value any more (unless
blk_is_available() is true or it can be assumed to otherwise, e.g.
because it is called immediately after a successful blk_new_with_bs() or
blk_new_open()).
Signed-off-by: Max Reitz
---
block.c | 5 ++
block/qap
This function removes the BlockDriverState associated with the given
BlockBackend from that BB and sets the BDS pointer in the BB to NULL.
Signed-off-by: Max Reitz
---
block/block-backend.c | 12
include/sysemu/block-backend.h | 1 +
2 files changed, 13 insertions(+)
diff
guest_block_size is a guest device property so it should be moved into
the interface between block layer and guest devices, which is the
BlockBackend.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Alberto Garcia
Reviewed-by: Kevin Wolf
---
block.c | 7 ---
If there is no BlockDriverState in a BlockBackend or if the tray of the
guest device is open, fail all requests (where that is possible) with
-ENOMEDIUM.
The reason the status of the guest device is taken into account is
because once the guest device's tray is opened, any request on the same
Block
This function associates the given BlockDriverState with the given
BlockBackend.
Signed-off-by: Max Reitz
---
block/block-backend.c | 11 +++
include/sysemu/block-backend.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/block/block-backend.c b/block/block-backend.c
inde
Extract some of the blockdev option extraction code from blockdev_init()
into its own function. This simplifies blockdev_init() and will allow
reusing the code in a different function added in a follow-up patch.
Signed-off-by: Max Reitz
Reviewed-by: Alberto Garcia
---
blockdev.c | 209 +
Fix the BlockBackend's AIOCB AioContext for aborting AIO in case there
is no BDS. If there is no implementation of AIOCBInfo::get_aio_context()
the AioContext is derived from the BDS the AIOCB belongs to. If that BDS
is NULL (because it has been removed from the BB) this will not work.
This patch
If there is no BDS tree attached to a BlockBackend, functions that can
do so should fall back to the BlockBackendRootState structure.
Signed-off-by: Max Reitz
---
block/block-backend.c | 28
1 file changed, 24 insertions(+), 4 deletions(-)
diff --git a/block/block-b
This structure will store some of the state of the root BDS if the BDS
tree is removed, so that state can be restored once a new BDS tree is
inserted.
Signed-off-by: Max Reitz
---
block/block-backend.c | 40
include/block/block_int.h | 10 ++
blk_is_available() returns true iff the BDS is inserted (which means
blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the
tray of the guest device is closed.
blk_is_inserted() is changed to return true only if blk_bs() is not
NULL.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
In order to handle host device passthrough, some guest device models
may call blk_is_inserted() to check whether the medium is inserted on
the host, when checking the guest tray status.
This tray status is inquired by blk_dev_change_media_cb(); because
bdrv_is_inserted() (invoked by blk_is_inserte
Throttle groups are not necessarily referenced by BDSs alone; a later
patch will essentially allow BBs to reference them, too. Make the
ref/unref functions public so that reference can be properly accounted
for.
Their interface is slightly adjusted in that they return and take a
ThrottleState poin
The tray of an FDD is open iff there is no medium inserted (there are
only two states for an FDD: "medium inserted" or "no medium inserted").
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
hw/block/fdc.c | 20
tests/fdc-test.c | 4 +---
2 f
With the new automatically-recursive implementation of
bdrv_is_inserted() checking by default whether all the children of a BDS
are inserted, we can drop raw's own implementation.
Signed-off-by: Max Reitz
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
Reviewed-by: Alberto Garcia
---
Note that
1 - 100 of 468 matches
Mail list logo