Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Changlong Xie
On 06/23/2016 02:21 PM, Kevin Wolf wrote: Am 23.06.2016 um 03:04 hat Changlong Xie geschrieben: On 06/23/2016 01:31 AM, Eric Blake wrote: On 06/22/2016 04:19 AM, Paolo Bonzini wrote: On 22/06/2016 12:12, Changlong Xie wrote: commit/mirror/stream/backup use block_job_create(..., cb,..) to c

Re: [Qemu-devel] [PATCH v2 1/3] hw/misc: Add a model for the ASPEED System Control Unit

2016-06-22 Thread Cédric Le Goater
On 06/23/2016 04:15 AM, Andrew Jeffery wrote: > The SCU is a collection of chip-level control registers that manage the > various functions supported by ASPEED SoCs. Typically the bits control > interactions with clocks, external hardware or reset behaviour, and we > can largly take a hands-off app

Re: [Qemu-devel] [RFC 00/28] s390x CPU models: exposing features

2016-06-22 Thread David Hildenbrand
> On Wed, Jun 22, 2016 at 09:54:51 +0200, David Hildenbrand wrote: > > > On Wed, Jun 22, 2016 at 09:34:49 +0200, David Hildenbrand wrote: > > > > I think the coffee didn't do its work already :) . I wanted to write > > > > that we can > > > > _with_ this additional query. Meaning the involved ov

Re: [Qemu-devel] [PATCH v2 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-22 Thread David Gibson
On Thu, Jun 23, 2016 at 08:08:38AM +0200, Cédric Le Goater wrote: > On 06/23/2016 07:50 AM, David Gibson wrote: > > On Wed, Jun 22, 2016 at 08:48:14AM +0200, Cédric Le Goater wrote: > >> On 06/22/2016 04:46 AM, David Gibson wrote: > >>> I'm not comfortable merging this until the openbios change is

[Qemu-devel] [PATCH v1 7/8] [optional] tests: SMMUv3 unit tests

2016-06-22 Thread Prem Mallappa
- initializes SMMU device - initializes Test device - allocates page tables 1:1 mapping va == pa - allocates STE/CD accordingly for S1, S2, S1+S2 - initiates DMA via PCI test device - verifies transfered data Signed-off-by: Prem Mallappa --- tests/Makefile.include | 4 + tests/smmuv3-tes

[Qemu-devel] [PATCH v1 5/8] [optional] hw: misc: added testdev for smmu

2016-06-22 Thread Prem Mallappa
A simple PCI device which does DMA from 'src' to 'dst' given src_addr, dst_addr and size, and is used by unit test. uses pci_dma_read and pci_dma_write in a crude way but serves the purpose. Signed-off-by: Prem Mallappa --- hw/misc/Makefile.objs | 2 +- hw/misc/pci-testdev-smmu.c | 239 ++

Re: [Qemu-devel] [PATCH v2 2/3] ast2400: Integrate the SCU model and set silicon revision

2016-06-22 Thread Cédric Le Goater
On 06/23/2016 04:15 AM, Andrew Jeffery wrote: > By specifying the silicon revision we select the appropriate reset > values for the SoC. > > Additionally, expose hardware strapping properties aliasing those > provided by the SCU for board-specific configuration. > > Signed-off-by: Andrew Jeffery

Re: [Qemu-devel] [RFC 00/28] s390x CPU models: exposing features

2016-06-22 Thread David Hildenbrand
> Question: KVM supports x2apic (and enables it by default) on any > host CPU, because it is all emulated by KVM. Should "host-model" > include x2apic on all hosts, or only when the host CPU has it? > ("-cpu host" does include it). > > Including x2apic sounds more useful, but it doesn't match the

[Qemu-devel] [PATCH v1 4/8] hw: arm: Add SMMUv3 to virt platform, create DTS accordingly

2016-06-22 Thread Prem Mallappa
Default virt platform now creates SMMU device. Default config to build SMMU device along is in previous patches. Signed-off-by: Prem Mallappa --- hw/arm/virt.c | 62 +++ include/hw/arm/smmu.h | 33 +++ include/hw/arm

[Qemu-devel] [PATCH v1 8/8] [optional] arm: smmu-v3: ACPI IORT initial support

2016-06-22 Thread Prem Mallappa
Added ACPI IORT tables, was needed for internal project purpose, but posting here for anyone looking for testing ACPI on ARM platforms. (P.S: Linux side IORT patches are WIP) Signed-off-by: Prem Mallappa --- hw/arm/virt-acpi-build.c| 43 +++ include/hw/acpi/acpi-defs.h |

Re: [Qemu-devel] [PATCH v2 3/3] palmetto-bmc: Configure the SCU's hardware strapping register

2016-06-22 Thread Cédric Le Goater
On 06/23/2016 04:15 AM, Andrew Jeffery wrote: > The magic constant configures the following options: > > * 28:27: Configure DRAM size as 256MB > * 26:24: DDR3 SDRAM with CL = 6, CWL = 5 > * 23: Configure 24/48MHz CLKIN > * 22: Disable GPIOE pass-through mode > * 21: Disable GPIOD pass-through mode

[Qemu-devel] [PATCH v1 6/8] [optional] tests: libqos: generic pci probing helpers

2016-06-22 Thread Prem Mallappa
Current libqos PCI helpers are x86 only, this addes a generic interface. Signed-off-by: Prem Mallappa --- tests/libqos/pci-generic.c | 197 + tests/libqos/pci-generic.h | 58 + 2 files changed, 255 insertions(+) create mode 100644 tests/l

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-06-22 Thread Jimi
I managed to fix that issue and properly load the VM with the rom file (what had gone wrong was it inexplicably acted like it had no hard drives, until I restored the libvirt XML file from a backup). I got a good test out of it: played video games in Windows for 2 hours, with the rom file loaded. I

[Qemu-devel] [PATCH v1 2/8] hw: arm: Added SMMUv3 files for build

2016-06-22 Thread Prem Mallappa
Signed-off-by: Prem Mallappa --- default-configs/aarch64-softmmu.mak | 1 + hw/arm/Makefile.objs| 1 + 2 files changed, 2 insertions(+) diff --git a/default-configs/aarch64-softmmu.mak b/default-configs/aarch64-softmmu.mak index 2449483..83a2932 100644 --- a/default-configs/aarc

[Qemu-devel] [PATCH v1 3/8] devicetree: Added new APIs to make use of more fdt functions

2016-06-22 Thread Prem Mallappa
SMMUv3 needs device tree entry like below interrupt-names = "gerror", "priq", "eventq", "cmdq-sync"; This patch introduces helper function to add entries like above Signed-off-by: Prem Mallappa --- device_tree.c| 35 +++ include/sysemu/devic

[Qemu-devel] [PATCH v1 1/8] hw: arm: SMMUv3 emulation model

2016-06-22 Thread Prem Mallappa
Big patch adds SMMUv3 model to Qemu - As per SMMUv3 spec 16.0 - Works with SMMUv3 driver in Linux 4.7rc1 - Only LPAE mode translation supported - BE mode is not supported yet - Stage1, Stage2 and S1+S2 - Suspend/resume not tested Signed-off-by: Prem Mallappa --- hw/arm/smmu-common.c

Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Kevin Wolf
Am 23.06.2016 um 03:04 hat Changlong Xie geschrieben: > On 06/23/2016 01:31 AM, Eric Blake wrote: > >On 06/22/2016 04:19 AM, Paolo Bonzini wrote: > >> > >> > >>On 22/06/2016 12:12, Changlong Xie wrote: > >>> > >>>commit/mirror/stream/backup use block_job_create(..., cb,..) to create > >>>relevant b

[Qemu-devel] [PATCH v1 0/8] SMMUv3 Emulation support

2016-06-22 Thread Prem Mallappa
RFC -> v1: - As per SMMUv3 spec 16.0 (only is_ste_consistant() is noticeable) - Reworked register access/update logic - Factored out translation code for - single point bug fix - sharing/removal in future - (optional) Unit tests added,

[Qemu-devel] [RESEND PATCH v5 2/4] i386: publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg

2016-06-22 Thread Haozhong Zhang
It's a prerequisite that certain bits of MSR_IA32_FEATURE_CONTROL should be set before some features (e.g. VMX and LMCE) can be used, which is usually done by the firmware. This patch adds a fw_cfg file "etc/msr_feature_control" which contains the advised value of MSR_IA32_FEATURE_CONTROL and can b

[Qemu-devel] [PULL 15/17] ppc: Move exception generation code out of line

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt There's no point inlining this, if you hit the exception case you exit anyway, and not inlining saves about 100K of code size (and cache footprint). Signed-off-by: Benjamin Herrenschmidt [clg: removed '__attribute__((noinline))' from original patch ] Signed-off-by:

Re: [Qemu-devel] [RFC PATCH v1 1/1] spapr: Support setting of compat CPU type for CPU cores

2016-06-22 Thread David Gibson
On Wed, Jun 22, 2016 at 12:53:49PM +0530, Bharata B Rao wrote: > Compat CPU type is typically specified on -cpu cmdline option like: > -cpu host,compat=power7 or -cpu POWER8E,compat=power7 etc. > With the introduction of sPAPR CPU core devices, we need to support > the same for core devices too. >

Re: [Qemu-devel] [PATCH v2 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-22 Thread Cédric Le Goater
On 06/23/2016 07:50 AM, David Gibson wrote: > On Wed, Jun 22, 2016 at 08:48:14AM +0200, Cédric Le Goater wrote: >> On 06/22/2016 04:46 AM, David Gibson wrote: >>> I'm not comfortable merging this until the openbios change is pulled >>> back into the qemu tree (submodule and pre-built binary). >>> >

Re: [Qemu-devel] [PATCH v5 2/4] i386: publish advised value of MSR_IA32_FEATURE_CONTROL via fw_cfg

2016-06-22 Thread Haozhong Zhang
On 06/22/16 19:08, Paolo Bonzini wrote: > > > On 22/06/2016 08:56, Haozhong Zhang wrote: > > + > > +val = g_malloc(sizeof(*val)); > > +*val = feature_control_bits | FEATURE_CONTROL_LOCKED; > > As noticed by Laszlo, you need to use cpu_to_le64 here. The maintainer > can fix it, I think.

[Qemu-devel] [PULL 10/17] ppc: Fix POWER7 and POWER8 exception definitions

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt We were initializing unused ones and missing some Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson [clg: fixed checkpatch.pl errors ] Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- target-ppc/cpu.h| 11 ++- tar

Re: [Qemu-devel] [PATCH v2 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-22 Thread David Gibson
On Wed, Jun 22, 2016 at 08:48:14AM +0200, Cédric Le Goater wrote: > On 06/22/2016 04:46 AM, David Gibson wrote: > > I'm not comfortable merging this until the openbios change is pulled > > back into the qemu tree (submodule and pre-built binary). > > > > Again - sure you don't want to apply this w

[Qemu-devel] [PULL 12/17] ppc: Rework generation of priv and inval interrupts

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt Recent server processors use the Hypervisor Emulation Assistance interrupt for illegal instructions and *some* type of SPR accesses. Also the code was always generating inval instructions even for priv violations due to setting the wrong flags Finally, the checking

[Qemu-devel] [PULL 04/17] target-ppc: Fix rlwimi, rlwinm, rlwnm again

2016-06-22 Thread David Gibson
From: Richard Henderson In 63ae0915f8ec, I arranged to use a 32-bit rotate, without considering the effect of a mask value that wraps around to the high bits of the word. [dwg: In 2e11b15 this was partially fixed, but an edge case was still incorrect, which this fixes] Signed-off-by: Richard He

[Qemu-devel] [PULL 14/17] ppc: Turn a bunch of booleans from int to bool

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- target-ppc/translate.c | 37 ++--- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/targ

[Qemu-devel] [PULL 05/17] ppc: Improve emulation of THRM registers

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt The 75x and 74xx processors have some thermal monitoring SPRs that some OSes such as MacOS do use. Our current "dumb" implementation isn't good enough and will cause some versions of MacOS to hang during boot. This lifts an improved emulation from MacOnLinux and adap

[Qemu-devel] [PULL 11/17] ppc: Fix generation if ISI/DSI vs. HV mode

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt Under some circumstances, we need to direct ISI and DSI interrupts at the hypervisor, turning them into HISI/HDSI, and using different SPRs (HDSISR and HDAR) depending on the combination of MSR_DR and the corresponding VPM bits in LPCR. This moves part of the code in

[Qemu-devel] [PULL 08/17] ppc: define a default LPCR value

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt This allows us to set the appropriate LPCR bits which will be used when fixing the exception model for the HV mode. Signed-off-by: Benjamin Herrenschmidt Reviewed-by: David Gibson [clg: previous commit 26a7f1291bb5 did not include the LPCR setting as it was n

[Qemu-devel] [PULL 06/17] memory: Add reporting of supported page sizes

2016-06-22 Thread David Gibson
From: Alexey Kardashevskiy Every IOMMU has some granularity which MemoryRegionIOMMUOps::translate uses when translating, however this information is not available outside the translate context for various checks. This adds a get_min_page_size callback to MemoryRegionIOMMUOps and a wrapper for it

[Qemu-devel] [PULL 13/17] ppc: Add real mode CI load/store instructions for P7 and P8

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt Those instructions are only available in hypervisor real mode and allow cache inhibited garded access to devices in that mode. Signed-off-by: Benjamin Herrenschmidt [clg: fixed checkpatch.pl errors ] Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson Signed

[Qemu-devel] [PULL 17/17] ppc: Disable huge page support if it is not available for main RAM

2016-06-22 Thread David Gibson
From: Thomas Huth On powerpc, we must only signal huge page support to the guest if all memory areas are capable of supporting huge pages. The commit 2d103aae8765 ("fix hugepage support when using memory-backend-file") already fixed the case when the user specified the mem-path property for NUMA

[Qemu-devel] [PULL 07/17] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt This reworks emulation of the various "rfi" variants. I removed some masking bits that I couldn't make sense of, the only bit that I am aware we should mask here is POW, the CPU's MSR mask should take care of the rest. This also fixes some problems when running 32-bi

[Qemu-devel] [PULL 16/17] ppc: Add P7/P8 Power Management instructions

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt This adds the ISA 2.06 and later power management instructions (doze, nap, sleep and rvwinkle) and associated wakeup cause testing in LPCR Signed-off-by: Benjamin Herrenschmidt [clg: fixed checkpatch.pl errors ] Signed-off-by: Cédric Le Goater Reviewed-by: David Gi

[Qemu-devel] [PULL 00/17] ppc-for-2.7 queue 20160623

2016-06-22 Thread David Gibson
The following changes since commit 6f1d2d1c5ad20d464705b17318cb7ca495f8078a: Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-20160621-1' into staging (2016-06-21 15:19:58 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.7-2016062

[Qemu-devel] [PULL 09/17] ppc: fix exception model for HV mode

2016-06-22 Thread David Gibson
From: Benjamin Herrenschmidt This properly implements LPES0 handling for HV vs. !HV mode and removes the unsupported LPES1. This has been removed from the specs since ISA v2.07. Signed-off-by: Benjamin Herrenschmidt [clg: AIL implementation was fixed in commit 5c94b2a5e5ef. This patch onl

[Qemu-devel] [PULL 03/17] ppc64: disable gen_pause() for linux-user mode

2016-06-22 Thread David Gibson
From: Laurent Vivier While trying to install a fedora container with "lxc-create -t fedora -- -I qemu-ppc64" the installation abort with the following error: qemu: fatal: Unknown exception 0x65537. Aborting NIP 004000927924 LR 0040009e325c CTR 004000927480 XER CP

[Qemu-devel] [PULL 01/17] powerpc/mm: Update the WIMG check during H_ENTER

2016-06-22 Thread David Gibson
From: "Aneesh Kumar K.V" Support for 0 value for memeory coherence is optional and with ppc64 we can always enable memory coherence. Linux kernel did that during the development of 4.7 kernel. But that resulted in failure in Qemu in H_ENTER hcall due to below check. The mentioned change was rever

[Qemu-devel] [PULL 02/17] tests: Use '+=' to add additional tests, not '='

2016-06-22 Thread David Gibson
From: Thomas Huth The recent commit that added the prom-env-test accidentially overwrote the check-qtest-ppc-y, check-qtest-ppc64-y and check-qtest-sparc-y variables instead of extending them. Fixes: fcbf4a3c0c576eec1321f9cff4fa0dd8e0b1a82f Signed-off-by: Thomas Huth Signed-off-by: David Gibson

Re: [Qemu-devel] [PATCH qemu v18 4/5] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)

2016-06-22 Thread Alexey Kardashevskiy
On 23/06/16 13:59, Alexey Kardashevskiy wrote: >> ret is not initialized and it is used in "fail:". >> >> hw/vfio/common.c: In function ‘vfio_listener_region_add’: >> hw/vfio/common.c:493:30: error: ‘ret’ may be used uninitialized in this >> function [-Werror=maybe-uninitialized] >> c

Re: [Qemu-devel] [PATCH v2 3/3] socket: unlink unix socket on remove

2016-06-22 Thread Michael S. Tsirkin
On Thu, Jun 23, 2016 at 07:41:55AM +0300, Michael S. Tsirkin wrote: > On Thu, Jun 16, 2016 at 09:28:52PM +0200, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > qemu leaves unix socket files behind when removing a listening chardev > > or leaving. qemu could clean that up, e

Re: [Qemu-devel] [PATCH v2 3/3] socket: unlink unix socket on remove

2016-06-22 Thread Michael S. Tsirkin
On Thu, Jun 16, 2016 at 09:28:52PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > qemu leaves unix socket files behind when removing a listening chardev > or leaving. qemu could clean that up, even if doing so isn't race-free. > > Fixes: > https://bugzilla.redhat.com/sho

Re: [Qemu-devel] [PATCH 05/12] monitor: register the qapi generated commands

2016-06-22 Thread Paolo Bonzini
On 23/06/2016 02:08, marcandre.lur...@redhat.com wrote: > > Stop using the so-called 'middle' mode. Instead, use qmp_find_command() > from generated qapi commands registry. > > Note: this commit requires a 'make clean' prior to make, since the > generated files do not depend on Makefile (due to

Re: [Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes

2016-06-22 Thread Michael S. Tsirkin
On Tue, Jun 21, 2016 at 12:02:28PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Since 'vhost-user: simple reconnection support' was merged, it is > possible to disconnect and reconnect a vhost-user backend. However, > many code paths in qemu may trigger assert(

Re: [Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes

2016-06-22 Thread Michael S. Tsirkin
On Tue, Jun 21, 2016 at 12:02:28PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Since 'vhost-user: simple reconnection support' was merged, it is > possible to disconnect and reconnect a vhost-user backend. However, > many code paths in qemu may trigger assert(

Re: [Qemu-devel] [PATCH 06/24] vhost-user: check vhost_user_write() return value

2016-06-22 Thread Michael S. Tsirkin
On Tue, Jun 21, 2016 at 12:02:34PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Just some more error checking. > > Signed-off-by: Marc-André Lureau Point being? Callers just ignore it afterwards ... > --- > hw/virtio/vhost-user.c | 44 +

Re: [Qemu-devel] [PATCH 08/24] vhost-user: return a read error

2016-06-22 Thread Michael S. Tsirkin
On Tue, Jun 21, 2016 at 12:02:36PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Return read errors (not sure why those were ignored) > > Signed-off-by: Marc-André Lureau why bother? So callers can just ignore them in turn? > --- > hw/virtio/vhost-user.c | 6 +++--

Re: [Qemu-devel] [PATCH 05/24] vhost: change some assert() for error_report() or silent fail

2016-06-22 Thread Michael S. Tsirkin
On Tue, Jun 21, 2016 at 12:02:33PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Calling a vhost operation may fail, especially with disconnectable > backends. Treat some that look harmless as recoverable errors (print > error, or ignore on error code path). > > Signed-

Re: [Qemu-devel] [PATCH 23/24] vhost-user: wait until link is up

2016-06-22 Thread Michael S. Tsirkin
On Tue, Jun 21, 2016 at 12:02:51PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > The chardev waits for an initial connection before starting qemu, > vhost-user wants the backend negotiation to be completed. vhost-user is > started in the net_vhost_user_event callback, wh

Re: [Qemu-devel] [PATCH qemu v18 4/5] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2)

2016-06-22 Thread Alexey Kardashevskiy
On 23/06/16 00:38, Laurent Vivier wrote: > > > On 21/06/2016 03:14, Alexey Kardashevskiy wrote: >> New VFIO_SPAPR_TCE_v2_IOMMU type supports dynamic DMA window management. >> This adds ability to VFIO common code to dynamically allocate/remove >> DMA windows in the host kernel when new VFIO conta

[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-06-22 Thread Jimi
I got impatient and got the rom file from EVGA and loaded it in, but for me and my GTX 960, I get no graphical output when it's loaded. I don't know anything beyond that. I don't get any error messages in dmesg or anything--just no video output whatsoever. It was also strangely booting into the Tia

Re: [Qemu-devel] [PATCH RFC 1/1] qemu-img: add the 'dd' subcommand

2016-06-22 Thread Fam Zheng
On Wed, 06/22 19:21, Reda Sallahi wrote: > This patch adds a basic dd subcommand analogous to dd(1) to qemu-img. > > For the start, this implements the bs, if, of and count options and requires > both if and of to be specified (no stdin/stdout if not specified) and doesn't > support tty, pipes, et

Re: [Qemu-devel] [PATCH] ppc: Disable huge page support if it is not available for main RAM

2016-06-22 Thread David Gibson
On Wed, Jun 22, 2016 at 10:50:05AM +0200, Thomas Huth wrote: > On powerpc, we must only signal huge page support to the guest if > all memory areas are capable of supporting huge pages. The commit > 2d103aae8765 ("fix hugepage support when using memory-backend-file") > already fixed the case when t

Re: [Qemu-devel] [PATCH 3/3] blockdev: Add dynamic module loading for block drivers

2016-06-22 Thread Fam Zheng
On Wed, 06/22 17:35, Colin Lord wrote: > From: Marc Mari > > Extend the current module interface to allow for block drivers to be loaded > dynamically on request. > > The only block drivers that can be converted into modules are the drivers > that don't perform any init operation except for regi

[Qemu-devel] [PATCH v2 3/3] palmetto-bmc: Configure the SCU's hardware strapping register

2016-06-22 Thread Andrew Jeffery
The magic constant configures the following options: * 28:27: Configure DRAM size as 256MB * 26:24: DDR3 SDRAM with CL = 6, CWL = 5 * 23: Configure 24/48MHz CLKIN * 22: Disable GPIOE pass-through mode * 21: Disable GPIOD pass-through mode * 20: Enable LPC decode of SuperIO 0x2E/0x4E addresses * 19

[Qemu-devel] [PATCH v2 2/3] ast2400: Integrate the SCU model and set silicon revision

2016-06-22 Thread Andrew Jeffery
By specifying the silicon revision we select the appropriate reset values for the SoC. Additionally, expose hardware strapping properties aliasing those provided by the SCU for board-specific configuration. Signed-off-by: Andrew Jeffery --- Since v1: * Remove reset value configuration * Config

[Qemu-devel] [PATCH v2 1/3] hw/misc: Add a model for the ASPEED System Control Unit

2016-06-22 Thread Andrew Jeffery
The SCU is a collection of chip-level control registers that manage the various functions supported by ASPEED SoCs. Typically the bits control interactions with clocks, external hardware or reset behaviour, and we can largly take a hands-off approach to reads and writes. Firmware makes heavy use o

[Qemu-devel] [PATCH v2 0/3] Add ASPEED SCU device

2016-06-22 Thread Andrew Jeffery
Hi all, These are three patches implementing minimal functionality for the ASPEED System Control Unit device and integrating it into the AST2400 SoC model/palmetto-bmc machine. The device is critical for initialisation of u-boot and the kernel as it provides chip level control registers, influenci

Re: [Qemu-devel] [PATCH 3/3] blockdev: Add dynamic module loading for block drivers

2016-06-22 Thread Fam Zheng
On Wed, 06/22 17:35, Colin Lord wrote: > From: Marc Mari > > Extend the current module interface to allow for block drivers to be loaded > dynamically on request. > > The only block drivers that can be converted into modules are the drivers > that don't perform any init operation except for regi

Re: [Qemu-devel] [PATCH qemu v18 5/5] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2016-06-22 Thread Alexey Kardashevskiy
On 22/06/16 19:44, Thomas Huth wrote: > On 22.06.2016 05:23, Alexey Kardashevskiy wrote: >> On 22/06/16 12:35, David Gibson wrote: >>> On Tue, Jun 21, 2016 at 11:14:05AM +1000, Alexey Kardashevskiy wrote: This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specific

Re: [Qemu-devel] [PATCH 0/3] Dynamic module loading for block drivers

2016-06-22 Thread Fam Zheng
On Wed, 06/22 17:35, Colin Lord wrote: > This is v2 of the series I sent out last week. These are the changes I > made based on the feedback I got: > - Fixed typo and Marc's email address in the python script > - Moved registration of iscsi_opts into vl.c > > What I didn't do: > - Remove copy-past

Re: [Qemu-devel] [PATCH 2/3] blockdev: Add dynamic generation of module_block.h

2016-06-22 Thread Fam Zheng
On Wed, 06/22 17:35, Colin Lord wrote: > From: Marc Mari > > To simplify the addition of new block modules, add a script that generates > include/qemu/module_block.h automatically from the modules' source code. > > This script assumes that the QEMU coding style rules are followed. > > Signed-of

Re: [Qemu-devel] [PATCH v3 00/20] GICv3 emulation

2016-06-22 Thread Shannon Zhao
On 2016/6/23 5:45, Ed Maste wrote: > On 22 June 2016 at 16:53, Peter Maydell wrote: >> >> Yeah, it looks like the same bug is also present in UEFI itself >> (it's super popular!). Laszlo, Ard, do you have a prebuilt >> UEFI binary with Ard's fix? >> >> Probably you'll find that if UEFI is config

Re: [Qemu-devel] [PATCH 1/3] blockdev: prepare iSCSI block driver for dynamic loading

2016-06-22 Thread Fam Zheng
On Wed, 06/22 17:35, Colin Lord wrote: > This commit moves the initialization of the QemuOptsList qemu_iscsi_opts > struct out of block/iscsi.c in order to allow it to be dynamically > loaded. Drivers that perform init operations other than registering > themselves can't be modularized, so this mov

Re: [Qemu-devel] [PATCH 1/2] blockjob: assert(cb) in the entry functions of blockjob

2016-06-22 Thread Changlong Xie
On 06/23/2016 01:31 AM, Eric Blake wrote: On 06/22/2016 04:19 AM, Paolo Bonzini wrote: On 22/06/2016 12:12, Changlong Xie wrote: commit/mirror/stream/backup use block_job_create(..., cb,..) to create relevant blockjob. When they finished, these jobs will invoke block_job_completed, then invo

Re: [Qemu-devel] [PATCH 3/3] iotests: add small-granularity mirror test

2016-06-22 Thread Fam Zheng
On Wed, 06/22 15:51, John Snow wrote: > Signed-off-by: John Snow > --- > tests/qemu-iotests/041 | 30 ++ > tests/qemu-iotests/041.out | 4 ++-- > 2 files changed, 32 insertions(+), 2 deletions(-) Reviewed-by: Fam Zheng

Re: [Qemu-devel] [PATCH 2/3] mirror: limit niov to IOV_MAX elements, again

2016-06-22 Thread Fam Zheng
On Wed, 06/22 15:51, John Snow wrote: > During the refactor of mirror_iteration in e5b43573, > we regressed the fix introduced in cae98cb8. > > This patch re-adds IOV_MAX checking to cases where we > aren't checking alignment (and size) already. > > Signed-off-by: John Snow > --- > block/mirror

Re: [Qemu-devel] [PATCH 1/3] mirror: clarify mirror_do_read return code

2016-06-22 Thread Fam Zheng
On Wed, 06/22 15:51, John Snow wrote: > mirror_do_read intends to return the number of sectors processed after > the starting sector, without regard to how many sectors were processed > before the starting sector due to alignment. > > Clean up the comments and code to hopefully illustrate this mor

[Qemu-devel] [PATCH 11/12] qmp: update qmp_query_spice fallback

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau There are a few commands that are undef #ifdef conditions in qmp-commands.hx. Move all the qmp_query_spice fallback in the same location, return an error and update the comment. Signed-off-by: Marc-André Lureau --- monitor.c | 14 ++ qmp.c | 16 -

[Qemu-devel] [PATCH 08/12] build-sys: remove qmp-commands-old.h

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau --- Makefile.target | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile.target b/Makefile.target index d720b3e..8c13294 100644 --- a/Makefile.target +++ b/Makefile.target @@ -159,7 +159,7 @@ else obj-y +=

[Qemu-devel] [PATCH 06/12] monitor: remove mhandler.cmd_new

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau This is no longer necessary, now that middle mode has been removed. Signed-off-by: Marc-André Lureau --- docs/writing-qmp-commands.txt | 8 +- hmp-commands-info.hx | 118 hmp-commands.hx | 206 +--

[Qemu-devel] [PATCH 10/12] monitor: use qmp_dispatch()

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Replace the old manual dispatch and validation code by the generic one provided by qapi common code. Signed-off-by: Marc-André Lureau --- monitor.c| 319 +++ trace-events | 1 - 2 files changed, 34 insertions

[Qemu-devel] [PATCH 07/12] monitor: implement 'qmp_query_commands' without qmp_cmds

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau So we can get rid of the static qmp_cmds table. Signed-off-by: Marc-André Lureau --- monitor.c | 32 ++-- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/monitor.c b/monitor.c index 71512e4..77dc439 100644 --- a/monitor.c +++

[Qemu-devel] [PATCH 12/12] Drop qmp-commands.hx

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Only the documentation remains useful, so strip it. (a later update will move the documentation in the respective json files and generate the text file) Signed-off-by: Marc-André Lureau --- .gitignore |1 - MAINTAINERS

[Qemu-devel] [PATCH 04/12] monitor: remove usage of generated marshal functions

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Once the middle mode is removed, the generated marshal functions will no longer be exported. Signed-off-by: Marc-André Lureau --- monitor.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index fc691b9..585bc1f 100644

[Qemu-devel] [PATCH 09/12] qapi: remove the "middle" mode

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Now that the register function is always generated, we can remove the so-called "middle" mode from the generator script. Signed-off-by: Marc-André Lureau --- scripts/qapi-commands.py | 29 + 1 file changed, 5 insertions(+), 24 deletions(-) d

[Qemu-devel] [PATCH 00/12] qapi: remove the 'middle' mode

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Hi, Although some QMP commands are still not fully qapi'fied, it is possible to use more qapi common and generated code by dropping the 'middle' mode. This series of patches was sent last year as part of a larger series 'post-Eric's fixes, QAPI improvements'. It is still

[Qemu-devel] [PATCH 05/12] monitor: register the qapi generated commands

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Stop using the so-called 'middle' mode. Instead, use qmp_find_command() from generated qapi commands registry. Note: this commit requires a 'make clean' prior to make, since the generated files do not depend on Makefile (due to a cyclic rule introduced in 4115852bb0). Si

[Qemu-devel] [PATCH 01/12] qapi-schema: use generated marshaller for 'qmp_capabilities'

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau qapi'fy the 'qmp_capabilities' command. Signed-off-by: Marc-André Lureau --- monitor.c| 4 ++-- qapi-schema.json | 19 +++ qmp-commands.hx | 2 +- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/monitor.c b/monitor.c index bbd5

[Qemu-devel] [PATCH 03/12] monitor: register gen:false commands manually

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Since a few commands are using 'gen': false, they are not registered automatically by the generator. Register manually instead. This is in preparation for removal of qapi 'middle' mode generation. Signed-off-by: Marc-André Lureau --- monitor.c | 11 +++ 1 file

[Qemu-devel] [PATCH 02/12] qapi-schema: add 'device_add'

2016-06-22 Thread marcandre . lureau
From: Marc-André Lureau Even though device_add is not fully qapi'fied, we may add it to the json schema with 'gen': false, so registration and documentation can be generated. Signed-off-by: Marc-André Lureau --- qapi-schema.json | 26 ++ 1 file changed, 26 insertions(+)

Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set)

2016-06-22 Thread Michael S. Tsirkin
On Thu, Jun 23, 2016 at 01:23:08AM +0200, Andrea Arcangeli wrote: > On Thu, Jun 23, 2016 at 01:44:06AM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 22, 2016 at 04:24:14PM +0200, Andrea Arcangeli wrote: > > > > cause malfunctioning, only crashes (and as Gerd said, if you cross your > > > > finge

Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set)

2016-06-22 Thread Andrea Arcangeli
On Thu, Jun 23, 2016 at 01:44:06AM +0300, Michael S. Tsirkin wrote: > On Wed, Jun 22, 2016 at 04:24:14PM +0200, Andrea Arcangeli wrote: > > > cause malfunctioning, only crashes (and as Gerd said, if you cross your > > > fingers and hope the guest doesn't put anything so high in memory, > > > chance

Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set)

2016-06-22 Thread Andrea Arcangeli
On Thu, Jun 23, 2016 at 01:40:42AM +0300, Michael S. Tsirkin wrote: > Where's a problem then? If EPT/NPT is enabled, the guest pagetables are parsed by the hardware and not by the KVM shadow MMU in software. The hardware speaks host phys bits and AFIK the hardware will behave different depending o

Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set)

2016-06-22 Thread Michael S. Tsirkin
On Wed, Jun 22, 2016 at 04:24:14PM +0200, Andrea Arcangeli wrote: > > cause malfunctioning, only crashes (and as Gerd said, if you cross your > > fingers and hope the guest doesn't put anything so high in memory, > > chances are you'll succeed), and this makes it "safer". I'm not sure > > which on

Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set)

2016-06-22 Thread Michael S. Tsirkin
On Wed, Jun 22, 2016 at 02:41:22PM +0200, Paolo Bonzini wrote: > > > On 21/06/2016 21:44, Eduardo Habkost wrote: > > The consequences of migrating (or having migration blocked) to a > > host with smaller phys-addr-bits sound worse to me than the > > consequences of just having guest's phys-addr-b

[Qemu-devel] [PATCH 3/5] curses: use wide output functions

2016-06-22 Thread Samuel Thibault
This makes use of cchar_t instead of chtype when using ncursesw, which allows to store a wide char as well as the WACS values. This also allows to complete the printable glyphs list beyond ascii and the ACS values. Signed-off-by: Samuel Thibault --- hw/display/vga.c | 4 +- include/ui/con

[Qemu-devel] [PATCH 1/5] curses: fix left/right arrow translation

2016-06-22 Thread Samuel Thibault
In default VGA font, left/right arrow are glyphs 0x1a and 0x1b, not 0x0a and 0x0b. Signed-off-by: Samuel Thibault --- ui/curses.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/curses.c b/ui/curses.c index 49d3ce6..438b8be 100644 --- a/ui/curses.c +++ b/ui/curses.c @@

[Qemu-devel] [PATCH 4/5] curses: add option to specify VGA font encoding

2016-06-22 Thread Samuel Thibault
This detects and uses iconv to convert glyphs from the specified VGA font encoding to unicode. Signed-off-by: Samuel Thibault --- configure | 37 + include/sysemu/sysemu.h | 1 + qemu-options.hx | 20 ui/curses.c

[Qemu-devel] [PATCH 2/5] curses: Use cursesw when available

2016-06-22 Thread Samuel Thibault
Signed-off-by: Samuel Thibault --- configure | 64 ++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 10cb212..ff10012 100755 --- a/configure +++ b/configure @@ -203,6 +203,7 @@ bluez="" brlapi

[Qemu-devel] [PATCH 5/5] curses: support wide input

2016-06-22 Thread Samuel Thibault
This makes use of wide curses functions instead of 8bit functions. This allows to type e.g. accented letters. Unfortunately, key codes are then returned with values that could be confused with wide characters by ncurses, so we need to add a maybe_keycode variable to know whether the returned value

[Qemu-devel] [PATCH 0/5] curses: wide character support

2016-06-22 Thread Samuel Thibault
Hello, This patch series adds wide character support to the curses frontend of qemu, thus allowing to fix a lot of input and output issues with e.g. accented letters and semi-graphic glyphs. Since qemu can't know the encoding of the VGA font, the user has to specify it (just like he has to specify

Re: [Qemu-devel] [PATCH v2 00/10] globals: Clean up validation and error checking

2016-06-22 Thread Eduardo Habkost
Markus, all patches in this series got at least one Reviewed-by line. I would like to have your Acked-by to merge it through my tree, so I can apply Igor's -cpu + global property series that depend on it. On Mon, Jun 20, 2016 at 12:52:53PM -0300, Eduardo Habkost wrote: > This series includes multi

Re: [Qemu-devel] [PATCH v5 00/13] NVDIMM: introduce nvdimm label support

2016-06-22 Thread Michael S. Tsirkin
On Wed, Jun 22, 2016 at 08:19:46PM +0100, Stefan Hajnoczi wrote: > On Fri, Jun 17, 2016 at 07:08:03PM +0800, Xiao Guangrong wrote: > > Changelog in v5: > > fix string format error when it is compiled on 32 bit box > > > > Xiao Guangrong (13): > > pc-dimm: introduce get_vmstate_memory_region cal

Re: [Qemu-devel] [PATCH v3 00/20] GICv3 emulation

2016-06-22 Thread Peter Maydell
On 22 June 2016 at 22:45, Ed Maste wrote: > On 22 June 2016 at 16:53, Peter Maydell wrote: >> >> Yeah, it looks like the same bug is also present in UEFI itself >> (it's super popular!). Laszlo, Ard, do you have a prebuilt >> UEFI binary with Ard's fix? >> >> Probably you'll find that if UEFI is

Re: [Qemu-devel] [PATCH v3 00/20] GICv3 emulation

2016-06-22 Thread Ed Maste
On 22 June 2016 at 16:53, Peter Maydell wrote: > > Yeah, it looks like the same bug is also present in UEFI itself > (it's super popular!). Laszlo, Ard, do you have a prebuilt > UEFI binary with Ard's fix? > > Probably you'll find that if UEFI is configuring the GIC interrupt > groups FreeBSD will

Re: [Qemu-devel] [PATCH 0/3] Dynamic module loading for block drivers

2016-06-22 Thread Colin Lord
On 06/22/2016 05:35 PM, Colin Lord wrote: > This is v2 of the series I sent out last week. These are the changes I > made based on the feedback I got: > - Fixed typo and Marc's email address in the python script > - Moved registration of iscsi_opts into vl.c > > What I didn't do: > - Remove copy-p

[Qemu-devel] [PATCH 3/3] blockdev: Add dynamic module loading for block drivers

2016-06-22 Thread Colin Lord
From: Marc Mari Extend the current module interface to allow for block drivers to be loaded dynamically on request. The only block drivers that can be converted into modules are the drivers that don't perform any init operation except for registering themselves. All the necessary module informa

  1   2   3   4   5   >