Re: [Qemu-devel] [PATCH] e1000e: fix building without CONFIG_VMXNET3_PCI

2016-07-17 Thread Jason Wang
On 2016年07月13日 10:42, Jason Wang wrote: e1000e needs net_tx_pkt.o and net_rx_pkt.o too. Cc: Dmitry Fleytman Cc: Leonid Bloch Signed-off-by: Jason Wang --- hw/net/Makefile.objs | 1 + 1 file

Re: [Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-07-17 Thread Zhang Chen
On 07/18/2016 01:31 PM, Jason Wang wrote: On 2016年07月18日 09:55, Zhang Chen wrote: Hi~ All~~ Can you give me some feedback for this patch? We need more comments~~ COLO project depend on this patch to work. Because this patch colo-compare can make handler of qemu_chr_add_handlers() run

Re: [Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-07-17 Thread Jason Wang
On 2016年07月18日 09:55, Zhang Chen wrote: Hi~ All~~ Can you give me some feedback for this patch? We need more comments~~ COLO project depend on this patch to work. Because this patch colo-compare can make handler of qemu_chr_add_handlers() run in compare thread, reduce workload of

Re: [Qemu-devel] [PATCH] virtio-blk: dataplane cleanup

2016-07-17 Thread Fam Zheng
On Mon, 07/18 12:05, Cao jin wrote: > No need duplicate the judgment, there is one in function entry. > > Cc: Stefan Hajnoczi > Cc: Kevin Wolf > Cc: Max Reitz > Signed-off-by: Cao jin > --- >

Re: [Qemu-devel] [RFC 1/6] target-ppc: Introduce Power9 family

2016-07-17 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Tue, Jul 12, 2016 at 11:33:17PM +0530, Nikunj A Dadhania wrote: >> From: "Aneesh Kumar K.V" >> >> Signed-off-by: Aneesh Kumar K.V >> [

Re: [Qemu-devel] [PATCH 1/3] virtio: Basic implementation of virtio pstore driver

2016-07-17 Thread Kees Cook
On Sun, Jul 17, 2016 at 9:37 PM, Namhyung Kim wrote: > The virtio pstore driver provides interface to the pstore subsystem so > that the guest kernel's log/dump message can be saved on the host > machine. Users can access the log file directly on the host, or on the > guest

Re: [Qemu-devel] [RFC 5/6] target-ppc: add modulo word operations

2016-07-17 Thread Nikunj A Dadhania
David Gibson writes: > [ Unknown signature status ] > On Tue, Jul 12, 2016 at 11:33:21PM +0530, Nikunj A Dadhania wrote: >> Adding following instructions: >> >> moduw: Modulo Unsigned Word >> modsw: Modulo Signed Word >> >> Signed-off-by: Nikunj A Dadhania

[Qemu-devel] [PULL 05/14] dbdma: fix load_word/store_word value endianness

2016-07-17 Thread David Gibson
From: Mark Cave-Ayland The values to read/write to/from physical memory are copied directly to the physical address with no endian swapping required. Also add some extra information to debugging output while we are here. Signed-off-by: Mark Cave-Ayland

[Qemu-devel] [PULL 04/14] dbdma: fix endian of DBDMA_CMDPTR_LO during branch

2016-07-17 Thread David Gibson
From: Mark Cave-Ayland The current DBDMA command is stored in little-endian format, so make sure we convert it to match our CPU when updating the DBDMA_CMDPTR_LO register. Signed-off-by: Mark Cave-Ayland Acked-by: Benjamin

[Qemu-devel] [PULL 08/14] ppc: Fix support for odd MSR combinations

2016-07-17 Thread David Gibson
From: Benjamin Herrenschmidt MacOS uses an architecturally illegal MSR combination that seems nonetheless supported by 32-bit processors, which is to have MSR[PR]=1 and one or more of MSR[DR/IR/EE]=0. This adds support for it. To work properly we need to also properly

[Qemu-devel] [PULL 13/14] target-ppc: fix left shift overflow in hpte_page_shift

2016-07-17 Thread David Gibson
From: Paolo Bonzini ps->pte_enc is a 32-bit value, which is shifted left and then compared to a 64-bit value. It needs a cast before the shift. Reported by Coverity. Signed-off-by: Paolo Bonzini Signed-off-by: David Gibson

[Qemu-devel] [PULL 10/14] spapr: Ensure CPU cores are added contiguously and removed in LIFO order

2016-07-17 Thread David Gibson
From: Bharata B Rao If CPU core addition or removal is allowed in random order leading to holes in the core id range (and hence in the cpu_index range), migration can fail as migration with holes in cpu_index range isn't yet handled correctly. Prevent this situation

[Qemu-devel] [PULL 11/14] ppc: abort if compat property contains an unknown value

2016-07-17 Thread David Gibson
From: Greg Kurz It is not possible to set the compat property to an unknown value with powerpc_set_compat(). Something must have gone terribly wrong in QEMU, if we detect an "Internal error" in powerpc_get_compat(). Let's abort then. This patch also drops the "max_compat ?

[Qemu-devel] [PULL 01/14] spapr: fix core unplug crash

2016-07-17 Thread David Gibson
From: Greg Kurz If the host has 8 threads/core and the guest is started with: -smp cores=1,threads=4,maxcpus=12 It is possible to crash QEMU by doing: (qemu) device_add host-spapr-cpu-core,core-id=16,id=foo (qemu) device_del foo Segmentation fault This happens because

[Qemu-devel] [PULL 03/14] dbdma: add per-channel debugging enabled via DEBUG_DBDMA_CHANMASK

2016-07-17 Thread David Gibson
From: Mark Cave-Ayland By default large amounts of DBDMA debugging are produced when often it is just 1 or 2 channels that are of interest. Introduce DEBUG_DBDMA_CHANMASK to allow the developer to select the channels of interest at compile time, and then further

[Qemu-devel] [PULL 09/14] vfio/spapr: Remove stale ioctl() call

2016-07-17 Thread David Gibson
This ioctl() call to VFIO_IOMMU_SPAPR_TCE_REMOVE was left over from an earlier version of the code and has since been folded into vfio_spapr_remove_window(). It wasn't caught because although the argument structure has been removed, the libc function remove() means this didn't trigger a compile

[Qemu-devel] [PULL 14/14] ppc: Yet another fix for the huge page support detection mechanism

2016-07-17 Thread David Gibson
From: Thomas Huth Commit 86b50f2e1bef ("Disable huge page support if it is not available for main RAM") already made sure that huge page support is not announced to the guest if the normal RAM of non-NUMA configurations is not backed by a huge page filesystem. However, there is

[Qemu-devel] [PULL 00/14] ppc-for-2.7 queue 20160718

2016-07-17 Thread David Gibson
The following changes since commit 6b92bbfe812746fe7841a24c24e6460f5359ce72: Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-signed' into staging (2016-07-15 16:56:08 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git

[Qemu-devel] [PULL 07/14] dbdma: reset io->processing flag for unassigned DBDMA channel rw accesses

2016-07-17 Thread David Gibson
From: Mark Cave-Ayland Otherwise MacOS 9 hangs upon shutdown. Signed-off-by: Mark Cave-Ayland Acked-by: Benjamin Herrenschmidt Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 02/14] dbdma: always define DBDMA_DPRINTF and enable debug with DEBUG_DBDMA

2016-07-17 Thread David Gibson
From: Mark Cave-Ayland Enabling DBDMA_DPRINTF unconditionally ensures that any errors in debug statements are picked up immediately. Signed-off-by: Mark Cave-Ayland Acked-by: Benjamin Herrenschmidt

[Qemu-devel] [PULL 06/14] dbdma: set FLUSH bit upon reception of flush command for unassigned DBDMA channels

2016-07-17 Thread David Gibson
From: Mark Cave-Ayland This fixes MacOS 9 whereby it continually flushes and polls the status bits until they are set to indicate a successful flush. Signed-off-by: Mark Cave-Ayland Acked-by: Benjamin Herrenschmidt

[Qemu-devel] [PULL 12/14] ppc/mmu-hash64: Remove duplicated #include statement

2016-07-17 Thread David Gibson
From: Thomas Huth No need to include error-report.h twice here. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- target-ppc/mmu-hash64.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target-ppc/mmu-hash64.c

[Qemu-devel] [PATCH] virtio-blk: dataplane cleanup

2016-07-17 Thread Cao jin
No need duplicate the judgment, there is one in function entry. Cc: Stefan Hajnoczi Cc: Kevin Wolf Cc: Max Reitz Signed-off-by: Cao jin --- hw/block/dataplane/virtio-blk.c | 6 ++ 1 file changed, 2

[Qemu-devel] [PATCH qemu] xhci: Fix possible side effect from assert()

2016-07-17 Thread Alexey Kardashevskiy
A static analysis tool called BEAM detected possible side effect from assert() calling a helper which may change an XHCI ring after every call. This moves xhci_ring_fetch() out of assert() so it will be called with and without enabled debug. Signed-off-by: Alexey Kardashevskiy

[Qemu-devel] [Bug 1603693] Re: Disks in mptsas1068 scsi controller not seen by linux

2016-07-17 Thread Dx
Welp. Yeah now I see it, it was in the test case I linked. Thanks. Vmware doesn't seem to need this. Seems like it assigns a WWN of 0x5000c293944837df to my disk (not in the vm config files as far as i can see, seems to persist across reboots) [2.305111] ioc0: LSISAS1068 B0:

Re: [Qemu-devel] [RFC 3/6] target-ppc: adding addpcis instruction

2016-07-17 Thread David Gibson
On Tue, Jul 12, 2016 at 11:33:19PM +0530, Nikunj A Dadhania wrote: > ISA 3.0 instruction for adding immediate value with next instruction > address and return the result in the target register. > > Signed-off-by: Nikunj A Dadhania Reviewed-by: David Gibson

Re: [Qemu-devel] [RFC 5/6] target-ppc: add modulo word operations

2016-07-17 Thread David Gibson
On Tue, Jul 12, 2016 at 11:33:21PM +0530, Nikunj A Dadhania wrote: > Adding following instructions: > > moduw: Modulo Unsigned Word > modsw: Modulo Signed Word > > Signed-off-by: Nikunj A Dadhania Hrm.. any reason you're not using the TCG inbuilt remainder ops

Re: [Qemu-devel] [RFC 2/6] target-ppc: Introduce POWER ISA 3.0 flag

2016-07-17 Thread David Gibson
On Tue, Jul 12, 2016 at 11:33:18PM +0530, Nikunj A Dadhania wrote: > This flag will be used for POWER9 instructions. > > Signed-off-by: Nikunj A Dadhania Reviewed-by: David Gibson > --- > target-ppc/cpu.h| 5 - >

Re: [Qemu-devel] [RFC 4/6] target-ppc: add cmprb instruction

2016-07-17 Thread David Gibson
On Tue, Jul 12, 2016 at 11:33:20PM +0530, Nikunj A Dadhania wrote: > ISA 3.0 Compare Ranged Byte instruction useful for > isupper/islower/isaplha kind of operation. At least until you have locale-aware versions of those... > Signed-off-by: Nikunj A Dadhania

Re: [Qemu-devel] [RFC 1/6] target-ppc: Introduce Power9 family

2016-07-17 Thread David Gibson
On Tue, Jul 12, 2016 at 11:33:17PM +0530, Nikunj A Dadhania wrote: > From: "Aneesh Kumar K.V" > > Signed-off-by: Aneesh Kumar K.V > [ rebased and added POWER9 alias ] > Signed-off-by: Nikunj A Dadhania

Re: [Qemu-devel] [RFC PATCH V2] qemu-char: Fix context for g_source_attach()

2016-07-17 Thread Zhang Chen
Hi~ All~~ Can you give me some feedback for this patch? We need more comments~~ COLO project depend on this patch to work. Because this patch colo-compare can make handler of qemu_chr_add_handlers() run in compare thread, reduce workload of main_loop in network busy situation. This idea

Re: [Qemu-devel] ext4 error when testing virtio-scsi & vhost-scsi

2016-07-17 Thread Dave Chinner
On Fri, Jul 15, 2016 at 03:55:20PM +0800, Zhangfei Gao wrote: > Dear Dave > > On Wed, Jul 13, 2016 at 7:03 AM, Dave Chinner wrote: > > On Tue, Jul 12, 2016 at 12:43:24PM -0400, Theodore Ts'o wrote: > >> On Tue, Jul 12, 2016 at 03:14:38PM +0800, Zhangfei Gao wrote: > >> >

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] Pass generic CPUState to gen_intermediate_code()

2016-07-17 Thread David Gibson
On Fri, Jul 15, 2016 at 06:12:05PM +0200, Lluís Vilanova wrote: > Needed to implement a target-agnostic gen_intermediate_code() in the > future. > > Signed-off-by: Lluís Vilanova > --- > include/exec/exec-all.h |2 +- > target-alpha/translate.c | 11

Re: [Qemu-devel] [RFC 2/2] linux-user: Fix cpu_index generation

2016-07-17 Thread David Gibson
On Sat, Jul 16, 2016 at 12:11:56AM +0200, Greg Kurz wrote: > On Thu, 14 Jul 2016 21:59:45 +1000 > David Gibson wrote: > > > On Thu, Jul 14, 2016 at 03:50:56PM +0530, Bharata B Rao wrote: > > > On Thu, Jul 14, 2016 at 3:24 PM, Peter Maydell

Re: [Qemu-devel] [PATCH] ppc: Yet another fix for the huge page support detection mechanism

2016-07-17 Thread David Gibson
On Fri, Jul 15, 2016 at 10:10:25AM +0200, Thomas Huth wrote: > Commit 86b50f2e1bef ("Disable huge page support if it is not available > for main RAM") already made sure that huge page support is not announced > to the guest if the normal RAM of non-NUMA configurations is not backed > by a huge

Re: [Qemu-devel] [PATCH] target-ppc: fix left shift overflow in hpte_page_shift

2016-07-17 Thread David Gibson
On Fri, Jul 15, 2016 at 05:22:10PM +0200, Paolo Bonzini wrote: > ps->pte_enc is a 32-bit value, which is shifted left and then compared > to a 64-bit value. It needs a cast before the shift. > > Reported by Coverity. > > Signed-off-by: Paolo Bonzini Applied to

Re: [Qemu-devel] [PATCH v2 2/2] tests: Check serial output of firmware boot of some machines

2016-07-17 Thread David Gibson
On Fri, Jul 15, 2016 at 05:39:39PM +0200, Thomas Huth wrote: > Some of the machines that we have got a firmware image for write > some output to the serial console while booting up. We can use > this output to make sure that the machine is basically working, > so this adds a test that checks the

Re: [Qemu-devel] [PATCH v2 1/2] tests: Resort check-qtest entries in Makefile.include

2016-07-17 Thread David Gibson
On Fri, Jul 15, 2016 at 05:39:38PM +0200, Thomas Huth wrote: > The rather random list of check-qtest-xxx entries caused some > confusion in the past, where to use "=" and where to use "+=" > (see commits 0ccac16f59462b8e2b9afbc1 and 1f5c1cfbaec0792cd2e5da > for example). > Sorting the

Re: [Qemu-devel] [PATCH] vfio/pci: Hide ARI capability

2016-07-17 Thread Marcel Apfelbaum
On 07/15/2016 08:30 PM, Alex Williamson wrote: QEMU supports ARI on downstream ports and assigned devices may support ARI in their extended capabilities. The endpoint ARI capability specifies the next function, such that the OS doesn't need to walk each possible function, however this next

Re: [Qemu-devel] [Xen-devel] [PATCH 01/19] xen: Create a new file xen_pvdev.c

2016-07-17 Thread Emil Condrea
On Jul 17, 2016 10:41, "Quan Xu" wrote: > > > [Quan:]: comment starts with [Quan:] > Thanks, Quan for your comments. The first patches from this series just move some code from xen_backend to xen_pvdev file. I would not group the reorg from xen_backend with refactoring in

[Qemu-devel] [PATCH V5 6/7] hw/apci: handle 64-bit MMIO regions correctly

2016-07-17 Thread Marcel Apfelbaum
In build_crs(), the calculation and merging of the ranges already happens in 64-bit, but the entry boundaries are silently truncated to 32-bit in the call to aml_dword_memory(). Fix it by handling the 64-bit MMIO ranges separately. This fixes 64-bit BARs behind PXBs. Reported-by: Laszlo Ersek

[Qemu-devel] [PATCH V5 3/7] hw/pxb: declare pxb devices as not hot-pluggable

2016-07-17 Thread Marcel Apfelbaum
Prevent future issues when hotplug will work for devices attached to pxbs. Suggested-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum Tested-by: Laszlo Ersek --- hw/pci-bridge/pci_expander_bridge.c | 2 ++ 1 file changed, 2

[Qemu-devel] [PATCH V5 7/7] tests/acpi: Add pxb/pxb-pcie tests blobs

2016-07-17 Thread Marcel Apfelbaum
Signed-off-by: Marcel Apfelbaum --- tests/acpi-test-data/pc/DSDT.pxb | Bin 0 -> 6286 bytes tests/acpi-test-data/q35/DSDT.pxb_pcie | Bin 0 -> 9098 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/acpi-test-data/pc/DSDT.pxb create mode

[Qemu-devel] [PATCH V5 4/7] hw/acpi: fix a DSDT table issue when a pxb is present.

2016-07-17 Thread Marcel Apfelbaum
PXBs do not support hotplug so they don't have a PCNT function. Since the PXB's PCI root-bus is a child bus of bus 0, the build_dsdt code will add a call to the corresponding PCNT function. Fix this by skipping the PCNT call for the above case. While at it skip also PCIe child buses.

[Qemu-devel] [PATCH V5 5/7] acpi: refactor pxb crs computation

2016-07-17 Thread Marcel Apfelbaum
Instead of always passing both IO and MEM ranges when computing CRS ranges, define a new CrsRangeSet structure that include them both. This is done before introducing a third type of range, 64-bit MEM, so it will be easier to pass them all around. Reviewed-by: Igor Mammedov

[Qemu-devel] [PATCH V5 2/7] tests/acpi: add pxb/pxb-pcie tests

2016-07-17 Thread Marcel Apfelbaum
Add an ivshmem device with 1G shared memory to pxb in order to check the ACPI code of 64bit MMIO allocation. Suggested-by: Igor Mammedov Signed-off-by: Marcel Apfelbaum Tested-by: Laszlo Ersek --- tests/bios-tables-test.c | 37

[Qemu-devel] [PATCH V5 0/7] pxb: fix 64-bit MMIO allocation

2016-07-17 Thread Marcel Apfelbaum
v4 -> v5: Addressed the pull request issues: (Peter Maydell) See: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg00882.html - cland warning -> "hw/pci/pci.c:196:23: runtime error: shift exponent -1 is negative": The PCIe Root port was not initialized properly, the interrupt

[Qemu-devel] [PATCH V5 1/7] hw/pcie-root-port: Fix PCIe root port initialization

2016-07-17 Thread Marcel Apfelbaum
Specify the root port interrupt pin as part of the init process for cases when msi/msix are not enabled. Fixes "hw/pci/pci.c:196:23: runtime error: shift exponent -1 is negative" warning from clang's sanitizer. Reported-by: Peter Maydell Signed-off-by: Marcel Apfelbaum

[Qemu-devel] [Bug 1603785] [NEW] trace_usb_port_attach prints junk data

2016-07-17 Thread Thomas
Public bug reported: Running qemu with tracing (-D ~/qemu_trace -d trace:\*) will result in a trace file with unprintable characters. example: usb_port_attach bus 0, port 1, devspeed <90>l.U, portspeed full+high The problem is in hw/usb/bus.c usb_mask_to_str. If speedmask doesn't match any of

[Qemu-devel] [Bug 1603779] [NEW] AC97 can allocate ~500MB of host RAM

2016-07-17 Thread Andrew Henderson
Public bug reported: While working with qtest test cases generated via fuzzing with QEMU 2.5.0, I discovered some odd behavior for the AC97 virtual device with qemu-system-i386. If AC97_MIC_ADC_RATE is set to the value of 1, the QEMU process allocates over 500MB of additional host RAM. You

Re: [Qemu-devel] [Xen-devel] [PATCH 01/19] xen: Create a new file xen_pvdev.c

2016-07-17 Thread Quan Xu
[Quan:]: comment starts with [Quan:] The purpose of the new file is to store generic functions shared by frontendand  backends such as xenstore operations, xendevs. Signed-off-by: Quan Xu  Signed-off-by: Emil Condrea  ---  hw/xen/Makefile.objs 

Re: [Qemu-devel] [v9 00/19] QEMU:Xen stubdom vTPM for HVM virtual machine(QEMU Part)

2016-07-17 Thread Quan Xu
On 2016 Jul 14 (Thu) 23:34, Stefano Stabellini  wrote:> Hi Quan, >  > thanks for CC'ing me. sstabell...@kernel.org is the right address to > reach me now. > > I am also CC'ing Anthony Perard who is Xen co-maintainer in QEMU. >  > Cheers, > > Stefano thanks in advance!!

[Qemu-devel] [Bug 1603734] [NEW] Hang in fsqrt

2016-07-17 Thread Robert Femmer
Public bug reported: At least qemu-i368 and qemu-x86_64 hang in floatx80_sqrt in versions 2.6.0 and git (2.6.50) for some input values, likely due to an infinite loop at fpu/softfloat.c:6569. Steps to reproduce: 1) Compile attached code: gcc -o test test.c -lm 2) `qemu-i368 test` and

[Qemu-devel] [Bug 1603693] Re: Disks in mptsas1068 scsi controller not seen by linux

2016-07-17 Thread Paolo Bonzini
Linux requires that you specify a WWN for the disk (through the wwn property of the scsi-disk device). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1603693 Title: Disks in mptsas1068 scsi

Re: [Qemu-devel] OUT_ASM on two different systems

2016-07-17 Thread Paolo Bonzini
On 17/07/2016 04:06, Ayaz Akram wrote: > Hi all ! > > I ran a program with qemu in user mode emulation and generated trace for > generated host instructions using (-d OUT_ASM) on two different linux > systems.I expected that the addresses in two trace files can be different. > But the total