[Xen-devel] [PATCH v4 13/43] misc: remove duplicated includes

2017-12-14 Thread Philippe Mathieu-Daudé
exec: housekeeping (funny since 02d0e095031) applied using ./scripts/clean-includes Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Acked-by: Cornelia Huck <coh...@redhat.com> Reviewed-by: Anthony PERARD <anth

[Xen-devel] [PATCH v4 24/43] misc: remove old i386 dependency

2017-12-14 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Thomas Huth <th...@redhat.com> Reviewed-by: Anthony PERARD <anthony.per...@citrix.com> --- hw/audio/pcspk.c| 1 - hw/i386/xen/xen_platform.c | 1 - hw/isa/vt82c686.c

[Xen-devel] [PATCH v4 14/40] hw/display: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Alistair Francis --- include/hw/displ

[Xen-devel] [PATCH v4 11/40] hw/xen: Use the IEC binary prefix definitions

2018-06-10 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alan Robinson --- hw/block/xen_disk.c| 5 +++-- hw/

Re: [Xen-devel] [Qemu-devel] [PATCH] compiler: add a sizeof_field() macro

2018-06-14 Thread Philippe Mathieu-Daudé
On 06/14/2018 04:17 PM, John Snow wrote: > On 06/14/2018 12:44 PM, Stefan Hajnoczi wrote: >> Determining the size of a field is useful when you don't have a struct >> variable handy. Open-coding this is ugly. >> >> This patch adds the sizeof_field() macro, which is similar to >> typeof_field().

[Xen-devel] [PATCH v4 14/21] hw: Do not include "sysemu/blockdev.h" if it is not necessary

2018-05-28 Thread Philippe Mathieu-Daudé
v_mark_auto_del)" | \ xargs sed -i.bak '/#include "sysemu\/blockdev.h"/d' Signed-off-by: Philippe Mathieu-Daudé --- hw/block/m25p80.c | 1 - hw/block/onenand.c | 1 - hw/i386/xen/xen-mapcache.c | 1 - hw/s390x/virtio-ccw.c | 1 - hw/scsi/scsi-generic.c | 1 -

[Xen-devel] [PATCH v4 12/21] hw: Do not include "sysemu/block-backend.h" if it is not necessary

2018-05-28 Thread Philippe Mathieu-Daudé
Remove those unneeded includes to speed up the compilation process a little bit. (Continue 7eceff5b5a1fa cleanup) Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/collie.c | 1 - hw/arm/gumstix.c | 1 - hw/arm/mainstone.c

[Xen-devel] [PATCH v5 14/46] hw/display: Use the IEC binary prefix definitions

2018-06-25 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Gerd Hoffmann Reviewed-by: Alistair Francis --- include/hw/displ

[Xen-devel] [PATCH v5 11/46] hw/xen: Use the IEC binary prefix definitions

2018-06-25 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alan Robinson --- hw/block/xen_disk.c| 3 ++- hw/

[Xen-devel] [PATCH 22/30] hw/display: use the BYTE-based definitions

2018-02-14 Thread Philippe Mathieu-Daudé
It ease code review, unit is explicit. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/display/cirrus_vga.c | 9 - hw/display/g364fb.c | 2 +- hw/display/qxl.c| 26 +++--- hw/display/vga-isa-mm.c | 4 ++-- hw/display/vga.c

[Xen-devel] [PATCH 30/30] xen: use the BYTE-based definitions

2018-02-14 Thread Philippe Mathieu-Daudé
It ease code review, unit is explicit. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- hw/block/xen_disk.c| 4 ++-- hw/xenpv/xen_domainbuild.c | 10 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c

[Xen-devel] [PATCH 08/30] hw/i386: use the BYTE-based definitions

2018-02-14 Thread Philippe Mathieu-Daudé
It ease code review, unit is explicit. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- include/hw/i386/ich9.h | 2 +- hw/i386/acpi-build.c | 4 ++-- hw/i386/pc.c | 18 +- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c

Re: [Xen-devel] [PATCH 30/30] xen: use the BYTE-based definitions

2018-02-15 Thread Philippe Mathieu-Daudé
On 02/15/2018 08:00 AM, Alan Robinson wrote: > Hi Philippe, > > On Thu, Feb 15, 2018 at 01:29:00AM -0300, Philippe Mathieu-Daudé wrote: >> From: Philippe Mathieu-Daudé <f4...@amsat.org> >> Subject: [Xen-devel] [PATCH 30/30] xen: use the BYTE-based definitions >>

Re: [Xen-devel] [Qemu-devel] [PATCH 4/8] xen: Remove useless casts

2018-07-05 Thread Philippe Mathieu-Daudé
On 07/05/2018 07:16 AM, Peter Maydell wrote: > On 4 July 2018 at 16:39, Philippe Mathieu-Daudé wrote: >> Patch created mechanically by rerunning: >> >> $ spatch --sp-file scripts/coccinelle/typecast.cocci \ >> --macro-file scripts/cocci-macro-fi

[Xen-devel] [PATCH v2 3/7] xen: Use the PCI_DEVICE macro

2018-07-05 Thread Philippe Mathieu-Daudé
TYPE_XEN_PT_DEVICE is a subclass of TYPE_PCI_DEVICE, the clean way to access the PCIDevice pointer is using the PCI_DEVICE() macro. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Acked-by: Anthony PERARD Acked-by: Michael S. Tsirkin --- hw

[Xen-devel] [PATCH 0/8] Coccinelle cleanups

2018-07-04 Thread Philippe Mathieu-Daudé
Nothing exciting here, patches created mechanically (common after soft freeze). Philippe Mathieu-Daudé (8): qobject: Catch another straggler for use of qdict_put_str() error: Remove NULL checks on error_propagate() calls crypto: Remove useless casts xen: Remove useless casts tests/bios

[Xen-devel] [PATCH 4/8] xen: Remove useless casts

2018-07-04 Thread Philippe Mathieu-Daudé
Patch created mechanically by rerunning: $ spatch --sp-file scripts/coccinelle/typecast.cocci \ --macro-file scripts/cocci-macro-file.h \ --dir . --in-place Signed-off-by: Philippe Mathieu-Daudé --- hw/xen/xen_pt_config_init.c | 2 +- 1 file changed, 1 insertion

[Xen-devel] [PATCH v3 11/41] hw/xen: Use the BYTE-based definitions

2018-04-15 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Alan Robinson <alan.robin...@ts.fujit

[Xen-devel] [PATCH v3 14/41] hw/display: Use the BYTE-based definitions

2018-04-15 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Gerd Hoffmann <kra...@redhat.com>

Re: [Xen-devel] [Qemu-devel] [PATCH 14/16] os-posix: cleanup: Replace fprintf with error_report in remaining call sites

2018-04-19 Thread Philippe Mathieu-Daudé
@@ void os_set_proc_name(const char *s) > exit(1); > } > #else > -fprintf(stderr, "Change of process name not supported by your OS\n"); > +error_report("Change of process name not supported by your OS\n"); removing the trailing "\n&quo

Re: [Xen-devel] [Qemu-devel] [PATCH 15/16] os-posix: cleanup: Replace perror with error_report

2018-04-19 Thread Philippe Mathieu-Daudé
t;, strerror(errno)); > exit(1); > } > TFR(fd = qemu_open("/dev/null", O_RDWR)); > @@ -383,7 +383,7 @@ int os_mlock(void) > > ret = mlockall(MCL_CURRENT | MCL_FUTURE); > if (ret < 0) { > -perror("mlockall"

[Xen-devel] [PATCH v2 22/30] hw/display: use the BYTE-based definitions

2018-03-05 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Gerd Hoffmann <kra...@redhat.com> ---

[Xen-devel] [PATCH v2 30/30] xen: use the BYTE-based definitions

2018-03-05 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: Alan Robinson <alan.robin...@ts.fujit

[Xen-devel] [PATCH v2 08/30] hw/i386: use the BYTE-based definitions

2018-03-05 Thread Philippe Mathieu-Daudé
It eases code review, unit is explicit. Patch generated using: $ git grep -E '(1024|2048|4096|8192|(<<|>>).?(10|20|30))' hw/ include/hw/ and modified manually. Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> --- include/hw/i386/ich9.h | 2 +- hw/i386/acpi-

Re: [Xen-devel] [Qemu-devel] [PATCH] chardev: Convert IOReadHandler to read an unsigned number of bytes

2018-10-11 Thread Philippe Mathieu-Daudé
On 11/10/2018 17:34, Paolo Bonzini wrote: > On 11/10/2018 17:24, Philippe Mathieu-Daudé wrote: >>> On the other hand, fd_chr_read_poll is not an IOCanReadHandler, and this >>> patch therefore probably doesn't compile? >> It does compile. >> >> fd_chr_upda

Re: [Xen-devel] [Qemu-devel] [PATCH] chardev: Convert IOReadHandler to read an unsigned number of bytes

2018-10-11 Thread Philippe Mathieu-Daudé
On 11/10/2018 17:14, Paolo Bonzini wrote: > On 11/10/2018 15:14, Philippe Mathieu-Daudé wrote: >> The number of bytes can not be negative nor zero. >> >> Fixed 2 format string: >> - hw/char/spapr_vty.c >> - hw/usb/ccid-card-passthru.c >> >> Signed-

[Xen-devel] [PATCH v2 07/11] chardev: Let IOReadHandler use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
The number of bytes can not be negative nor zero. Fixed 2 format string: - hw/char/spapr_vty.c - hw/usb/ccid-card-passthru.c Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alberto Garcia --- backends/rng-egd.c | 2 +- chardev/char-mux.c | 2

[Xen-devel] [PATCH v2 08/11] chardev: Let IOCanReadHandler use unsigned type

2018-10-11 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- backends/rng-egd.c | 4 ++-- chardev/char-mux.c | 2 +- gdbstub.c | 2 +- hw/arm/pxa2xx.c | 2 +- hw/arm/strongarm.c | 2 +- hw/char/bcm2835_aux.c | 2 +- hw/char

Re: [Xen-devel] [Qemu-devel] [PATCH for-3.2 v3 05/14] qdev: move qdev_prop_register_global_list() to tests

2018-11-11 Thread Philippe Mathieu-Daudé
On Wed, Nov 7, 2018 at 1:40 PM Marc-André Lureau wrote: > > The function is only used by a test, move it there. > > Signed-off-by: Marc-André Lureau > Reviewed-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé > --- > include/hw/qdev-properties.h | 1 - > h

[Xen-devel] [PATCH] chardev: Convert IOReadHandler to read an unsigned number of bytes

2018-10-11 Thread Philippe Mathieu-Daudé
The number of bytes can not be negative nor zero. Fixed 2 format string: - hw/char/spapr_vty.c - hw/usb/ccid-card-passthru.c Signed-off-by: Philippe Mathieu-Daudé --- See: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02212.html backends/rng-egd.c | 4 ++-- chardev/char

[Xen-devel] [PATCH] xen: Fix format string

2019-01-16 Thread Philippe Mathieu-Daudé
(xendev, "sectors", "%lu", ^ blk_getlength(conf->blk) / conf->logical_block_size); blk_getlength() returns an int64_t. Signed-off-by: Philippe Mathie

Re: [Xen-devel] [PATCH] hw/block/xen: use proper format string for printing sectors

2019-01-16 Thread Philippe Mathieu-Daudé
ng on the host architecture >> which causes builds like the debian-armhf-cross build to fail. Use the >> correct PRi64 format string. >> >> Signed-off-by: Alex Bennée > > This does the same thing as "xen: Fix format string" from Philippe, but this > vari

Re: [Xen-devel] [Qemu-devel] [PATCH] configure: Don't add Xen's libs to LDFLAGS

2019-01-21 Thread Philippe Mathieu-Daudé
xen_pc)" > libs_softmmu="$($pkg_config --libs $xen_pc) $libs_softmmu" > -LDFLAGS="$($pkg_config --libs $xen_pc) $LDFLAGS" >else > > xen_libs="-lxenstore -lxenctrl -lxenguest" > Reviewed-by: Philippe Mathieu-Daudé

Re: [Xen-devel] [Qemu-devel] [PATCH 17/18] MAINTAINERS: add myself as a Xen maintainer

2018-11-29 Thread Philippe Mathieu-Daudé
On 21/11/18 16:12, Paul Durrant wrote: > I have made many significant contributions to the Xen code in QEMU, > particularly the recent patches introducing a new PV device framework. > I intend to make further significant contributions, porting other PV back- > ends to the new framework with the

Re: [Xen-devel] [Qemu-devel] [PATCH 2/3] machine: Eliminate unnecessary stringify() usage

2019-01-08 Thread Philippe Mathieu-Daudé
> .driver = "fw_cfg_mem", > .property = "x-file-slots", > - .value= stringify(0x10), > +.value= "0x10", [...] Lovely. Reviewed-by: Philippe Mathieu-Daudé ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [Qemu-devel] [PATCH 3/3] machine: Use shorter format for GlobalProperty arrays

2019-01-08 Thread Philippe Mathieu-Daudé
On 1/7/19 8:30 PM, Eduardo Habkost wrote: > Instead of verbose arrays with 4 lines for each entry, make each > entry take only one line. This makes long arrays that couldn't > fit in the screen become short and readable. And we'll thank you for the next git diff :)

Re: [Xen-devel] [PATCH v3 19/25] s390/ebcdic: Use size_t to iterate over arrays

2019-02-20 Thread Philippe Mathieu-Daudé
On 2/20/19 10:40 AM, Cornelia Huck wrote: > On Wed, 20 Feb 2019 02:02:26 +0100 > Philippe Mathieu-Daudé wrote: > >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> include/hw/s390x/ebcdic.h | 8 >> 1 file changed, 4 insertions(+), 4 deletions(-) &g

Re: [Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-21 Thread Philippe Mathieu-Daudé
On 2/20/19 12:13 PM, Philippe Mathieu-Daudé wrote: > On 2/20/19 11:03 AM, Marc-André Lureau wrote: >> Hi >> >> On Wed, Feb 20, 2019 at 2:03 AM Philippe Mathieu-Daudé >> wrote: >>> >>> The backend should not return a negative length to

Re: [Xen-devel] [PATCH v3 20/25] s390x/sclp: Use a const variable to improve readability

2019-03-08 Thread Philippe Mathieu-Daudé
On 2/20/19 11:53 AM, Cornelia Huck wrote: > On Wed, 20 Feb 2019 02:02:27 +0100 > Philippe Mathieu-Daudé wrote: > >> We will reuse this variable in the next patch. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/char/sclpconsole-lm.c | 7 ---

Re: [Xen-devel] [Qemu-devel] Maintainers, please tell us how to boot your machines!

2019-03-21 Thread Philippe Mathieu-Daudé
Le mar. 19 mars 2019 19:40, Markus Armbruster a écrit : > Markus Armbruster writes: > > > Dear board code maintainers, > > > > This is a (rather late) follow-up to the last QEMU summit. Minutes[*]: > > > > * Deprecating unmaintained features (devices, targets, backends) in QEMU > > > >

Re: [Xen-devel] [Qemu-devel] [PATCH 1/3] dataplane/xen-block: remove dead code

2019-02-15 Thread Philippe Mathieu-Daudé
On 2/15/19 5:25 PM, Paul Durrant wrote: > The if() statement is clearly bogus (dead code which should have been > cleaned up when grant mapping was removed). "... was removed in 06454c24ad)." > > Spotted by Coverity: CID 1398635 > > While in the neighbourhood, add a missing 'fall through'

[Xen-devel] [PATCH v3 16/25] tpm: Use size_t to hold sizes

2019-02-19 Thread Philippe Mathieu-Daudé
Avoid to use a signed type to hold an unsigned value. Signed-off-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_emulator.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index 70f4b10284..931e56f6ed 100644 --- a/hw/tpm

[Xen-devel] [PATCH v3 17/25] net/filter-mirror: Use size_t

2019-02-19 Thread Philippe Mathieu-Daudé
Since iov_size() returns a size_t, no need to use a signed type. Signed-off-by: Philippe Mathieu-Daudé --- net/filter-mirror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/filter-mirror.c b/net/filter-mirror.c index 3a61cf21e8..97b52d0544 100644 --- a/net/filter

[Xen-devel] [PATCH v3 11/25] xen: Let xencons_send() take a 'size' argument

2019-02-19 Thread Philippe Mathieu-Daudé
The single caller of xencons_send(), con_event() already use the difference 'con->buffer.size - con->buffer.consumed'. Deduplicate by passing the difference as an argument. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/xen_console.c | 12 +++- 1 file changed, 7 insertions

[Xen-devel] [PATCH v3 19/25] s390/ebcdic: Use size_t to iterate over arrays

2019-02-19 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/hw/s390x/ebcdic.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/hw/s390x/ebcdic.h b/include/hw/s390x/ebcdic.h index 69a04cab62..d89174e113 100644 --- a/include/hw/s390x/ebcdic.h +++ b/include/hw/s390x

[Xen-devel] [PATCH v3 15/25] spapr-vty: Let vty_putchars() use size_t

2019-02-19 Thread Philippe Mathieu-Daudé
Both callers (h_put_term_char and rtas_display_character) use an unsigned value. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/spapr_vty.c| 2 +- include/hw/ppc/spapr_vio.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/char/spapr_vty.c b/hw/char

[Xen-devel] [PATCH v3 12/25] xen: Let buffer_append() return the size consumed

2019-02-19 Thread Philippe Mathieu-Daudé
The buffer.size and buffer.consumed fields are only updated within the buffer_append() body. We can simply let buffer_append() return the difference (the buffer consumed). Signed-off-by: Philippe Mathieu-Daudé --- hw/char/xen_console.c | 13 - 1 file changed, 8 insertions(+), 5

[Xen-devel] [RFC PATCH v3 13/25] xen: Let buffer_append() return a size_t

2019-02-19 Thread Philippe Mathieu-Daudé
To the Xen team: this is not trivial to me to demonstrate this assertion can never happen, but then the whole series is justified and I can convert qemu_chr_fe_write() to use size_t argument. Can you help me here? Signed-off-by: Philippe Mathieu-Daudé --- hw/char/xen_console.c | 1 + 1 file

[Xen-devel] [PATCH v3 09/25] vhost-user: Express sizeof with size_t

2019-02-19 Thread Philippe Mathieu-Daudé
VHOST_USER_HDR_SIZE uses offsetof(), thus is an expression of type size_t. Update the format string accordingly. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/vhost-user.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio

[Xen-devel] [PATCH v3 14/25] virtio-serial: Let VirtIOSerialPortClass::have_data() use size_t

2019-02-19 Thread Philippe Mathieu-Daudé
Both callers in hw/char/virtio-serial-bus.c provide unsigned values, even the trace event display an unsigned value. Convert the have_data() handler to take an unsigned value. Signed-off-by: Philippe Mathieu-Daudé --- It is funny/scary that there are big comments about how to treat errors to set

[Xen-devel] [PATCH v3 10/25] usb-redir: Verify usbredirparser_write get called with positive count

2019-02-19 Thread Philippe Mathieu-Daudé
The usbredirparser_write handler should never be called with a negative size payload, return an error if this is not the case. Now that we are sure the 'count' value is positive, make it obvious by casting it to a size_t. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/redirect.c | 6 +- 1

[Xen-devel] [PATCH v3 03/25] chardev/wctablet: Use unsigned type to hold unsigned value

2019-02-19 Thread Philippe Mathieu-Daudé
TabletChardev::query is an array of uint8_t. Use the same type to hold it (this also silent a -Wsign-conversion warning in the trace function). Signed-off-by: Philippe Mathieu-Daudé --- chardev/trace-events | 2 +- chardev/wctablet.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions

[Xen-devel] [PATCH v3 01/25] chardev: Simplify IOWatchPoll::fd_can_read as a GSourceFunc

2019-02-19 Thread Philippe Mathieu-Daudé
IOWatchPoll::fd_can_read() really is a GSourceFunc type, it simply returns a boolean value. Update the backends to return a boolean, whether there is data to read from the source or not. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-fd.c | 4

[Xen-devel] [PATCH v3 00/25] chardev: Convert qemu_chr_write() to take a size_t argument

2019-02-19 Thread Philippe Mathieu-Daudé
://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02396.html v1: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02200.html (from Prasad J Pandit) Changes requested by Paolo: https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg02294.html Please review, Phil. Philippe Mathieu-Daudé (25

[Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-19 Thread Philippe Mathieu-Daudé
The backend should not return a negative length to read. We will later change the prototype of IOCanReadHandler to return an unsigned length. Meanwhile make sure the return length is positive. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char.c | 5 - 1

[Xen-devel] [PATCH v3 04/25] chardev: Let qemu_chr_be_can_write() return a size_t types

2019-02-19 Thread Philippe Mathieu-Daudé
In the previous commit we added an assert to be sure than qemu_chr_be_can_write() will never return a negative value. We can now change its prototype to return a size_t. Adapt the backends accordingly. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/baum.c

[Xen-devel] [PATCH v3 06/25] gdbstub: Use size_t to hold GDBState::last_packet_len

2019-02-19 Thread Philippe Mathieu-Daudé
se size_t to hold last_packet_len values. Signed-off-by: Philippe Mathieu-Daudé --- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index 76eca3bb7e..69340d7cd1 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -323,7 +323,7 @@ typedef struct GDBSt

[Xen-devel] [PATCH v3 07/25] gdbstub: Let put_buffer() use size_t

2019-02-19 Thread Philippe Mathieu-Daudé
All callers provide a size_t argument, we can safely use size_t for this function. Signed-off-by: Philippe Mathieu-Daudé --- gdbstub.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 69340d7cd1..860e9bb7c7 100644 --- a/gdbstub.c +++ b

[Xen-devel] [PATCH v3 08/25] ui/gtk: Remove pointless cast

2019-02-19 Thread Philippe Mathieu-Daudé
The 'size' value is of type 'guint' which is already unsigned. Remove the useless cast. Signed-off-by: Philippe Mathieu-Daudé --- ui/gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 949b143e4e..b5879fdece 100644 --- a/ui/gtk.c +++ b/ui/gtk.c

[Xen-devel] [PATCH v3 05/25] gdbstub: Use size_t for strlen() return value

2019-02-19 Thread Philippe Mathieu-Daudé
Since strlen() returns an unsigned value, it is pointless to convert it to a signed one. Use size_t to hold its return value. Signed-off-by: Philippe Mathieu-Daudé --- gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index bc774ae992

[Xen-devel] [PATCH v3 24/25] chardev: Let qemu_chr_fe_write[_all] use size_t type argument

2019-02-19 Thread Philippe Mathieu-Daudé
as size_t to make explicit this value is unsigned. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- chardev/char-fe.c | 4 ++-- chardev/char-mux.c| 3 ++- include/chardev/char-fe.h | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git

[Xen-devel] [PATCH v3 20/25] s390x/sclp: Use a const variable to improve readability

2019-02-19 Thread Philippe Mathieu-Daudé
We will reuse this variable in the next patch. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/sclpconsole-lm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index dbc91a1e5b..49543e2c83 100644 --- a/hw/char

[Xen-devel] [PATCH v3 21/25] s390x/sclp: Use size_t in process_mdb()

2019-02-19 Thread Philippe Mathieu-Daudé
Since it is unlikely we have sizeof(mdbo->mto.message) < 0, we can convert this variable to an unsigned type. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/sclpconsole-lm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpc

[Xen-devel] [PATCH v3 18/25] s390x/3270: Let insert_IAC_escape_char() use size_t

2019-02-19 Thread Philippe Mathieu-Daudé
This function takes size_t argument and return a size_t. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/terminal3270.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c index 35b079d5c4..1cb48a3c6f 100644 --- a/hw/char

[Xen-devel] [PATCH v3 25/25] chardev: Let qemu_chr_write[_all] use size_t

2019-02-19 Thread Philippe Mathieu-Daudé
We now know all callers use a size_t argument. We can convert qemu_chr_write() and qemu_chr_write_all() to use a size_t argument. Signed-off-by: Philippe Mathieu-Daudé --- chardev/char.c | 8 include/chardev/char.h | 2 +- include/sysemu/replay.h | 2 +- replay/replay-char.c

[Xen-devel] [PATCH v3 22/25] s390x/sclp: Let write_console_data() take a size_t

2019-02-19 Thread Philippe Mathieu-Daudé
Since all callers provide an unsigned value, we can safely use a size_t argument. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/sclpconsole-lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index 48c76d863e

[Xen-devel] [PATCH v3 23/25] hw/ipmi: Assert outlen > outpos

2019-02-19 Thread Philippe Mathieu-Daudé
can then add an assertion on 'outlen > outpos', which will helps the next patch to safely convert 'outlen - outpos' as an unsigned type (size_t). Make this assertion explicit by casting 'outlen - outpos' size_t. Signed-off-by: Philippe Mathieu-Daudé --- hw/ipmi/ipmi_bmc_extern.c | 3 ++- 1 file c

Re: [Xen-devel] [PATCH v3 02/25] chardev: Assert IOCanReadHandler can not be negative

2019-02-20 Thread Philippe Mathieu-Daudé
On 2/20/19 11:03 AM, Marc-André Lureau wrote: > Hi > > On Wed, Feb 20, 2019 at 2:03 AM Philippe Mathieu-Daudé > wrote: >> >> The backend should not return a negative length to read. >> We will later change the prototype of IOCanReadHandler to return an >>

Re: [Xen-devel] [PATCH v3 04/25] chardev: Let qemu_chr_be_can_write() return a size_t types

2019-02-20 Thread Philippe Mathieu-Daudé
On 2/20/19 11:40 AM, Marc-André Lureau wrote: > Hi > > On Wed, Feb 20, 2019 at 2:04 AM Philippe Mathieu-Daudé > wrote: >> >> In the previous commit we added an assert to be sure than >> qemu_chr_be_can_write() will never return a negative value. >> We ca

Re: [Xen-devel] [Qemu-devel] [PATCH v3 25/25] chardev: Let qemu_chr_write[_all] use size_t

2019-02-20 Thread Philippe Mathieu-Daudé
On 2/20/19 11:42 AM, Marc-André Lureau wrote: > Hi > > On Wed, Feb 20, 2019 at 11:39 AM Daniel P. Berrangé > wrote: >> >> On Wed, Feb 20, 2019 at 02:02:32AM +0100, Philippe Mathieu-Daudé wrote: >> >>> diff --git a/include/chardev/char.h b/include/chardev/

Re: [edk2-devel] [PATCH 2/4] OvmfPkg/License.txt: refresh the MIT license text and include the SPDX ID

2019-04-11 Thread Philippe Mathieu-Daudé
On 4/10/19 2:58 PM, Laszlo Ersek wrote: > Refresh the MIT license text from , > and add "SPDX-License-Identifier: MIT" for easier parsing by machines. > > This follows the tree-wide adoption of "SPDX-License-Identifier"s, made > for

Re: [Xen-devel] [Qemu-devel] [PATCH v2 4/4] xen: Avoid VLA

2019-06-18 Thread Philippe Mathieu-Daudé
On 6/18/19 1:23 PM, Anthony PERARD wrote: > Avoid using a variable length array. > > We allocate the `dirty_bitmap' buffer only once when we start tracking > for dirty bits. > Suggested-by: Paul Durrant Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Anthony PERARD

Re: [edk2-devel] [PATCH v2 00/31] Specific platform to run OVMF in Xen PVH and HVM guests

2019-04-09 Thread Philippe Mathieu-Daudé
On 4/9/19 10:09 AM, Laszlo Ersek wrote: > On 04/08/19 17:50, Laszlo Ersek wrote: >> On 04/08/19 16:23, Anthony PERARD wrote: >>> Patch series available in this git branch: >>> https://xenbits.xen.org/git-http/people/aperard/ovmf.git >>> br.platform-xen-pvh-v2 >>> >>> Hi, >>> >>> I've started to

Re: [Xen-devel] [Qemu-devel] [PATCH v7 11/42] memory: Access MemoryRegion with MemOp

2019-08-18 Thread Philippe Mathieu-Daudé
On 8/16/19 9:30 AM, tony.ngu...@bt.com wrote: > Convert memory_region_dispatch_{read|write} operand "unsigned size" > into a "MemOp op". > > Signed-off-by: Tony Nguyen > Reviewed-by: Richard Henderson > --- >  include/exec/memop.h  | 20 ++-- >  include/exec/memory.h |  9

Re: [Xen-devel] [Qemu-devel] [PATCH v7 00/42] Invert Endian bit in SPARCv9 MMU TTE

2019-08-16 Thread Philippe Mathieu-Daudé
Hi Tony, On 8/16/19 8:28 AM, tony.ngu...@bt.com wrote: > This patchset implements the IE (Invert Endian) bit in SPARCv9 MMU TTE. > > v7: [...] > - Re-declared many native endian devices as little or big endian. This is why > v7 has +16 patches. Why are you doing that? What is the rational?

Re: [Xen-devel] [Qemu-devel] [PATCH v7 24/42] hw/isa: Declare device little or big endian

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 9:34 AM, tony.ngu...@bt.com wrote: > For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > targets from the set of target/hw/*/device.o. > > If the set of targets are all little or all big endian, re-declare > the device endianness as DEVICE_LITTLE_ENDIAN or

Re: [Xen-devel] [Qemu-devel] [PATCH v7 25/42] hw/misc: Declare device little or big endian

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 9:34 AM, tony.ngu...@bt.com wrote: > For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > targets from the set of target/hw/*/device.o. > > If the set of targets are all little or all big endian, re-declare > the device endianness as DEVICE_LITTLE_ENDIAN or

Re: [Xen-devel] [Qemu-devel] [PATCH v7 27/42] hw/pci-host: Declare device little or big endian

2019-08-16 Thread Philippe Mathieu-Daudé
On 8/16/19 9:35 AM, tony.ngu...@bt.com wrote: > For each device declared with DEVICE_NATIVE_ENDIAN, find the set of > targets from the set of target/hw/*/device.o. > > If the set of targets are all little or all big endian, re-declare > the device endianness as DEVICE_LITTLE_ENDIAN or

Re: [Xen-devel] [Qemu-devel] [PATCH v6 00/26] Invert Endian bit in SPARCv9 MMU TTE

2019-08-07 Thread Philippe Mathieu-Daudé
On 8/7/19 10:23 AM, tony.ngu...@bt.com wrote: [...] > v3: > - Like v1, the entire TCGMemOp enum is now MemOp. > - MemOp target dependant attributes are conditional upon NEED_CPU_H > > v4: > - Added Paolo Bonzini as include/exec/memop.h maintainer > > v5: > - Improved commit messages to clarify

Re: [Xen-devel] [Qemu-devel] [PATCH v6 00/26] Invert Endian bit in SPARCv9 MMU TTE

2019-08-07 Thread Philippe Mathieu-Daudé
On 8/7/19 2:41 PM, tony.ngu...@bt.com wrote: > On 8/7/19 8:37 PM, Philippe Mathieu-Daudé wrote: > >> I'm confused I think I already reviewed various patches of your previous > ​> series but don't see my Reviewed-by tags.​> > Apologies Philippe! I am the confused one

Re: [Xen-devel] [PATCH v3 00/20] hw/i386/pc: Split PIIX3 southbridge from i440FX northbridge

2019-10-30 Thread Philippe Mathieu-Daudé
Hi Aleksandar, On 10/27/19 8:44 AM, Aleksandar Markovic wrote: On Saturday, October 26, 2019, Philippe Mathieu-Daudé <mailto:phi...@redhat.com>> wrote: Changes since v2 [0]: - Use a #define - Reword one description - Added review tags (thanks all for reviewing!)

[Xen-devel] [PATCH-for-5.0 v3 4/6] hw/pci-host/i440fx: Use definitions instead of magic values

2019-12-09 Thread Philippe Mathieu-Daudé
Use definitions from "hw/pci/pci_regs.h". This also helps when using git-grep. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/i440fx.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index

[Xen-devel] [PATCH-for-5.0 v3 1/6] hw/pci-host/i440fx: Correct the header description

2019-12-09 Thread Philippe Mathieu-Daudé
Missed during the refactor in commits 14a026dd58 and 0f25d865a, this file is now only about the i440FX chipset. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/i440fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci-host/i440fx.c b/hw/pci-host/i440fx.c index

[Xen-devel] [PATCH-for-5.0 v3 5/6] hw/pci-host/i440fx: Extract the IGD passthrough host bridge device

2019-12-09 Thread Philippe Mathieu-Daudé
We can use a i440FX without the IGD passthrough host bridge. Extract it into a new file, 'hw/pci-host/igd_pt.c'. Signed-off-by: Philippe Mathieu-Daudé --- v3: - Rename as 'xen_igd_pt.c' (Alex Williamson) - Add an entry in MAINTAINERS::Xen --- hw/pci-host/i440fx.c | 84

[Xen-devel] [PATCH-for-5.0 v3 3/6] hw/pci-host/i440fx: Use size_t to iterate over ARRAY_SIZE()

2019-12-09 Thread Philippe Mathieu-Daudé
We don't enforce the -Wsign-conversion CPPFLAG, but it doesn't hurt to avoid this warning: warning: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Wsign-conversion] Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/i440fx.c | 5 ++--- 1 file changed, 2

[Xen-devel] [PATCH-for-5.0 v3 0/6] hw/pci-host: Add Kconfig selector for IGD PCIe pass-through

2019-12-09 Thread Philippe Mathieu-Daudé
Mathieu-Daudé (6): hw/pci-host/i440fx: Correct the header description hw/pci-host/i440fx: Extract PCII440FXState to "hw/pci-host/i440fx.h" hw/pci-host/i440fx: Use size_t to iterate over ARRAY_SIZE() hw/pci-host/i440fx: Use definitions instead of magic values hw/pci-host/i440fx: Extra

[Xen-devel] [PATCH-for-5.0 v3 6/6] hw/pci-host: Add Kconfig entry to select the IGD Passthrough Host Bridge

2019-12-09 Thread Philippe Mathieu-Daudé
Add the XEN_IGD_PASSTHROUGH Kconfig option. Xen build has that option selected by default. Non-Xen builds now have to select this feature manually. Signed-off-by: Philippe Mathieu-Daudé --- v3: Only default with Xen (Alex Williamson) I did not used 'depends on XEN' as suggested by Alex

Re: [Xen-devel] [PATCH-for-5.0 v3 6/6] hw/pci-host: Add Kconfig entry to select the IGD Passthrough Host Bridge

2019-12-09 Thread Philippe Mathieu-Daudé
On 12/9/19 11:42 AM, Paolo Bonzini wrote: On 09/12/19 11:10, Durrant, Paul wrote: Signed-off-by: Philippe Mathieu-Daudé --- v3: Only default with Xen (Alex Williamson) I did not used 'depends on XEN' as suggested by Alex but 'default y if XEN', so one can build XEN without this feature

[Xen-devel] [PATCH-for-5.0 v3 2/6] hw/pci-host/i440fx: Extract PCII440FXState to "hw/pci-host/i440fx.h"

2019-12-09 Thread Philippe Mathieu-Daudé
Make the PCII440FXState structure public, so it can be used out of this source file. This will allow us to extract the IGD Passthrough Host Bridge, which is a children of the TYPE_I440FX_PCI_DEVICE. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci-host/i440fx.h | 19

Re: [Xen-devel] [PATCH 12/12] hw/i386/pc: Move PC-machine specific declarations to 'pc_internal.h'

2019-12-13 Thread Philippe Mathieu-Daudé
On 12/13/19 5:17 PM, Philippe Mathieu-Daudé wrote: Historically, QEMU started with only one X86 machine: the PC. The 'hw/i386/pc.h' header was used to store all X86 and PC declarations. Since we have now multiple machines based on the X86 architecture, move the PC-specific declarations in a new

[Xen-devel] [PATCH 01/12] hw/i386/pc: Convert DPRINTF() to trace events

2019-12-13 Thread Philippe Mathieu-Daudé
Convert the deprecated DPRINTF() macro to trace events. Signed-off-by: Philippe Mathieu-Daudé --- v2: rename pc_pic -> x86_pic --- hw/i386/pc.c | 19 +-- hw/i386/trace-events | 6 ++ 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/hw/i386/pc.c b

[Xen-devel] [PATCH 00/12] hw/i386/pc: Move PC-machine specific declarations to 'pc_internal.h'

2019-12-13 Thread Philippe Mathieu-Daudé
[2] https://www.mail-archive.com/qemu-devel@nongnu.org/msg664765.html Philippe Mathieu-Daudé (12): hw/i386/pc: Convert DPRINTF() to trace events hw/i386/pc: Move kvm_i8259_init() declaration to sysemu/kvm.h hw/i386/pc: Remove obsolete pc_pci_device_init() declaration hw/i386/pc: Remove ob

[Xen-devel] [PATCH 02/12] hw/i386/pc: Move kvm_i8259_init() declaration to sysemu/kvm.h

2019-12-13 Thread Philippe Mathieu-Daudé
Move the KVM-related call to "sysemu/kvm.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - include/sysemu/kvm.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 1f86eba3f9..9866dfb

[Xen-devel] [PATCH 04/12] hw/i386/pc: Remove obsolete cpu_set_smm_t typedef

2019-12-13 Thread Philippe Mathieu-Daudé
In commit f809c6051 we replaced the use of cpu_set_smm_t callbacks by using a Notifier to modify the MemoryRegion. This prototype is now not used anymore, we can safely remove it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 2 -- 1 file changed, 2 deletions(-) diff --git

[Xen-devel] [PATCH 05/12] hw/i386/ich9: Remove unused include

2019-12-13 Thread Philippe Mathieu-Daudé
The "pcie_host.h" header is used by devices providing a PCI-e bus, usually North Bridges. The ICH9 is a South Bridge. Since we don't need this header, do not include it. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/ich9.h | 1 - 1 file changed, 1 deletion(-) diff --git

[Xen-devel] [PATCH 03/12] hw/i386/pc: Remove obsolete pc_pci_device_init() declaration

2019-12-13 Thread Philippe Mathieu-Daudé
In commit 1454509726 we removed the pc_pci_device_init() deprecated function and its calls, but we forgot to remove its prototype. Do that now. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/i386/pc.h b/include/hw

[Xen-devel] [PATCH 12/12] hw/i386/pc: Move PC-machine specific declarations to 'pc_internal.h'

2019-12-13 Thread Philippe Mathieu-Daudé
this header is restricted to the X86 architecture. Other architecture can not access it. Signed-off-by: Philippe Mathieu-Daudé --- Maybe name it 'pc_machine.h'? --- hw/i386/pc_internal.h | 144 ++ include/hw/i386/pc.h | 128

[Xen-devel] [PATCH 09/12] hw/intc/ioapic: Make ioapic_print_redtbl() static

2019-12-13 Thread Philippe Mathieu-Daudé
Since commit 0c8465440 the ioapic_print_redtbl() function is not used outside of ioapic_common.c, make it static, and remove its prototype declaration in "ioapic_internal.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/ioapic_internal.h | 1 - hw/intc/ioapic_common.c

[Xen-devel] [PATCH 08/12] hw/ide/piix: Use ARRAY_SIZE() instead of magic numbers

2019-12-13 Thread Philippe Mathieu-Daudé
Using magic numbers is dangerous because the structures PCIIDEState might be modified and this source file consuming the "ide/pci.h" header would be out of sync, eventually accessing out of bound array members. Use the ARRAY_SIZE() to keep the source file sync. Signed-off-by: Philip

[Xen-devel] [PATCH 10/12] hw/i386/pc: Rename allocate_cpu_irq from 'pc' to 'x86_machine'

2019-12-13 Thread Philippe Mathieu-Daudé
All the X86 machines use an interrupt controller. Rename the function to something more generic. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/pc.h | 2 +- hw/i386/microvm.c| 2 +- hw/i386/pc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git

  1   2   3   4   5   6   7   8   9   10   >