Statistics
| Branch: | Revision:

root @ c2162a8b

# Date Author Comment
c2162a8b 09/21/2011 12:49 pm Jan Kiszka

Silence make if nothing is to do for libcacard

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

43b26fc8 09/21/2011 12:49 pm Jan Kiszka

Drop unneeded pthread.h inclusions

Signed-off-by: Jan Kiszka <>
Signed-off-by: Stefan Hajnoczi <>

a213fcb2 09/21/2011 12:49 pm Peter Maydell

configure: Make missing pkg-config an error rather than a warning

If pkg-config doesn't exist then make configure fail immediately
with a useful error message. Now that glib is a required dependency,
proceeding despite the missing pkg-config will just cause us to...

903ec8ea 09/21/2011 12:49 pm Paolo Bonzini

fix compilation with stderr trace backend

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

782ea2c7 09/21/2011 12:49 pm Stefan Weil

target-i386: Remove data type CCTable

Remove also two assert statements which were the last remaining users.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

27cdad67 09/21/2011 01:50 am Richard Henderson

Revert "alpha-softmmu: Disable for the 0.15 release branch."

This reverts commit 46f08792bb4a69ab8aab897c174d82b006026140.

This was not supposed to be applied to mainline.

Signed-off-by: Richard Henderson <>
Signed-off-by: Edgar E. Iglesias <>

03c39eb5 09/20/2011 11:22 pm Anthony Liguori

Merge remote-tracking branch 'mst-tmp/for_anthony' into staging

c8af89af 09/20/2011 11:21 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

39ba59c2 09/20/2011 11:18 pm Anthony Liguori

Merge remote-tracking branch 'kiszka/queues/slirp' into staging

7f67d892 09/20/2011 11:16 pm Anthony Liguori

Merge remote-tracking branch 'qmp/queue/qmp' into staging

336411ca 09/20/2011 05:46 pm Michael S. Tsirkin

pci_bridge: simplify memory regions some more

replace alloc/free with struct members.
todo: smash with initial implementation after
testing.

Signed-off-by: Michael S. Tsirkin <>

27acf660 09/20/2011 04:55 pm Juan Quintela

wavaudio: Use stdio instead of QEMUFile

QEMUFile * is only intended for migration nowadays. Using it for
anything else just adds pain and a layer of buffers for no good
reason.

Signed-off-by: Juan Quintela <>
CC: malc <>...

b04df2a4 09/20/2011 04:50 pm Juan Quintela

wavcapture: Use stdio instead of QEMUFile

QEMUFile * is only intended for migration nowadays. Using it for
anything else just adds pain and a layer of buffers for no good
reason.

Signed-off-by: Juan Quintela <>
CC: malc <>...

cf26a4e6 09/20/2011 03:34 pm Paolo Bonzini

linux-aio: remove process requests callback

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

16a06b24 09/20/2011 03:34 pm Sage Weil

rbd: allow escaping in config string

The config string is variously delimited by =, @, and /, depending on the
field. Allow these characters to be escaped by preceeding them with \.

Signed-off-by: Sage Weil <>
Signed-off-by: Kevin Wolf <>

e1d3b254 09/20/2011 03:32 pm Frediano Ziglio

block: avoid SIGUSR2

Now that iothread is always compiled sending a signal seems only an
additional step. This patch also avoid writing to two pipe (one from signal
and one in qemu_service_io).

Work with kvm enabled or disabled. strace output is more readable (less syscalls)....

a26a13da 09/20/2011 01:27 pm Alexander Motin

AHCI Port Interrupt Enable register cleaning on soft reset

I've found that FreeBSD AHCI driver doesn't work with AHCI hardware
emulation of QEMU 0.15.0. I believe the problem is on QEMU's side. As I
see, it clears port's Interrupt Enable register each time when reset of...

f9fe18ec 09/20/2011 01:27 pm Sage Weil

rbd: ignore failures when reading from default conf location

If we are reading from the default config location, ignore any failures.
It is perfectly legal for the user to specify exactly the options they need
and to not rely on any config file.

Signed-off-by: Sage Weil <>...

9e1fbcde 09/20/2011 01:27 pm Sage Weil

rbd: update comment heading

Properly document the configuration string syntax and semantics. Remove
(out of date) details about the librbd implementation.

Signed-off-by: Sage Weil <>
Signed-off-by: Kevin Wolf <>

7a3f5fe9 09/20/2011 01:27 pm Sage Weil

rbd: call flush, if available

librbd recently added async writeback and flush support. If the new
rbd_flush() call is available, call it.

Signed-off-by: Sage Weil <>
Signed-off-by: Kevin Wolf <>

bd5da232 09/20/2011 01:27 pm Paolo Bonzini

scsi: fix sign extension problems

When assigning a 32-bit value to cmd->xfer (which is 64-bits)
it can be erroneously sign extended because the intermediate
32-bit computation is signed. Fix this by standardizing on
the ld*_be_p functions.

Signed-off-by: Paolo Bonzini <>...

c3adb5b9 09/20/2011 01:27 pm Paolo Bonzini

dma-helpers: rewrite completion/cancellation

This fixes various problems with completion/cancellation:

  • if the io_func fails to get an AIOCB, the callback wasn't called
  • If DMA encounters a bounce buffer conflict, and the DMA operation is
    canceled before the bottom half fires, bad things happen....
103b40f5 09/20/2011 01:27 pm Paolo Bonzini

scsi-disk: commonize iovec creation between reads and writes

Also, consistently use qiov.size instead of iov.iov_len.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

7285477a 09/20/2011 01:27 pm Paolo Bonzini

scsi-disk: lazily allocate bounce buffer

It will not be needed for reads and writes if the HBA provides a sglist.
In addition, this lets scsi-disk refuse commands with an excessive
allocation length, as well as limit memory on usual well-behaved guests.
...

b3c0bfb6 09/20/2011 01:27 pm Fam Zheng

VMDK: fix leak of extent_file

Release extent_file on error in vmdk_parse_extents. Added closing files
in freeing extents.

Signed-off-by: Fam Zheng <>
Signed-off-by: Kevin Wolf <>

21cfa41e 09/20/2011 01:27 pm Frediano Ziglio

posix-aio-compat: Removed unused offset variable

Signed-off-by: Frediano Ziglio <>
Signed-off-by: Kevin Wolf <>

10dc8aef 09/20/2011 01:27 pm Paolo Bonzini

dma-helpers: allow including from target-independent code

Target-independent code cannot construct sglists, but it can take
them from the outside as a black box. Allow this.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

778d1799 09/19/2011 09:22 pm Wen Congyang

pci_bridge: use parent bus's address space

The switch to the new memory API caused the following problem:

The pci device may call pci_register_bar() to use PCI bus's address
space. But we don't init PCI bus's address space if it is not bus
0. A crash was reported:...

7df32ca0 09/19/2011 09:22 pm Michael S. Tsirkin

pci: implement bridge filtering

Support bridge filtering on top of the memory
API as suggested by Avi Kivity:

Create a memory region for the bridge's address space. This region is
not directly added to system_memory or its descendants. Devices under
the bridge see this region as its pci_address_space(). The region is...

ab346bb2 09/19/2011 09:22 pm Jan Kiszka

pci: Remove unused pci_reserve_capability

eepro100 was the last user. Now pci_add_capability is powerful enough.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

817e0b6f 09/19/2011 09:22 pm Michael S. Tsirkin

pci: interrupt pin documentation update

Fix up some erroneous comments in code:
interrupt pins are named A-D, the
interrupt pin register is always readonly
and isn't zeroed out on reset.

Signed-off-by: Michael S. Tsirkin <>

a92eb87a 09/19/2011 09:22 pm Jan Kiszka

pci: Remove unused mem_base from PCIBus

Obsoleted by f64e02b6cc.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

bbca72c6 09/19/2011 12:35 pm Paolo Bonzini

dma-helpers: rename is_write to to_dev

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

1b8f8a6f 09/19/2011 12:34 pm Paolo Bonzini

scsi-generic: do not disable FUA

I found no rationale for this in the logs, and it is quite bad because
it will make scsi-generic unsafe WRT power failures.

Signed-off-by: Paolo Bonzini <>
Reviewed-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

b90fb4b8 09/19/2011 12:34 pm Paolo Bonzini

nbd: support feature negotiation

nbd supports writing flags in bytes 24...27 of the header,
and uses that for the read-only flag. Add support for it
in qemu-nbd.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

bbb74edd 09/19/2011 12:34 pm Paolo Bonzini

nbd: sync API definitions with upstream

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

973b3d0a 09/19/2011 12:34 pm Paolo Bonzini

nbd: support NBD_SET_FLAGS ioctl

The nbd kernel module cannot enable DISCARD requests unless it is
informed about it. The flags field in the header is used for this,
and this patch adds support for it.

Signed-off-by: Paolo Bonzini <>...

074abad3 09/19/2011 12:34 pm Kevin Wolf

raw-posix: Fix bdrv_flush error return values

bdrv_flush is supposed to use 0/-errno return values

Signed-off-by: Kevin Wolf <>

530889ff 09/18/2011 03:00 pm Blue Swirl

sun4u: don't set up isa_mem_base

Since we use memory API in sun4u.c, after
71579cae30b53c910cd6c47ab4e683f647d36519, setting up isa_mem_base
puts vga.chain4 outside of the physical address space.

Fix by removing obsolete isa_mem_base set up.

Signed-off-by: Blue Swirl <>

be9c4183 09/17/2011 08:56 pm Stefan Weil

tcg/ppc64: Only one call output register needed for 64 bit hosts

The second register is only needed for 32 bit hosts.

Cc: Vassili Karpov <>
Fine-with-me'd-by: Vassili Karpov <>
Signed-off-by: Stefan Weil <>...

26a74ae3 09/17/2011 08:55 pm Stefan Weil

tcg/sparc: Only one call output register needed for 64 bit hosts

The second register is only needed for 32 bit hosts.

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

5ddd17b4 09/17/2011 08:55 pm Stefan Weil

tcg/s390: Only one call output register needed for 64 bit hosts

The second register is only needed for 32 bit hosts.

Cc: Alexander Graf <>
Acked-by: Richard Henderson <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

af15a623 09/17/2011 08:54 pm Stefan Weil

tcg/ia64: Only one call output register needed for 64 bit hosts

The second register is never used for ia64 hosts.

Cc: Aurelien Jarno <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

68af23af 09/17/2011 08:54 pm Stefan Weil

tcg/i386: Only one call output register needed for 64 bit hosts

The second register is only needed for 32 bit hosts.

Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

5c6562c2 09/17/2011 08:13 pm Max Reitz

target-i386: Fix several SSE3 instructions.

haddp[sd], hsubp[sd] and addsubp[sd] operate on floats, thus it is
necessary to use the appropriate floating point calculation functions.
If this is not done, those functions operate merely on integers, which
is not correct....

4e1837f8 09/17/2011 06:14 pm Stefan Hajnoczi

trace: add virtio_set_status() trace event

The virtio device lifecycle can be observed by looking at the sequence
of set status operations. This is especially important for catching the
reset operation (status value 0), which resets the device and all
virtqueues....

689d7e2f 09/17/2011 06:14 pm Stefan Hajnoczi

trace: remove trailing double quotes after PRI*64

Now that format strings can end in a PRI*64 macro, remove the
workarounds from the trace-events file.

Signed-off-by: Stefan Hajnoczi <>
Signed-off-by: Blue Swirl <>

913540a3 09/17/2011 06:14 pm Stefan Hajnoczi

trace: allow PRI*64 at beginning and ending of format string

The tracetool parser only picks up PRI*64 and other format string macros
when enclosed between double quoted strings. Lift this restriction by
extracting everything after the closing ')' as the format string:...

2f4a725b 09/17/2011 06:13 pm Stefan Hajnoczi

trace: remove newline from grlib_irqmp_check_irqs format string

There is no need to put a newline in trace event format strings. The
backend may use the format string within some context and takes care of
how to display the event. The stderr backend automatically appends "\n"...

519e1693 09/17/2011 05:37 pm Stefan Weil

Makefile: Fix broken build

make -C mybuilddir no longer works (regression caused by commit)
388d475815c23901010a25c845eb078d47ee0740.

PWD is the directory of the caller (not mybuilddir),
so BUILD_DIR is set to the wrong value.

GNU make sets CURDIR to the correct value....

71579cae 09/16/2011 05:06 pm Jan Kiszka

vga: Respect isa_mem_base when registering chain4 alias

This does not yet unbreak PPC (which has its own problems) but
potentially other non-x86 systems where isa_mem_base is != 0.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

a8467c7a 09/16/2011 05:06 pm Gerd Hoffmann

qdev: print bus properties too

Make qdev_device_help print both device and bus properties.
Helps libvirt to figure whenever bus properties such as
PCI.multifunction are supported present or not.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

df3f457b 09/16/2011 04:28 pm Peter Maydell

hw/integratorcp: Fix bugs in writes to CM_CTRL system register

Fix a number of bugs in the implementation of writes to the CM_CTRL
system register: * write to cm_ctrl, not cm_init ! * an '&' vs '^' typo meant we would write the inverse of the bits * handling the LED via printf() meant we spew lots of output...

f44cc485 09/16/2011 04:26 pm Christoph Egger

bswap.h: build fix

qemu build fails when CONFIG_MACHINE_BSWAP_H is defined
because float32, float64, etc. are not defined.
This makes qemu build.

Signed-off-by: Christoph Egger <>
Signed-off-by: Anthony Liguori <>

2313e998 09/16/2011 04:25 pm Jan Kiszka

vga: Fix text mode screendumps

In text mode, even a full refresh of the screen takes multiple updates.
As we reset the dump file pointer after the first call, we only wrote
the first line.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

f81bdefb 09/16/2011 04:25 pm Jan Kiszka

console: Properly switch consoles for screen dumps

Do not mess with active_console, use console_select instead. This fixes
corrupt virtual monitor consoles after issuing the screendump command.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

388d4758 09/16/2011 04:25 pm Lluís Vilanova

build: Always have 'BUILD_DIR' variable pointing to the root of the build tree

Signed-off-by: Lluís Vilanova <>
Signed-off-by: Lluís Vilanova <>
Signed-off-by: Anthony Liguori <>

937b1258 09/16/2011 04:25 pm Lluís Vilanova

build: Move tracing objects into libuser on usermode emulation targets

This will apply libuser-specific compilation flags (like the ones added by
--enable-user-pie), but keep softmmu emulation targets "as-is".

Signed-off-by: Lluís Vilanova <>...

b2bedb21 09/16/2011 04:25 pm Stefan Weil

Remove blanks before \n in output strings

Those blanks violate the coding conventions, see
scripts/checkpatch.pl.

Blanks missing after colons in the changed lines were added.

This patch does not try to fix tabs, long lines and other
problems in the changed lines, therefore checkpatch.pl reports...

d9389b96 09/16/2011 04:25 pm Kevin Wolf

Fix termination by signal with -no-shutdown

On signals such as SIGTERM qemu should exit instead of just stopping the VM
even with -no-shutdown.

Signed-off-by: Kevin Wolf <>
Signed-off-by: Anthony Liguori <>

144d192d 09/16/2011 01:16 am Jan Kiszka

slirp: Fill TCP/IP header template after SYN reception

This ensures we can cleanly signal the drop in case the connection timer
fires. So far we sent those frames to nowhere (target IP 0.0.0.0).

Found by the new assertion on invalid IPs in arp_table_search....

1dfb4dd9 09/15/2011 10:39 pm Luiz Capitulino

Replace the VMSTOP macros with a proper state type

Today, when notifying a VM state change with vm_state_notify(),
we pass a VMSTOP macro as the 'reason' argument. This is not ideal
because the VMSTOP macros tell why qemu stopped and not exactly
what the current VM state is....

f5bbfba1 09/15/2011 10:39 pm Luiz Capitulino

RunState: Add additional states

Currently, only vm_start() and vm_stop() change the VM state.
That's, the state is only changed when starting or stopping the VM.

This commit adds the runstate_set() function, which makes it possible
to also do state transitions when the VM is stopped or running....

5db9d4d1 09/15/2011 10:39 pm Luiz Capitulino

runstate_set(): Check for valid transitions

This commit could have been folded with the previous one, however
doing it separately will allow for easy bisect and revert if needed.

Checking and testing all valid transitions wasn't trivial, chances
are this will need broader testing to become more stable....

1bcef683 09/15/2011 10:39 pm Luiz Capitulino

Drop the incoming_expected global variable

Test against RSTATE_IN_MIGRATE instead.

Please, note that the RSTATE_IN_MIGRATE state is only set when all the
initial VM setup is done, while 'incoming_expected' was set right in
the beginning when parsing command-line options. Shouldn't be a problem...

1354869c 09/15/2011 10:39 pm Luiz Capitulino

Drop the vm_running global variable

Use runstate_is_running() instead, which is introduced by this commit.

Signed-off-by: Luiz Capitulino <>

6667b23f 09/15/2011 10:39 pm Luiz Capitulino

Monitor/QMP: Don't allow cont on bad VM state

We have two states where issuing cont before system_reset can
cause problems: RSTATE_SHUTDOWN (when -no-shutdown is used) and
RSTATE_PANICKED (which only happens with kvm).

This commit fixes that by doing the following when state is...

9e37b9dc 09/15/2011 10:39 pm Luiz Capitulino

QMP: query-status: Introduce 'status' key

This new key reports the current VM status to clients. Please, check
the documentation being added in this commit for more details.

Signed-off-by: Luiz Capitulino <>

6e0ca882 09/15/2011 10:39 pm Luiz Capitulino

HMP: info status: Print the VM state

Today our printf format for the "info status" command is:

VM status: %s

Where the string can be "running", "running (single step mode)" or
"paused".

This commit extends it to:

VM status: %s (%s)

The second string corresponds to the "status" field as returned...

bff046f8 09/15/2011 10:39 pm Luiz Capitulino

Move vm_state_notify() prototype from cpus.h to sysemu.h

It's where all the state handling functions prototypes are located.

Signed-off-by: Luiz Capitulino <>

ef4f97cb 09/15/2011 09:33 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm-tmp/memory/core' into staging

c7fbbdf9 09/15/2011 09:28 pm Anthony Liguori

Merge remote-tracking branch 'aneesh/for-upstream-4' into staging

d2963631 09/14/2011 11:21 am David Gibson

Fix subtle integer overflow bug in memory API

It is quite common to have a MemoryRegion with size of INT64_MAX.
When processing alias regions in render_memory_region() it's quite
easy to find a case where it will construct a temporary AddrRange with
a non-zero start, and size still of INT64_MAX. When means attempting...

7b6f9300 09/12/2011 04:17 pm Markus Armbruster

block: New bdrv_set_buffer_alignment()

Device models should be able to set it without an unclean include of
block_int.h.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

29e05f20 09/12/2011 04:17 pm Markus Armbruster

block: Reset buffer alignment on detach

BlockDriverState member buffer_alignment is initially 512. The device
model may set them, with bdrv_set_buffer_alignment(). If the device
model gets detached (hot unplug), the device's alignment is left
behind. Only okay because device hot unplug automatically destroys...

ab359cd1 09/12/2011 04:17 pm Markus Armbruster

nbd: Clean up use of block_int.h

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

7d4b4ba5 09/12/2011 04:17 pm Markus Armbruster

block: New change_media_cb() parameter load

To let device models distinguish between eject and load.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

25ad22bc 09/12/2011 04:17 pm Markus Armbruster

ide/atapi scsi-disk: Make monitor eject -f, then change work

change fails while the tray is locked by the guest. eject -f forces
it open and removes any media. Unfortunately, the tray closes again
instantly. Since the lock remains as it is, there is no way to insert...

05140499 09/12/2011 04:17 pm Frediano Ziglio

qcow2: initialize metadata before inserting in cluster_allocs

QCow2Meta structure was inserted into list before many fields are
initialized. Currently is not a problem cause all occur in a lock
but if qcow2_alloc_clusters would in a future unlock this lock...

847f171e 09/12/2011 04:17 pm Stefan Weil

ahci: Remove unused struct member

Member variable is_read is written, but never read
(contrary to its name). Remove it.

Kevin Wolf <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Kevin Wolf <>

dea43a65 09/12/2011 04:17 pm Frediano Ziglio

qcow2: align cluster_data to block to improve performance using O_DIRECT

Signed-off-by: Frediano Ziglio <>
Signed-off-by: Kevin Wolf <>

ee18e730 09/12/2011 04:17 pm Frediano Ziglio

qcow2: fix range check

QCowL2Meta::offset is not cluster aligned but only sector aligned
however nb_clusters count cluster from cluster start.
This fix range check. Note that old code have no corruption issues
related to this check cause it only cause intersection to occur...

dfe80b07 09/12/2011 04:17 pm Sage Weil

rbd: clean up, fix style

No assignment in condition. Remove duplicate ret > 0 check.

Signed-off-by: Sage Weil <>
Reviewed-by: Stefan Hajnoczi <>
Signed-off-by: Kevin Wolf <>

eb93d5d9 09/12/2011 04:17 pm Sage Weil

rbd: fix leak in qemu_rbd_open failure paths

Fix leak of s->snap in failure path. Simplify error paths for the whole
function.

Reported-by: Stefan Hajnoczi <>
Signed-off-by: Sage Weil <>
Reviewed-by: Stefan Hajnoczi <>...

48f65b3f 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Don't fail eject when tray is already open

MMC-5 6.40.2.6 specifies that START STOP UNIT succeeds when the drive
already has the requested state. cmd_start_stop_unit() fails when
asked to eject while the tray is open and locked. Fix that.

Signed-off-by: Markus Armbruster <>...

68bb01f3 09/12/2011 04:17 pm Markus Armbruster

scsi-disk: Fix START_STOP to fail when it can't eject

Don't fail when tray is already open.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

db118fe7 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Preserve tray state on migration

Use a subsection, so that migration to older version still works,
provided the tray is closed and unlocked.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

2c6942fa 09/12/2011 04:17 pm Markus Armbruster

block: Clean up remaining users of "removable"

BlockDriverState member removable is a confused mess. It is true when
an ide-cd, scsi-cd or floppy qdev is attached, or when the
BlockDriverState was created with -drive if={floppy,sd} or -drive
if={ide,scsi,xen,none},media=cdrom ("created removable"), except when...

9e6a4c91 09/12/2011 04:17 pm Markus Armbruster

block: Drop BlockDriverState member removable

It's a confused mess (see previous commit). No users remain.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

e4def80b 09/12/2011 04:17 pm Markus Armbruster

block: Show whether the virtual tray is open in info block

Need to ask the device, so this requires new BlockDevOps member
is_tray_open().

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

d1a0739d 09/12/2011 04:17 pm Markus Armbruster

block: Move BlockConf & friends from block_int.h to block.h

It's convenience stuff for block device models, so block.h isn't the
ideal home either, but better than block_int.h.

Permits moving some #include "block_int.h" from device model .h into
.c.

Signed-off-by: Markus Armbruster <>...

fb0c61a5 09/12/2011 04:17 pm Markus Armbruster

hw: Trim superfluous #include "block_int.h"

Including it in device models is unclean, including it without a
reason adds insult to injury.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

a1aff5bf 09/12/2011 04:17 pm Markus Armbruster

block: Revert entanglement of bdrv_is_inserted() with tray status

Commit 4be9762a changed bdrv_is_inserted() to fail when the tray is
open. Unfortunately, there are two different kinds of users, with
conflicting needs.

1. Device models using bdrv_eject(), currently ide-cd and scsi-cd....

22cf56c4 09/12/2011 04:17 pm Markus Armbruster

block: Drop tray status tracking, no longer used

Commit 4be9762a is now completely redone.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

a0a7573b 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Track tray locked state

We already track it in BlockDriverState. Just like tray open/close
state, we should track it in the device models instead, because it's
device state.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

81b1008d 09/12/2011 04:17 pm Markus Armbruster

scsi-disk: Track tray locked state

We already track it in BlockDriverState. Just like tray open/close
state, we should track it in the device models instead, because it's
device state.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

fdec4404 09/12/2011 04:17 pm Markus Armbruster

block: Leave enforcing tray lock to device models

The device model knows best when to accept the guest's eject command.
No need to detour through the block layer.

bdrv_eject() can't fail anymore. Make it void.

Signed-off-by: Markus Armbruster <>...

f107639a 09/12/2011 04:17 pm Markus Armbruster

block: Drop medium lock tracking, ask device models instead

Requires new BlockDevOps member is_medium_locked(). Implement for IDE
and SCSI CD-ROMs.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

025e849a 09/12/2011 04:17 pm Markus Armbruster

block: Rename bdrv_set_locked() to bdrv_lock_medium()

While there, make the locked parameter bool.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

7c7e9df0 09/12/2011 04:17 pm Sage Weil

rbd: allow client id to be specified in config string

Allow the client id to be specified in the config string via 'id=' so that
users can control who they authenticate as. Currently they are stuck with
the default ('admin'). This is necessary for anyone using authentication...