[PATCH v2 06.5/18] hw/ide/piix: Allow using PIIX3-IDE as standalone PCI function

2023-02-20 Thread Philippe Mathieu-Daudé
In order to allow Frankenstein uses such plugging a PIIX3 IDE function on a ICH9 chipset (which already exposes AHCI ports...) as: $ qemu-system-x86_64 -M q35 -device piix3-ide add a kludge to automatically wires the IDE IRQs on an ISA bus exposed by a PCI-to-ISA bridge (usually function #0). R

Re: [PATCH v3 07/10] qapi: implement conditional command arguments

2023-02-20 Thread Markus Armbruster
Marc-André Lureau writes: > Hi Markus > > On Fri, Feb 17, 2023 at 12:28 PM Markus Armbruster > wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > The generated code doesn't quite handle the conditional arguments. >> > For example, 'bar' in 'test-if-cmd' is

Re: [PATCH] hw/ide/ahci: trace ncq write command as write instead of read

2023-02-20 Thread Philippe Mathieu-Daudé
On 17/2/23 11:31, Fiona Ebner wrote: Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") Signed-off-by: Fiona Ebner --- Or should it be sorted alphabetically below execute_ncq_command_unsup? I felt read and write belong close together and this reflects the positions in the code. hw

[PATCH v2 2/3] hw: allwinner-i2c: Fix TWI_CNTR_INT_FLAG on SUN6i SoCs

2023-02-20 Thread qianfanguijin
From: qianfan Zhao TWI_CNTR_INT_FLAG is W1C(write 1 to clear and write 0 has non-effect) register on SUN6i based SoCs, we should lower interrupt when the guest set this bit. The linux kernel will hang in irq handler(mv64xxx_i2c_intr) if no device connected on the i2c bus, next is the trace log:

[PATCH v2 1/3] hw: allwinner-i2c: Make the trace message more readable

2023-02-20 Thread qianfanguijin
From: qianfan Zhao Next is an example when read/write trace enabled: allwinner_i2c_write write XADDR(0x04): 0x00 allwinner_i2c_write write CNTR(0x0c): 0x50 M_STP BUS_EN allwinner_i2c_write write CNTR(0x0c): 0xe4 A_ACK M_STA BUS_EN INT_EN allwinner_i2c_read readCNTR(0x0c): 0xcc A_ACK IN

[PATCH v2 3/3] hw: arm: allwinner-h3: Fix and complete H3 i2c devices

2023-02-20 Thread qianfanguijin
From: qianfan Zhao Allwinner h3 has 4 twi(i2c) devices named twi0, twi1, twi2 and r_twi. The registers are compatible with TYPE_AW_I2C_SUN6I, write 1 to clear control register's INT_FLAG bit. Signed-off-by: qianfan Zhao --- hw/arm/allwinner-h3.c | 29 + incl

Re: [PATCH v3 08/10] qmp: teach 'getfd' to import sockets on win32

2023-02-20 Thread Markus Armbruster
Marc-André Lureau writes: > Hi Markus > > On Fri, Feb 17, 2023 at 1:49 PM Markus Armbruster wrote: >> >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > A process with enough capabilities can duplicate a socket to QEMU. >> > Modify 'getfd' to import it and add it t

Re: [PATCH] qemu: make version available in coredump

2023-02-20 Thread Laszlo Ersek
On 2/15/23 23:05, Stefan Hajnoczi wrote: > On Tue, 7 Jun 2022 at 16:33, Vladimir Sementsov-Ogievskiy > wrote: >> >> Add a variable with QEMU_FULL_VERSION definition. Then the content of >> the variable is easily searchable: >> >>strings /path/to/core | grep QEMU_FULL_VERSION >> >> 'volatile' k

Re: [PATCH] Updated the FSF address to

2023-02-20 Thread Stefan Weil via
Am 20.02.23 um 08:01 schrieb Khadija Kamran: From: Khadija Kamran The Free Software Foundation moved to a new address and some sources in QEMU referred to their old location. The address should be updated and replaced to a pointer to ... replaced by a pointer

Re: [PATCH v2 6/7] CI: Stop building docs on centos8

2023-02-20 Thread Markus Armbruster
John Snow writes: > On Tue, Feb 14, 2023 at 12:26 PM Kevin Wolf wrote: >> >> Am 14.02.2023 um 15:03 hat Paolo Bonzini geschrieben: >> > In the case of Python the issue is not the interpreter per se, though >> > there are a couple new feature in Python 3.7 that are quite nice (for >> > example im

[PATCH v2 1/4] linux-user: fix timerfd read endianness conversion

2023-02-20 Thread Mathis Marion
From: Mathis Marion When reading the expiration count from a timerfd, the endianness of the 64bit value read is the one of the host, just as for eventfds. Signed-off-by: Mathis Marion --- linux-user/fd-trans.c | 10 +++--- linux-user/fd-trans.h | 1 + linux-user/syscall.c | 8 ++--

[PATCH v2 0/4] Missing endianness conversions in user mode

2023-02-20 Thread Mathis Marion
From: Mathis Marion For a bit of context, I was trying to test a network border router [1] daemon using the MIPS architecture (see [2]). I didn't have access to real MIPS hardware so I figured I would emulate it using QEMU user mode. I ran into a couple of problems all related to endianness conve

[PATCH v2 4/4] linux-user: handle netlink flag NLA_F_NESTED

2023-02-20 Thread Mathis Marion
From: Mathis Marion Newer kernel versions require this flag to be present contrary to older ones. Depending on the libnl version it is added or not. Typically when using rtnl_link_inet6_set_addr_gen_mode, the netlink packet generated may contain the following attribute: with libnl 3.4 {nla_l

[PATCH v2 2/4] linux-user: fix sockaddr_in6 endianness

2023-02-20 Thread Mathis Marion
From: Mathis Marion Fields sin6_flowinfo and sin6_scope_id use the host byte order, so there is a conversion to be made when host and target endianness differ. Signed-off-by: Mathis Marion --- linux-user/syscall.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/linux-user/syscall.c b

[PATCH v2 3/4] linux-user: add target to host netlink conversions

2023-02-20 Thread Mathis Marion
From: Mathis Marion Added conversions for: - IFLA_MTU - IFLA_TXQLEN - IFLA_AF_SPEC AF_INET6 IFLA_INET6_ADDR_GEN_MODE These relate to the libnl functions rtnl_link_set_mtu, rtnl_link_set_txqlen, and rtnl_link_inet6_set_addr_gen_mode. Signed-off-by: Mathis Marion --- linux-user/fd-trans.c | 62 +

Re: [PATCH v1 3/4] linux-user: add target to host netlink conversions

2023-02-20 Thread Philippe Mathieu-Daudé
On 20/2/23 09:24, Mathis MARION wrote: On 20/02/2023 08:22, Philippe Mathieu-Daudé wrote: On 17/2/23 17:35, Mathis Marion wrote: From: Mathis Marion Added conversions for: - IFLA_MTU - IFLA_TXQLEN - IFLA_AF_SPEC AF_INET6 IFLA_INET6_ADDR_GEN_MODE These relate to the libnl functions rtnl_link_s

Re: [PATCH v2 3/4] linux-user: add target to host netlink conversions

2023-02-20 Thread Philippe Mathieu-Daudé
On 20/2/23 09:58, Mathis Marion wrote: From: Mathis Marion Added conversions for: - IFLA_MTU - IFLA_TXQLEN - IFLA_AF_SPEC AF_INET6 IFLA_INET6_ADDR_GEN_MODE These relate to the libnl functions rtnl_link_set_mtu, rtnl_link_set_txqlen, and rtnl_link_inet6_set_addr_gen_mode. Signed-off-by: Mathis

Re: [PATCH v2 2/4] linux-user: fix sockaddr_in6 endianness

2023-02-20 Thread Philippe Mathieu-Daudé
On 20/2/23 09:58, Mathis Marion wrote: From: Mathis Marion Fields sin6_flowinfo and sin6_scope_id use the host byte order, so there is a conversion to be made when host and target endianness differ. Signed-off-by: Mathis Marion --- linux-user/syscall.c | 6 ++ 1 file changed, 6 inserti

Re: [PATCH v2 06.5/18] hw/ide/piix: Allow using PIIX3-IDE as standalone PCI function

2023-02-20 Thread Gerd Hoffmann
On Mon, Feb 20, 2023 at 09:00:44AM +0100, Philippe Mathieu-Daudé wrote: > In order to allow Frankenstein uses such plugging a PIIX3 > IDE function on a ICH9 chipset (which already exposes AHCI > ports...) as: > > $ qemu-system-x86_64 -M q35 -device piix3-ide > > add a kludge to automatically wi

[PATCH v2 11/24] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq()

2023-02-20 Thread Philippe Mathieu-Daudé
ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_set_irq/ide_bus_set_irq/g' \ $(git grep -l ide_set_irq) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-1

[PATCH v2 09/24] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h'

2023-02-20 Thread Philippe Mathieu-Daudé
The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-9-phi...@linaro.org> Reviewed-by: Richard Henderson --- include/hw/ide/internal.h | 2 +- 1 file

[PATCH v2 01/24] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes"

2023-02-20 Thread Philippe Mathieu-Daudé
From: John Snow I have not been able to give these devices the love they need for a while now. Update the maintainers file to reflect the truth of the matter. Signed-off-by: John Snow Message-Id: <20230206182544.77-1-js...@redhat.com> Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-

[PATCH v2 13/24] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb

2023-02-20 Thread Philippe Mathieu-Daudé
ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \ $(git grep -l ide_register_restart_cb) Signed-off-by: Phi

[PATCH v2 10/24] hw/ide: Un-inline ide_set_irq()

2023-02-20 Thread Philippe Mathieu-Daudé
Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-10-phi...@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 1 + hw/ide/core.c | 8 hw/ide/ich.c | 1 + hw/ide/macio.c

[PATCH v2 14/24] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd()

2023-02-20 Thread Philippe Mathieu-Daudé
ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.2

[PATCH v2 00/24] hw/ide: QOM/QDev housekeeping

2023-02-20 Thread Philippe Mathieu-Daudé
Missing review: 2, 17, 20 Since v1: - addressed review comments John, can I get your formal Ack? Thanks, Phil. Bernhard Beschow (1): hw/ide/pci: Unexport bmdma_active_if() Fiona Ebner (1): hw/ide/ahci: trace ncq write command as write instead of read John Snow (1): MAINTAINERS: Mark ID

[PATCH v2 12/24] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive()

2023-02-20 Thread Philippe Mathieu-Daudé
ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \ $(git grep -wl ide_create_drive) Signed-off-by: Philippe Mathieu-Daudé Message-I

[PATCH v2 23/24] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus

2023-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-21-phi...@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index b74f1c77c

[PATCH v2 16/24] hw/ide: Rename idebus_active_if() -> ide_bus_active_if()

2023-02-20 Thread Philippe Mathieu-Daudé
idebus_active_if() operates on a IDEBus; rename it as ide_bus_active_if() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/idebus_active_if/ide_bus_active_if/g' \ $(git grep -l idebus_active_if) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <202

[PATCH v2 02/24] hw/ide/mmio: Use CamelCase for MMIO_IDE state name

2023-02-20 Thread Philippe Mathieu-Daudé
Following docs/devel/style.rst guidelines, rename MMIOIDEState as MmioIdeState. Having the structure name and its typedef named equally, we can manually convert from the old DECLARE_INSTANCE_CHECKER() macro to the more recent OBJECT_DECLARE_SIMPLE_TYPE(). Note, due to that name mismatch, this mac

[PATCH v2 15/24] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq()

2023-02-20 Thread Philippe Mathieu-Daudé
ide_init2() initializes an IDEBus, and sets its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq(). Mechanical change using: $ sed -i -e 's/ide_init2/ide_bus_init_output_irq/g' \ $(git grep -l ide_init2) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112

[PATCH v2 22/24] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg

2023-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-20-phi...@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 5b1455e232..b74f1c77c4 100644 ---

[PATCH v2 20/24] hw/ide/pci: Unexport bmdma_active_if()

2023-02-20 Thread Philippe Mathieu-Daudé
From: Bernhard Beschow The function is only used inside ide/pci.c, so doesn't need to be exported. Signed-off-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/pci.c | 6 ++ include/hw/ide/pci.h | 6 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff

[PATCH v2 21/24] hw/ide/piix: Remove unused includes

2023-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-19-phi...@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index fc44c261cc..5b1455e232 100644 --- a/hw/ide/

[PATCH v2 18/24] hw/ide: Rename ISA specific ide_init_ioport -> ide_bus_init_ioport_isa

2023-02-20 Thread Philippe Mathieu-Daudé
Rename ide_init_ioport() as ide_bus_init_ioport_isa() to make explicit it expects an ISA device. Move the declaration to "hw/ide/isa.h" where it belongs. Message-Id: <20230215161641.32663-13-phi...@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/iopor

[PATCH v2 04/24] hw/ide/isa: Rename isairq -> irqnum

2023-02-20 Thread Philippe Mathieu-Daudé
Rename ISAIDEState::isairq as 'irqnum' to emphasize this is not a qemu_irq object but the number (index) of an ISA IRQ. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-5-phi...@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow --- hw/ide/isa.c

[PATCH v2 03/24] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h'

2023-02-20 Thread Philippe Mathieu-Daudé
"hw/ide.h" is a mixed bag of lost IDE declarations. Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM declarations to a new "hw/ide/mmio.h" header. Document the SysBus interface. Message-Id: <20230215112712.23110-4-phi...@linaro.org> Reviewed-by: Alex Bennée Reviewed-by: Richard Henderso

Re: Optimization for the virtio-balloon feature on the ARM platform

2023-02-20 Thread David Hildenbrand
On 20.02.23 02:33, Yangming via wrote: Dear QEMU maintainers, I am writing to discuss a possible optimization for the virtio-balloon feature on the ARM platform. The ‘virtio_balloon_set_config’ function is called frequently during the balloon inflation process, and its subfunction ‘get_curren

[PATCH v2 17/24] hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h'

2023-02-20 Thread Philippe Mathieu-Daudé
ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE declarations. In order to remove this (almost) pointless header soon, move these declarations to "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c

[PATCH v2 05/24] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h'

2023-02-20 Thread Philippe Mathieu-Daudé
"hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Message-Id: <20230215112712.23110-5-phi...@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Da

[PATCH v2 06/24] hw/ide/isa: Remove intermediate ISAIDEState::irq variable

2023-02-20 Thread Philippe Mathieu-Daudé
The intermediate ISAIDEState::irq variable just add noise, remove it. Message-Id: <20230215112712.23110-6-phi...@linaro.org> Reviewed-by: Bernhard Beschow Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

[PATCH v2 24/24] hw/ide/ahci: trace ncq write command as write instead of read

2023-02-20 Thread Philippe Mathieu-Daudé
From: Fiona Ebner Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") Signed-off-by: Fiona Ebner Reviewed-by: Alex Bennée Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230217103130.42077-1-f.eb...@proxmox.com> Signed-off-by: Philippe Mathieu-Daudé --- h

[PATCH v2 19/24] hw/ide/ioport: Remove unnecessary includes

2023-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-17-phi...@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ioport.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c index 7156c465da..d869f8018a 100644 --- a/hw/ide/iopor

Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-20 Thread Markus Armbruster
Thomas Huth writes: > On 17/02/2023 16.06, Daniel P. Berrangé wrote: >> On Fri, Feb 17, 2023 at 02:26:31PM +0100, Thomas Huth wrote: > ... >> I'm also not so comfortable dropping the only version of SLES that we >> explicitly target, when we don't know when their new major release >> will arrive.

[PATCH v2 08/24] hw/ide: Remove unused 'qapi/qapi-types-run-state.h'

2023-02-20 Thread Philippe Mathieu-Daudé
Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-8-phi...@linaro.org> Reviewed-by: Richard Henderson --- include/hw/ide/internal.h | 1 - 1 file

[PATCH v2 07/24] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion

2023-02-20 Thread Philippe Mathieu-Daudé
Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-7-phi...@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/atapi.c| 1 + include/hw/ide/internal.h

[PATCH] hw/i386/xen: Remove unused 'hw/ide.h' include from header

2023-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/xen/xen_platform.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index 66e6de31a6..3795a203d4 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -25,7 +25,6 @@

Re: [PATCH v3 08/10] qmp: teach 'getfd' to import sockets on win32

2023-02-20 Thread Daniel P . Berrangé
On Mon, Feb 20, 2023 at 09:26:24AM +0100, Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi Markus > > > > On Fri, Feb 17, 2023 at 1:49 PM Markus Armbruster wrote: > >> > >> marcandre.lur...@redhat.com writes: > >> > >> > From: Marc-André Lureau > >> > > >> > A process with enough c

Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-20 Thread Markus Armbruster
Paolo Bonzini writes: > Il ven 17 feb 2023, 19:47 Thomas Huth ha scritto: > >> On 17/02/2023 16.59, Daniel P. Berrangé wrote: >> > On Fri, Feb 17, 2023 at 04:55:49PM +0100, Markus Armbruster wrote: >> >> > The cost/benefit tradeoff of dropping the platforms entirely >> > is not obviously fa

Re: [PATCH v2 2/4] linux-user: fix sockaddr_in6 endianness

2023-02-20 Thread Philippe Mathieu-Daudé
On 20/2/23 10:09, Mathis MARION wrote: On 20/02/2023 10:06, Philippe Mathieu-Daudé wrote: >> On 20/2/23 09:58, Mathis Marion wrote: From: Mathis Marion Fields sin6_flowinfo and sin6_scope_id use the host byte order, so there is a conversion to be made when host and target endianness differ.

Re: [RFC PATCH] docs/about/build-platforms: Refine the distro support policy

2023-02-20 Thread Daniel P . Berrangé
On Fri, Feb 17, 2023 at 07:47:51PM +0100, Thomas Huth wrote: > On 17/02/2023 16.59, Daniel P. Berrangé wrote: > > On Fri, Feb 17, 2023 at 04:55:49PM +0100, Markus Armbruster wrote: > > > The cost/benefit tradeoff of dropping the platforms entirely > > is not obviously favourable when we don't

Re: [PATCH 3/5] qmp: Added the helper stamp check.

2023-02-20 Thread Daniel P . Berrangé
On Sun, Feb 19, 2023 at 06:20:58PM +0200, Andrew Melnychenko wrote: > Added a function to check the stamp in the helper. > eBPF helper should have a special symbol that generates during the build. > QEMU checks the helper and determines that it fits, so the helper > will produce proper output. I t

Re: [PATCH v3 08/10] qmp: teach 'getfd' to import sockets on win32

2023-02-20 Thread Marc-André Lureau
Hi On Mon, Feb 20, 2023 at 12:26 PM Markus Armbruster wrote: > > Marc-André Lureau writes: > > > Hi Markus > > > > On Fri, Feb 17, 2023 at 1:49 PM Markus Armbruster wrote: > >> > >> marcandre.lur...@redhat.com writes: > >> > >> > From: Marc-André Lureau > >> > > >> > A process with enough capa

Re: [PATCH v2 06.5/18] hw/ide/piix: Allow using PIIX3-IDE as standalone PCI function

2023-02-20 Thread Philippe Mathieu-Daudé
On 20/2/23 10:10, Gerd Hoffmann wrote: On Mon, Feb 20, 2023 at 09:00:44AM +0100, Philippe Mathieu-Daudé wrote: In order to allow Frankenstein uses such plugging a PIIX3 IDE function on a ICH9 chipset (which already exposes AHCI ports...) as: $ qemu-system-x86_64 -M q35 -device piix3-ide add

Re: [RFC v5 0/3] migration: reduce time of loading non-iterable vmstate

2023-02-20 Thread Chuang Xu
Hi, Juan On 2023/2/16 上午3:10, Juan Quintela wrote: Chuang Xu wrote: In this version: Hi I had to drop this. It breaks migration of dbus-vmstate. .[K144/179 qemu:qtest+qtest-x86_64 / qtest-x86_64/virtio-net-failover ERROR 5.66s killed by signal 6 SIGABRT G_TEST_DBU

Re: [PATCH v2 2/4] sysemu/os-win32: fix setjmp/longjmp on windows-arm64

2023-02-20 Thread Pierrick Bouvier
On 2/16/23 21:02, Richard Henderson wrote: On 2/16/23 03:49, Pierrick Bouvier wrote: Windows implementation of setjmp/longjmp is done in C:/WINDOWS/system32/ucrtbase.dll. Alas, on arm64, it seems to *always* perform stack unwinding, which crashes from generated code. By using alternative implem

Re: [PATCH 4/5] ebpf_rss_helper: Added helper for eBPF RSS.

2023-02-20 Thread Daniel P . Berrangé
On Sun, Feb 19, 2023 at 06:20:59PM +0200, Andrew Melnychenko wrote: > Helper program. Loads eBPF RSS program and maps and passes them through unix > socket. > Libvirt may launch this helper and pass eBPF fds to qemu virtio-net. > Also, libbpf dependency for now is exclusively for Linux. > Libbpf i

[PATCH] RISC-V: XTheadMemPair: Remove register restrictions for store-pair

2023-02-20 Thread Christoph Muellner
From: Christoph Müllner The XTheadMemPair does not define any restrictions for store-pair instructions (th.sdd or th.swd). However, the current code enforces the restrictions that are required for load-pair instructions. Let's fix this by removing this code. Signed-off-by: Christoph Müllner ---

Re: [PATCH v2 4/4] target/ppc: fix warning with clang-15

2023-02-20 Thread Pierrick Bouvier
On 2/17/23 18:23, Philippe Mathieu-Daudé wrote: On 16/2/23 14:49, Pierrick Bouvier wrote: When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninit

Re: [PATCH v2 1/4] util/cacheflush: fix cache on windows-arm64

2023-02-20 Thread Pierrick Bouvier
On 2/17/23 16:32, Peter Maydell wrote: On Thu, 16 Feb 2023 at 13:49, Pierrick Bouvier wrote: ctr_el0 access is privileged on this platform and fails as an illegal instruction. Windows does not offer a way to flush data cache from userspace, and only FlushInstructionCache is available in Windo

[PATCH v5 05/16] hw/9pfs: Update the local fs driver to support Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi Update the 9p 'local' file system driver to support Windows, including open, read, write, close, rename, remove, etc. All security models are supported. The mapped (mapped-xattr) security model is implemented using NTFS Alternate Data Stream (ADS) so the 9p export path shall be

[PATCH v5 01/16] hw/9pfs: Add missing definitions for Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi Some definitions currently used by the 9pfs codes are only available on POSIX platforms. Let's add our own ones in preparation to adding 9pfs support for Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- fsdev/file-op-9p.h | 33

[PATCH v5 09/16] hw/9pfs: Disable unsupported flags and features for Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi Some flags and features are not supported on Windows, like mknod, readlink, file mode, etc. Update the codes for Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p.c | 45 ++--- 1 file changed, 38 insertions(+)

[PATCH v5 00/16] hw/9pfs: Add 9pfs support for Windows

2023-02-20 Thread Bin Meng
At present there is no Windows support for 9p file system. This series adds initial Windows support for 9p file system. 'local' file system backend driver is supported on Windows, including open, read, write, close, rename, remove, etc. All security models are supported. The mapped (mapped-xattr)

[PATCH v5 15/16] tests/qtest: virtio-9p-test: Adapt the case for win32

2023-02-20 Thread Bin Meng
From: Guohuai Shi Windows does not provide the getuid() API. Let's create a local one and return a fixed value 0 as the uid for testing. Co-developed-by: Xuzhou Cheng Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- tests/qtest/libqos/virtio-9p-client.h | 7 +

[PATCH v5 02/16] hw/9pfs: Implement Windows specific utilities functions for 9pfs

2023-02-20 Thread Bin Meng
From: Guohuai Shi Windows POSIX API and MinGW library do not provide the NO_FOLLOW flag, and do not allow opening a directory by POSIX open(). This causes all xxx_at() functions cannot work directly. However, we can provide Windows handle based functions to emulate xxx_at() functions (e.g.: opena

[PATCH v5 16/16] meson.build: Turn on virtfs for Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi Enable virtfs configuration option for Windows host. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- meson.build | 10 +- fsdev/meson.build | 1 + hw/9pfs/meson.build | 8 +--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/me

[PATCH v5 12/16] hw/9pfs: Translate Windows errno to Linux value

2023-02-20 Thread Bin Meng
From: Guohuai Shi Some of Windows error numbers have different value from Linux ones. For example, ENOTEMPTY is defined to 39 in Linux, but is defined to 41 in Windows. So deleting a directory from a Linux guest on top of QEMU from a Windows host complains: # rmdir tmp rmdir: 'tmp': Unknown

[PATCH v5 10/16] hw/9pfs: Update v9fs_set_fd_limit() for Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi Use _getmaxstdio() to set the fd limit on Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 768f20f2ac..6b2977f637 10064

[PATCH v5 13/16] fsdev: Disable proxy fs driver on Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi We don't plan to support 'proxy' file system driver for 9pfs on Windows. Disable it for Windows build. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- fsdev/qemu-fsdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fsdev/qemu-fsdev.c b/fsdev/qemu-fsdev.c ind

[PATCH v5 04/16] hw/9pfs: Implement Windows specific xxxdir() APIs

2023-02-20 Thread Bin Meng
From: Guohuai Shi This commit implements Windows specific xxxdir() APIs for safety directory access. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p-util.h | 6 + hw/9pfs/9p-util-win32.c | 443 2 files changed, 449 insertions

[PATCH v5 11/16] hw/9pfs: Add Linux error number definition

2023-02-20 Thread Bin Meng
From: Guohuai Shi When using 9p2000.L protocol, the errno should use the Linux errno. Currently magic numbers with comments are used. Replace these with macros for future expansion. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p-linux-errno.h | 151

[PATCH v5 06/16] hw/9pfs: Support getting current directory offset for Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi On Windows 'struct dirent' does not have current directory offset. Update qemu_dirent_off() to support Windows. While we are here, add a build time check to error out if a new host does not implement this helper. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9p

[PATCH 2/3] Fix issue #761: Broken scaling with gtk, gl=on on a hidpi display

2023-02-20 Thread liuyujun
Signed-off-by: Yujun --- ui/gtk-egl.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index e84431790c..15b3d64233 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -66,13 +66,14 @@ void gd_egl_draw(VirtualConsole *vc) #ifdef CONF

[PATCH v5 07/16] hw/9pfs: Update helper qemu_stat_rdev()

2023-02-20 Thread Bin Meng
As Windows host does not have stat->st_rdev field, we use the first 3 characters of the root path to build a device id. Co-developed-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p-util.h | 22 +++--- hw/9pfs/9p-util-win32.c | 18 ++ hw/9pfs/9p.c

[PATCH v5 03/16] hw/9pfs: Replace the direct call to xxxdir() APIs with a wrapper

2023-02-20 Thread Bin Meng
From: Guohuai Shi xxxdir() APIs are not safe on Windows host. For future extension to Windows, let's replace the direct call to xxxdir() APIs with a wrapper. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p-util.h | 14 ++ hw/9pfs/9p-local.c | 12 ++-- 2

[PATCH v5 08/16] hw/9pfs: Add a helper qemu_stat_blksize()

2023-02-20 Thread Bin Meng
As Windows host does not have stat->st_blksize field, we use the one we calculated in init_win32_root_directory(). Add a helper qemu_stat_blksize() and use it to avoid direct access to stat->st_blksize. Co-developed-by: Guohuai Shi Signed-off-by: Bin Meng --- hw/9pfs/9p-util.h | 13

[PATCH v5 14/16] hw/9pfs: Update synth fs driver for Windows

2023-02-20 Thread Bin Meng
From: Guohuai Shi Adapt synth fs driver for Windows in preparation to running qtest 9p testing on Windows. Signed-off-by: Guohuai Shi Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- hw/9pfs/9p-synth.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw

[PATCH 3/3] Fix zoom scale

2023-02-20 Thread liuyujun
Signed-off-by: Yujun --- ui/gtk.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 1b43ed31e3..c4c8339d91 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1482,9 +1482,10 @@ static void gd_menu_zoom_fixed(GtkMenuItem *item, void *opaque) { G

[PATCH 1/3] This reverts commit f14aab420c58b57e07189d6d9e6d3fbfab4761a6.

2023-02-20 Thread liuyujun
This commit was originally tested on gtk/gl which corrected behavior there. Turns out, the OpenGL texture representing the virtual console was being rendered in the incorrect place and not that the cursor was incorrectly being handled. Signed-off-by: Alexander Orzechowski Signed-off-by: Yujun --

Re: [PATCH RFC 0/7] revert RNG seed mess

2023-02-20 Thread Daniel P . Berrangé
On Fri, Feb 10, 2023 at 11:32:58AM +, Daniel P. Berrangé wrote: > On Wed, Feb 08, 2023 at 04:12:23PM -0500, Michael S. Tsirkin wrote: > > All attempts to fix up passing RNG seed via setup_data entry failed. > > Let's just rip out all of it. We'll start over. > > > > > > Warning: all I did wa

Re: [PATCH v3 08/10] qmp: teach 'getfd' to import sockets on win32

2023-02-20 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Mon, Feb 20, 2023 at 12:26 PM Markus Armbruster wrote: >> >> Marc-André Lureau writes: >> >> > Hi Markus >> > >> > On Fri, Feb 17, 2023 at 1:49 PM Markus Armbruster >> > wrote: >> >> >> >> marcandre.lur...@redhat.com writes: >> >> >> >> > From: Marc-André

Re: [PATCH] RISC-V: XTheadMemPair: Remove register restrictions for store-pair

2023-02-20 Thread LIU Zhiwei
On 2023/2/20 17:56, Christoph Muellner wrote: From: Christoph Müllner The XTheadMemPair does not define any restrictions for store-pair instructions (th.sdd or th.swd). However, the current code enforces the restrictions that are required for load-pair instructions. Let's fix this by removing

[PATCH] MAINTAINERS: Add section for overall sensors

2023-02-20 Thread Philippe Mathieu-Daudé
Sensor devices depend on some bus, not a particular board. While merged for a particular board, sensor devices don't depend on it. They depend on a bus technology, and can be used by any board exposing such bus. In order to help merging sensor patches, when they fall out of a particular board tree

[PATCH v3 0/4] Adds support for running QEMU natively on windows-arm64

2023-02-20 Thread Pierrick Bouvier
Since v2: - Delete superfluous comment on unreachable code - Fix style for multiline comments Since v1: - Comment why we use generic version of flush_idcache_range - Ensure __mingw_setjmp/longjmp are available using meson - Fix a warning by calling g_assert_not_reached() instead of initializing

[PATCH v3 1/4] util/cacheflush: fix cache on windows-arm64

2023-02-20 Thread Pierrick Bouvier
ctr_el0 access is privileged on this platform and fails as an illegal instruction. Windows does not offer a way to flush data cache from userspace, and only FlushInstructionCache is available in Windows API. The generic implementation of flush_idcache_range uses, __builtin___clear_cache, which al

[PATCH v3 2/4] sysemu/os-win32: fix setjmp/longjmp on windows-arm64

2023-02-20 Thread Pierrick Bouvier
Windows implementation of setjmp/longjmp is done in C:/WINDOWS/system32/ucrtbase.dll. Alas, on arm64, it seems to *always* perform stack unwinding, which crashes from generated code. By using alternative implementation built in mingw, we avoid doing stack unwinding and this fixes crash when callin

[PATCH v3 3/4] qga/vss-win32: fix warning for clang++-15

2023-02-20 Thread Pierrick Bouvier
Reported when compiling with clang-windows-arm64. ../qga/vss-win32/install.cpp:537:9: error: variable 'hr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!(ControlService(service, SERVICE_CONTROL_STOP, NULL))) { ^

[PATCH v3 4/4] target/ppc: fix warning with clang-15

2023-02-20 Thread Pierrick Bouvier
When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninitialized value, but clang seems unhappy with assert(0) definition. Change code to g_assert_no

[PATCH v2] TCG plugin API extension to read guest memory content by an address

2023-02-20 Thread Mikhail Tyutin
TCG plugin API extension to read guest memory content. qemu_plugin_vcpu_read_phys_mem() function can be used by TCG plugin inside of qemu_plugin_vcpu_mem_cb_t callback to adjust received address according to internal memory mappings and read content of guest memory. Works for both user-level and

Re: [PATCH 3/4] win32: stop mixing SOCKET and file descriptor space

2023-02-20 Thread Marc-André Lureau
Hi On Mon, Feb 13, 2023 at 12:51 AM wrote: > > From: Marc-André Lureau > > Until now, a win32 SOCKET handle is often cast to an int file > descriptor, as this is what other OS use for sockets. When necessary, > QEMU eventually queries whether it's a socket with the help of > fd_is_socket(). Howe

Re: [PATCH v3 0/4] Adds support for running QEMU natively on windows-arm64

2023-02-20 Thread Philippe Mathieu-Daudé
Hi Pierrick, On 20/2/23 12:12, Pierrick Bouvier wrote: Since v2: - Delete superfluous comment on unreachable code - Fix style for multiline comments Since v1: - Comment why we use generic version of flush_idcache_range - Ensure __mingw_setjmp/longjmp are available using meson - Fix a warning

Re: [PATCH 2/2] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-02-20 Thread Jonathan Cameron via
On Fri, 17 Feb 2023 06:08:57 -0500 Gregory Price wrote: > On Fri, Feb 17, 2023 at 04:16:17PM +, Jonathan Cameron via wrote: > > On Tue, 31 Jan 2023 16:38:47 + > > Jonathan Cameron via wrote: > > > > > From: Gregory Price > > > > > > This commit enables each CXL Type-3 device to cont

[PATCH 1/8] hw/gpio/max7310: Simplify max7310_realize()

2023-02-20 Thread Philippe Mathieu-Daudé
Since &I2C_SLAVE(dev)->qdev == dev, no need to go back and forth with QOM type casting. Directly use 'dev'. Signed-off-by: Philippe Mathieu-Daudé --- hw/gpio/max7310.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c index db6b5e3d76.

[PATCH 6/8] hw/char/cmsdk-apb-uart: Open-code cmsdk_apb_uart_create()

2023-02-20 Thread Philippe Mathieu-Daudé
cmsdk_apb_uart_create() is only used twice in the same file. Open-code it. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/mps2.c| 41 +--- include/hw/char/cmsdk-apb-uart.h | 34 -- 2 files changed, 27 insertions(+), 48 del

[PATCH 3/8] hw/char/pl011: Open-code pl011_luminary_create()

2023-02-20 Thread Philippe Mathieu-Daudé
pl011_luminary_create() is only used for the Stellaris board, open-code it. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/stellaris.c | 11 --- include/hw/char/pl011.h | 17 - 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/hw/arm/stellaris.c b/hw/

[PATCH 2/8] hw/char/pl011: Un-inline pl011_create()

2023-02-20 Thread Philippe Mathieu-Daudé
pl011_create() is only used in DeviceRealize handlers, not a hot-path. Inlining is not justified. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/pl011.c | 17 + include/hw/char/pl011.h | 19 +-- 2 files changed, 18 insertions(+), 18 deletions(-) diff -

[PATCH 0/8] hw/arm: Cleanups around QOM style

2023-02-20 Thread Philippe Mathieu-Daudé
- Reduce "hw/qdev-properties.h" inclusions - Open-code various QDev helpers used few times - Use QOM cast macro when relevant Philippe Mathieu-Daudé (8): hw/gpio/max7310: Simplify max7310_realize() hw/char/pl011: Un-inline pl011_create() hw/char/pl011: Open-code pl011_luminary_create() hw/

[PATCH 8/8] hw/intc/armv7m_nvic: Use QOM cast CPU() macro

2023-02-20 Thread Philippe Mathieu-Daudé
Avoid accessing 'parent_obj' directly. Signed-off-by: Philippe Mathieu-Daudé --- hw/intc/armv7m_nvic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 1f7763964c..2fe5b1c4e1 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/

[PATCH 4/8] hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type

2023-02-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/char/xilinx_uartlite.c | 4 +--- include/hw/char/xilinx_uartlite.h | 6 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index 99b9a6f851..180bb97202 100644 --- a/hw/cha

  1   2   3   4   5   >