Re: [PATCH] block: Avoid memleak on qcow2 image info failure

2020-03-22 Thread Vladimir Sementsov-Ogievskiy
20.03.2020 21:36, Eric Blake wrote: If we fail to get bitmap info, we must not leak the encryption info. Fixes: b8968c875f403 Fixes: Coverity CID 1421894 Signed-off-by: Eric Blake --- block/qcow2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2.c b/block/qcow2.c index d44b45

Re: [PATCH v6 04/61] target/riscv: add vector configure instruction

2020-03-22 Thread Kito Cheng
Hi Zhiwei: vsetvl and vsetvli seems like missing ISA checking before translate, this cause those 2 instructions can be executed even RVV not enable. My testing env is qemu riscv64-linux-user mode. > diff --git a/target/riscv/insn_trans/trans_rvv.inc.c > b/target/riscv/insn_trans/trans_rvv.inc.c

Re: [PATCH v5 0/3] net: tulip: add checks to avoid OOB access

2020-03-22 Thread Li Qiang
Jason Wang 于2020年3月23日周一 上午11:44写道: > > On 2020/3/20 上午1:40, P J P wrote: > > From: Prasad J Pandit > > > > Hello, > > > > * This series adds checks to avoid potential OOB access and infinite loop > >issues while processing rx/tx data. > > > > * Tulip tx descriptors are capped at 128 to avoi

Re: [PATCH v5 0/3] net: tulip: add checks to avoid OOB access

2020-03-22 Thread P J P
+-- On Mon, 23 Mar 2020, P J P wrote --+ | +-- On Mon, 23 Mar 2020, Jason Wang wrote --+ | | hw/net/tulip.c:305:20: error: initialization of ‘_Bool (*)(NetClientState *)’ | | {aka ‘_Bool (*)(struct NetClientState *)’} from incompatible pointer type ‘int | | (*)(NetClientState *)’ {aka ‘int (*)(st

Re: [PATCH] tests/acceptance/ppc_prep_40p: Use cdn.netbsd.org hostname

2020-03-22 Thread David Gibson
On Wed, Mar 11, 2020 at 12:59:44PM -0300, Willian Rampazzo wrote: > > That certainly sounds like an improvement. I still don't love the > > idea that the test results will vary based on something outside of the > > tested code, even if a cancel is definitely better than a fail. > > During the dev

Re: [PATCH v5 0/3] net: tulip: add checks to avoid OOB access

2020-03-22 Thread P J P
+-- On Mon, 23 Mar 2020, Jason Wang wrote --+ | hw/net/tulip.c:305:20: error: initialization of ‘_Bool (*)(NetClientState *)’ | {aka ‘_Bool (*)(struct NetClientState *)’} from incompatible pointer type ‘int | (*)(NetClientState *)’ {aka ‘int (*)(struct NetClientState *)’} | [-Werror=incompatible-po

Re: [PATCH v5 0/3] net: tulip: add checks to avoid OOB access

2020-03-22 Thread Jason Wang
On 2020/3/23 上午11:43, Jason Wang wrote: On 2020/3/20 上午1:40, P J P wrote: From: Prasad J Pandit Hello, * This series adds checks to avoid potential OOB access and infinite loop    issues while processing rx/tx data. * Tulip tx descriptors are capped at 128 to avoid infinite loop in    t

Re: [PATCH v5 0/3] net: tulip: add checks to avoid OOB access

2020-03-22 Thread Jason Wang
On 2020/3/20 上午1:40, P J P wrote: From: Prasad J Pandit Hello, * This series adds checks to avoid potential OOB access and infinite loop issues while processing rx/tx data. * Tulip tx descriptors are capped at 128 to avoid infinite loop in tulip_xmit_list_update(), wrt Tulip kernel dr

Re: [PATCH 1/1] spapr/rtas: Add MinMem to ibm,get-system-parameter RTAS call

2020-03-22 Thread David Gibson
On Fri, Mar 20, 2020 at 09:39:22PM -0300, Leonardo Bras wrote: > Add support for MinMem SPLPAR Characteristic on emulated > RTAS call ibm,get-system-parameter. > > MinMem represents Minimum Memory, that is described in LOPAPR as: > The minimum amount of main store that is needed to power on the >

Re: [PATCH for-5.0] hw/ppc: Take QEMU lock when calling ppc_dcr_read/write()

2020-03-22 Thread David Gibson
On Sun, Mar 22, 2020 at 07:22:58PM +, Peter Maydell wrote: > The ppc_dcr_read() and ppc_dcr_write() functions call into callbacks > in device code, so we need to hold the QEMU iothread lock while > calling them. This is the case already for the callsites in > kvmppc_handle_dcr_read/write(), bu

Re: [RFC PATCH] target/ppc: Add capability for enabling secure guests

2020-03-22 Thread David Gibson
On Fri, Mar 20, 2020 at 08:23:53PM -0300, Fabiano Rosas wrote: > Making use of ppc's Protected Execution Facility (PEF) feature, a > guest can become a secure guest (aka. secure VM - SVM) and have its > memory protected from access by the host. This feature is mediated by > a piece of firmware call

Re: [PATCH] ppc/ppc405_boards: Remove unnecessary NULL check

2020-03-22 Thread David Gibson
On Sun, Mar 22, 2020 at 10:06:13AM +, Peter Maydell wrote: > On Sun, 22 Mar 2020 at 08:50, David Gibson > wrote: > > > > On Fri, Mar 20, 2020 at 04:57:40PM +0100, Philippe Mathieu-Daudé wrote: > > > This code is inside the "if (dinfo)" condition, so testing > > > again here whether it is NULL

[PATCH 2/3] target/i386: Add support for TEST_CTRL MSR

2020-03-22 Thread Xiaoyao Li
From: Xiaoyao Li MSR_TEST_CTRL is needed and accessed by feature split lock detection. Signed-off-by: Xiaoyao Li --- target/i386/cpu.h | 2 ++ target/i386/kvm.c | 13 + target/i386/machine.c | 20 3 files changed, 35 insertions(+) diff --git a/target/

[PATCH 1/3] target/i386: Rename CORE_CAPABILITY to CORE_CAPABILITIES

2020-03-22 Thread Xiaoyao Li
Intel SDM updates the name of MSR CORE_CAPABILITY to CORE_CAPABILITIES, so updating it QEMU. Signed-off-by: Xiaoyao Li --- target/i386/cpu.c | 12 ++-- target/i386/cpu.h | 6 +++--- target/i386/kvm.c | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/target/i3

[PATCH 0/3] Misc patches for core_capabilites and split lock detection

2020-03-22 Thread Xiaoyao Li
Patch 1 renames core_capability to core_capabilities to align with the latest SDM. Patch 2 adds MSR_TEST_CTRL support. Patch 3 prints info when guest is going to be killed due to split lock #AC Xiaoyao Li (3): target/i386: Rename CORE_CAPABILITY to CORE_CAPABILITIES target/i386: Add support

[PATCH 3/3] target/i386: Tell why guest exits to user space due to #AC

2020-03-22 Thread Xiaoyao Li
Tell why guest exits from kvm to user space due to #AC, so user knows what happened. Signed-off-by: Xiaoyao Li --- target/i386/kvm.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/target/i386/kvm.c b/target/i386/kvm.c index 411402aa29fa..36bc1485d478 100644 --- a

Re: [PATCH v2] target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model

2020-03-22 Thread Xiaoyao Li
On 3/23/2020 10:32 AM, Tao Xu wrote: Hi Xiaoyao, May be you can add .note for this new version. for example: +    .version = 3, +    .note = "ARCH_CAPABILITIES", +    .props = (PropValue[]) { Hi Paolo and Eduardo, Need I spin a new version to add the .not

Re: [PATCH v14 Kernel 7/7] vfio: Selective dirty page tracking if IOMMU backed device pins pages

2020-03-22 Thread Yan Zhao
On Sat, Mar 21, 2020 at 03:41:42AM +0800, Alex Williamson wrote: > On Thu, 19 Mar 2020 02:24:33 -0400 > Yan Zhao wrote: > > On Thu, Mar 19, 2020 at 03:41:14AM +0800, Kirti Wankhede wrote: > > > diff --git a/drivers/vfio/vfio_iommu_type1.c > > > b/drivers/vfio/vfio_iommu_type1.c > > > index 912629

Re: [PATCH v2] target/i386: Add ARCH_CAPABILITIES related bits into Icelake-Server CPU model

2020-03-22 Thread Tao Xu
Hi Xiaoyao, May be you can add .note for this new version. for example: +.version = 3, +.note = "ARCH_CAPABILITIES", +.props = (PropValue[]) { On 3/16/2020 5:56 PM, Xiaoyao Li wrote: Current Icelake-Server CPU model lacks all the features enumer

Re: [PATCH v4 0/2] Cross-device resource sharing

2020-03-22 Thread David Stevens
Thanks for taking a look at this. I've opened a github issue. Fixes: https://github.com/oasis-tcs/virtio-spec/issues/76 Thanks, David On Fri, Mar 20, 2020 at 3:41 PM Gerd Hoffmann wrote: > > On Thu, Mar 19, 2020 at 11:18:21AM +0900, David Stevens wrote: > > Hi all, > > > > This is the next iter

Re: [PATCH v14 Kernel 5/7] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-03-22 Thread Yan Zhao
On Sat, Mar 21, 2020 at 03:28:21AM +0800, Alex Williamson wrote: > On Sat, 21 Mar 2020 00:44:32 +0530 > Kirti Wankhede wrote: > > > On 3/20/2020 9:17 PM, Alex Williamson wrote: > > > On Fri, 20 Mar 2020 09:40:39 -0600 > > > Alex Williamson wrote: > > > > > >> On Fri, 20 Mar 2020 04:35:29 -040

Re: deprecation of in-tree builds

2020-03-22 Thread BALATON Zoltan
On Sun, 22 Mar 2020, Peter Maydell wrote: On Sun, 22 Mar 2020 at 20:46, BALATON Zoltan wrote: On Sun, 22 Mar 2020, Peter Maydell wrote: Before you told me about the gprof issue, the *only* thing Was that gprof or gcov? Sorry, gcov; I always get those two mixed up in my head. Plus potenti

Re: [PATCH 0/6] dwc-hsotg (aka dwc2) USB host contoller emulation

2020-03-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/2020032726.10244-1-pauld...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 0/6] dwc-hsotg (aka dwc2) USB host contoller emulation Message-id: 2020032726.10244-1-pauld...@g

Re: [PATCH 0/6] dwc-hsotg (aka dwc2) USB host contoller emulation

2020-03-22 Thread Paul Zimmerman
On Sun, Mar 22, 2020 at 3:28 PM Paul Zimmerman wrote: < snip > > 2) I have imported the register description file from the Linux >kernel. This file is licensed GPL-2 only, is this OK? Never mind about the license, I see it is actually GPL 2.0 or later. I guess the question remains whether i

[PATCH 5/6] Add short-packet handling to usb-storage driver

2020-03-22 Thread Paul Zimmerman
The dwc-hsotg (dwc2) USB host depends on a short packet to indicate the end of an IN transfer. The usb-storage driver currently doesn't provide this, so fix it. Signed-off-by: Paul Zimmerman --- hw/usb/dev-storage.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --gi

[PATCH 4/6] dwc-hsotg USB host controller emulation

2020-03-22 Thread Paul Zimmerman
Add the dwc-hsotg (dwc2) USB host controller emulation code. Based on hw/usb/hcd-ehci.c and hw/usb/hcd-ohci.c. Note that to use this with the dwc-otg driver in the Raspbian kernel, you must pass the option "dwc_otg.fiq_fsm_enable=0" on the kernel command line. I have used some on-line sources of

[PATCH 2/6] dwc-hsotg USB host controller register definitions

2020-03-22 Thread Paul Zimmerman
Import the dwc2 register definitions file from the Linux kernel. This is a copy of drivers/usb/dwc2/hw.h from the mainline Linux kernel, the only changes being two instances of 'u32' changed to 'uint32_t' to allow it to compile Signed-off-by: Paul Zimmerman --- include/hw/usb/dwc2-regs.h | 895

[PATCH 3/6] dwc-hsotg USB host controller state definitions

2020-03-22 Thread Paul Zimmerman
Add the dwc-hsotg (dwc2) USB host controller state definitions. Mostly based on hw/usb/hcd-ehci.h. Signed-off-by: Paul Zimmerman --- hw/usb/hcd-dwc2.h | 180 ++ 1 file changed, 180 insertions(+) create mode 100644 hw/usb/hcd-dwc2.h diff --git a/hw/us

[PATCH 6/6] Wire in the dwc-hsotg USB host controller emulation

2020-03-22 Thread Paul Zimmerman
Wire the dwc-hsotg (dwc2) emulation into Qemu Signed-off-by: Paul Zimmerman --- hw/arm/bcm2835_peripherals.c | 21 - hw/usb/Kconfig | 5 + hw/usb/Makefile.objs | 1 + include/hw/arm/bcm2835_peripherals.h | 3 ++- 4 files ch

[PATCH 0/6] dwc-hsotg (aka dwc2) USB host contoller emulation

2020-03-22 Thread Paul Zimmerman
This patch series adds emulation for the dwc-hsotg USB controller, which is used on the Raspberry Pi 3 and earlier, as well as a number of other development boards. The main benefit for Raspberry Pi is that this enables networking on these boards, since the network adapter is attached via USB. The

[PATCH 1/6] Add BCM2835 SOC MPHI emulation

2020-03-22 Thread Paul Zimmerman
Add BCM2835 SOC MPHI emulation. It is very basic, only providing the FIQ interrupt needed to allow the dwc-otg USB host controller driver in the Raspbian kernel to function. Signed-off-by: Paul Zimmerman --- hw/arm/bcm2835_peripherals.c | 17 +++ hw/misc/Makefile.objs|

[PATCH v2 8/8] hw/arm/fsl-imx7: Connect watchdog interrupts

2020-03-22 Thread Guenter Roeck
i.MX7 supports watchdog pretimeout interupts. With this commit, the watchdog in mcimx7d-sabre is fully operational, including pretimeout support. Signed-off-by: Guenter Roeck --- v2: No change hw/arm/fsl-imx7.c | 11 +++ include/hw/arm/fsl-imx7.h | 5 + 2 files changed, 16

[PATCH v2 7/8] hw/arm/fsl-imx7: Instantiate various unimplemented devices

2020-03-22 Thread Guenter Roeck
Instantiating PWM, CAN, CAAM, and OCOTP devices is necessary to avoid crashes when booting mainline Linux. Signed-off-by: Guenter Roeck --- v2: "octop" -> "ocotp" hw/arm/fsl-imx7.c | 24 include/hw/arm/fsl-imx7.h | 16 2 files changed, 40 insert

[PATCH v2 5/8] hw/arm/fsl-imx6: Connect watchdog interrupts

2020-03-22 Thread Guenter Roeck
With this patch applied, the watchdog in the sabrelite emulation is fully operational, including pretimeout support. Signed-off-by: Guenter Roeck --- v2: No change hw/arm/fsl-imx6.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 13f1bf23

[PATCH v2 3/8] hw/arm/fsl-imx25: Wire up watchdog

2020-03-22 Thread Guenter Roeck
With this commit, the watchdog on imx25-pdk is fully operational, including pretimeout support. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Guenter Roeck --- v2: Select WDT_IMX2 explicitly Added Philippe's Reviewed-by: tag hw/arm/Kconfig | 1 + hw/arm/fsl-imx25.c

[PATCH v2 1/8] hw: Move i.MX watchdog driver to hw/watchdog

2020-03-22 Thread Guenter Roeck
In preparation for a full implementation, move i.MX watchdog driver from hw/misc to hw/watchdog. While at it, add the watchdog files to MAINTAINERS. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Guenter Roeck --- v2: Instead of auto-selecting WDT_IMX2 if IMX is enabled, select it expli

[PATCH v2 4/8] hw/arm/fsl-imx31: Wire up watchdog

2020-03-22 Thread Guenter Roeck
With this patch, the watchdog on i.MX31 emulations is fully operational. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Guenter Roeck --- v2: Select WDT_IMX2 explicitly Added Philippe's Reviewed-by: tag hw/arm/Kconfig | 1 + hw/arm/fsl-imx31.c | 6 ++ include/hw

[PATCH v2 6/8] hw/arm/fsl-imx6ul: Connect watchdog interrupts

2020-03-22 Thread Guenter Roeck
With this commit, the watchdog on mcimx6ul-evk is fully operational, including pretimeout support. Signed-off-by: Guenter Roeck --- v2: No change hw/arm/fsl-imx6ul.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c index 56dfd7cecc..3ecb2

[PATCH v2 0/8] hw/arm: Implement i.MX watchdog support

2020-03-22 Thread Guenter Roeck
The current i.MX watchdog implementation only supports resets. This patch series implements the full watchdog, including optional pretimeout support. Notable changes: - The existing i.MX watchdog emulation (which only emulates syste resets) is moved from hw/misc to hw/watchdog and renamed to mat

[PATCH v2 2/8] hw/watchdog: Implement full i.MX watchdog support

2020-03-22 Thread Guenter Roeck
Implement full support for the watchdog in i.MX systems. Pretimeout support is optional because the watchdog hardware on i.MX31 does not support pretimeouts. Signed-off-by: Guenter Roeck --- v2: Fixup of CONFIG_WDT_IMX -> CONFIG_WDT_IMX2 moved to patch 1/8 hw/watchdog/wdt_imx2.c | 196 +

Re: [PATCH 2/2] hw/misc/allwinner-h3-dramc: enforce 64-bit multiply when calculating row mirror address

2020-03-22 Thread Peter Maydell
On Sun, 22 Mar 2020 at 20:54, Niek Linnenbank wrote: > > The allwinner_h3_dramc_map_rows function simulates row addressing behavior > when bootloader software attempts to detect the amount of available SDRAM. > > Currently the line that calculates the 64-bit address of the mirrored row > uses a si

Re: [PULL 22/36] hw/arm/allwinner-h3: add SDRAM controller device

2020-03-22 Thread Peter Maydell
On Sun, 22 Mar 2020 at 20:23, Niek Linnenbank wrote: > On Fri, Mar 20, 2020 at 4:46 PM Peter Maydell > wrote: >> In this calculation we do the multiply as a signed 32-bit operation, >> which then gets sign-extended to 64 bits for the addition; that >> means that if the multiply result is greater

Re: deprecation of in-tree builds

2020-03-22 Thread Peter Maydell
On Sun, 22 Mar 2020 at 20:46, BALATON Zoltan wrote: > On Sun, 22 Mar 2020, Peter Maydell wrote: > > Before you told me about the gprof issue, the *only* thing > > Was that gprof or gcov? Sorry, gcov; I always get those two mixed up in my head. > Plus potentially any scripts people might use to b

[PATCH] hax: Windows doesn't like posix device names

2020-03-22 Thread Volker Rümelin
Patch acb9f95a7c "i386: Fix GCC warning with snprintf when HAX is enabled" replaced Windows device names with posix device names. Revert this. Fixes: acb9f95a7c "i386: Fix GCC warning with snprintf when HAX is enabled" Signed-off-by: Volker Rümelin --- target/i386/hax-windows.c | 4 ++-- 1 file

[PATCH 2/2] hw/misc/allwinner-h3-dramc: enforce 64-bit multiply when calculating row mirror address

2020-03-22 Thread Niek Linnenbank
The allwinner_h3_dramc_map_rows function simulates row addressing behavior when bootloader software attempts to detect the amount of available SDRAM. Currently the line that calculates the 64-bit address of the mirrored row uses a signed 32-bit multiply operation that in theory could result in the

[PATCH 1/2] hw/arm/orangepi: check for potential NULL pointer when calling blk_is_available

2020-03-22 Thread Niek Linnenbank
The Orange Pi PC initialization function needs to verify that the SD card block backend is usable before calling the Boot ROM setup routine. When calling blk_is_available() the input parameter should not be NULL. This commit ensures that blk_is_available is only called with non-NULL input. Reporte

Re: deprecation of in-tree builds

2020-03-22 Thread BALATON Zoltan
On Sun, 22 Mar 2020, Peter Maydell wrote: On Sun, 22 Mar 2020 at 19:52, Aleksandar Markovic wrote: If an end-user feature works only in in-tree builds (so, explitely said: not in out-of-tree builds), this is not a build-time stuff, but user-facing feature issue. gprof is a developer feature,

Re: deprecation of in-tree builds

2020-03-22 Thread Aleksandar Markovic
21:14 Ned, 22.03.2020. Peter Maydell > *Everything* is supposed to work in out of tree builds. > If it doesn't that's a bug -- unless people report bugs > we'll never know to fix them. Most developers use out > of tree builds and all our CI is out of tree builds, so > they actually get better ad-ho

Re: [PULL 22/36] hw/arm/allwinner-h3: add SDRAM controller device

2020-03-22 Thread Niek Linnenbank
Hi Peter, On Fri, Mar 20, 2020 at 4:46 PM Peter Maydell wrote: > On Thu, 12 Mar 2020 at 16:45, Peter Maydell > wrote: > > > > From: Niek Linnenbank > > > > In the Allwinner H3 SoC the SDRAM controller is responsible > > for interfacing with the external Synchronous Dynamic Random > > Access Me

Re: deprecation of in-tree builds

2020-03-22 Thread Peter Maydell
On Sun, 22 Mar 2020 at 19:52, Aleksandar Markovic wrote: > If an end-user feature works only in in-tree builds (so, > explitely said: not in out-of-tree builds), this is not > a build-time stuff, but user-facing feature issue. gprof is a developer feature, not an end-user-facing feature. By the l

Re: deprecation of in-tree builds

2020-03-22 Thread Aleksandar Markovic
18:21 Ned, 22.03.2020. Peter Maydell је написао/ла: > > On Sun, 22 Mar 2020 at 15:29, Aleksandar Markovic > wrote: > > If the "progress" (in the form of deprecation) is so impotrant, than the authors should devise it so that there is no dammage to existing features, and no adverse effects. > > >

[PATCH for-5.0] hw/ppc: Take QEMU lock when calling ppc_dcr_read/write()

2020-03-22 Thread Peter Maydell
The ppc_dcr_read() and ppc_dcr_write() functions call into callbacks in device code, so we need to hold the QEMU iothread lock while calling them. This is the case already for the callsites in kvmppc_handle_dcr_read/write(), but we must also take the lock when calling the helpers from TCG. This f

Re: [PATCH] Update copyright date for user-facing copyright strings

2020-03-22 Thread Peter Maydell
On Mon, 16 Mar 2020 at 11:20, Peter Maydell wrote: > > Update the copyright date to 2020 for the copyright strings which are > user-facing and represent overall copyright info for all of QEMU. > > Reported-by: John Arbuckle > Signed-off-by: Peter Maydell > --- > include/qemu-common.h | 2 +- >

[PATCH v2 0/1] COLO: Fix memory leak in packet_enqueue()

2020-03-22 Thread Derek Su
The patch is to fix the memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big to insert. Reproduce steps: (1) Setup PVM and SVM both with NIC e1000 by the steps descripted in the wiki qemu/COLO (2) Run "iperf3 -s" in PV

[PATCH v2 1/1] net/colo-compare.c: Fix memory leak in packet_enqueue()

2020-03-22 Thread Derek Su
The patch is to fix the "pkt" memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big. Signed-off-by: Derek Su --- net/colo-compare.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --gi

Re: deprecation of in-tree builds

2020-03-22 Thread Peter Maydell
On Sun, 22 Mar 2020 at 15:29, Aleksandar Markovic wrote: > If the "progress" (in the form of deprecation) is so impotrant, than the > authors should devise it so that there is no dammage to existing features, > and no adverse effects. > > In this light, perhaps in-tree builds deorecation is 5.0

[PULL v3 0/1] Slirp patches

2020-03-22 Thread Marc-André Lureau
The following changes since commit f57587c7d47b35b2d9b31def3a74d81bdb5475d7: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-03-17' into staging (2020-03-19 10:18:07 +) are available in the Git repository at: https://github.com/elmarco/qemu.git tags/slirp-pull-request

[PULL v3 1/1] slirp: update submodule to v4.2.0+

2020-03-22 Thread Marc-André Lureau
git shortlog 126c04acbabd7ad32c2b018fe10dfac2a3bc1210..55ab21c9a36852915b81f1b41ebaf3b6509dd8ba 5eraph (1): Use specific outbound IP address Akihiro Suda (8): remove confusing comment that exists from ancient slirp add slirp_new(SlirpConfig *, SlirpCb *, void *) allow cust

Re: [PATCH-for-5.0 1/2] hw/acpi/piix4: Add 'system-hotplug-support' property

2020-03-22 Thread Philippe Mathieu-Daudé
On 3/19/20 4:08 PM, Igor Mammedov wrote: On Thu, 19 Mar 2020 12:04:11 +0100 Philippe Mathieu-Daudé wrote: On 3/19/20 11:44 AM, Igor Mammedov wrote: On Wed, 18 Mar 2020 23:15:30 +0100 Philippe Mathieu-Daudé wrote: The I/O ranges registered by the piix4_acpi_system_hot_add_init() function

[PATCH 1/1] net/colo-compare.c: Fix memory leak in packet_enqueue()

2020-03-22 Thread Derek Su
The patch is to fix the "pkt" memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big. Signed-off-by: Derek Su --- net/colo-compare.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --gi

Re: [PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-03-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1584893097-12317-2-git-send-email-teawa...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CON

[PATCH-for-5.0] ui/input-linux: Do not ignore ioctl() return value

2020-03-22 Thread Philippe Mathieu-Daudé
Fix warnings reported by Clang static code analyzer: CC ui/input-linux.o ui/input-linux.c:343:9: warning: Value stored to 'rc' is never read rc = ioctl(il->fd, EVIOCGBIT(EV_REL, sizeof(relmap)), &relmap); ^~

[PATCH 0/1] COLO: Fix memory leak in packet_enqueue()

2020-03-22 Thread Derek Su
The patch is to fix the memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big to insert. Reproduce steps: (1) Setup PVM and SVM both with NIC e1000 by the steps descripted in the wiki qemu/COLO (2) Run "iperf3 -s" in

[PATCH 1/1] COLO: Fix memory leak in packet_enqueue()

2020-03-22 Thread Derek Su
The patch is to fix the "pkt" memory leak in packet_enqueue(). The allocated "pkt" needs to be freed if the colo compare primary or secondary queue is too big. Signed-off-by: Derek Su --- net/colo-compare.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --gi

[PATCH for QEMU v2] virtio-balloon: Add option cont-pages to set VIRTIO_BALLOON_VQ_INFLATE_CONT

2020-03-22 Thread Hui Zhu
If the guest kernel has many fragmentation pages, use virtio_balloon will split THP of QEMU when it calls MADV_DONTNEED madvise to release the balloon pages. Set option cont-pages to on will open flags VIRTIO_BALLOON_VQ_INFLATE_CONT and set continuous pages order to THP order. Then It will get cont

[PATCH for Linux v2] virtio_balloon: Add VIRTIO_BALLOON_VQ_INFLATE_CONT to handle THP split issue

2020-03-22 Thread Hui Zhu
The first version is in [1]. According to the comments from Michael and David, I updated the patch. 1. Added a separate vq inflate_cont_vq to transport inflate continuous pages. 2. Set all the pages in the continuous pages movable then they can be compaction. 3. Added a new element pages_orde

[PATCH] .travis.yml: Add a KVM-only s390x job

2020-03-22 Thread Philippe Mathieu-Daudé
Add a job to build QEMU on s390x with TCG disabled, so this configuration won't bitrot over time. This job is quick, running check-unit: Ran for 5 min 30 sec https://travis-ci.org/github/philmd/qemu/jobs/665456423 Acked-by: Cornelia Huck Signed-off-by: Philippe Mathieu-Daudé --- .travis.yml |

Re: deprecation of in-tree builds

2020-03-22 Thread Aleksandar Markovic
9:51 PM Sub, 21.03.2020. Peter Maydell је написао/ла: > > AIUI from Paolo, the intention is to deprecate and eventually > stop supporting "in-tree" builds, so that the only option is > building in a separate build directory. I thought we should > probably mention that in the 5.0 changelog, so I wr

[PATCH 1/2] qemu-img: refactor dump_map_entry JSON format output

2020-03-22 Thread Eyal Moscovici
Previously dump_map_entry identified whether we need to start a new JSON array based on whether start address == 0. In this refactor we remove this assumption as in following patches we will allow map to start from an arbitrary position. Acked-by: Mark Kanda Signed-off-by: Eyal Moscovici --- qe

[PATCH 2/2] qemu-img: Add --start-offset and --max-length to map

2020-03-22 Thread Eyal Moscovici
The mapping operation of large disks especially ones stored over a long chain of QCOW2 files can take a long time to finish. Additionally when mapping fails there was no way recover by restarting the mapping from the failed location. The new options, --start-offset and --max-length allows the user

[PATCH 0/2] Additional parameters for qemu_img map

2020-03-22 Thread Eyal Moscovici
Hi, The following series adds two parameters to qemu-img map: 1. start-offset: mapping starting offset. 2. max-length: the length of the mapping. These parameters proved useful when mapping large disk spread across long store file chains. It allows us to bound the execution time of each qemu-img

Re: [PATCH v1 00/22] intel_iommu: expose Shared Virtual Addressing to VMs

2020-03-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1584880579-12178-1-git-send-email-yi.l@intel.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT

[PATCH v1 04/22] hw/iommu: introduce HostIOMMUContext

2020-03-22 Thread Liu Yi L
Currently, many platform vendors provide the capability of dual stage DMA address translation in hardware. For example, nested translation on Intel VT-d scalable mode, nested stage translation on ARM SMMUv3, and etc. In dual stage DMA address translation, there are two stages address translation, s

[PATCH v1 18/22] vfio: add support for flush iommu stage-1 cache

2020-03-22 Thread Liu Yi L
This patch adds flush_stage1_cache() definition in HostIOMUContextClass. And adds corresponding implementation in VFIO. This is to expose a way for vIOMMU to flush stage-1 cache in host side since guest owns stage-1 translation structures in dual stage DMA translation configuration. Cc: Kevin Tian

[PATCH v1 22/22] intel_iommu: modify x-scalable-mode to be string option

2020-03-22 Thread Liu Yi L
Intel VT-d 3.0 introduces scalable mode, and it has a bunch of capabilities related to scalable mode translation, thus there are multiple combinations. While this vIOMMU implementation wants simplify it for user by providing typical combinations. User could config it by "x-scalable-mode" option. Th

[PATCH v1 19/22] intel_iommu: process PASID-based iotlb invalidation

2020-03-22 Thread Liu Yi L
This patch adds the basic PASID-based iotlb (piotlb) invalidation support. piotlb is used during walking Intel VT-d 1st level page table. This patch only adds the basic processing. Detailed handling will be added in next patch. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bon

[PATCH v1 14/22] intel_iommu: bind/unbind guest page table to host

2020-03-22 Thread Liu Yi L
This patch captures the guest PASID table entry modifications and propagates the changes to host to setup dual stage DMA translation. The guest page table is configured as 1st level page table (GVA->GPA) whose translation result would further go through host VT-d 2nd level page table(GPA->HPA) unde

[PATCH v1 15/22] intel_iommu: replay guest pasid bindings to host

2020-03-22 Thread Liu Yi L
This patch adds guest pasid bindings replay for domain selective pasid cache invalidation(dsi) and global pasid cache invalidation by walking guest pasid table. Reason: Guest OS may flush the pasid cache with a larger granularity. e.g. guest does a svm_bind() but flush the pasid cache with global

[PATCH v1 12/22] intel_iommu: add PASID cache management infrastructure

2020-03-22 Thread Liu Yi L
This patch adds a PASID cache management infrastructure based on new added structure VTDPASIDAddressSpace, which is used to track the PASID usage and future PASID tagged DMA address translation support in vIOMMU. struct VTDPASIDAddressSpace { VTDBus *vtd_bus; uint8_t devfn;

[PATCH v1 09/22] vfio/common: check PASID alloc/free availability

2020-03-22 Thread Liu Yi L
VFIO exposes host IOMMU dual-stage DMA translation programming capability to userspace by VFIO_TYPE1_NESTING_IOMMU type. However, userspace needs more info on the nesting type. e.g. the supported stage 1 format and PASID alloc/free request availability. This patch gets the iommu nesting cap info f

[PATCH v1 17/22] intel_iommu: do not pass down pasid bind for PASID #0

2020-03-22 Thread Liu Yi L
RID_PASID field was introduced in VT-d 3.0 spec, it is used for DMA requests w/o PASID in scalable mode VT-d. It is also known as IOVA. And in VT-d 3.1 spec, there is definition on it: "Implementations not supporting RID_PASID capability (ECAP_REG.RPS is 0b), use a PASID value of 0 to perform addr

[PATCH v1 16/22] intel_iommu: replay pasid binds after context cache invalidation

2020-03-22 Thread Liu Yi L
This patch replays guest pasid bindings after context cache invalidation. This is a behavior to ensure safety. Actually, programmer should issue pasid cache invalidation with proper granularity after issuing a context cache invalidation. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc:

[PATCH v1 11/22] intel_iommu: process PASID cache invalidation

2020-03-22 Thread Liu Yi L
This patch adds PASID cache invalidation handling. When guest enabled PASID usages (e.g. SVA), guest software should issue a proper PASID cache invalidation when caching-mode is exposed. This patch only adds the draft handling of pasid cache invalidation. Detailed handling will be added in subseque

[PATCH v1 21/22] intel_iommu: process PASID-based Device-TLB invalidation

2020-03-22 Thread Liu Yi L
This patch adds an empty handling for PASID-based Device-TLB invalidation. For now it is enough as it is not necessary to propagate it to host for passthru device and also there is no emulated device has device tlb. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Ri

[PATCH v1 07/22] intel_iommu: add set/unset_iommu_context callback

2020-03-22 Thread Liu Yi L
This patch adds set/unset_iommu_context() impelementation in Intel vIOMMU. For Intel platform, pass-through modules (e.g. VFIO) could set HostIOMMUContext to Intel vIOMMU emulator. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkos

[PATCH v1 03/22] vfio: check VFIO_TYPE1_NESTING_IOMMU support

2020-03-22 Thread Liu Yi L
VFIO needs to check VFIO_TYPE1_NESTING_IOMMU support with Kernel before further using it. e.g. requires to check IOMMU UAPI version. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun Cc: David Gibson Cc: Alex Williamson Signed-off-by: Liu Yi L Signed-off-by: Yi Sun ---

[PATCH v1 10/22] intel_iommu: add virtual command capability support

2020-03-22 Thread Liu Yi L
This patch adds virtual command support to Intel vIOMMU per Intel VT-d 3.1 spec. And adds two virtual commands: allocate pasid and free pasid. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Reviewed-by: Peter Xu Signed-off-b

[PATCH v1 20/22] intel_iommu: propagate PASID-based iotlb invalidation to host

2020-03-22 Thread Liu Yi L
This patch propagates PASID-based iotlb invalidation to host. Intel VT-d 3.0 supports nested translation in PASID granular. Guest SVA support could be implemented by configuring nested translation on specific PASID. This is also known as dual stage DMA translation. Under such configuration, guest

[PATCH v1 00/22] intel_iommu: expose Shared Virtual Addressing to VMs

2020-03-22 Thread Liu Yi L
Shared Virtual Addressing (SVA), a.k.a, Shared Virtual Memory (SVM) on Intel platforms allows address space sharing between device DMA and applications. SVA can reduce programming complexity and enhance security. This QEMU series is intended to expose SVA usage to VMs. i.e. Sharing guest applicati

[PATCH v1 02/22] header file update VFIO/IOMMU vSVA APIs

2020-03-22 Thread Liu Yi L
The kernel uapi/linux/iommu.h header file includes the extensions for vSVA support. e.g. bind gpasid, iommu fault report related user structures and etc. Note: this should be replaced with a full header files update when the vSVA uPAPI is stable. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Y

[PATCH v1 08/22] vfio: init HostIOMMUContext per-container

2020-03-22 Thread Liu Yi L
After confirming dual stage DMA translation support with kernel by checking VFIO_TYPE1_NESTING_IOMMU, VFIO inits HostIOMMUContet instance and exposes it to PCI layer. Thus vIOMMU emualtors may make use of such capability by leveraging the methods provided by HostIOMMUContext. Cc: Kevin Tian Cc: J

[PATCH v1 01/22] scripts/update-linux-headers: Import iommu.h

2020-03-22 Thread Liu Yi L
From: Eric Auger Update the script to import the new iommu.h uapi header. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Yi Sun Cc: Michael S. Tsirkin Cc: Cornelia Huck Cc: Paolo Bonzini Acked-by: Cornelia Huck Signed-off-by: Eric Auger --- scripts/update-linux-headers.sh | 2 +- 1 file

[PATCH v1 06/22] hw/pci: introduce pci_device_set/unset_iommu_context()

2020-03-22 Thread Liu Yi L
This patch adds pci_device_set/unset_iommu_context() to set/unset host_iommu_context for a given device. New callback is added in PCIIOMMUOps. As such, vIOMMU could make use of host IOMMU capability. e.g setup nested translation. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi

[PATCH v1 13/22] vfio: add bind stage-1 page table support

2020-03-22 Thread Liu Yi L
This patch adds bind_stage1_pgtbl() definition in HostIOMMUContextClass, also adds corresponding implementation in VFIO. This is to expose a way for vIOMMU to setup dual stage DMA translation for passthru devices on hardware. Cc: Kevin Tian Cc: Jacob Pan Cc: Peter Xu Cc: Eric Auger Cc: Yi Sun

[PATCH v1 05/22] hw/pci: modify pci_setup_iommu() to set PCIIOMMUOps

2020-03-22 Thread Liu Yi L
This patch modifies pci_setup_iommu() to set PCIIOMMUOps instead of setting PCIIOMMUFunc. PCIIOMMUFunc is used to get an address space for a PCI device in vendor specific way. The PCIIOMMUOps still offers this functionality. But using PCIIOMMUOps leaves space to add more iommu related vendor specif

[PATCH-for-5.0 v2 4/4] tests/docker: Add libepoxy and libudev packages to the Fedora image

2020-03-22 Thread Philippe Mathieu-Daudé
Install optional dependencies of QEMU to get better coverage. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/fedora.docker | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/docker/dockerfiles/fedora.docker b/tests/docker/dockerfiles/fed

[PATCH-for-5.0 v2 3/4] tests/docker: Use Python3 PyYAML in the Fedora image

2020-03-22 Thread Philippe Mathieu-Daudé
The Python2 PyYAML is now pointless, switch to the Python3 version. Fixes: bcbf27947 (docker: move tests from python2 to python3) Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/fedora.docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/docker/dock

[PATCH-for-5.0 v2 1/4] tests/docker: Keep package list sorted

2020-03-22 Thread Philippe Mathieu-Daudé
Keep package list sorted, this eases rebase/cherry-pick. Fixes: 3a6784813 Signed-off-by: Philippe Mathieu-Daudé --- tests/docker/dockerfiles/centos7.docker | 6 -- tests/docker/dockerfiles/fedora.docker | 6 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/docker/

[PATCH-for-5.0 v2 0/4] tests/docker: Fixes for 5.0

2020-03-22 Thread Philippe Mathieu-Daudé
Easy fixes for our Docker images. Since v1: - Reword gcrypt patch description (requested by Aleksandar) Philippe Mathieu-Daudé (4): tests/docker: Keep package list sorted tests/docker: Install gcrypt devel package in Debian image tests/docker: Use Python3 PyYAML in the Fedora image tests/

[PATCH-for-5.0 v2 2/4] tests/docker: Install gcrypt devel package in Debian image

2020-03-22 Thread Philippe Mathieu-Daudé
In commit 6f8bbb374be we enabled building with the gcrypt library on the the Debian 'x86 host', which was based on Debian Stretch. Later in commit 698a71edbed we upgraded the Debian base image to Buster. Apparently Debian Stretch was listing gcrypt as a QEMU dependency, but this is not the case an

  1   2   >