[PATCH v4 4/6] net/eth: Check rt_hdr size before casting to ip6_ext_hdr

2021-03-09 Thread Philippe Mathieu-Daudé
Do not cast our ip6_ext_hdr pointer to ip6_ext_hdr_routing if there isn't enough data in the buffer for a such structure. This fix a 2 bytes buffer overrun in eth_parse_ipv6_hdr() reported by QEMU fuzzer: $ cat << EOF | ./qemu-system-i386 -M pc-q35-5.0 \ -accel qtest -monitor none \ -se

Re: [PATCH 2/3] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:53PM -0300, Wainer dos Santos Moschetta wrote: > The tests that are already tagged with "cpu:VALUE" don't need to add > "-cpu VALUE" to the list of arguments of the vm object because the > avocado_qemu > framework is able to handle it automatically. So this adjust tho

[PATCH v4 6/6] net/eth: Return earlier in _eth_get_rss_ex_dst_addr()

2021-03-09 Thread Philippe Mathieu-Daudé
Slightly simplify _eth_get_rss_ex_dst_addr() by returning earlier. Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/net/eth.c b/net/eth.c index e984edcfb0b..b44439d31c5 100644 --- a/net/eth.c +++ b/net/eth.c

Re: [PATCH 1/3] tests/acceptance: Automatic set -cpu to the test vm

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:52PM -0300, Wainer dos Santos Moschetta wrote: > This introduces a new feature to the functional tests: automatic setting of > the '-cpu VALUE' option to the created vm if the test is tagged with > 'cpu:VALUE'. The 'cpu' property is made available to the test object as

Re: [PULL 00/18] testing, docs, semihosting move and guest-loader

2021-03-09 Thread Alex Bennée
Peter Maydell writes: > On Mon, 8 Mar 2021 at 13:51, Alex Bennée wrote: >> >> The following changes since commit 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1: >> >> Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' >> into staging (2021-03-05 19:04:47 +) >> >> are ava

Re: [PATCH v3 3/4] fdc: Inline fdctrl_connect_drives() into fdctrl_realize_common()

2021-03-09 Thread Richard Henderson
On 3/9/21 8:12 AM, Markus Armbruster wrote: @@ -2565,6 +2551,7 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl, Error **errp) { int i, j; +FDrive *drive; static int command_tables_inited = 0; if (fdctrl->fallbac

Re: [PATCH] tests/migration: fix unix socket migration

2021-03-09 Thread Wainer dos Santos Moschetta
On 3/9/21 1:00 PM, huang...@chinatelecom.cn wrote: From: Hyman The test aborts and error message as the following be throwed: "No such file or directory: '/var/tmp/qemu-migrate-{pid}.migrate", when the unix socket migration test nearly done. The reason is qemu removes the unix socket file aft

[PATCH 0/3] hw/usb: Extract Extract VT82C686 UHCI PCI function into new unit

2021-03-09 Thread Philippe Mathieu-Daudé
The VT82C686 UHCI PCI function should not be exposed it the VT82C686 south bridge is not present. Extract it out of hcd-uhci.c Following this discussion: https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg02923.html Philippe Mathieu-Daudé (3): hw/southbridge: Add missing Kconfig dependenc

[PATCH v4 3/6] net/eth: Initialize input_size variable earlier

2021-03-09 Thread Philippe Mathieu-Daudé
Initialize the 'input_size' variable earlier to make the next commit easier to review. Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/net/eth.c b/net/eth.c index 6a5a1d04e0b..77af2b673bb 100644 --- a/net/eth.c +++ b/net/e

[PATCH 3/3] hw/usb: Extract VT82C686 UHCI PCI function into a new unit

2021-03-09 Thread Philippe Mathieu-Daudé
Extract the VT82C686 PCI UHCI function into a new unit so it is only build when the VT82C686 south bridge is selected. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-uhci.c | 23 hw/usb/vt82c686-uhci-pci.c | 43 ++ MAINTAINE

Re: [PATCH v3] target/m68k: implement rtr instruction

2021-03-09 Thread Laurent Vivier
Le 07/03/2021 à 22:25, Laurent Vivier a écrit : > This is needed to boot MacOS ROM. > > Pull the condition code and the program counter from the stack. > > Operation: > > (SP) -> CCR > SP + 2 -> SP > (SP) -> PC > SP + 4 -> SP > > This operation is not privileged. > > Reported-b

[PATCH 1/3] hw/southbridge: Add missing Kconfig dependency VT82C686 on USB_UHCI

2021-03-09 Thread Philippe Mathieu-Daudé
The VT82C686 south bridge provides a USB UHCI bus via a PCI function. Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig index c7f07854f7e..2691eae2f0c 100644 --- a/hw/isa/Kconfig +++ b/hw/isa/Kconfig @@ -4

Re: [PATCH v2 3/3] target/m68k: add M68K_FEATURE_UNALIGNED_DATA feature

2021-03-09 Thread Laurent Vivier
Le 08/03/2021 à 13:11, Mark Cave-Ayland a écrit : > According to the M68040UM Appendix D the requirement for data accesses to be > word aligned is only for the 68000, 68008 and 68010 CPUs. Later CPUs from the > 68020 onwards will allow unaligned data accesses but at the cost of being less > efficie

Re: [PATCH v2 2/2] accel: kvm: Add aligment assert for kvm_log_clear_one_slot

2021-03-09 Thread Paolo Bonzini
On 09/03/21 17:26, Peter Maydell wrote: The documentation comment for memory_region_snapshot_and_clear_dirty() says: * The dirty bitmap region which gets copyed into the snapshot (and * cleared afterwards) can be larger than requested. The boundaries * are rounded up/down That is, it is t

Re: [RFC v5 24/36] target/arm: move TCG cpu and models inside tcg/

2021-03-09 Thread Claudio Fontana
On 3/9/21 3:25 PM, Claudio Fontana wrote: > to avoid confusion, move the TCG-only 32bit cpu models definitions > inside tcg/tcg-cpu-models.c > > The 64bit cpu models (a53/a57/a72/max) remain in cpu64.c . > > Signed-off-by: Claudio Fontana This clearly needs rewording. It is about moving the ex

Re: [PATCH v2] MAINTAINERS: Fix the location of tools manuals

2021-03-09 Thread Thomas Huth
On 09/03/2021 18.41, Wainer dos Santos Moschetta wrote: Hi, Any issue that prevent this of being queued? Maybe it's just not clear who should take the patch ... CC:-ing qemu-trivial and qemu-block now, since I think it could go through the trivial or block tree. On 2/4/21 10:59 AM, Philipp

[PATCH v7 0/5] m68k: add Virtual M68k Machine

2021-03-09 Thread Laurent Vivier
The Quadra 800 machine is very limited to run linux, it manages only 1 GiB of memory and only some specific interfaces. The Virtual M68k Machine is based on Goldfish interfaces defined by Google for Android simulator. It uses Goldfish-rtc (timer and RTC), Goldfish-pic (PIC) and Goldfish-tty (for s

Re: [PATCH 0/3] tests/acceptance: Handle tests with "cpu" tag

2021-03-09 Thread Cleber Rosa
On Wed, Feb 24, 2021 at 06:26:51PM -0300, Wainer dos Santos Moschetta wrote: > Currently the acceptance tests tagged with "machine" have the "-M TYPE" > automatically added to the list of arguments of the QEMUMachine object. > In other words, that option is passed to the launched QEMU. On this > se

[PATCH v7 5/5] m68k: add Virtual M68k Machine

2021-03-09 Thread Laurent Vivier
The machine is based on Goldfish interfaces defined by Google for Android simulator. It uses Goldfish-rtc (timer and RTC), Goldfish-pic (PIC) and Goldfish-tty (for serial port and early tty). The machine is created with 128 virtio-mmio bus, and they can be used to use serial console, GPU, disk, NI

[PATCH v7 1/5] char: add goldfish-tty

2021-03-09 Thread Laurent Vivier
Implement the goldfish tty device as defined in https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT and based on the kernel driver code: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/goldfish.c Signed-off-by:

Re: [PATCH] hw/arm/virt: KVM: The IPA lower bound is 32

2021-03-09 Thread Marc Zyngier
Hi Andrew, On Tue, 09 Mar 2021 18:59:39 +, Andrew Jones wrote: > > The virt machine already checks KVM_CAP_ARM_VM_IPA_SIZE to get the > upper bound of the IPA size. If that bound is lower than the highest > possible GPA for the machine, then QEMU will error out. However, the > IPA is set to

Re: [PATCH v4 00/78] target/arm: Implement SVE2

2021-03-09 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210309162041.23124-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210309162041.23124-1-richard.hender...@linaro.org Subject: [PATCH v4 00/78] ta

[PATCH v7 2/5] intc: add goldfish-pic

2021-03-09 Thread Laurent Vivier
Implement the goldfish pic device as defined in https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- include/h

Re: [PATCH v2] linux-user: Fix executable page of /proc/self/maps

2021-03-09 Thread Laurent Vivier
Le 08/03/2021 à 10:19, Nicolas Surbayrole a écrit : > The guest binary and libraries are not always map with the > executable bit in the host process. The guest may read a > /proc/self/maps with no executable address range. The > perm fields should be based on the guest permission inside > Qemu. >

Re: [PATCH v2 1/3] target/m68k: don't set SSW ATC bit for physical bus errors

2021-03-09 Thread Laurent Vivier
Le 08/03/2021 à 13:11, Mark Cave-Ayland a écrit : > If a NuBus slot doesn't contain a card, the Quadra hardware generates a > physical > bus error if the CPU attempts to access the slot address space. Both Linux and > MacOS use a separate bus error handler during NuBus accesses in order to > dete

[PATCH v7 3/5] m68k: add an interrupt controller

2021-03-09 Thread Laurent Vivier
A (generic) copy of the GLUE device we already have for q800 to use with the m68k-virt machine. The q800 one would disappear in the future as q800 uses actually the djMEMC controller. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Phi

Re: [PATCH 3/3] hw/usb: Extract VT82C686 UHCI PCI function into a new unit

2021-03-09 Thread BALATON Zoltan
On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: Extract the VT82C686 PCI UHCI function into a new unit so it is only build when the VT82C686 south bridge is selected. I'm not sure it's worth separating just this one device from the other similar usb devices when the others that are also part

Re: [PATCH v2 2/3] target/m68k: reformat m68k_features enum

2021-03-09 Thread Laurent Vivier
Le 08/03/2021 à 13:11, Mark Cave-Ayland a écrit : > Move the feature comment from after the feature name to the preceding line to > allow for longer feature names and descriptions without hitting the 80 > character line limit. > > Signed-off-by: Mark Cave-Ayland > --- > target/m68k/cpu.h | 66 ++

Re: [PATCH 1/3] hw/southbridge: Add missing Kconfig dependency VT82C686 on USB_UHCI

2021-03-09 Thread BALATON Zoltan
On Tue, 9 Mar 2021, Philippe Mathieu-Daudé wrote: The VT82C686 south bridge provides a USB UHCI bus via a PCI function. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan --- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/isa/Kconfig b/hw/isa/Kconfig in

Re: [PATCH] qemu-common.h: Update copyright string to 2021

2021-03-09 Thread Laurent Vivier
Le 09/03/2021 à 17:22, Peter Maydell a écrit : > Update the common copyright string that we use in > -version reports, About dialogs, etc, to 2021. > > Signed-off-by: Peter Maydell > --- > include/qemu-common.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qem

Re: [PATCH] scsi: Silence gcc warning

2021-03-09 Thread Laurent Vivier
Le 08/03/2021 à 20:54, Eric Blake a écrit : > Adding qemu-trivial in cc. > > On 2/9/21 9:44 AM, Philippe Mathieu-Daudé wrote: >> On 2/9/21 4:23 PM, Eric Blake wrote: >>> On Fedora 33, gcc 10.2.1 notes that scsi_cdb_length(buf) can set >>> len==-1, which in turn overflows g_malloc(): >>> >>> [5/5]

[PATCH v7 4/5] m68k: add a system controller

2021-03-09 Thread Laurent Vivier
Add a system controller for the m68k-virt machine. This controller allows the kernel to power off or reset the machine. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- docs/specs/virt-ctlr.txt| 26

Re: [PATCH v3 09/12] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-03-09 Thread Peter Xu
On Mon, Mar 08, 2021 at 04:05:57PM +0100, David Hildenbrand wrote: > Let's introduce a new set of flags that abstract mmap logic and replace > our current set of bools, to prepare for another flag. > > Signed-off-by: David Hildenbrand > --- > include/qemu/mmap-alloc.h | 17 +++-- > s

Re: [PATCH] stream: Don't crash when node permission is denied

2021-03-09 Thread Eric Blake
On 3/9/21 11:34 AM, Kevin Wolf wrote: > The image streaming block job restricts shared permissions of the nodes > it accesses. This can obviously fail when other users already got these > permissions. &error_abort is therefore wrong and can crash. Handle these > errors gracefully and just fail star

Re: [PATCH 2/4] vhost-user: Convert slave channel to QIOChannelSocket

2021-03-09 Thread Greg Kurz
On Tue, 9 Mar 2021 15:17:21 + Stefan Hajnoczi wrote: > On Mon, Mar 08, 2021 at 01:31:39PM +0100, Greg Kurz wrote: > > +g_autofree int *fd = NULL; > > +size_t fdsize = 0; > > +int i; > > > > /* Read header */ > > iov.iov_base = &hdr; > > iov.iov_len = VHOST_USER_HD

[Bug 1918321] [NEW] [OSS-Fuzz] Issue 31875 megasas: Null-ptr dereference in megasas_finish_dcmd

2021-03-09 Thread Alexander Bulekov
Public bug reported: Hello, == QTest Reproducer == /* * cat << EOF | ./qemu-system-i386 -display none -machine accel=qtest, -m \ * 512M -machine q35 -nodefaults -device megasas -device \ * scsi-cd,drive=null0 -blockdev \ * driver=null-co,read-zeroes=on,node-name=null0 -qtest stdio * outl 0x

Re: [PATCH] hw/arm/virt: KVM: The IPA lower bound is 32

2021-03-09 Thread Andrew Jones
On Tue, Mar 09, 2021 at 07:21:58PM +, Marc Zyngier wrote: > Hi Andrew, > > On Tue, 09 Mar 2021 18:59:39 +, > Andrew Jones wrote: > > > > The virt machine already checks KVM_CAP_ARM_VM_IPA_SIZE to get the > > upper bound of the IPA size. If that bound is lower than the highest > > possibl

Re: [PATCH] hw/elf_ops: Fix a typo

2021-03-09 Thread Laurent Vivier
Le 25/02/2021 à 19:13, Philippe Mathieu-Daudé a écrit : > g_mapped_file_new_from_fd()'s parameter is named 'writable'. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/elf_ops.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/hw/elf_ops.h b/include/h

Re: [PATCH] linux-user: manage binfmt-misc preserve-arg[0] flag

2021-03-09 Thread Laurent Vivier
Le 22/02/2021 à 11:50, Laurent Vivier a écrit : > Add --preserve-argv0 in qemu-binfmt-conf.sh to configure the preserve-argv0 > flag. > > This patch allows to use new flag in AT_FLAGS to detect if > preserve-argv0 is configured for this interpreter: > argv[0] (the full pathname provided by binfmt-

Re: [PATCH V2 trivial] Various spelling fixes

2021-03-09 Thread Laurent Vivier
Le 09/03/2021 à 12:15, Michael Tokarev a écrit : > An assorted set of spelling fixes in various places. > > Signed-off-by: Michael Tokarev > Reviewed-by: Stefan Weil > --- > V1: https://lists.nongnu.org/archive/html/qemu-devel/2020-12/msg05959.html > Changes: incorporated suggestions by Stefan W

Re: [PATCH] exec/memory: Use struct Object typedef

2021-03-09 Thread Laurent Vivier
Le 25/02/2021 à 19:20, Philippe Mathieu-Daudé a écrit : > We forward-declare Object typedef in "qemu/typedefs.h" since commit > ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'"). > Use it everywhere to make the code simpler. > > Signed-off-by: Philippe Mathieu-Daudé > --- > in

[PATCH v6 0/8] Pegasos2 emulation

2021-03-09 Thread BALATON Zoltan
Hello, This is adding a new PPC board called pegasos2. More info on it can be found at: https://osdn.net/projects/qmiga/wiki/SubprojectPegasos2 Currently it needs a firmware ROM image that I cannot include due to original copyright holder (bPlan) did not release it under a free licence but I hav

Re: [PATCH v3 09/12] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-03-09 Thread David Hildenbrand
> Am 09.03.2021 um 21:04 schrieb Peter Xu : > > On Mon, Mar 08, 2021 at 04:05:57PM +0100, David Hildenbrand wrote: >> Let's introduce a new set of flags that abstract mmap logic and replace >> our current set of bools, to prepare for another flag. >> >> Signed-off-by: David Hildenbrand >> ---

[RFC PATCH v3 cxl-2.0-doe 0/2] Version 3 patch series for PCIe DOE for PCIe and CXL 2.0

2021-03-09 Thread Chris Browy
Version 3 patch series for PCIe DOE for PCIe and CXL 2.0 implements all planned functionality. Based on QEMU version: https://gitlab.com/bwidawsk/qemu/-/tree/cxl-2.0v4 Summary: 1: PCIe DOE support for Discovery - Support multiple DOE instances for each own protocol set - MSI-X and polling

[PATCH v6 1/8] vt82c686: Implement control of serial port io ranges via config regs

2021-03-09 Thread BALATON Zoltan
In VIA super south bridge the io ranges of superio components (parallel and serial ports and FDC) can be controlled by superio config registers to set their base address and enable/disable them. This is not easy to implement in QEMU because ISA emulation is only designed to set io base address once

[PATCH v6 6/8] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread BALATON Zoltan
From: Philippe Mathieu-Daudé TYPE_VIA_PM calls apm_init() in via_pm_realize(), so requires APM to be selected. Reported-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: BALATON Zoltan --- hw/isa/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/isa/Kconfig

Re: [PATCH] plugins: Expose physical addresses instead of device offsets

2021-03-09 Thread Aaron Lindsay via
On Mar 09 17:45, Alex Bennée wrote: > Aaron Lindsay writes: > > On Mar 09 10:08, Peter Maydell wrote: > >> On Mon, 8 Mar 2021 at 20:14, Aaron Lindsay > >> wrote: > >> > > >> > This allows plugins to query for full virtual-to-physical address > >> > translation for a given `qemu_plugin_hwaddr` an

Re: [PATCH v2] MAINTAINERS: Fix the location of tools manuals

2021-03-09 Thread Laurent Vivier
Le 09/03/2021 à 20:48, Thomas Huth a écrit : > On 09/03/2021 18.41, Wainer dos Santos Moschetta wrote: >> Hi, >> >> Any issue that prevent this of being queued? > > Maybe it's just not clear who should take the patch ... CC:-ing qemu-trivial > and qemu-block now, > since I think it could go throu

[PATCH v6 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it

2021-03-09 Thread BALATON Zoltan
To allow reusing ISA bridge emulation for vt8231_isa move the device state of vt82c686b_isa emulation in an abstract via_isa class. This change breaks migration back compatibility but this is not an issue for Fuloong2E machine which is not versioned or migration supported. Signed-off-by: BALATON Z

[PATCH v6 7/8] hw/pci-host: Add emulation of Marvell MV64361 PPC system controller

2021-03-09 Thread BALATON Zoltan
The Marvell Discovery II aka. MV64361 is a PowerPC system controller chip that is used on the pegasos2 PPC board. This adds emulation of it that models the device enough to boot guests on this board. The mv643xx.h header with register definitions is taken from Linux 4.15.10 only fixing white space

Re: [PATCH] target/hexagon/gen_tcg_funcs: Fix a typo

2021-03-09 Thread Laurent Vivier
Le 25/02/2021 à 19:15, Philippe Mathieu-Daudé a écrit : > Signed-off-by: Philippe Mathieu-Daudé > --- > target/hexagon/gen_tcg_funcs.py | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs.py > inde

[PATCH v6 2/8] vt82c686: QOM-ify superio related functionality

2021-03-09 Thread BALATON Zoltan
Collect superio functionality and its controlling config registers handling in an abstract VIA_SUPERIO class that is a subclass of ISA_SUPERIO and put vt82c686b specific parts in a subclass of this abstract class. Signed-off-by: BALATON Zoltan --- hw/isa/vt82c686.c | 240

Re: [PATCH 2/2] vhost_user_gpu: Drop dead check for g_malloc() failure

2021-03-09 Thread Laurent Vivier
Le 26/01/2021 à 13:42, Markus Armbruster a écrit : > Signed-off-by: Markus Armbruster > --- > hw/display/vhost-user-gpu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c > index 51f1747c4a..db042c7c5e 100644 > --- a/hw/display/vho

Re: [PATCH] docs/system: Document the removal of "compat" property for POWER CPUs

2021-03-09 Thread Laurent Vivier
Le 22/02/2021 à 12:28, Greg Kurz a écrit : > This is just an oversight. > > Fixes: f518be3aa35b ("target/ppc: Remove "compat" property of server class > POWER CPUs") > Cc: gr...@kaod.org > Signed-off-by: Greg Kurz > --- > docs/system/removed-features.rst |6 ++ > 1 file changed, 6 inser

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-03-09 Thread Laurent Vivier
Le 31/01/2021 à 07:19, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, pgd_find_hole_fallback assumed that if the build host's libc > had MAP_FIXED_NOREPLACE defined that the address returned by mmap would > match the requested address. This is not a safe assumption for Linux > kern

Re: [PATCH] net: Use id_generate() in the network subsystem, too

2021-03-09 Thread Laurent Vivier
Le 15/02/2021 à 10:02, Thomas Huth a écrit : > We already got a global function called id_generate() to create unique > IDs within QEMU. Let's use it in the network subsytem, too, instead of > inventing our own ID scheme here. > > Signed-off-by: Thomas Huth > --- > include/qemu/id.h | 1 + > net

Re: [PATCH] exec/memory: Use struct Object typedef

2021-03-09 Thread Laurent Vivier
Le 25/02/2021 à 19:20, Philippe Mathieu-Daudé a écrit : > We forward-declare Object typedef in "qemu/typedefs.h" since commit > ca27b5eb7cd ("qom/object: Move Object typedef to 'qemu/typedefs.h'"). > Use it everywhere to make the code simpler. > > Signed-off-by: Philippe Mathieu-Daudé > --- > in

Re: [PATCH 1/2] backends/dbus-vmstate: Fix short read error handling

2021-03-09 Thread Laurent Vivier
Le 26/01/2021 à 13:42, Markus Armbruster a écrit : > When dbus_vmstate_post_load() fails, it complains to stderr. Except > on short read, where it checks with g_return_val_if_fail(). This > fails silently if G_DISABLE_CHECKS is undefined (it should be), or > else pads the short read with uninitia

Re: [PATCH v3 09/12] util/mmap-alloc: Pass flags instead of separate bools to qemu_ram_mmap()

2021-03-09 Thread Peter Xu
On Tue, Mar 09, 2021 at 09:27:10PM +0100, David Hildenbrand wrote: > > > Am 09.03.2021 um 21:04 schrieb Peter Xu : > > > > On Mon, Mar 08, 2021 at 04:05:57PM +0100, David Hildenbrand wrote: > >> Let's introduce a new set of flags that abstract mmap logic and replace > >> our current set of bools

Re: [PATCH] fuzz-test: remove unneccessary debugging flags

2021-03-09 Thread Laurent Vivier
Le 16/02/2021 à 19:13, Alexander Bulekov a écrit : > These flags cause the output to look strange for 'make check', and > they aren't needed to reproduce bugs, if they reappear. > > Suggested-by: Peter Maydell > Signed-off-by: Alexander Bulekov > --- > tests/qtest/fuzz-test.c | 3 +-- > 1 file

[RFC PATCH v3 cxl-2.0-doe 1/2] Basic PCIe DOE support

2021-03-09 Thread Chris Browy
--- MAINTAINERS | 49 +-- hw/pci/meson.build| 1 + hw/pci/pci.c | 13 +- hw/pci/pcie_doe.c | 416 ++ include/hw/pci/pci_ids.h | 5 +- include/hw/pci

[PATCH v6 5/8] vt82c686: Add emulation of VT8231 south bridge

2021-03-09 Thread BALATON Zoltan
Add emulation of VT8231 south bridge ISA part based on the similar VT82C686B but implemented in a separate subclass that holds the differences while reusing parts that can be shared. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 84 +++

Re: [PATCH] linux-user/elfload: munmap proper address in pgd_find_hole_fallback

2021-03-09 Thread Vincent Fazio
Pinging per Laurent. On 2/14/21 5:32 AM, Alex Bennée wrote: Vincent Fazio writes: From: Vincent Fazio Previously, if the build host's libc did not define MAP_FIXED_NOREPLACE or if the running kernel didn't support that flag, it was possible for pgd_find_hole_fallback to munmap an incorrect

Re: [PATCH] virtio-gpu: Adjust code space style

2021-03-09 Thread Laurent Vivier
Le 09/03/2021 à 14:32, Philippe Mathieu-Daudé a écrit : > On 3/9/21 1:14 PM, lijiejun wrote: >> Fix code style. Operator needs align with eight spaces, and delete line >> space. >> >> Signed-off-by: lijiejun >> --- >> hw/display/virtio-gpu-3d.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 delet

[PATCH v6 3/8] vt82c686: Add VT8231_SUPERIO based on VIA_SUPERIO

2021-03-09 Thread BALATON Zoltan
The VT8231 south bridge is very similar to VT82C686B but there are some differences in register addresses and functionality, e.g. the VT8231 only has one serial port. This commit adds VT8231_SUPERIO subclass based on the abstract VIA_SUPERIO class to emulate the superio part of VT8231. Signed-off-

Re: [PATCH v4] target/s390x: Implement the MVPG condition-code-option bit

2021-03-09 Thread Thomas Huth
On 04/03/2021 09.10, David Hildenbrand wrote: On 03.03.21 22:36, Richard Henderson wrote: On 3/3/21 1:22 PM, David Hildenbrand wrote: Am 03.03.2021 um 22:19 schrieb Richard Henderson : On 3/3/21 1:11 PM, David Hildenbrand wrote: MMIO on s390x? :) hw/s390x/s390-pci-bus.c, memory_region_i

Re: [PATCH] linux-user/elfload: fix address calculation in fallback scenario

2021-03-09 Thread Vincent Fazio
Pinging per Laurent. On 2/13/21 3:48 PM, Laurent Vivier wrote: Le 31/01/2021 à 07:19, Vincent Fazio a écrit : From: Vincent Fazio Previously, guest_loaddr was not taken into account when returning an address from pgb_find_hole when /proc/self/maps was unavailable which caused an improper gues

[RFC PATCH v3 cxl-2.0-doe 2/2] CXL DOE support for CDAT and Compliance Mode

2021-03-09 Thread Chris Browy
--- hw/cxl/cxl-component-utils.c | 93 hw/mem/cxl_type3.c | 184 include/hw/cxl/cxl_cdat.h | 127 + include/hw/cxl/cxl_compl.h | 252 + include/hw/cxl/cxl_component.h | 74 ++ inc

[PATCH v6 8/8] hw/ppc: Add emulation of Genesi/bPlan Pegasos II

2021-03-09 Thread BALATON Zoltan
Add new machine called pegasos2 emulating the Genesi/bPlan Pegasos II, a PowerPC board based on the Marvell MV64361 system controller and the VIA VT8231 integrated south bridge/superio chips. It can run Linux, AmigaOS and a wide range of MorphOS versions. Currently a firmware ROM image is needed to

Re: [PATCH v3 3/5] seccomp: Replace the word 'blacklist'

2021-03-09 Thread Laurent Vivier
Le 03/03/2021 à 19:46, Philippe Mathieu-Daudé a écrit : > Follow the inclusive terminology from the "Conscious Language in your > Open Source Projects" guidelines [*] and replace the word "blacklist" > appropriately. > > [*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md >

Re: [PATCH v3 1/5] ui: Replace the word 'whitelist'

2021-03-09 Thread Laurent Vivier
Le 03/03/2021 à 19:46, Philippe Mathieu-Daudé a écrit : > Follow the inclusive terminology from the "Conscious Language in your > Open Source Projects" guidelines [*] and replace the words "whitelist" > appropriately. > > [*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md >

[PATCH v2] plugins: Expose physical addresses instead of device offsets

2021-03-09 Thread Aaron Lindsay
This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay --- contrib/plugins/hotpages.c |

Re: [PATCH] linux-user/elfload: munmap proper address in pgd_find_hole_fallback

2021-03-09 Thread Laurent Vivier
Le 31/01/2021 à 07:18, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, if the build host's libc did not define MAP_FIXED_NOREPLACE > or if the running kernel didn't support that flag, it was possible for > pgd_find_hole_fallback to munmap an incorrect address which could lead to > S

Re: [PATCH v3 2/5] scripts/tracetool: Replace the word 'whitelist'

2021-03-09 Thread Laurent Vivier
Le 03/03/2021 à 19:46, Philippe Mathieu-Daudé a écrit : > Follow the inclusive terminology from the "Conscious Language in your > Open Source Projects" guidelines [*] and replace the words "whitelist" > appropriately. > > [*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md >

Re: [PATCH v3 5/5] tests/fp/fp-test: Replace the word 'blacklist'

2021-03-09 Thread Laurent Vivier
Le 03/03/2021 à 19:46, Philippe Mathieu-Daudé a écrit : > Follow the inclusive terminology from the "Conscious Language in your > Open Source Projects" guidelines [*] and replace the word "blacklist" > appropriately. > > [*] https://github.com/conscious-lang/conscious-lang-docs/blob/main/faq.md >

Re: [PATCH] migration: Remove time_t cast for OpenBSD

2021-03-09 Thread Laurent Vivier
Le 08/03/2021 à 12:46, Thomas Huth a écrit : > On 22/02/2021 08.28, Brad Smith wrote: >> OpenBSD has supported 64-bit time_t across all archs since 5.5 released in >> 2014. >> >> Remove a time_t cast that is no longer necessary. >> >> >> Signed-off-by: Brad Smith >> >> diff --git a/migration/save

Re: [PATCH] qemu-common.h: Update copyright string to 2021

2021-03-09 Thread Laurent Vivier
Le 09/03/2021 à 17:22, Peter Maydell a écrit : > Update the common copyright string that we use in > -version reports, About dialogs, etc, to 2021. > > Signed-off-by: Peter Maydell > --- > include/qemu-common.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/qem

Re: [PATCH] coroutine: add libucontext as external library

2021-03-09 Thread Joelle van Dyne
On Tue, Mar 9, 2021 at 10:24 AM Joelle van Dyne wrote: > > On Tue, Mar 9, 2021 at 7:38 AM Stefan Hajnoczi wrote: > > > > On Mon, Mar 08, 2021 at 07:26:36PM -0800, Joelle van Dyne wrote: > > > iOS does not support ucontext natively for aarch64 and the sigaltstack is > > > also unsupported (even wo

Re: [PATCH] linux-user/elfload: fix address calculation in fallback scenario

2021-03-09 Thread Laurent Vivier
Le 31/01/2021 à 07:19, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, guest_loaddr was not taken into account when returning an > address from pgb_find_hole when /proc/self/maps was unavailable which > caused an improper guest_base address to be calculated. > > This could cause a

[RFC] hw/display: add virtio-ramfb device

2021-03-09 Thread Joelle van Dyne
Like virtio-vga, but using ramfb instead of legacy vga. Useful for booting from OVMF (with updated drivers) into Windows ARM which expects a linear FB that the virtio-gpu driver in OVMF does not provide. This code was originally written by Gerd Hoffmann and was updated to contain later changes to

Re: [PATCH] hw/arm/virt: KVM: The IPA lower bound is 32

2021-03-09 Thread Marc Zyngier
On Tue, 09 Mar 2021 20:06:06 +, Andrew Jones wrote: > > On Tue, Mar 09, 2021 at 07:21:58PM +, Marc Zyngier wrote: > > Hi Andrew, > > > > On Tue, 09 Mar 2021 18:59:39 +, > > Andrew Jones wrote: > > > > > > The virt machine already checks KVM_CAP_ARM_VM_IPA_SIZE to get the > > > uppe

Re: [PATCH v2 1/3] hw/lm32/Kconfig: Introduce CONFIG_LM32_EVR for lm32-evr/uclinux boards

2021-03-09 Thread Laurent Vivier
Le 21/02/2021 à 23:56, Philippe Mathieu-Daudé a écrit : > We want to be able to use the 'LM32' config for architecture > specific features. Introduce CONFIG_LM32_EVR to select the > lm32-evr / lm32-uclinux boards. > > Reviewed-by: Alex Bennée > Signed-off-by: Philippe Mathieu-Daudé > --- > defa

Re: [PATCH v2] hw/char: disable ibex uart receive if the buffer is full

2021-03-09 Thread Alistair Francis
On Tue, Mar 9, 2021 at 10:56 AM Alexander Wagner wrote: > > Not disabling the UART leads to QEMU overwriting the UART receive buffer with > the newest received byte. The rx_level variable is added to allow the use of > the existing OpenTitan driver libraries. > > Signed-off-by: Alexander Wagner

Re: [PATCH v2 2/3] hw/lm32/Kconfig: Rename CONFIG_LM32 -> CONFIG_LM32_DEVICES

2021-03-09 Thread Laurent Vivier
Le 21/02/2021 à 23:56, Philippe Mathieu-Daudé a écrit : > We want to be able to use the 'LM32' config for architecture > specific features. As CONFIG_LM32 is only used to select > peripherals, rename it CONFIG_LM32_DEVICES. > > Reviewed-by: Alex Bennée > Signed-off-by: Philippe Mathieu-Daudé > -

Re: [PULL 00/18] testing, docs, semihosting move and guest-loader

2021-03-09 Thread Peter Maydell
On Tue, 9 Mar 2021 at 18:38, Alex Bennée wrote: > > > Peter Maydell writes: > > > > Fails on x86-64 trying to do something with docker: > Hmm that's weird. What machine are you running on? Ubuntu 18.04.5 LTS. -- PMM

Re: [PATCH v2 3/3] hw/lm32/Kconfig: Have MILKYMIST select LM32_DEVICES

2021-03-09 Thread Laurent Vivier
Le 21/02/2021 à 23:56, Philippe Mathieu-Daudé a écrit : > The Milkymist board requires more than the PTIMER. Directly > select the LM32_DEVICES. This fixes: > > /usr/bin/ld: > libqemu-lm32-softmmu.fa.p/target_lm32_gdbstub.c.o: in function > `lm32_cpu_gdb_read_register': > target/lm32/gdbstu

Re: [PATCH] migration: Remove time_t cast for OpenBSD

2021-03-09 Thread Brad Smith
On 3/8/2021 6:46 AM, Thomas Huth wrote: On 22/02/2021 08.28, Brad Smith wrote: OpenBSD has supported 64-bit time_t across all archs since 5.5 released in 2014. Remove a time_t cast that is no longer necessary. Signed-off-by: Brad Smith diff --git a/migration/savevm.c b/migration/savevm.c i

Re: [PATCH v4 00/13] KVM: Dirty ring support (QEMU part)

2021-03-09 Thread Peter Xu
On Fri, Jan 08, 2021 at 11:45:48AM -0500, Peter Xu wrote: > This is v4 of the qemu dirty ring interface support. > > It is merely the same as v3 content-wise, but there're a few things to mention > besides the rebase itself: > > - I picked up two patches from Eric Farman for the linux-header up

Re: [PATCH v2] linux-user: Adjust pgd_find_hole_fallback result with guest_loaddr

2021-03-09 Thread Laurent Vivier
Le 06/03/2021 à 10:33, Ivan A. Melnikov a écrit : > While pgd_find_hole_fallback returns the beginning of the > hole found, pgb_find_hole returns guest_base, which > is somewhat different as the binary qemu-user is loading > usually have non-zero load address. > > Failing to take that into account

Re: [PATCH 2/3] memory: Provide 'base address' argument to mtree_print_mr()

2021-03-09 Thread Philippe Mathieu-Daudé
+Peter/Mark/Edgar for SoC modelling On 3/9/21 10:39 AM, Philippe Mathieu-Daudé wrote: > Hi Peter, > > On 3/9/21 12:40 AM, Peter Xu wrote:> On Sat, Mar 06, 2021 at 12:54:13AM > +0100, Philippe Mathieu-Daudé wrote: >>> @@ -3188,14 +3188,15 @@ void mtree_info(bool flatview, bool dispatch_tree, >>>

Re: [PATCH 0/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-03-09 Thread Philippe Mathieu-Daudé
ping, qemu-trivial maybe? On 2/22/21 3:34 PM, Philippe Mathieu-Daudé wrote: > Paolo, this series is fully reviewed, can it go via your > misc tree? > > On 1/11/21 4:20 PM, Philippe Mathieu-Daudé wrote: >> Trivial prototype change to clarify the use of the 'running' >> argument of VMChangeStateHan

Re: [PATCH 1/2] sysemu/runstate: Let runstate_is_running() return bool

2021-03-09 Thread Laurent Vivier
Le 11/01/2021 à 16:20, Philippe Mathieu-Daudé a écrit : > runstate_check() returns a boolean. runstate_is_running() > returns what runstate_check() returns, also a boolean. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/runstate.h | 2 +- > softmmu/runstate.c| 2 +- > 2

Re: [PATCH 2/2] sysemu: Let VMChangeStateHandler take boolean 'running' argument

2021-03-09 Thread Laurent Vivier
Le 11/01/2021 à 16:20, Philippe Mathieu-Daudé a écrit : > The 'running' argument from VMChangeStateHandler does not require > other value than 0 / 1. Make it a plain boolean. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/sysemu/runstate.h | 10 -- > target/arm/kvm_arm.h

Re: [PULL 00/18] testing, docs, semihosting move and guest-loader

2021-03-09 Thread Philippe Mathieu-Daudé
On 3/9/21 7:37 PM, Alex Bennée wrote: > > Peter Maydell writes: > >> On Mon, 8 Mar 2021 at 13:51, Alex Bennée wrote: >>> >>> The following changes since commit 91e92cad67caca3bc4b8e920ddb5c8ca64aac9e1: >>> >>> Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210305' >>> into

Re: [PATCH v5 0/4] qapi: Restrict X86 features to X86 targets

2021-03-09 Thread Philippe Mathieu-Daudé
ping? On 2/24/21 11:46 PM, Philippe Mathieu-Daudé wrote: > Since v4: > - Rebase on Claudio's work to avoid stub > > This series restrict the 'feature-words' property to the x86 > architecture (other archs don't have it), and to system-mode > (user-mode doesn't use it). > > v4: https://www.mail-a

Re: [PATCH v2] tests/acceptance: Add bFLT loader linux-user test

2021-03-09 Thread Philippe Mathieu-Daudé
ping? On 2/14/21 8:45 PM, Philippe Mathieu-Daudé wrote: > Add a very quick test that runs a busybox binary in bFLT format: > > $ avocado --show=app run -t linux_user tests/acceptance/load_bflt.py > JOB ID : db94d5960ce564c50904d666a7e259148c27e88f > JOB LOG: ~/avocado/job-results/jo

Re: [PATCH] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-03-09 Thread Philippe Mathieu-Daudé
ping for review? On 3/2/21 9:05 AM, Philippe Mathieu-Daudé wrote: > TYPE_VIA_PM calls apm_init() in via_pm_realize(), so > requires APM to be selected. > > Reported-by: BALATON Zoltan > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/isa/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > di

Re: [PATCH v5 4/8] vt82c686: Introduce abstract TYPE_VIA_ISA and base vt82c686b_isa on it

2021-03-09 Thread David Gibson
On Tue, Mar 09, 2021 at 10:12:24AM +0100, Philippe Mathieu-Daudé wrote: > On 3/5/21 2:02 AM, David Gibson wrote: > > On Thu, Mar 04, 2021 at 11:42:10PM +0100, Philippe Mathieu-Daudé wrote: > >> On 3/4/21 9:16 PM, BALATON Zoltan wrote: > >>> On Thu, 4 Mar 2021, Philippe Mathieu-Daudé wrote: > O

Re: [PATCH 0/3] target/tricore: Pass MMUAccessType to get_physical_address()

2021-03-09 Thread Philippe Mathieu-Daudé
On 2/10/21 1:12 PM, Bastian Koppelmann wrote: > Hi, > > On Wed, Jan 27, 2021 at 11:42:52PM +0100, Philippe Mathieu-Daudé wrote: >> Taking notes while reviewing commit 671a0a1265a >> ("use MMUAccessType instead of int in mmu_translate"). >> >> Philippe Mathieu-Daudé (3): >> target/tricore: Replac

Re: [PATCH] tests/acceptance: Print expected message on wait_for_console_pattern

2021-03-09 Thread Joel Stanley
On Tue, 9 Mar 2021 at 16:00, Wainer dos Santos Moschetta wrote: > > For the sake of improve debuggability of tests which use the > wait_for_console_pattern(), this changed the _console_interaction() so that > the expected message is printed if the test fail. > > Signed-off-by: Wainer dos Santos Mo

<    1   2   3   4   5   6   7   >