Re: [PATCH] util/cutils: Expand do_strtosz parsing precision to 64 bits

2019-12-18 Thread Tao Xu
On 12/19/2019 2:26 AM, Markus Armbruster wrote: Tao Xu writes: On 12/18/2019 9:33 AM, Tao Xu wrote: On 12/17/2019 6:25 PM, Markus Armbruster wrote: [...] Also fun: for "0123", we use uint64_t 83, not double 123.0.  But for "0123.", we use 123.0, not 83. Do we really want to accept octal an

[PATCH 09/10] ppc/pnv: Add an "nr-threads" property to the base chip class

2019-12-18 Thread Cédric Le Goater
From: Greg Kurz Set it at chip creation and forward it to the cores. This allows to drop a call to qdev_get_machine(). Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 1 + hw/ppc/pnv.c | 8 +--- 2 files changed, 6 insertions(+), 3 deletions(-)

Re: [PATCH v2 06/10] migration: Add multifd-compress parameter

2019-12-18 Thread Markus Armbruster
Juan Quintela writes: > Signed-off-by: Juan Quintela > > --- > Rename it to NONE > Fix typos (dave) > We don't need to chek values returned by visit_type_MultifdCompress (markus) > Fix yet more typos (wei) > --- > hw/core/qdev-properties.c| 13 + > include/hw/qdev-properties.h |

[PATCH 08/10] xive: Use the XIVE fabric link under the XIVE router

2019-12-18 Thread Cédric Le Goater
From: Greg Kurz Now that the spapr and pnv machines do set the "xive-fabric" link, the use of the XIVE fabric pointer becomes mandatory. This is checked with an assert() in a new realize hook. Since the XIVE router is realized at machine init for the all the machine's life time, no risk to abort

[PATCH 03/10] ppc/pnv: Introduce a "xics" property alias under the PSI model

2019-12-18 Thread Cédric Le Goater
This removes the need of the intermediate link under PSI to pass the XICS link to the underlying ICSState object. Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 4 ++-- hw/ppc/pnv_psi.c | 11 ++- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/p

[PATCH 01/10] ppc/pnv: Modify the powerdown notifier to get the PowerNV machine

2019-12-18 Thread Cédric Le Goater
Use container_of() instead of qdev_get_machine() Signed-off-by: Cédric Le Goater --- hw/ppc/pnv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index f77e7ca84ede..855254f28263 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -561,7 +561,7 @@ stat

[PATCH 07/10] spapr, pnv, xive: Add a "xive-fabric" link to the XIVE router

2019-12-18 Thread Cédric Le Goater
From: Greg Kurz In order to get rid of qdev_get_machine(), first add a pointer to the XIVE fabric under the XIVE router and make it configurable through a QOM link property. Configure it in the spapr and pnv machine. In the case of pnv, the XIVE routers are under the chip, so this is done with a

[PATCH 06/10] pnv/xive: Use device_class_set_parent_realize()

2019-12-18 Thread Cédric Le Goater
From: Greg Kurz The XIVE router base class currently inherits an empty realize hook from the sysbus device base class, but it will soon implement one of its own to perform some sanity checks. Do the preliminary plumbing to have it called. Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater

[PATCH 05/10] spapr/xive: Use device_class_set_parent_realize()

2019-12-18 Thread Cédric Le Goater
From: Greg Kurz The XIVE router base class currently inherits an empty realize hook from the sysbus device base class, but it will soon implement one of its own to perform some sanity checks. Do the preliminary plumbing to have it called. Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater

[PATCH 02/10] ppc/pnv: Introduce a "system-memory" property

2019-12-18 Thread Cédric Le Goater
and use a link to pass the system memory to the device models that require it to map/unmap BARs. This replace the use of get_system_memory() Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 ++ include/hw/ppc/pnv_psi.h | 1 + include/hw/ppc/pnv_xive.h | 2 ++ hw/intc/pnv_xiv

[PATCH 10/10] ppc/pnv: Add a "pnor" const link property to the BMC internal simulator

2019-12-18 Thread Cédric Le Goater
From: Greg Kurz This allows to get rid of a call to qdev_get_machine(). Signed-off-by: Greg Kurz Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 +- hw/ppc/pnv.c | 2 +- hw/ppc/pnv_bmc.c | 8 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/incl

[PATCH 00/10] ppc/pnv: remove the use of qdev_get_machine() and get_system_memory()

2019-12-18 Thread Cédric Le Goater
Hello, The PowerNV and sPAPR machine use qdev_get_machine() and get_system_memory() in some places. This is not a good modeling pratice and it should be avoided. This series replaces the uses of these routines with a set of QOM properties and aliases. The work is mostly complete. We still need to

[PATCH 04/10] ppc/pnv: Introduce a "xics" property under the POWER8 chip

2019-12-18 Thread Cédric Le Goater
POWER8 is the only chip using the XICS interface. Add a "xics" link and a XICSFabric attribute under this chip to remove the use of qdev_get_machine() Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 2 ++ hw/ppc/pnv.c | 26 -- 2 files changed, 22 inser

Re: [RFC PATCH v3 000/132] Proof of concept for Meson integration

2019-12-18 Thread Markus Armbruster
I (mercifully?) haven't received PATCH 094-132, and the list archive doesn't have them, either.

Re: [PATCH v2 5/7] configure: Unnest detection of -z, relro and -z, now

2019-12-18 Thread Fangrui Song
On 2019-12-18, Philippe Mathieu-Daudé wrote: On 12/18/19 11:34 PM, Richard Henderson wrote: There is nothing about these options that is related to PIE. Use them unconditionally. Signed-off-by: Richard Henderson --- v2: Do not split into two tests. --- configure | 9 ++--- 1 file change

Re: [RFC PATCH 13/14] hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler

2019-12-18 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > The Chardev events are listed in the QEMUChrEvent enum. To be > able to use this enum in the IOEventHandler typedef, we need to > explicit when frontends ignore some events, to silent GCC the > following warnings: > > CC s390x-softmmu/hw/char/terminal3270

[PATCH 2/2] arm/virt/acpi: remove _ADR from devices identified by _HID

2019-12-18 Thread Heyi Guo
According to ACPI spec, _ADR should be used for device which is on a bus that has a standard enumeration algorithm. It does not make sense to have a _ADR object for devices which already have _HID and will be enumerated by OSPM. Signed-off-by: Heyi Guo --- Cc: Shannon Zhao Cc: Peter Maydell Cc

[PATCH 0/2] Some cleanup in arm/virt/acpi

2019-12-18 Thread Heyi Guo
Remove useless device node and conflict _ADR objects in ACPI/DSDT. Cc: Peter Maydell Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Shannon Zhao Cc: qemu-...@nongnu.org Cc: qemu-devel@nongnu.org Heyi Guo (2): arm/virt/acpi: remove meaningless sub device "PR0" from PCI0 arm/virt/acpi: remo

[PATCH 1/2] arm/virt/acpi: remove meaningless sub device "PR0" from PCI0

2019-12-18 Thread Heyi Guo
The sub device "PR0" under PCI0 in ACPI/DSDT does not make any sense, so simply remote it. Signed-off-by: Heyi Guo --- Cc: Peter Maydell Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Shannon Zhao Cc: qemu-...@nongnu.org Cc: qemu-devel@nongnu.org --- hw/arm/virt-acpi-build.c | 4

[PATCH v7 4/4] hw/arm: Add the Netduino Plus 2

2019-12-18 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- MAINTAINERS| 6 + hw/arm/Makefile.objs | 1 + hw/arm/netduinoplus2.c | 52 ++ 3 files changed, 59 insertions(+) create mode 100644 hw/arm/netduinoplus2.c diff --git a/MAIN

[PATCH v7 3/4] hw/arm: Add the STM32F4xx SoC

2019-12-18 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- MAINTAINERS| 8 + hw/arm/Makefile.objs | 1 + hw/arm/stm32f405_soc.c | 302 + include/hw/arm/stm32f405_soc.h | 73 4 files changed, 384 insertions(+)

[PATCH v7 1/4] hw/misc: Add the STM32F4xx Sysconfig device

2019-12-18 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- default-configs/arm-softmmu.mak| 1 + hw/arm/Kconfig | 9 ++ hw/misc/Kconfig| 3 + hw/misc/Makefile.objs | 1 + hw/misc/stm32f4xx_syscfg.c | 171 +++

[PATCH v7 0/4] Add the STM32F405 and Netduino Plus 2 machine

2019-12-18 Thread Alistair Francis
Now that the Arm-M4 CPU has been added to QEMU we can add the Netduino Plus 2 machine. This is very similar to the STM32F205 and Netduino 2 SoC and machine. v7: - Fix the EXTI IRQ - Remove the duplicate configs v6: - Remove machine specific reset code - Rebase on master v5: - Fix checkpatch f

[PATCH v7 2/4] hw/misc: Add the STM32F4xx EXTI device

2019-12-18 Thread Alistair Francis
Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- hw/arm/Kconfig | 1 + hw/misc/Kconfig | 3 + hw/misc/Makefile.objs| 1 + hw/misc/stm32f4xx_exti.c | 188 +++ hw/misc/trace-events |

Re: [PATCH v4 ppc-for-5.0 0/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-18 Thread David Gibson
On Thu, Dec 19, 2019 at 08:44:43AM +0530, Bharata B Rao wrote: > This patchset adds KVM_PPC_SVM_OFF ioctl which is required to support > reset of secure guest. This includes linux-headers update so that we get > the newly introduced ioctl. > > v3: > https://lists.gnu.org/archive/html/qemu-devel/20

Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based interface

2019-12-18 Thread David Gibson
On Wed, Dec 18, 2019 at 08:59:18PM -0500, Stefan Berger wrote: > On 12/18/19 8:54 PM, David Gibson wrote: > > On Tue, Dec 17, 2019 at 02:44:04PM -0500, Stefan Berger wrote: > > > On 12/16/19 7:29 PM, David Gibson wrote: > > > > > > > > > > Since you need to change compatible based on an internal

Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based interface

2019-12-18 Thread David Gibson
On Thu, Dec 19, 2019 at 04:13:57PM +1100, David Gibson wrote: > On Wed, Dec 18, 2019 at 08:59:18PM -0500, Stefan Berger wrote: > > On 12/18/19 8:54 PM, David Gibson wrote: > > > On Tue, Dec 17, 2019 at 02:44:04PM -0500, Stefan Berger wrote: > > > > On 12/16/19 7:29 PM, David Gibson wrote: > > > >

Re: [PATCH 6/7] target/ppc: add support for Hypervisor Facility Unavailable Exception

2019-12-18 Thread David Gibson
On Thu, Nov 28, 2019 at 02:46:59PM +0100, Cédric Le Goater wrote: > The privileged message send and clear instructions (msgsndp & msgclrp) > are privileged, but will generate a hypervisor facility unavailable > exception if not enabled in the HFSCR and executed in privileged > non-hypervisor state.

[RFC PATCH] hw/arm/virt: Support NMI injection

2019-12-18 Thread Gavin Shan
This supports NMI injection for virtual machine and currently it's only supported on GICv3 controller, which is emulated by qemu or host kernel. The design is highlighted as below: * The NMI is identified by its priority (0x20). In the guest (linux) kernel, the GICC_PMR is set to 0x80, to

[PATCH v4 ppc-for-5.0 1/2] linux-headers: Update

2019-12-18 Thread Bharata B Rao
Update to mainline commit: d1eef1c61974 ("Linux 5.5-rc2") Signed-off-by: Bharata B Rao --- include/standard-headers/asm-x86/bootparam.h | 7 +- .../infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 15 +++- include/standard-headers/drm/drm_fourcc.h | 28 ++- .../linux/input-event-codes.h

[PATCH v4 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-18 Thread Bharata B Rao
A pseries guest can be run as a secure guest on Ultravisor-enabled POWER platforms. When such a secure guest is reset, we need to release/reset a few resources both on ultravisor and hypervisor side. This is achieved by invoking this new ioctl KVM_PPC_SVM_OFF from the machine reset path. As part o

[PATCH v4 ppc-for-5.0 0/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-18 Thread Bharata B Rao
This patchset adds KVM_PPC_SVM_OFF ioctl which is required to support reset of secure guest. This includes linux-headers update so that we get the newly introduced ioctl. v3: https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg03685.html Changes in v4: - - s/error_setg/error_setg

[PATCH v39 00/22] QEMU AVR 8 bit cores

2019-12-18 Thread Michael Rolnik
This series of patches adds 8bit AVR cores to QEMU. All instruction, except BREAK/DES/SPM/SPMX, are implemented. Not fully tested yet. However I was able to execute simple code with functions. e.g fibonacci calculation. This series of patches include a non real, sample board. No fuses support yet

Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based interface

2019-12-18 Thread Stefan Berger
On 12/18/19 8:54 PM, David Gibson wrote: On Tue, Dec 17, 2019 at 02:44:04PM -0500, Stefan Berger wrote: On 12/16/19 7:29 PM, David Gibson wrote: Since you need to change compatible based on an internal variable, we'd need to replace the static dt_compatible in the class with a callback. Why

Re: [PATCH v5 1/5] tpm_spapr: Support TPM for ppc64 using CRQ based interface

2019-12-18 Thread David Gibson
On Tue, Dec 17, 2019 at 02:44:04PM -0500, Stefan Berger wrote: > On 12/16/19 7:29 PM, David Gibson wrote: > > On Fri, Dec 13, 2019 at 08:03:36AM -0500, Stefan Berger wrote: > > > On 12/13/19 12:34 AM, David Gibson wrote: > > > > > > The existing one looks like this: > > > > > > typedef struct Spa

[PATCH v39 03/22] target/avr: Add instruction decoding

2019-12-18 Thread Michael Rolnik
This includes: - encoding of all 16 bit instructions - encoding of all 32 bit instructions Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/insn.decode | 183 + 1 file changed, 183 insertions(+) create mode 100644 target/avr

Re: [PATCH v3 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-18 Thread David Gibson
On Wed, Dec 18, 2019 at 02:22:49PM +0100, Greg Kurz wrote: > On Wed, 18 Dec 2019 10:02:08 +0530 > Bharata B Rao wrote: > > > A pseries guest can be run as a secure guest on Ultravisor-enabled > > POWER platforms. When such a secure guest is reset, we need to > > release/reset a few resources both

[PATCH v39 05/22] target/avr: Add instruction translation - Arithmetic and Logic Instructions

2019-12-18 Thread Michael Rolnik
This includes: - ADD, ADC, ADIW - SBIW, SUB, SUBI, SBC, SBCI - AND, ANDI - OR, ORI, EOR - COM, NEG - INC, DEC - MUL, MULS, MULSU - FMUL, FMULS, FMULSU - DES Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 714 +

Re: [PATCH RESEND v20 0/8] Build ACPI Heterogeneous Memory Attribute Table (HMAT)

2019-12-18 Thread Tao Xu
On 12/13/2019 6:06 PM, Michael S. Tsirkin wrote: On Fri, Dec 13, 2019 at 09:19:21AM +0800, Tao Xu wrote: This series of patches will build Heterogeneous Memory Attribute Table (HMAT) according to the command line. The ACPI HMAT describes the memory attributes, such as memory side cache attribute

Re: [PATCH v10 Kernel 4/5] vfio iommu: Implementation of ioctl to for dirty pages tracking.

2019-12-18 Thread Yan Zhao
On Thu, Dec 19, 2019 at 04:05:52AM +0800, Dr. David Alan Gilbert wrote: > * Yan Zhao (yan.y.z...@intel.com) wrote: > > On Tue, Dec 17, 2019 at 07:47:05PM +0800, Kirti Wankhede wrote: > > > > > > > > > On 12/17/2019 3:21 PM, Yan Zhao wrote: > > > > On Tue, Dec 17, 2019 at 05:24:14PM +0800, Kirti W

Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board

2019-12-18 Thread Cleber Rosa
On Tue, Dec 17, 2019 at 07:27:26PM +0100, Philippe Mathieu-Daudé wrote: > This test boots a Linux kernel on a OrangePi PC board and verify > the serial output is working. > > The kernel image and DeviceTree blob are built by the Raspbian > project (based on Debian): > https://www.raspbian.org/Rasp

[PATCH v39 04/22] target/avr: Add instruction translation - Registers definition

2019-12-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 143 + 1 file changed, 143 insertions(+) create mode 100644 target/avr/translate.c diff --git a/target/avr/translate.c b/tar

Re: [PATCH v4 0/6] HPPA: i82596, PS/2 and graphics emulation

2019-12-18 Thread Richard Henderson
On 12/13/19 10:40 AM, Helge Deller wrote: > To avoid confusion because we missed qemu 4.2, I've deleted the > parisc-qemu-4.2 branch at the parisc-seabios git repo [1]. > Instead I've created a parisc-qemu-5.0 branch. > Please use that instead if you push the prebuilt seabios rom and > git submodul

[PATCH] 9p: init_in_iov_from_pdu can truncate the size

2019-12-18 Thread Stefano Stabellini
From: Stefano Stabellini init_in_iov_from_pdu might not be able to allocate the full buffer size requested, which comes from the client and could be larger than the transport has available at the time of the request. Specifically, this can happen with read operations, with the client requesting a

Re: [PATCH v8 3/4] Acceptance tests: add make targets to download images

2019-12-18 Thread Cleber Rosa
On Thu, Dec 19, 2019 at 01:16:12AM +0100, Philippe Mathieu-Daudé wrote: > On 12/19/19 12:24 AM, Cleber Rosa wrote: > > The newly introduced "boot linux" tests make use of Linux images that > > are larger than usual, and fall into what Avocado calls "vmimages", > > and can be referred to by name, ve

Re: [PATCH v8 2/4] Acceptance test: add "boot_linux" tests

2019-12-18 Thread Cleber Rosa
On Thu, Dec 19, 2019 at 01:12:02AM +0100, Philippe Mathieu-Daudé wrote: > Hi Cleber, > > Few minor questions... > > On 12/19/19 12:24 AM, Cleber Rosa wrote: > > This acceptance test, validates that a full blown Linux guest can > > successfully boot in QEMU. In this specific case, the guest chose

Re: [PATCH v4 5/6] hppa: Add emulation of Artist graphics

2019-12-18 Thread Richard Henderson
On 11/3/19 10:56 AM, Sven Schnelle wrote: > This adds emulation of Artist graphics good enough > to get a Text console on both Linux and HP-UX. The > X11 server from HP-UX also works. > > Signed-off-by: Sven Schnelle > --- > hw/display/Kconfig |4 + > hw/display/Makefile.objs |1 +

Re: [PATCH v8 1/4] Acceptance tests: introduce BLD_DIR, SRC_DIR and LNK_DIR

2019-12-18 Thread Cleber Rosa
On Thu, Dec 19, 2019 at 01:02:39AM +0100, Philippe Mathieu-Daudé wrote: > On 12/19/19 12:24 AM, Cleber Rosa wrote: > > Some tests may benefit from using resources from a build directory. > > This introduces three variables that can help tests find resources in > > those directories. > > > > First,

Re: [PATCH v8 3/4] Acceptance tests: add make targets to download images

2019-12-18 Thread Philippe Mathieu-Daudé
On 12/19/19 12:24 AM, Cleber Rosa wrote: The newly introduced "boot linux" tests make use of Linux images that are larger than usual, and fall into what Avocado calls "vmimages", and can be referred to by name, version and architecture. The images can be downloaded automatically during the test.

Re: [PATCH v8 2/4] Acceptance test: add "boot_linux" tests

2019-12-18 Thread Philippe Mathieu-Daudé
Hi Cleber, Few minor questions... On 12/19/19 12:24 AM, Cleber Rosa wrote: This acceptance test, validates that a full blown Linux guest can successfully boot in QEMU. In this specific case, the guest chosen is Fedora version 31. * x86_64, pc and q35 machine types, with and without kvm as a

Re: [PATCH v2 06/10] arm/arm-powerctl: rebuild hflags after setting CP15 bits in arm_set_cpu_on()

2019-12-18 Thread Niek Linnenbank
Hello Richard, On Tue, Dec 17, 2019 at 5:41 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 12/17/19 6:12 AM, Peter Maydell wrote: > > Cc'ing Richard : this is one for you I think... (surely we > > need to rebuild the hflags from scratch when we power up > > a CPU anyway?) > > We

Re: [PATCH] linux-user:Fix align mistake when mmap guest space

2019-12-18 Thread Richard Henderson
On 12/12/19 11:00 PM, Laurent Vivier wrote: > Le 13/12/2019 à 03:29, Xinyu Li a écrit : >> In init_guest_space, we need to mmap guest space. If the return address >> of first mmap is not aligned with align, which was set to MAX(SHMLBA, >> qemu_host_page_size), we need unmap and a new mmap(space is

Re: [PATCH v8 1/4] Acceptance tests: introduce BLD_DIR, SRC_DIR and LNK_DIR

2019-12-18 Thread Philippe Mathieu-Daudé
On 12/19/19 12:24 AM, Cleber Rosa wrote: Some tests may benefit from using resources from a build directory. This introduces three variables that can help tests find resources in those directories. First, a BLD_DIR is assumed to exist, given that the primary form of running the acceptance tests

Re: QEMU for Qualcomm Hexagon - KVM Forum talk and code available

2019-12-18 Thread Richard Henderson
On 12/17/19 8:21 AM, Peter Maydell wrote: > On Tue, 17 Dec 2019 at 18:16, Taylor Simpson wrote: >> Question 2: >> What is the best source of guidance on breaking down support for a new >> target into a patch series? > > Look at how previous ports did it. E.g. the hppa-linux-user port. The init

[Bug 1856834] Re: Virtio broken in qemu ppc in 4.2.0 and other versions

2019-12-18 Thread ecsdn
Also tested on another system (Debian GNU/Linux 9 \n \l with kernel SMP Debian 3.16.56-1+deb8u1 (2018-05-08) x86_64) besides the previous Ubuntu 17.04 and confirmed even Qemu 2.8.1 is working but Qemu 3.1.10 and higher not working, virtio fails/freezes guest at vda as on the other system. -- You

Re: [PATCH v2 06/10] arm/arm-powerctl: rebuild hflags after setting CP15 bits in arm_set_cpu_on()

2019-12-18 Thread Richard Henderson
On 12/18/19 11:01 AM, Niek Linnenbank wrote: > Hello Richard, > > On Tue, Dec 17, 2019 at 5:41 PM Richard Henderson > > wrote: > > On 12/17/19 6:12 AM, Peter Maydell wrote: > > Cc'ing Richard : this is one for you I think... (surely we > > need t

[PATCH v8 3/4] Acceptance tests: add make targets to download images

2019-12-18 Thread Cleber Rosa
The newly introduced "boot linux" tests make use of Linux images that are larger than usual, and fall into what Avocado calls "vmimages", and can be referred to by name, version and architecture. The images can be downloaded automatically during the test. But, to make for more reliable test result

[PATCH v8 1/4] Acceptance tests: introduce BLD_DIR, SRC_DIR and LNK_DIR

2019-12-18 Thread Cleber Rosa
Some tests may benefit from using resources from a build directory. This introduces three variables that can help tests find resources in those directories. First, a BLD_DIR is assumed to exist, given that the primary form of running the acceptance tests is from a build directory (which may or may

[PATCH v8 2/4] Acceptance test: add "boot_linux" tests

2019-12-18 Thread Cleber Rosa
This acceptance test, validates that a full blown Linux guest can successfully boot in QEMU. In this specific case, the guest chosen is Fedora version 31. * x86_64, pc and q35 machine types, with and without kvm as an accelerator * aarch64 and virt machine type, with and without kvm as an

[PATCH v8 4/4] [TO BE REMOVED] Use Avocado master branch + vmimage fix

2019-12-18 Thread Cleber Rosa
This uses the Avocado from a custom branch that contains a fix, and is proposed on the upstream Avocado project as pull request #3406. Upon inclusion and a new release, this should be dropped and the Avocado version bumped to 74.0. Reference: https://github.com/avocado-framework/avocado/pull/3406

[PATCH v8 0/4] Acceptance test: Add "boot_linux" acceptance test

2019-12-18 Thread Cleber Rosa
This acceptance test, validates that a full blown Linux guest can successfully boot in QEMU. In this specific case, the guest chosen is Fedora version 31. * x86_64, pc and q35 machine types, with and without kvm as an accellerator * aarch64 and virt machine type, with and without kvm as an

[PATCH v39 02/22] target/avr: Add instruction helpers

2019-12-18 Thread Michael Rolnik
Stubs for unimplemented instructions and helpers for instructions that need to interact with QEMU. SPM and WDR are unimplemented because they require emulation of complex peripherals. The implementation of SLEEP is very limited due to the lack of peripherals to generate wake interrupts. Memory a

Re: [PATCH v2 5/7] configure: Unnest detection of -z, relro and -z, now

2019-12-18 Thread Philippe Mathieu-Daudé
On 12/18/19 11:34 PM, Richard Henderson wrote: There is nothing about these options that is related to PIE. Use them unconditionally. Signed-off-by: Richard Henderson --- v2: Do not split into two tests. --- configure | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git

Re: [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler

2019-12-18 Thread Philippe Mathieu-Daudé
On 12/18/19 9:47 PM, Richard Henderson wrote: On 12/18/19 7:19 AM, Philippe Mathieu-Daudé wrote: The Chardev events are listed in the QEMUChrEvent enum. To be able to use this enum in the IOEventHandler typedef, we need to explicit all the events ignored by this frontend, to silent the following

Re: [PATCH] iotests: Add more "_require_drivers" checks to the shell-based tests

2019-12-18 Thread Eric Blake
On 12/18/19 10:15 AM, Thomas Huth wrote: Test 051 should be skipped if nbd is not available, and 267 should be skipped if copy-on-read is not enabled. Signed-off-by: Thomas Huth --- tests/qemu-iotests/051 | 1 + tests/qemu-iotests/267 | 1 + 2 files changed, 2 insertions(+) Reviewed-by: E

[PATCH v2 7/7] configure: Support -static-pie if requested

2019-12-18 Thread Richard Henderson
Recent toolchains support static and pie at the same time. As with normal dynamic builds, allow --static to default to PIE if supported by the toolchain. Allow --enable/--disable-pie to override the default. Signed-off-by: Richard Henderson --- v2: Fix --disable-pie --static --- configure | 19

[PATCH v2 6/7] configure: Override the os default with --disable-pie

2019-12-18 Thread Richard Henderson
Some distributions, e.g. Ubuntu 19.10, enable PIE by default. If for some reason one wishes to build a non-pie binary, we must provide additional options to override. At the same time, reorg the code to an elif chain. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: R

[PATCH v2 4/7] configure: Always detect -no-pie toolchain support

2019-12-18 Thread Richard Henderson
The CFLAGS_NOPIE and LDFLAGS_NOPIE variables are used in pc-bios/optionrom/Makefile, which has nothing to do with the PIE setting of the main qemu executables. This overrides any operating system default to build all executables as PIE, which is important for ROMs. Reviewed-by: Philippe Mathieu-D

[PATCH v2 3/7] configure: Do not force pie=no for non-x86

2019-12-18 Thread Richard Henderson
PIE is supported on many other hosts besides x86. The default for non-x86 is now the same as x86: pie is used if supported, and may be forced via --enable/--disable-pie. The original commit (40d6444e91c) said: "Non-x86 are not changed, as they require TCG changes" but I think that's wrong --

[PATCH v2 1/7] configure: Drop adjustment of textseg

2019-12-18 Thread Richard Henderson
This adjustment was random and unnecessary. The user mode startup code in probe_guest_base() will choose a value for guest_base that allows the host qemu binary to not conflict with the guest binary. With modern distributions, this isn't even used, as the default is PIE, which does the same job i

[PATCH v2 2/7] tcg: Remove softmmu code_gen_buffer fixed address

2019-12-18 Thread Richard Henderson
The commentary talks about "in concert with the addresses assigned in the relevant linker script", except there is no linker script for softmmu, nor has there been for some time. (Do not confuse the user-only linker script editing that was removed in the previous patch, because user-only does not

[PATCH v2 0/7] configure: Improve PIE and other linkage

2019-12-18 Thread Richard Henderson
This begins by dropping the -Ttext-segment stuff, which Fangrui Song correctly points out does not work with lld. But it's also obsolete, so instead of adding support for lld's --image-base, remove it all. Then, remove some other legacy random addresses that were supposed to apply to softmmu, but

[PATCH v2 5/7] configure: Unnest detection of -z,relro and -z,now

2019-12-18 Thread Richard Henderson
There is nothing about these options that is related to PIE. Use them unconditionally. Signed-off-by: Richard Henderson --- v2: Do not split into two tests. --- configure | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 7a646ec007..25032886

Re: [PATCH 0/7] configure: Improve PIE and other linkage

2019-12-18 Thread Richard Henderson
On 12/17/19 9:28 PM, Fangrui Song wrote: > How will this patch set affect statically linked user mode binaries? > (qemu-user-static packages on Debian, CentOS, ...) The statically linked user mode binaries will still build, and should still be able to run any guest binary that could be run before.

Re: [PATCH v1 0/4] semihosting read console support

2019-12-18 Thread Keith Packard
Alex Bennée writes: > Hi, > > This series introduces a new "blocking" console read function for > semihosting and plumbs it in to the ARM semihosting code. The main bit > of work is Keith's patch (with a few tweaks by me). The other > preparatory patches make sure the PC is updated after semihost

[PATCH v39 01/22] target/avr: Add outward facing interfaces and core CPU logic

2019-12-18 Thread Michael Rolnik
This includes: - CPU data structures - object model classes and functions - migration functions - GDB hooks Co-developed-by: Michael Rolnik Co-developed-by: Sarah Harris Signed-off-by: Michael Rolnik Signed-off-by: Sarah Harris Signed-off-by: Michael Rolnik Acked-by: Igor Mammedov Tested-by:

[Bug 1596832] Re: e500 -bios/-kernel broken with big images

2019-12-18 Thread ecsdn
Curious: Is your guest kernel >=3.6 with qemu-ppce500 config ie qemu_ppce500 defined etc? In case u-boot loads/maps uImage format kernel differently have you tried uImage vs vmlinux? And are you able to boot ok with an mpc... machine instead of ppce500 by specifying a dtb file or dtb compatibil

Re: [PATCH] util/cutils: Expand do_strtosz parsing precision to 64 bits

2019-12-18 Thread Eric Blake
On 12/17/19 7:33 PM, Tao Xu wrote: Also fun: for "0123", we use uint64_t 83, not double 123.0.  But for "0123.", we use 123.0, not 83. Do we really want to accept octal and hexadecimal integers? Thank you for reminding me. Octal and hexadecimal may bring more confusion. I will use qemu_strt

Re: [PATCH v10 Kernel 4/5] vfio iommu: Implementation of ioctl to for dirty pages tracking.

2019-12-18 Thread Alex Williamson
On Tue, 17 Dec 2019 14:54:14 +0530 Kirti Wankhede wrote: > On 12/17/2019 10:45 AM, Yan Zhao wrote: > > On Tue, Dec 17, 2019 at 04:21:39AM +0800, Kirti Wankhede wrote: > >> + } else if (range.flags & > >> + VFIO_IOMMU_DIRTY_PAGES_FLAG_GET_BITMAP) { > >> +

[Bug 1856834] Re: Virtio broken in qemu ppc in 4.2.0 and other versions

2019-12-18 Thread ecsdn
** Tags added: ppc -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1856834 Title: Virtio broken in qemu ppc in 4.2.0 and other versions Status in QEMU: New Bug description: The same qemu -M mpc

[Bug 1856834] Re: Virtio broken in qemu ppc in 4.2.0 and other versions

2019-12-18 Thread ecsdn
** Summary changed: - softmmu qemu-system-ppc freezes at virtio vda + Virtio broken in qemu ppc in 4.2.0 and other versions ** Tags added: virtio ** Tags added: powerpc softmmu -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https:

Re: [RFC PATCH v2 6/6] hw/pci-host/designware: Remove unuseful FALLTHROUGH comment

2019-12-18 Thread Aleksandar Markovic
On Wed, Dec 18, 2019 at 8:29 PM Philippe Mathieu-Daudé wrote: > > We don't need to explicit this obvious switch fall through. > Stay consistent with the rest of the codebase. > > Signed-off-by: Philippe Mathieu-Daudé > --- I see you covered two cases of such comment (in patches 5 and 6). But wh

Re: [RFC PATCH 5/5] tests/boot_linux_console: Add a SLOW test booting Ubuntu on OrangePi PC

2019-12-18 Thread Niek Linnenbank
Hi Philippe, This test has some problems on my host (Ubuntu 18.04.3 LTS, avocado 73.0, python 3.6.9): (4/4) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_arm_orangepi_bionic: ERROR: Input format not supported by decoder (3.25 s) RESULTS: PASS 3 | ERROR 1 | FAIL 0 | SKIP 0 | W

Re: [RFC PATCH] semihosting: suspend recieving CPU when blocked (HACK, WIP)

2019-12-18 Thread Paolo Bonzini
Il mer 18 dic 2019, 18:36 Alex Bennée ha scritto: > > Paolo Bonzini writes: > > > On 17/12/19 15:18, Alex Bennée wrote: > >> cpu_has_work is a guest function though and semihosting_console is a > >> common hw module. It can't peek into the guests internal state. > > > > semihosting_console only

Re: [RFC PATCH 4/5] !fixup "hw: arm: add Xunlong Orange Pi PC machine"

2019-12-18 Thread Niek Linnenbank
Hi Philippe, Noted. I'll make sure mc->default_ram_size = 1 * GiB is added for the next reworked patch set v3. Regards, Niek On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé wrote: > Without this, the machine starts with default 128MB, and Ubuntu Bionic > fails: > > [ *** ] (2 of 4) A s

Re: [PATCH 2/5] tests/boot_linux_console: Add initrd test for the Orange Pi PC board

2019-12-18 Thread Niek Linnenbank
This one also works fine on my host (Ubuntu 18.04 LTS): Tested-by: Niek Linnenbank On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé wrote: > This test boots a Linux kernel on a OrangePi PC board and verify > the serial output is working. > > The kernel image and DeviceTree blob are bui

Re: [PATCH 3/5] tests/boot_linux_console: Add a SD card test for the OrangePi PC board

2019-12-18 Thread Niek Linnenbank
Same, this one also runs fine for me: Tested-by: Niek Linnenbank On Tue, Dec 17, 2019 at 7:27 PM Philippe Mathieu-Daudé wrote: > The kernel image and DeviceTree blob are built by the Raspbian > project (based on Debian): > https://www.raspbian.org/RaspbianImages > > The SD image is from the

Re: [PATCH 1/5] tests/boot_linux_console: Add a quick test for the OrangePi PC board

2019-12-18 Thread Niek Linnenbank
Hey Philippe, Super!! Fantastic, now we can automatically test the H3 based boards and use that to verify they keep working as expected when changing the code. Great, I'm going to use these tests also from now on (previously I had some small bash scripts). This quick test is working fine for me,

[PATCH v39 22/22] target/avr: Update MAINTAINERS file

2019-12-18 Thread Michael Rolnik
Include AVR maintaners in MAINTAINERS file Signed-off-by: Michael Rolnik --- MAINTAINERS | 21 + 1 file changed, 21 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 740401bcbb..9ed886106a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -163,6 +163,27 @@ S: Maintained

[PATCH v39 16/22] target/avr: Add section about AVR into QEMU documentation

2019-12-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- qemu-doc.texi | 51 +++ 1 file changed, 51 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index eea91a2d1e..c169ab9357 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -1742,6 +1742,7 @@ differences are

[PATCH v39 21/22] target/avr: Add Avocado test

2019-12-18 Thread Michael Rolnik
The test is based on https://github.com/seharris/qemu-avr-tests/tree/master/free-rtos/Demo demo which. If working correctly, prints 'ABCDEFGHIJKLMNOPQRSTUVWX' out. it also demostrates that timer and IRQ are working Signed-off-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Phil

[PATCH v39 15/22] target/avr: Add example board configuration

2019-12-18 Thread Michael Rolnik
A simple board setup that configures an AVR CPU to run a given firmware image. This is all that's useful to implement without peripheral emulation as AVR CPUs include a lot of on-board peripherals. NOTE: this is not a real board NOTE: it's used for CPU testing Signed-off-by: Michael Rol

[PATCH v39 19/22] target/avr: Update build system

2019-12-18 Thread Michael Rolnik
Make AVR support buildable Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- configure | 7 +++ default-configs/avr-softmmu.mak | 5 + target/avr/Makefile.objs| 34 + 3 fi

[PATCH v39 20/22] target/avr: Add boot serial test

2019-12-18 Thread Michael Rolnik
Print out 'T' through serial port Signed-off-by: Michael Rolnik Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth --- tests/boot-serial-test.c | 10 ++ tests/Makefile.include | 2 ++ 2 files changed, 12 insertions(+) diff --git a/tests/boo

[PATCH v39 11/22] target/avr: Add instruction disassembly function

2019-12-18 Thread Michael Rolnik
Provide function disassembles executed instruction when `-d in_asm` is provided Example: `./avr-softmmu/qemu-system-avr -bios free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf -d in_asm` will produce something like the following ``` ... IN: 0x014a: CALL 0x3808 IN: main 0x

[PATCH v39 14/22] target/avr: Add dummy mask device

2019-12-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik --- include/hw/misc/avr_mask.h | 47 hw/misc/avr_mask.c | 112 + hw/misc/Kconfig| 3 + hw/misc/Makefile.objs | 2 + 4 files changed, 164 insertions(+) create mode 100644 include/hw/mi

[PATCH v39 18/22] target/avr: Add machine none test

2019-12-18 Thread Michael Rolnik
Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic --- tests/machine-none-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/machine-none-test.c b/tests/machine-none-test.c index 5953d31755..3e5c74e73e 100644 --- a/tests/machine-none-t

[PATCH v39 12/22] target/avr: Add limited support for USART peripheral

2019-12-18 Thread Michael Rolnik
These were designed to facilitate testing but should provide enough function to be useful in other contexts. Only a subset of the functions of each peripheral is implemented, mainly due to the lack of a standard way to handle electrical connections (like GPIO pins). Signed-off-by: Sarah Harris

[PATCH v39 07/22] target/avr: Add instruction translation - Data Transfer Instructions

2019-12-18 Thread Michael Rolnik
This includes: - MOV, MOVW - LDI, LDS LDX LDY LDZ - LDDY, LDDZ - STS, STX STY STZ - STDY, STDZ - LPM, LPMX - ELPM, ELPMX - SPM, SPMX - IN, OUT - PUSH, POP - XCH - LAS, LAC LAT Signed-off-by: Michael Rolnik --- target/avr/translate.c | 986 +

[PATCH v39 10/22] target/avr: Add instruction translation - CPU main translation function

2019-12-18 Thread Michael Rolnik
Co-developed-by: Richard Henderson Co-developed-by: Michael Rolnik Signed-off-by: Michael Rolnik Tested-by: Philippe Mathieu-Daudé --- target/avr/translate.c | 234 + 1 file changed, 234 insertions(+) diff --git a/target/avr/translate.c b/target/avr/tr

  1   2   3   4   5   >