c9d3396d | 23-Jan-2020 |
Guenter Roeck <linux@roeck-us.net> |
hw/char/exynos4210_uart: Implement post_load function
After restoring a VM, serial parameters need to be updated to reflect restored register values. Implement a post_load function to handle this si
hw/char/exynos4210_uart: Implement post_load function
After restoring a VM, serial parameters need to be updated to reflect restored register values. Implement a post_load function to handle this situation.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Message-id: 20200123052540.6132-6-linux@roeck-us.net Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
083b266f | 18-Dec-2019 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
chardev: Use QEMUChrEvent enum in IOEventHandler typedef
The Chardev events are listed in the QEMUChrEvent enum.
By using the enum in the IOEventHandler typedef we:
- make the IOEventHandler type
chardev: Use QEMUChrEvent enum in IOEventHandler typedef
The Chardev events are listed in the QEMUChrEvent enum.
By using the enum in the IOEventHandler typedef we:
- make the IOEventHandler type more explicit (this handler process out-of-band information, while the IOReadHandler is in-band), - help static code analyzers.
This patch was produced with the following spatch script:
@match@ expression backend, opaque, context, set_open; identifier fd_can_read, fd_read, fd_event, be_change; @@ qemu_chr_fe_set_handlers(backend, fd_can_read, fd_read, fd_event, be_change, opaque, context, set_open);
@depends on match@ identifier opaque, event; identifier match.fd_event; @@ static -void fd_event(void *opaque, int event) +void fd_event(void *opaque, QEMUChrEvent event) { ... }
Then the typedef was modified manually in include/chardev/char-fe.h.
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Corey Minyard <cminyard@mvista.com> Acked-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191218172009.8868-15-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
3042bd34 | 18-Dec-2019 |
Philippe Mathieu-Daudé <philmd@redhat.com> |
virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandler
The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to e
virtio-console: Explicit we ignore some QEMUChrEvent in IOEventHandler
The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following GCC warning:
CC hw/char/virtio-console.o hw/char/virtio-console.c: In function ‘chr_event’: hw/char/virtio-console.c:154:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 154 | switch (event) { | ^~~~~~ hw/char/virtio-console.c:154:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/char/virtio-console.c:154:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch] cc1: all warnings being treated as errors
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191218172009.8868-11-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
d9259178 | 20-Nov-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
mips: use sysbus_mmio_get_region() instead of internal fields
Register the memory region with sysbus_init_mmio() and look it up with sysbus_mmio_get_region() to avoid accessing internal device field
mips: use sysbus_mmio_get_region() instead of internal fields
Register the memory region with sysbus_init_mmio() and look it up with sysbus_mmio_get_region() to avoid accessing internal device fields.
Suggested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
9fac5d88 | 23-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
mips: inline serial_init()
The function is specific to mipssim, let's inline it.
(when inlining, we use a DeviceState variable instead of SerialIO, as it is the most common type used, and avoids ha
mips: inline serial_init()
The function is specific to mipssim, let's inline it.
(when inlining, we use a DeviceState variable instead of SerialIO, as it is the most common type used, and avoids having too many casts)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
show more ...
|
10315a70 | 23-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: make SerialIO a sysbus device
Make serial IO a proper sysbus device, similar to serial MM.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé
serial: make SerialIO a sysbus device
Make serial IO a proper sysbus device, similar to serial MM.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
9bc7176c | 20-Nov-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial-mm: use sysbus facilities
Make SerialMM a regular sysbus device, by registering the irq, and the mmio region. Reexport the internal serial properties.
Signed-off-by: Marc-André Lureau <marca
serial-mm: use sysbus facilities
Make SerialMM a regular sysbus device, by registering the irq, and the mmio region. Reexport the internal serial properties.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
80b2eed9 | 23-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial-mm: add endianness property
Add a qdev property for endianness, so memory region setup can be done in realize.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Pet
serial-mm: add endianness property
Add a qdev property for endianness, so memory region setup can be done in realize.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
17fd1a64 | 21-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial-mm: add "regshift" property
And a property and rename "it_shift" field to "regshift", as it seems to be more popular (and I don't know what "it" stands for).
Signed-off-by: Marc-André Lureau
serial-mm: add "regshift" property
And a property and rename "it_shift" field to "regshift", as it seems to be more popular (and I don't know what "it" stands for).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
490a9d9b | 23-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: start making SerialMM a sysbus device
Memory mapped serial device is in fact a sysbus device. The following patches will make use of sysbus facilities for resource and registration. In parti
serial: start making SerialMM a sysbus device
Memory mapped serial device is in fact a sysbus device. The following patches will make use of sysbus facilities for resource and registration. In particular, "serial-mm: use sysbus facilities" will move internal serial realization to serial_mm_realize callback to follow qdev best practices.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
b9975000 | 21-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: replace serial_exit_core() with unrealize
Instead of calling serial_exit_core() directly, use the QDev unrealize callback.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Rev
serial: replace serial_exit_core() with unrealize
Instead of calling serial_exit_core() directly, use the QDev unrealize callback.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
c9808d60 | 21-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: realize the serial device
Instead of calling serial_realize_core(), use the QDev realize callback.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathi
serial: realize the serial device
Instead of calling serial_realize_core(), use the QDev realize callback.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
show more ...
|
ff22c588 | 21-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: add "chardev" property
This is more QOM-friendly, callers may set/get the property themself.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Dau
serial: add "chardev" property
This is more QOM-friendly, callers may set/get the property themself.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|
4cc017e5 | 21-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: register vmsd with DeviceClass
Migration from old to new code works, however the other way fails for devices that use serial_init/serial_mm_init with "base", used as instance_id previously.
serial: register vmsd with DeviceClass
Migration from old to new code works, however the other way fails for devices that use serial_init/serial_mm_init with "base", used as instance_id previously.
(with qdev_set_legacy_instance_id, the alias_id is only used in savevm.c:find_se(), and thus can only be used to match against "legacy" instance id values. On new code, instance_id is generated incrementally from 0 with calculate_new_instance_id(), based on "qdev-path/vmsd-name")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: xiaoqiang zhao <zxq_yx_007@163.com>
show more ...
|
7781b88e | 21-Oct-2019 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
serial: initial qom-ification
Make SerialState a device (the following patches will introduce IO/MM sysbus serial devices)
None of the serial_{,mm}_init() callers actually free the returned value (
serial: initial qom-ification
Make SerialState a device (the following patches will introduce IO/MM sysbus serial devices)
None of the serial_{,mm}_init() callers actually free the returned value (even if they did, it would be quite harmless), so we can change the object allocation at will.
However, the devices that embed SerialState must now have their field QOM-initialized manually (isa, pci, pci-multi).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
show more ...
|