Statistics
| Branch: | Revision:

root / hw @ 3d78499a

# Date Author Comment
3d78499a 05/18/2010 10:12 pm Thomas Monjalon

target-ppc: remove dead code

This function had been disabled from the beginning:
see 9fddaa0c0cabb610947146a79b4a9a38b0a216e5

cpu_reset() function is in target-ppc/helper.c

Signed-off-by: Thomas Monjalon <>
Acked-by: Alexander Graf <>...

fe270d04 05/18/2010 10:12 pm Alexander Graf

target-s390: add firmware code

This patch adds a firmware blob to the S390 target. The blob is a simple
implementation of a virtio client that tries to read the second stage
bootloader from sectors described as of offset 0x20 in the MBR.

In combination with an updated zipl this allows for booting from virtio...

12941418 05/17/2010 09:17 pm Anthony Liguori

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

f7ce7287 05/17/2010 08:41 pm Anthony Liguori

Merge remote branch 'mst/for_anthony' into staging

38d8dfa1 05/17/2010 11:20 am Kevin Wolf

ide: Fix ide_dma_cancel

When cancelling a request, bdrv_aio_cancel may decide that it waits for
completion of a request rather than for cancellation. IDE therefore can't
abandon its DMA status before calling bdrv_aio_cancel; otherwise the callback
of a completed request would use invalid data....

1012e960 05/15/2010 08:52 pm Blue Swirl

Update to a hopefully more future proof FSF address

See also 70539e1850ddd3a7ee6f9a8db7bd8e81b85225a4,
8167ee883931cb20c6264fc19d040ce2dc6ceaaa,
530e7615ce3c01882e582c84dc6304ab98a3d5c5 and
fad6cb1a565bb73f83fc0e2654489457b489e436.

Signed-off-by: Blue Swirl <>

0b8f9be6 05/15/2010 08:36 pm Blue Swirl

Trim unnecessary includes

Signed-off-by: Blue Swirl <>

ec51e364 05/15/2010 07:42 pm Isaku Yamahata

mc146818rtc: remove #ifdef DEBUG_CMOS.

remove #ifdef DEBUG_CMOS by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

019ea978 05/15/2010 07:41 pm Isaku Yamahata

apm: remove #ifdef DEBUG.

remove #ifdef DEBUG by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

50d8ff8b 05/15/2010 07:41 pm Isaku Yamahata

acpi_piix4: remove #ifdef DEBUG.

removed #ifdef DEBUG by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

b246eebb 05/15/2010 07:39 pm Isaku Yamahata

pm_smbus: remove #ifdef DEBUG.

remove #ifdef DEBUG by using macro.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

ac404095 05/15/2010 07:28 pm Isaku Yamahata

pci hotadd, acpi_piix4: remove global variables

remove global variables, gpe and pci0_status by moving them
into PIIX4PMState.

Signed-off-by: Blue Swirl <>
Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

87c30546 05/15/2010 07:26 pm Isaku Yamahata

pci hotplug: add argument to pci hot plug callback.

Add argument, DeviceState*, to pci hot plug callback.
The argument will be used later to remove global variable.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

e8ec0571 05/15/2010 07:24 pm Isaku Yamahata

acpi_piix4: qdevfy.

qdevfy acpi_piix4.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

1d914fa0 05/15/2010 07:21 pm Isaku Yamahata

rtc: make rtc_xxx accept/return ISADevice instead of RTCState.

To match rtc_xxx with qdev, make rtc_xxx accept and return ISADevice
instead of RTCState.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

e1460e47 05/15/2010 07:20 pm Isaku Yamahata

pc: move rtc declarations from pc.h into a dedicated header file.

Move rtc_xxx declarations from pc.h into mc146818rtc.h.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

845773ab 05/15/2010 06:53 pm Isaku Yamahata

pc: split out piix specific part from pc.c into pc_piix.c

Finally, we can safely split out the piix specific part from pc.c
into pc_piix.c.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

e3a5cf42 05/15/2010 06:52 pm Isaku Yamahata

pc: split out pci device init from pc_init1() into pc_pci_device_init()

Split out pci device initialization from pc_init1() into pc_pci_device_init().
and removed unnecessary braces.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

ffe513da 05/15/2010 06:51 pm Isaku Yamahata

pc: split out basic device init from pc_init1() into pc_basic_device_init()

Split out basic device, i.e. legacy devices like floppy, initialization
from pc_init1() into pc_basic_device_init().
Later it will be used.

Signed-off-by: Isaku Yamahata <>...

765d7908 05/15/2010 06:50 pm Isaku Yamahata

pc: split out vga initialization from pc_init1() into pc_vga_init().

Split out vga initialization which is independent of piix
from pc_init1() as pc_vga_init().
Later it will be used.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

3d53f5c3 05/15/2010 06:47 pm Isaku Yamahata

pc: split out memory allocation from pc_init1() into pc_memory_init()

Split out memory allocation and rom/bios loading which doesn't depend
on piix from pc_init1() into pc_memory_init().
Later it will be used.

Signed-off-by: Isaku Yamahata <>...

70166477 05/15/2010 06:45 pm Isaku Yamahata

pc: split out cpu initialization from pc_init1() into pc_cpus_init().

split out cpu initialization which is piix independent from pc_init1()
into pc_cpus_init(). Later it will be used.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

8e78eb28 05/15/2010 06:42 pm Isaku Yamahata

pc: make pc_init1() not refer ferr_irq directly.

By introducing a registering function, make pc_init1() not refer to
ferr_irq directly in order to make ferr_irq piix independent.
Later pc_init1() will be split out into another file keeping ferr_irq
static....

6f09e686 05/15/2010 06:41 pm Isaku Yamahata

pc: introduce a function to allocate cpu irq.

Introduce a function, pc_allocate_cpu_irq(), to allocate cpu irq
in order to make pic_irq_request() piix independent.
Later piix code will be split out to another file keeping pic_irq_request()
static.

Signed-off-by: Isaku Yamahata <>...

ec2654fb 05/15/2010 06:40 pm Isaku Yamahata

pc: remove global variable rtc_state by using qemu_irq.

Remove the reference to the global variable, rtc_state, by passing
function argument to cmos_init_hd(), cmos_init().

Signed-off-by: Isaku Yamahata <>
Cc: Paolo Bonzini <>...

01b9e8c1 05/15/2010 06:38 pm Isaku Yamahata

pc: remove a global variable, floppy_controller.

Remove a global variable, floppy_controller.
Since it is unnecessarily global, make it local and pass it as
a function argument.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

57864959 05/15/2010 06:37 pm Isaku Yamahata

pc: make an unnecessary global variable, pit, local.

remove unnecessary global static variables, pit.
Make it local.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

f885f1ea 05/15/2010 06:33 pm Isaku Yamahata

pc, i440fx: Make smm enable/disable function i440fx independent.

make cpu_smm_update() generic to be independent on i440fx by
registering a callback.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

b8d6f539 05/15/2010 06:32 pm Isaku Yamahata

pc: initialize ioapic before use.

The changeset of 2c8d9340203c7f19265fd4cb2341f568217a3af6
prevents isa_irq_handler() from NULL refering of IsaIrqState::ioapic.
However it would be better to initialize the member before reference.

Signed-off-by: Isaku Yamahata <>...

93d89f63 05/15/2010 06:30 pm Isaku Yamahata

acpi: split acpi.c into the common part and the piix4 part.

Split acpi.c into the common part and the piix4 specific part.
The common part will be used later.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

990b150e 05/15/2010 06:29 pm Isaku Yamahata

acpi: add acpi constants from linux header files and use them.

add acpi constants from linux header files and
replace the old constants with them.
The acpi constants will be used by other file.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

04762841 05/15/2010 06:27 pm Isaku Yamahata

acpi: split out apm register emulation from acpi.c

Split out apm register emulation for acpi.c into apm.c.
The apm emulation will be used later.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>
Cc: Aurelien Jarno <>...

fc0bdd99 05/15/2010 06:25 pm Isaku Yamahata

acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c

Split out piix4 smbus routines from acpi.c into pm_smbus.c and
use it.
The split out smbus emulation will be used later.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

dc683910 05/15/2010 05:34 pm Jan Kiszka

mc146818rtc: Register vmstate via qdev

After defining the required alias ID, we can push vmstate registration
of mc146818rtc to qdev.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

a64405d1 05/15/2010 05:33 pm Jan Kiszka

fdc: Register vmstate via qdev

Establish vmstate containers for ISA and sysbus variant, define the
iobase as instance ID alias, and let qdev do the vmstate registration
work.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

1cc9f514 05/15/2010 05:32 pm Jan Kiszka

serial: Register vmstate via qdev

At least for isa-serial, we can already let qdev do the vmstate
registration for us. It just takes wrapping vmstate for the
encapsulating ISASerialState and defining the proper instance ID
aliases.

Signed-off-by: Jan Kiszka <>...

4d2ffa08 05/15/2010 05:23 pm Jan Kiszka

vmstate: Add support for alias ID

Some legacy users (mostly PC devices) of vmstate_register manage
instance IDs on their own, and that unfortunately in a way that is
incompatible with automatically generated ones. This so far prevents
switching those users to vmstates that are registered by qdev....

ec86f3e1 05/15/2010 05:02 pm Jan Kiszka

vmstate: Drop unused post_save handler

No device makes use of it anymore.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

604be200 05/15/2010 04:57 pm Shin-ichiro KAWASAKI

sh: sm501: add 2D engine support

In linux kernel v2.6.33, sm501 frame buffer driver modified to support
2D graphics engine on sm501 chip. One example is "fill rectangle" operation.
But current qemu's sm501 emulation doesn't support it. This results in
graphics console disturbance....

e5d3b98d 05/15/2010 03:31 pm Andrzej Zaborowski

tmp105: update the register in post_load where it needs updating.

This was the only user of .post_save as noticed by Jan Kiszka and
seems to have been added there wrongly during conversion to
VMStateDescription.

Signed-off-by: Andrzej Zaborowski <>

af2960f9 05/14/2010 10:32 pm Blue Swirl

e1000: make some tables 'const'

Signed-off-by: Blue Swirl <>

117e1e82 05/14/2010 10:32 pm Blue Swirl

ide: make a table 'const'

Signed-off-by: Blue Swirl <>

68f04a3c 05/14/2010 10:32 pm Blue Swirl

vga: make some tables 'const'

Signed-off-by: Blue Swirl <>

9c0afd0e 05/12/2010 10:27 pm Blue Swirl

apb: don't use any static state

Signed-off-by: Blue Swirl <>

5acd0646 05/12/2010 10:27 pm Blue Swirl

pckbd: don't use any static state

Signed-off-by: Blue Swirl <>

57c3229b 05/12/2010 06:33 pm Michael S. Tsirkin

virtio-net: return with value in void function

virtio-net has return with value in a void function.
No idea why does it compile with gcc,
but this isn't standard C.

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

fae054b0 05/12/2010 06:07 pm Michael S. Tsirkin

virtio: invoke set_features on load

After migration, vhost was not getting features
acked because set_features callback was never invoked.
The fix is just to invoke that callback.

Reported-by: David L Stevens <>
Signed-off-by: Michael S. Tsirkin <>...

c3f8f611 05/12/2010 02:02 am Michael S. Tsirkin

pci: irq_state vmstate breakage

Code for saving irq_state got vm_state
macros wrong, passing in the wrong parameter.
As a result, we both saved a wrong value
and restored it to a wrong offset.

This leads to device and bus irq counts getting
out of sync, which in turn leads to interrupts getting lost or...

925fe64a 05/12/2010 01:59 am Alex Williamson

pci: cleanly backout of pci_qdev_init()

If the init function of a device fails, as might happen with device
assignment, we never undo the work done by do_pci_register_device().
This not only causes a bit of a memory leak, but also leaves a bogus
pointer in the bus devices array that can cause a segfault or...

64d56409 05/10/2010 07:36 pm Jan Kiszka

lsi: Handle removal of selected devices

We must not store references to selected devices as they may be
hot-removed. Instead, look up the device based on its tag right before
using it. If the device disappeared, throw an interrupt and disconnect.

Signed-off-by: Jan Kiszka <>...

4c64d5b5 05/10/2010 07:36 pm Amit Shah

iov: Move from hw/ to topdir

The iov functions can be useful to other code as well.

Signed-off-by: Amit Shah <>
CC: Christoph Hellwig <>
Signed-off-by: Anthony Liguori <>

e9447f35 05/10/2010 07:36 pm Jan Kiszka

SCSI: Add disk reset handler

Ensure that pending requests of an SCSI disk are purged on system reset
and also restore max_lba. The latter is no only present in the reset
handler as that one is called after init as well.

Signed-off-by: Jan Kiszka <>...

3e94cb02 05/10/2010 07:36 pm Jan Kiszka

scsi-disk: Clear aiocb on read completion

Once the I/O completion callback returned, aiocb will be released by the
controller. So we have to clear the reference not only in
scsi_write_complete, but also in scsi_read_complete. Otherwise we risk
inconsistencies when a reset hits us before the related request is...

d43ba0af 05/10/2010 07:36 pm Jan Kiszka

lsi: Purge message queue on reset

Declare the input message queue empty and initialize the related state
machine properly on controller reset. This fixes unrecoverable errors
when the controller was reset during ongoing requests.

Signed-off-by: Jan Kiszka <>...

12aa6dd6 05/10/2010 07:36 pm Jan Kiszka

lsi: Adjust some register reset values

According to the LSI spec, the reset value of dcmd, dstat, and ctest2
were wrong, and sdid as well as ssid require zero initialization. There
are surely more discrepancies, this is just another increment.

Signed-off-by: Jan Kiszka <>...

ec5f92ce 05/04/2010 12:03 am Bernhard M. Wiedemann

hw: better i440 emulation

updated version of an old patch
http://xenon.stanford.edu/~eswierk/misc/qemu-linuxbios/qemu-piix-ram-size.patch
that together with
http://www.mail-archive.com/linuxbios@linuxbios.org/msg02390.html
(which is already in coreboot trunk) allows coreboot to autodetect the amount of RAM within qemu/kvm from a register in i440 northbridge....

a6568fe2 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TOPEN support.

Implement P9_TOPEN support.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

a9231555 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TREAD support

Implement P9_TREAD support.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

bbd5697b 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TCLUNK support

Implement P9_TCLUNK support.
This patch gets `ls -al` to work.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

8449360c 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TWRITE support

Implement P9_TWRITE support.
This gets write to file to work

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

c494dd6f 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TCREATE support

Implement P9_TCREATE support.
[: strdup to qemu_strdup conversion]

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

8cf89e00 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TWSTAT support

Implement P9_TWSTAT support.
This gets file and directory creation to work.

[: strdup to qemu_strdup conversion]
[: v9fs_fix_path]

Signed-off-by: Anthony Liguori <>...

5bae1900 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TREMOVE support.

Implement P9_TREMOVE support.
This gets file deletion to work.

[: Fix truncate to use the relative path]

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>...

9c5e9d89 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TFLUSH support

Don't do anything special for flush.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

a03f7874 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add string manipulation support.

Add helpers to do string manipulation.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

131dcb25 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add minimal set of FileOperations

Add minimal set of FileOperations and the corresponding implementations for
local fstype. These will be required for the FID management patches later on.

[: rpath fix ]
Signed-off-by: Anthony Liguori <>...

286d5652 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add fid and qid management support.

Helper APIs for FID and QID management.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

bb9e3216 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add stat and mode related helper functions.

Add helpers to obtain file stat and mode details.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

1f5a89bf 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add sg helper functions

Add scatter-gather helper functions.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

92c1ad03 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TVERSION support

Implement P9_TVERSION support.

[: Handle unknown 9P versions as per the standards]

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>...

955efc47 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TATTACH support.

Implement P9_TATTACH support.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

4da7d3fa 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TSTAT support

Implement P9_TSTAT support. This get the mount to work on the guest.

[: malloc to qemu_malloc conversion]

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>...

ff5e54c9 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add P9_TWALK support

Implement P9_TWALK support.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

74db920c 05/03/2010 08:17 pm Gautham R Shenoy

virtio-9p: Create a commandline option -fsdev

This patch creates a new command line option named -fsdev to hold any file
system specific information.

The option will currently hold the following attributes:
-fsdev fstype id=id,path=path_to_share
where
fstype: Type of the file system....

9f107513 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: Add a virtio 9p device to qemu

This patch doesn't implement the 9p protocol handling
code. It adds a simple device which dump the protocol data.

[: Little-Endian to host format conversion]
[: Multiple-mounts support]...

405a549a 05/03/2010 08:17 pm Anthony Liguori

virtio-9p: pdu processing support.

Add helpers to process the PDUs.

[: malloc to qemu_malloc coversion]

Signed-off-by: Anthony Liguori <>
Signed-off-by: Aneesh Kumar K.V <>
Signed-off-by: Anthony Liguori <>

51336214 05/03/2010 08:09 pm Jan Kiszka

lsi: Purge request queue on soft reset

Avoid keeping zombie requests across controller reset by purging the
queue and also dropping the currently active request.

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

54eefd72 05/03/2010 08:09 pm Jan Kiszka

lsi: Properly initialize controller state on reset

The LSI controller was lacking a system reset handler. Simply invoke the
existing soft reset handler in this case. This also allows to drop its
explicit invocation during init.

Signed-off-by: Jan Kiszka <>...

a1c59752 05/03/2010 08:09 pm Amit Shah

virtio-serial: Fix check for 'assert'; prevent NULL derefs

In the flush_queued_data() function, we expect port to be valid. Assert
only for port and not port || discard.

Reported-by: Juan Quintela <>
Signed-off-by: Amit Shah <>...

a6dac6a9 05/03/2010 03:31 pm Anthony Liguori

Merge remote branch 'qemu-kvm/uq/master' into HEAD

ace22f69 05/02/2010 09:38 pm Blue Swirl

Fix missing '|' in '|=', spotted by clang analyzer

Signed-off-by: Blue Swirl <>

50a48094 05/01/2010 10:44 pm Igor V. Kovalenko

cmd646: fix abort due to changed opaque pointer for ioport read

We cannot install different opaque pointer for read and write
of the same i/o address.

- handle zero address in bmdma_writeb_common and install
the same opaque pointer for both read and write access....

70ae65f5 05/01/2010 10:44 pm Igor V. Kovalenko

cmd646: pass pci_dev as it needs it

Instead of doing tricks to get the pci_dev, just pass it in the 1st
place. Patch is a bit longer that reverting the pci_dev field, but it
states more clearly (IMHO) what we are doing.

It also fixes the bm test, now that you told me that ->unit is not...

cce83b7d 04/28/2010 07:41 pm Marcelo Tosatti

vga: fix typo in length passed to kvm_log_stop

Signed-off-by: Marcelo Tosatti <>

e4d5639d 04/28/2010 04:58 pm Amit Shah

iov: Introduce a new file for helpers around iovs, add iov_from_buf()

The virtio-net code uses iov_fill() which fills an iov from a linear
buffer. The virtio-serial-bus code does something similar in an
open-coded function.

Create a new iov.c file that has iov_from_buf()....

fa6111f2 04/28/2010 04:58 pm Amit Shah

iov: Add iov_to_buf and iov_size helpers

iov_to_buf() puts the buffer contents in the iov in a linearized buffer.

iov_size() gets the length of the contents in the iov.

The iov_to_buf() function is the memcpy_to_iovec() function that was
used in virtio-ballon.c....

e61da14d 04/28/2010 04:58 pm Amit Shah

virtio-serial: Handle scatter-gather buffers for control messages

Current control messages are small enough to not be split into multiple
buffers but we could run into such a situation in the future or a
malicious guest could cause such a situation.

So handle the entire iov request for control messages....

e85ba9b2 04/28/2010 04:58 pm Amit Shah

virtio-serial: Handle scatter/gather input from the guest

Current guests don't send more than one iov but it can change later.
Ensure we handle that case.

Signed-off-by: Amit Shah <>
CC: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

1e4476aa 04/28/2010 04:58 pm Amit Shah

virtio-serial: Apps should consume all data that guest sends out / Fix virtio api abuse

We cannot indicate to the guest how much data was consumed by an app for
out_bufs. So we just have to assume the apps will consume all the data
that are handed over to them....

a69c7600 04/28/2010 04:58 pm Amit Shah

virtio-serial: Discard data that guest sends us when ports aren't connected

Before the earlier patch, we relied on incorrect virtio api usage to
signal to the guest that a particular buffer wasn't consumed by the
host.

After fixing that, we now just discard the data the guest sends us while...

9ed7b059 04/28/2010 04:58 pm Amit Shah

virtio-serial: Implement flow control for individual ports

Individual ports can now signal to the virtio-serial core to stop
sending data if the ports cannot immediately handle new data. When a
port later unthrottles, any data queued up in the virtqueue are sent to...

295587f7 04/28/2010 04:58 pm Amit Shah

virtio-serial: save/load: Ensure nr_ports on src and dest are same.

The number of ports on the source as well as the destination machines
should match. If they don't, it means some ports that got hotplugged on
the source aren't instantiated on the destination. Or that ports that...

16af2e3c 04/28/2010 04:58 pm Amit Shah

virtio-serial: save/load: Ensure we have hot-plugged ports instantiated

If some ports that were hot-plugged on the source are not available on
the destination, fail migration instead of trying to deref a NULL
pointer.

Signed-off-by: Amit Shah <>...

31abe21f 04/28/2010 04:58 pm Amit Shah

virtio-serial: save/load: Send target host connection status if different

If the host connection to a port is closed on the destination machine
after migration, whereas the connection was open on the source, the
guest has to be informed of that.

Similar for a host connection open on the destination....

055b889f 04/28/2010 04:58 pm Amit Shah

virtio-serial: Use control messages to notify guest of new ports

Allow the port 'id's to be set by a user on the command line. This is
needed by management apps that will want a stable port numbering scheme
for hot-plug/unplug and migration.

Since the port numbers are shared with the guest (to identify ports in...

306eb457 04/28/2010 04:58 pm Amit Shah

virtio-serial: whitespace: match surrounding code

The virtio-serial code doesn't mix declarations and definitions, so
separate them out on different lines.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

e30f328c 04/28/2010 04:58 pm Amit Shah

virtio-serial: Remove redundant check for 0-sized write request

The check for a 0-sized write request to a guest port is not necessary;
the while loop below won't be executed in this case and all will be
fine.

Signed-off-by: Amit Shah <>...

71c092e9 04/28/2010 04:58 pm Amit Shah

virtio-serial: Update copyright year to 2010

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

4048c7c3 04/28/2010 04:58 pm Amit Shah

virtio-serial: Propagate errors in initialising ports / devices in guest

If adding of ports or devices in the guest fails we can send out a QMP
event so that management software can deal with it.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>

3ecb45f8 04/28/2010 04:58 pm Amit Shah

virtio-serial: Send out guest data to ports only if port is opened

Data should be written only when ports are open.

Signed-off-by: Amit Shah <>
Signed-off-by: Anthony Liguori <>