Re: [Qemu-devel] [PATCH 00/22] sPAPR updates 2015-06-24

2015-06-23 Thread David Gibson
On Wed, Jun 24, 2015 at 04:30:14PM +1000, David Gibson wrote: > Hi Alex, > > Here are my accumulated spapr related qemu updates for the last little > while. Highlights are a SLOF update and changes to move PCI device > node creation from SLOF into qemu (using the same code paths as for > hotplug)

[Qemu-devel] [PATCH 19/22] xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled

2015-06-23 Thread David Gibson
From: Bharata B Rao When supporting CPU hot removal by parking the vCPU fd and reusing it during hotplug again, there can be cases where we try to reenable KVM_CAP_IRQ_XICS CAP for the vCPU for which it was already enabled. Introduce a boolean member in ICPState to track this and don't reenable t

[Qemu-devel] [PATCH 20/22] spapr_pci: enumerate and add PCI device tree

2015-06-23 Thread David Gibson
From: Nikunj A Dadhania All the PCI enumeration and device node creation was off-loaded to SLOF. With PCI hotplug support, code needed to be added to add device node. This creates multiple copy of the code one in SLOF and other in hotplug code. To unify this, the patch adds the pci device node cr

[Qemu-devel] [PATCH 15/22] cpus: Add a macro to walk CPUs in reverse

2015-06-23 Thread David Gibson
From: Bharata B Rao Add CPU_FOREACH_REVERSE that walks CPUs in reverse. Needed for PowerPC CPU device tree reorganization. Signed-off-by: Bharata B Rao Reviewed-by: Andreas Färber Signed-off-by: David Gibson --- include/qom/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include

[Qemu-devel] [PATCH 01/22] spapr: ensure we have at least one XICS server

2015-06-23 Thread David Gibson
From: Greg Kurz XICS needs to know the upper value for cpu_index as it is used to compute the number of servers: smp_cpus * kvmppc_smt_threads() / smp_threads When passing -smp cpus=1,threads=9 on a POWER8 host, we end up with: 1 * 8 / 9 = 0 ... which leads to an assertion in both emu

[Qemu-devel] [PATCH 22/22] spapr_pci: drop redundant args in spapr_[populate, create]_pci_child_dt

2015-06-23 Thread David Gibson
From: Nikunj A Dadhania * phb_index is not being used and if required can be obtained from sphb * use helper to get drc_index in spapr_populate_pci_child_dt() * Check if drc_index is zero Suggested-by: Alexey Kardashevskiy Signed-off-by: Nikunj A Dadhania Signed-off-by: David Gibson --- hw/p

[Qemu-devel] [PATCH 16/22] spapr: Reorganize CPU dt generation code

2015-06-23 Thread David Gibson
From: Bharata B Rao Reorganize CPU device tree generation code so that it be reused from hotplug path. CPU dt entries are now generated from spapr_finalize_fdt() instead of spapr_create_fdt_skel(). Note: This is how the split-up looks like now: Boot path - spapr_finalize_fdt spapr_popu

Re: [Qemu-devel] [PATCH V2 3/7] introduce dpcd module.

2015-06-23 Thread Peter Crosthwaite
On Mon, Jun 15, 2015 at 8:15 AM, wrote: > From: KONRAD Frederic > > This introduces a DPCD modules. It wires on a aux-bus and can be accessed by "module" > driver to get lane-speed, etc. > > Signed-off-by: KONRAD Frederic > --- > hw/display/Makefile.objs | 1 + > hw/display/dpcd.c|

[Qemu-devel] [PATCH 05/22] spapr: Remove obsolete entry_point field from sPAPRMachineState

2015-06-23 Thread David Gibson
The sPAPRMachineState structure includes an entry_point field containing the initial PC value for starting the machine, even though this always has the value 0x100. I think this is a hangover from very early versions which bypassed the firmware when using -kernel. In any case it has no function n

[Qemu-devel] [PATCH 18/22] ppc: Update cpu_model in MachineState

2015-06-23 Thread David Gibson
From: Bharata B Rao Keep cpu_model field in MachineState uptodate so that it can be used from the CPU hotplug path. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/mac_newworld.c | 10 +- hw/ppc/mac_oldworld.c | 7 +++ hw/ppc/ppc44

[Qemu-devel] [PATCH 13/22] spapr: Consider max_cpus during xics initialization

2015-06-23 Thread David Gibson
From: Bharata B Rao Use max_cpus instead of smp_cpus when intializating xics system. Also report max_cpus in ibm,interrupt-server-ranges device tree property of interrupt controller node. Signed-off-by: Bharata B Rao Signed-off-by: David Gibson --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 i

[Qemu-devel] [PATCH 21/22] spapr_pci: populate ibm,loc-code

2015-06-23 Thread David Gibson
From: Nikunj A Dadhania Each hardware instance has a platform unique location code. The OF device tree that describes a part of a hardware entity must include the “ibm,loc-code” property with a value that represents the location code for that hardware entity. Populate ibm,loc-code. 1) PCI pass

[Qemu-devel] [PATCH 08/22] spapr_pci: encode class code including Prog IF register

2015-06-23 Thread David Gibson
From: Nikunj A Dadhania Current code missed the Prog IF register. All Class Code, Subclass, and Prog IF registers are needed to identify the accurate device type. For example: USB controllers use the PROG IF for denoting: USB FullSpeed, HighSpeed or SuperSpeed. Signed-off-by: Nikunj A Dadhania

[Qemu-devel] [PATCH 02/22] pseries: Update SLOF firmware image to qemu-slof-20150429

2015-06-23 Thread David Gibson
From: Alexey Kardashevskiy The changelog is: > version: update to 20150429 > pci: Use QEMU created PCI device nodes > usb: support 64-bit pci bars > pci: Support 64-bit address translation > pci: program correct bridge limit registers during probe > scsi: handle report-luns failure

[Qemu-devel] [PATCH 17/22] spapr: Consolidate cpu init code into a routine

2015-06-23 Thread David Gibson
From: Bharata B Rao Factor out bits of sPAPR specific CPU initialization code into a separate routine so that it can be called from CPU hotplug path too. Signed-off-by: Bharata B Rao Signed-off-by: David Gibson --- hw/ppc/spapr.c | 54 +- 1

[Qemu-devel] [PATCH 07/22] spapr_pci: encode missing 64-bit memory address space

2015-06-23 Thread David Gibson
From: Nikunj A Dadhania The properties reg/assigned-resources need to encode 64-bit memory address space as part of phys.hi dword. 00 if configuration space 01 if IO region, 10 if 32-bit MEM region 11 if 64-bit MEM region Signed-off-by: Nikunj A Dadhania Reviewed-by: Thomas Huth Signe

[Qemu-devel] [PATCH 12/22] Revert "hw/ppc/spapr_pci.c: Avoid functions not in glib 2.12 (g_hash_table_iter_*)"

2015-06-23 Thread David Gibson
From: Markus Armbruster Since we now require GLib 2.22+ (commit f40685c), we don't have to work around lack of g_hash_table_iter_init() & friends anymore. This reverts commit f8833a37c0c6b22ddd57b45e48cfb0f97dbd5af4. Signed-off-by: Markus Armbruster Signed-off-by: David Gibson --- hw/ppc/spa

[Qemu-devel] [PATCH 04/22] spapr: Remove obsolete ram_limit field from sPAPRMachineState

2015-06-23 Thread David Gibson
The ram_limit field was imported from sPAPREnvironment where it predates the machine's ram size being available generically from machine->ram_size. Worse, the existing code was inconsistent about where it got the ram size from. Sometimes it used spapr->ram_limit, sometimes the global 'ram_size' a

[Qemu-devel] [PATCH 00/22] sPAPR updates 2015-06-24

2015-06-23 Thread David Gibson
Hi Alex, Here are my accumulated spapr related qemu updates for the last little while. Highlights are a SLOF update and changes to move PCI device node creation from SLOF into qemu (using the same code paths as for hotplug). This also has some preliminaries for CPU and memory hotplug on -machine

[Qemu-devel] [PATCH 03/22] spapr: Merge sPAPREnvironment into sPAPRMachineState

2015-06-23 Thread David Gibson
The code for -machine pseries maintains a global sPAPREnvironment structure which keeps track of general state information about the guest platform. This predates the existence of the MachineState structure, but performs basically the same function. Now that we have the generic MachineState, fold

[Qemu-devel] [PATCH 11/22] spapr_iommu: translate sPAPRTCEAccess to IOMMUAccessFlags

2015-06-23 Thread David Gibson
From: Greg Kurz The fact that these enums have matching values is pure coincidence. We actually need to translate from the PAPR definition to the QEMU one. This patch doesn't fix any bug, it is only code cleanup. Suggested-by: Alexey Kardashevskiy Signed-off-by: Greg Kurz Signed-off-by: David

[Qemu-devel] [PATCH 14/22] spapr: Support ibm, lrdr-capacity device tree property

2015-06-23 Thread David Gibson
From: Bharata B Rao Add support for ibm,lrdr-capacity since this is needed by the guest kernel to know about the possible hot-pluggable CPUs and Memory. With this, pseries kernels will start reporting correct maxcpus in /sys/devices/system/cpu/possible. Also define the minimum hotpluggable memor

[Qemu-devel] [PATCH 10/22] spapr_iommu: drop erroneous check in h_put_tce_indirect()

2015-06-23 Thread David Gibson
From: Greg Kurz The tce_list variable is not a TCE but the address to a TCE: we shouldn't clear permission bits as we do now. And this is dead code anyway since we check tce_list is 4K aligned a few lines above. This patch doesn't fix any bug, it is only code cleanup. Suggested-by: Alexey Karda

[Qemu-devel] [PATCH 06/22] spapr: Add sPAPRMachineClass

2015-06-23 Thread David Gibson
Currently although we have an sPAPRMachineState descended from MachineState we don't have an sPAPRMAchineClass descended from MachineClass. So far it hasn't been needed, but several upcoming features are going to want it, so this patch creates a stub implementation. Signed-off-by: Michael Roth S

[Qemu-devel] [PATCH 09/22] spapr_pci: set device node unit address as hex

2015-06-23 Thread David Gibson
From: Nikunj A Dadhania Device node names should encode the unit address as hex, while the code was encodind it as integers. Also, use FDT_NAME_MAX macro for allocating and composing the name. Signed-off-by: Nikunj A Dadhania Reviewed-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/s

Re: [Qemu-devel] [PATCH V2 2/7] i2c: implement broadcast write.

2015-06-23 Thread Peter Crosthwaite
On Mon, Jun 15, 2015 at 8:15 AM, wrote: > From: KONRAD Frederic > > This does a write to every slaves when the I2C bus get a write to address 0. > > Signed-off-by: KONRAD Frederic > --- > hw/i2c/core.c | 46 +- > 1 file changed, 45 insertions(+), 1 d

Re: [Qemu-devel] [PATCH V2 1/7] Introduce AUX bus.

2015-06-23 Thread Peter Crosthwaite
On Mon, Jun 15, 2015 at 8:15 AM, wrote: > From: KONRAD Frederic > > This introduces a new bus: aux-bus. > > It contains an address space for aux slaves devices and a bridge to an I2C bus > for I2C through AUX transactions. > > Signed-off-by: KONRAD Frederic > --- > hw/misc/Makefile.objs | 1

Re: [Qemu-devel] [PATCH v7 3/4] i.MX: Add i.MX25 3DS evaluation board support

2015-06-23 Thread Jean-Christophe DUBOIS
Le 24/06/2015 07:07, Peter Crosthwaite a écrit : On Mon, Jun 22, 2015 at 12:06 PM, Jean-Christophe Dubois wrote: For now we support: * timers (GPT and EPIT) * serial ports * ethernet (through the newly added FEC emulator) * I2C (through the newly added I2C emulator) Signed-

Re: [Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-06-23 Thread Michael S. Tsirkin
On Wed, Jun 24, 2015 at 02:46:30PM +0900, Tetsuya Mukawa wrote: > On 2015/06/23 18:41, Michael S. Tsirkin wrote: > > On Tue, Jun 23, 2015 at 05:31:06PM +0900, Tetsuya Mukawa wrote: > >> On 2015/06/22 17:14, Michael S. Tsirkin wrote: > >>> On Mon, Jun 22, 2015 at 12:50:43PM +0900, Tetsuya Mukawa wro

Re: [Qemu-devel] [RFC PATCH v4 3/5] spapr: Support ibm, dynamic-reconfiguration-memory

2015-06-23 Thread David Gibson
On Wed, Jun 24, 2015 at 07:55:44AM +0530, Bharata B Rao wrote: > On Tue, Jun 23, 2015 at 11:54:29AM +1000, David Gibson wrote: > > On Fri, Jun 19, 2015 at 03:47:55PM +0530, Bharata B Rao wrote: > > > Parse ibm,architecture.vec table obtained from the guest and enable > > > memory node configuration

Re: [Qemu-devel] [RFC PATCH v4 2/5] spapr: Add LMB DR connectors

2015-06-23 Thread David Gibson
On Wed, Jun 24, 2015 at 07:49:31AM +0530, Bharata B Rao wrote: > On Tue, Jun 23, 2015 at 11:32:34AM +1000, David Gibson wrote: > > On Fri, Jun 19, 2015 at 03:47:54PM +0530, Bharata B Rao wrote: > > > Enable memory hotplug for pseries 2.4 and add LMB DR connectors. > > > With memory hotplug, enforce

Re: [Qemu-devel] [PATCH v2 0/5] Add feature to start QEMU without vhost-user backend

2015-06-23 Thread Tetsuya Mukawa
On 2015/06/23 18:41, Michael S. Tsirkin wrote: > On Tue, Jun 23, 2015 at 05:31:06PM +0900, Tetsuya Mukawa wrote: >> On 2015/06/22 17:14, Michael S. Tsirkin wrote: >>> On Mon, Jun 22, 2015 at 12:50:43PM +0900, Tetsuya Mukawa wrote: Hi guys, Here are patches to add feature to start QEM

[Qemu-devel] [PATCH V2] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
Signed-off-by: Lin Ma Reviewed-by: Gonglei --- Changes in V2: * For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs. * Add missing R-by information. hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/

Re: [Qemu-devel] [PATCH v7 10/10] hw/pci-bridge: format special OFW unit address for PXB host

2015-06-23 Thread Michael S. Tsirkin
On Fri, Jun 19, 2015 at 04:40:17AM +0200, Laszlo Ersek wrote: > We have agreed that OpenFirmware device paths in the "bootorder" fw_cfg > file should follow the pattern > > /pci@i0cf8,%x/... > > for devices that live behind an extra root bus. The extra root bus in > question is the %x'th among

Re: [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
在 2015年06月24日 11:53, Gonglei 写道: On 2015/6/24 11:39, Lin Ma wrote: Changes in V1: For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs. Signed-off-by: Lin Ma --- The changing remarks should be lay up here, and use v2 suffix inst

Re: [Qemu-devel] [PATCH v7 3/4] i.MX: Add i.MX25 3DS evaluation board support

2015-06-23 Thread Peter Crosthwaite
On Mon, Jun 22, 2015 at 12:06 PM, Jean-Christophe Dubois wrote: > For now we support: > * timers (GPT and EPIT) > * serial ports > * ethernet (through the newly added FEC emulator) > * I2C (through the newly added I2C emulator) > > Signed-off-by: Jean-Christophe Dubois > --- > > C

[Qemu-devel] [PATCH] qcow2: Handle EAGAIN returned from update_refcount

2015-06-23 Thread Jindřich Makovička
Fixes a crash during image compression Signed-off-by: Jindřich Makovička --- block/qcow2-refcount.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 0632fc3..b0ee42d 100644 --- a/block/qcow2-refcoun

Re: [Qemu-devel] [PATCH v2] memory_mapping: Rework cpu related includes

2015-06-23 Thread Peter Crosthwaite
Ping! On Sun, Jun 7, 2015 at 2:59 PM, Peter Crosthwaite wrote: > This makes it more consistent with all other core code files, which > either just rely on qemu-common.h inclusion or precede cpu.h with > qemu-common.h. > > cpu-all.h should not be included in addition to cpu.h. Remove it. > > Signe

Re: [Qemu-devel] [PATCH 0/2] real host page API

2015-06-23 Thread Peter Crosthwaite
Ping! Can this go via the TCG queue, is there something for VFIO, or can Peter pick it up as a between-the-maintainerships straggler? Regards, Peter On Fri, Jun 5, 2015 at 11:17 PM, Peter Crosthwaite wrote: > Hi All, > > As we discussed earlier, the sole use of HOST_PAGE_ALIGN in system > level

Re: [Qemu-devel] [PATCH 0/4] More core code ENV_GET_CPU removals

2015-06-23 Thread Peter Crosthwaite
On Tue, Jun 23, 2015 at 6:00 AM, Andreas Färber wrote: > Hi Peter, > > Am 04.06.2015 um 03:10 schrieb Peter Crosthwaite: >> Was there an outcome? > > The conclusion for this series was that I would get a chance to review > it (which I did later than I wanted to, after my talks from a hotel...) > a

[Qemu-devel] [PATCH qom v4 7/7] disas: cris: QOMify target specific disas setup

2015-06-23 Thread Peter Crosthwaite
Move the target_disas() cris specifics to the QOM disas_set_info() hook and delete the cris specific code in disas.c. This also now adds support for monitor_disas() to cris. E.g. (qemu) xp 0x40004000 40004000: 0x1e6f25f0 And before this patch: (qemu) xp/i 0x40004000 0x40004000: Asm outpu

[Qemu-devel] [PATCH qom v4 5/7] disas: microblaze: QOMify target specific disas setup

2015-06-23 Thread Peter Crosthwaite
Move the target_disas() MB specifics to the QOM disas_set_info hook and delete the MB specific code in disas.c. This also now adds support for monitor_disas() to Microblaze. E.g. (qemu) xp 0x9000 9000: 0x94208001 And before this patch: (qemu) xp/i 0x9000 0x9000: Asm outpu

[Qemu-devel] [PATCH qom v4 3/7] disas: arm-a64: Make printfer and stream variable

2015-06-23 Thread Peter Crosthwaite
In a normal disassembly flow, the printf() and stream being used varies from disas job to job. In particular it varies if mixing monitor_disas and target_disas. Make both the printf() function and target stream settable in the QEMUDisassmbler class. Reviewed-by: Claudio Fontana Tested-by: Claudi

[Qemu-devel] [PATCH qom v4 6/7] disas: cris: Fix 0 buffer length case

2015-06-23 Thread Peter Crosthwaite
Cris has the complication of variable length instructions and has a check in place to clamp memory reads in case the disas request doesn't have enough bytes for the instruction being disas'd. This breaks down in the case where disassembling for the monitor where the buffer length is defaulted to 0.

[Qemu-devel] [PATCH qom v4 4/7] disas: arm: QOMify target specific disas setup

2015-06-23 Thread Peter Crosthwaite
Move the target_disas() ARM specifics to the QOM disas_set_info hook and delete the ARM specific code in disas.c. This has the extra advantage of the more fully featured target_disas() implementation now applying to monitor_disas(). Currently, target_disas() has multi-endian, thumb and AArch64 su

[Qemu-devel] [PATCH qom v4 1/7] disas: Add print_insn to disassemble info

2015-06-23 Thread Peter Crosthwaite
Add the print_insn pointer to the disassemble info structure. This is to prepare for QOMification support, where a QOM CPU hook function will be responsible for setting the print_insn() function. Add this function to the existing struct to consolidate such that only the one struct needs to be passe

[Qemu-devel] [PATCH qom v4 2/7] disas: QOMify target specific setup

2015-06-23 Thread Peter Crosthwaite
Add a QOM function hook for target-specific disassembly setup. This allows removal of the #ifdeffery currently implementing target specific disas setup from disas.c. Reviewed-by: Richard Henderson Signed-off-by: Peter Crosthwaite --- disas.c | 22 ++ include/qom/cp

[Qemu-devel] [PATCH qom v4 0/7] Unify and QOMify (target|monitor)_disas

2015-06-23 Thread Peter Crosthwaite
These two functions are mostly trying to do the same thing, which is disassemble a target instruction (sequence) for printfing. The architecture specific setup is largely duped between the two functions. The approach is to add a single QOM hook on the CPU level to setup the disassembler (P1&2). Th

Re: [Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Gonglei
On 2015/6/24 11:39, Lin Ma wrote: > Changes in V1: > For avoiding regression issue, Dont remove the usb device from global > hostdevs list while > usb speed mismatch occurs. > > Signed-off-by: Lin Ma > --- The changing remarks should be lay up here, and use v2 suffix instead of v1. If you do t

[Qemu-devel] [PATCH V1] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Lin Ma
Changes in V1: For avoiding regression issue, Dont remove the usb device from global hostdevs list while usb speed mismatch occurs. Signed-off-by: Lin Ma --- hw/usb/host-libusb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c index bc2944c..11

Re: [Qemu-devel] [PATCH v2 0/4] Refactoring pc_dimm_plug and NUMA node lookup API

2015-06-23 Thread Bharata B Rao
On Fri, Jun 19, 2015 at 10:40:20AM +0530, Bharata B Rao wrote: > Hi, > > Here is the v2 of the patchset that refactors pc_dimm_plug and adds > an API to lookup NUMA node by address. > > - Refactoring pc_dimm_plug() helps other architectures like PowerPC > to make use of common code. > - API to

Re: [Qemu-devel] [PATCH v3 3/7] disas: arm-a64: Make printfer and stream variable

2015-06-23 Thread Peter Crosthwaite
On Sun, May 24, 2015 at 3:47 PM, Peter Crosthwaite wrote: > In a normal disassembly flow, the printf and stream being used varies > from disas job to job. In particular it varies if mixing monitor_disas > and target_disas. > > Make both the printfer function and target stream settable in the > QEM

Re: [Qemu-devel] [RFC PATCH v4 2/5] spapr: Add LMB DR connectors

2015-06-23 Thread Bharata B Rao
On Wed, Jun 24, 2015 at 07:49:31AM +0530, Bharata B Rao wrote: > On Tue, Jun 23, 2015 at 11:32:34AM +1000, David Gibson wrote: > > On Fri, Jun 19, 2015 at 03:47:54PM +0530, Bharata B Rao wrote: > > > Enable memory hotplug for pseries 2.4 and add LMB DR connectors. > > > With memory hotplug, enforce

[Qemu-devel] [PATCH qom v3 3/4] arm: boot: Use cpu_set_pc()

2015-06-23 Thread Peter Crosthwaite
Use cpu_set_pc() across the board for setting program counters. This removes instances of system level code having to reach into the CPU env. Reviewed-by: Peter Maydell Reviewed-by: Andreas Färber Signed-off-by: Peter Crosthwaite --- Changed since v2: Add () to fn names in commit msg Drop error

[Qemu-devel] [PATCH qom v3 0/4] qom-cpu: Wrap set_pc hook and use in bootloaders

2015-06-23 Thread Peter Crosthwaite
Wrap the CPUClass::set_pc fn hook in a caller helper to reduce verbosity of calls. Simplify the call from the gdbstub. Then use the call to abstract away the PC env fields from the ARM and Microblaze bootloaders. This moves towards the goal of minimising system level code of the CPU env (and one

[Qemu-devel] [PATCH qom v3 1/4] cpu: Add wrapper to the set-pc() hook

2015-06-23 Thread Peter Crosthwaite
Add a wrapper around the CPUClass::set_pc() hook. Signed-off-by: Peter Crosthwaite --- changed since v2: drop "qom" from commit message subject. Add () to functions in commit messages. Drop error argument --- include/qom/cpu.h | 17 + 1 file changed, 17 insertions(+) diff --git

[Qemu-devel] [PATCH qom v3 4/4] microblaze: boot: Use cpu_set_pc()

2015-06-23 Thread Peter Crosthwaite
Use cpu_set_pc() for setting program counters when bootloading. This removes an instance of system level code having to reach into the CPU env. Reviewed-by: Andreas Färber Signed-off-by: Peter Crosthwaite --- changed since v2: Add () to function names in commit messages --- dtc

[Qemu-devel] [PATCH qom v3 2/4] gdbstub: Use cpu_set_pc() helper

2015-06-23 Thread Peter Crosthwaite
Use the cpu_set_pc() helper which will take care of CPUClass retrieval for us. Signed-off-by: Peter Crosthwaite --- Changed since v2: Add () to fn names in commit message Drop error argument --- gdbstub.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdbstub.c b/gdbstub

Re: [Qemu-devel] [Qemu-block] [PATCH v2 02/13] block: Introduce bdrv_lock and bdrv_unlock API

2015-06-23 Thread Fam Zheng
On Wed, 06/24 10:47, Fam Zheng wrote: > On Tue, 06/16 17:07, Stefan Hajnoczi wrote: > > On Tue, Jun 02, 2015 at 11:21:51AM +0800, Fam Zheng wrote: > > > +/** > > > + * bdrv_lock: > > > + * > > > + * Begin a temporary exclusive accessing by locking the BDS. > > > + */ > > > +void bdrv_lock(BlockDriv

Re: [Qemu-devel] [PATCH v2 2/4] gdbstub: Use cpu_set_pc helper

2015-06-23 Thread Peter Crosthwaite
On Mon, Jun 22, 2015 at 10:31 AM, Andreas Färber wrote: > Am 16.06.2015 um 07:46 schrieb Peter Crosthwaite: >> Use the cpu_set_pc helper which will take care of CPUClass retrieval >> for us. >> >> Signed-off-by: Peter Crosthwaite >> --- >> gdbstub.c | 5 + >> 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [Qemu-block] [PATCH v2 02/13] block: Introduce bdrv_lock and bdrv_unlock API

2015-06-23 Thread Fam Zheng
On Tue, 06/16 17:07, Stefan Hajnoczi wrote: > On Tue, Jun 02, 2015 at 11:21:51AM +0800, Fam Zheng wrote: > > +/** > > + * bdrv_lock: > > + * > > + * Begin a temporary exclusive accessing by locking the BDS. > > + */ > > +void bdrv_lock(BlockDriverState *bs); > > + > > +/** > > + * bdrv_unlock: > >

Re: [Qemu-devel] [PATCH] qemu-iotests: fix 051.out after qdev error message change

2015-06-23 Thread Fam Zheng
On Tue, 06/23 15:56, Stefan Hajnoczi wrote: > Commit f006cf7fa9a63ba8e4ccf57d46231ce594301727 ("qdev-monitor: > Propagate errors through qdev_device_add()") dropped a meaningless error > message. This change in output caused qemu-iotests 051 to fail: > >QEMU_PROG: -device ide-drive,drive=disk

[Qemu-devel] [PATCH qom v4 5/7] gdbserver: _fork: Change fn to accept cpu instead of env

2015-06-23 Thread Peter Crosthwaite
All callsites to this function navigate the cpu->env_ptr only for the function to take the env ptr back to the original cpu ptr. Change the function to just pass in the CPU pointer instead. Removes a core code usage of ENV_GET_CPU (in gdbstub.c). Cc: Riku Voipio Reviewed-by: Andreas Färber Revie

[Qemu-devel] [PATCH qom v4 7/7] cpus: Change exec_init() arg to cpu, not env

2015-06-23 Thread Peter Crosthwaite
The callers (most of them in target-foo/cpu.c) to this function all have the cpu pointer handy. Just pass it to avoid an ENV_GET_CPU() from core code (in exec.c). Cc: Paolo Bonzini Cc: Richard Henderson Cc: Peter Maydell Cc: "Edgar E. Iglesias" Cc: "Andreas Färber" Cc: Eduardo Habkost Cc: Mi

[Qemu-devel] [PATCH qom v4 4/7] translate-all: Change tb_flush() env argument to cpu

2015-06-23 Thread Peter Crosthwaite
All of the core-code usages of this API have the cpu pointer handy so pass it in. There are only 3 architecture specific usages (2 of which are commented out) which can just use ENV_GET_CPU() locally to get the cpu pointer. The reduces core code usage of the CPU env, which brings us closer to commo

[Qemu-devel] [PATCH qom v4 3/7] ppc: Move cpu_exec_init() call to realize function

2015-06-23 Thread Peter Crosthwaite
From: Bharata B Rao Move cpu_exec_init() call from instance_init to realize. This allows any failures from cpu_exec_init() to be handled appropriately. Also add corresponding cpu_exec_exit() call from unrealize. cpu_dt_id assignment from instance_init is no longer needed since correct assignment

[Qemu-devel] [PATCH qom v4 6/7] cpus: Change tcg_cpu_exec() arg to cpu, not env

2015-06-23 Thread Peter Crosthwaite
The sole caller of this function navigates the cpu->env_ptr only for this function to take it back the cpu pointer straight away. Pass in cpu pointer instead and grab the env pointer locally in the function. Removes a core code usage of ENV_GET_CPU(). Reviewed-by: Andreas Färber Reviewed-by: Edua

[Qemu-devel] [PATCH qom v4 1/7] cpus: Add Error argument to cpu_exec_init()

2015-06-23 Thread Peter Crosthwaite
From: Bharata B Rao Add an Error argument to cpu_exec_init() to let users collect the error. This is in preparation to change the CPU enumeration logic in cpu_exec_init(). With the new enumeration logic, cpu_exec_init() can fail if cpu_index values corresponding to max_cpus have already been hand

[Qemu-devel] [PATCH qom v4 0/7] More core code ENV_GET_CPU removals

2015-06-23 Thread Peter Crosthwaite
Hi All, I'm moving towards the goal of having no core code usages of ENV_GET_CPU. This has two advantages: 1: It means we are closer to common-obj'ing core code like exec.c, cpus.c and friends. 2: Multi arch is easier if ENV_GET_CPU() stays arch specific. It means I don't need those patches where

[Qemu-devel] [PATCH qom v4 2/7] cpus: Convert cpu_index into a bitmap

2015-06-23 Thread Peter Crosthwaite
From: Bharata B Rao Currently CPUState.cpu_index is monotonically increasing and a newly created CPU always gets the next higher index. The next available index is calculated by counting the existing number of CPUs. This is fine as long as we only add CPUs, but there are architectures which are s

Re: [Qemu-devel] [RFC PATCH v4 3/5] spapr: Support ibm, dynamic-reconfiguration-memory

2015-06-23 Thread Bharata B Rao
On Tue, Jun 23, 2015 at 11:54:29AM +1000, David Gibson wrote: > On Fri, Jun 19, 2015 at 03:47:55PM +0530, Bharata B Rao wrote: > > Parse ibm,architecture.vec table obtained from the guest and enable > > memory node configuration via ibm,dynamic-reconfiguration-memory if guest > > supports it. This

Re: [Qemu-devel] [RFC PATCH v4 2/5] spapr: Add LMB DR connectors

2015-06-23 Thread Bharata B Rao
On Tue, Jun 23, 2015 at 11:32:34AM +1000, David Gibson wrote: > On Fri, Jun 19, 2015 at 03:47:54PM +0530, Bharata B Rao wrote: > > Enable memory hotplug for pseries 2.4 and add LMB DR connectors. > > With memory hotplug, enforce NUMA node memory size and maxmem to be > > a multiple of SPAPR_MEMORY_

Re: [Qemu-devel] [RFC PATCH v4 1/5] spapr: Initialize hotplug memory address space

2015-06-23 Thread Bharata B Rao
On Tue, Jun 23, 2015 at 11:33:58AM +1000, David Gibson wrote: > On Fri, Jun 19, 2015 at 03:47:53PM +0530, Bharata B Rao wrote: > > Initialize a hotplug memory region under which all the hotplugged > > memory is accommodated. Also enable memory hotplug by setting > > CONFIG_MEM_HOTPLUG. > > > > Mod

Re: [Qemu-devel] [PATCH v3 8/8] cpu-exec: Purge all uses of ENV_GET_CPU()

2015-06-23 Thread Peter Crosthwaite
On Thu, Jun 18, 2015 at 10:24 AM, Peter Crosthwaite wrote: > Remove un-needed usages of ENV_GET_CPU() by converting the APIs to use > CPUState pointers and retrieving the env_ptr as minimally needed. > > Scripted conversion for target-* change: > > for I in target-*/cpu.h; do > sed -i \ >

Re: [Qemu-devel] [PATCH v3 7/8] cpus: Change exec_init() arg to cpu, not env

2015-06-23 Thread Peter Crosthwaite
On Thu, Jun 18, 2015 at 12:35 PM, Eduardo Habkost wrote: > On Thu, Jun 18, 2015 at 10:24:54AM -0700, Peter Crosthwaite wrote: > [...] >> diff --git a/exec.c b/exec.c >> index b1c8aae..7fc1950 100644 >> --- a/exec.c >> +++ b/exec.c >> @@ -554,9 +554,8 @@ void cpu_exec_exit(CPUState *cpu) >> } >>

Re: [Qemu-devel] [PATCH] Re-attach usb device to kernel while usb_host_open fails

2015-06-23 Thread Gonglei
On 2015/6/23 22:49, Lin Ma wrote: > > 在 2015年06月23日 16:29, Gonglei 写道: >> On 2015/6/23 12:24, Lin Ma wrote: >>> Signed-off-by: Lin Ma >>> --- >>> hw/usb/host-libusb.c | 5 + >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libusb.c >>> index 10f47

Re: [Qemu-devel] [Qemu-block] [PATCH COLO-Block v6 07/16] Add new block driver interface to connect/disconnect the remote target

2015-06-23 Thread Wen Congyang
On 06/19/2015 06:49 PM, Stefan Hajnoczi wrote: > On Fri, Jun 19, 2015 at 08:54:56AM +0800, Wen Congyang wrote: >> On 06/19/2015 12:06 AM, Stefan Hajnoczi wrote: >>> On Thu, Jun 18, 2015 at 10:36:39PM +0800, Wen Congyang wrote: At 2015/6/18 20:55, Stefan Hajnoczi Wrote: > On Thu, Jun 18, 20

[Qemu-devel] [PATCH] m68k: remove useless parameter op_size from gen_lea_indexed()

2015-06-23 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index d6c478f..bc83a6e 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -297,8 +297,7 @@ stat

[Qemu-devel] GSoC 2015 (Mac OS 9 support) report, week 8

2015-06-23 Thread Alexander Graf
[Done] - Fix ppc: mem_claim() and mmu_claim() - Initial patch has been sent to the OpenBIOS mailing list. - Newest version submitted and waiting to be pushed to trunk. - Verify that the carriage return / newline problem is related to stack corruption - The fixes to mem_claim and

Re: [Qemu-devel] [PATCH] m68k: is_mem is useless

2015-06-23 Thread Peter Crosthwaite
cc trivial. On Tue, Jun 23, 2015 at 4:00 PM, Laurent Vivier wrote: > Remove is_mem as it is never tested anymore since: > > commit bfa50bc2638d877cf2900712b7503be22e8811cb > Author: aliguori > Date: Tue Nov 18 20:26:41 2008 + > > Remove premature memop TB terminations (

Re: [Qemu-devel] [PATCH] m68k: remove useless file m68k-qreg.h

2015-06-23 Thread Peter Crosthwaite
On Tue, Jun 23, 2015 at 5:21 PM, Laurent Vivier wrote: > > > Le 24/06/2015 02:19, Peter Crosthwaite a écrit : >> On Tue, Jun 23, 2015 at 5:07 PM, Laurent Vivier wrote: >>> Unused since: >>> >>> commit e1f3808e03f73e7a7fa966afbed2455dd052202e >>> Author: pbrook >>> Date: Sat May 24

Re: [Qemu-devel] [PATCH v2 RFC 0/8] block: persistent dirty bitmaps

2015-06-23 Thread John Snow
On 06/17/2015 10:29 AM, Vladimir Sementsov-Ogievskiy wrote: > On 12.06.2015 22:34, John Snow wrote: >> >> On 06/08/2015 11:21 AM, Vladimir Sementsov-Ogievskiy wrote: >>> v2: >>> - rebase on my 'Dirty bitmaps migration' series >>> - remove 'print dirty bitmap', 'query-dirty-bitmap' and use md5

Re: [Qemu-devel] [PATCH] m68k: remove useless file m68k-qreg.h

2015-06-23 Thread Laurent Vivier
Le 24/06/2015 02:19, Peter Crosthwaite a écrit : > On Tue, Jun 23, 2015 at 5:07 PM, Laurent Vivier wrote: >> Unused since: >> >> commit e1f3808e03f73e7a7fa966afbed2455dd052202e >> Author: pbrook >> Date: Sat May 24 22:29:16 2008 + >> >> Convert m68k target to TCG. >> >

Re: [Qemu-devel] [PATCH] m68k: remove useless file m68k-qreg.h

2015-06-23 Thread Peter Crosthwaite
On Tue, Jun 23, 2015 at 5:07 PM, Laurent Vivier wrote: > Unused since: > > commit e1f3808e03f73e7a7fa966afbed2455dd052202e > Author: pbrook > Date: Sat May 24 22:29:16 2008 + > > Convert m68k target to TCG. > > Signed-off-by: Laurent Vivier You should cc qemu-trivial o

[Qemu-devel] [PATCH] m68k: remove useless file m68k-qreg.h

2015-06-23 Thread Laurent Vivier
Unused since: commit e1f3808e03f73e7a7fa966afbed2455dd052202e Author: pbrook Date: Sat May 24 22:29:16 2008 + Convert m68k target to TCG. Signed-off-by: Laurent Vivier --- target-m68k/m68k-qreg.h | 11 --- 1 file changed, 11 deletions(-) delete mode 100644 t

[Qemu-devel] [PATCH v8 7/8] vmport_rpc: Add migration

2015-06-23 Thread Don Slutz
From: Don Slutz Signed-off-by: Don Slutz CC: Don Slutz --- hw/misc/vmport_rpc.c | 250 +++ trace-events | 2 + 2 files changed, 252 insertions(+) diff --git a/hw/misc/vmport_rpc.c b/hw/misc/vmport_rpc.c index 917898b..7198e30 100644 --

[Qemu-devel] [PATCH v8 8/8] vmport: Add VMware all ring hack

2015-06-23 Thread Don Slutz
From: Don Slutz This is done by adding a new machine property vmware-port-ring3 that needs to be enabled to have any effect. It only effects accel=tcg mode. It is needed if you want to use VMware tools in accel=tcg mode. Signed-off-by: Don Slutz CC: Don Slutz --- hw/i386/pc.c |

[Qemu-devel] [PATCH v8 5/8] vmport_rpc: Add limited support of VMware's hyper-call rpc

2015-06-23 Thread Don Slutz
From: Don Slutz To enable you must add "-device vmport_rpc" to command line. The support included is enough to allow VMware tools to install in a guest and provide guestinfo support. guestinfo support is provided by what is known as VMware RPC support. If the guest is running VMware tools, the

[Qemu-devel] [PATCH v8 4/8] vmport_rpc: Add the object vmport_rpc

2015-06-23 Thread Don Slutz
From: Don Slutz This is the 1st part of "Add limited support of VMware's hyper-call rpc". This patch uses existing infrastructure used by vmmouse.c (provided by vmport.c) to handle the VMware backdoor command 30. One of the better on-line references is: https://sites.google.com/site/chitchatvm

[Qemu-devel] [PATCH v8 3/8] MAINTAINERS: add VMware port

2015-06-23 Thread Don Slutz
From: Don Slutz Signed-off-by: Don Slutz CC: Don Slutz Acked-by: Paolo Bonzini --- v8: Added Acked-by: Paolo Bonzini v7: Switched e-mail address in MAINTAINERS. MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 3639173..1872a9c 10064

[Qemu-devel] [PATCH v8 1/8] vmport: Switch to trace

2015-06-23 Thread Don Slutz
From: Don Slutz Signed-off-by: Don Slutz CC: Don Slutz Acked-by: Paolo Bonzini --- v8: Added Acked-by: Paolo Bonzini hw/misc/vmport.c | 6 ++ trace-events | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/misc/vmport.c b/hw/misc/vmport.c index 7fcc00d..3b81

[Qemu-devel] [PATCH v8 0/8] Add limited support of VMware's hyper-call rpc

2015-06-23 Thread Don Slutz
Changes v7 to v8: Rebase to master Drop patch #1 since commit 965eb2fcdfe919ecced6c34803535ad32dc1249c fixed this. Paolo Bonzini Ok to pull v7 1,2,3, and 9. Added Acked-by: Paolo Bonzini Moved v7 #9 to v8 #3 Eric Blake s/it's/its/ Done No space after **.

[Qemu-devel] [BUGFIX][PATCH v8 2/8] vmport: Fix vmport_cmd_ram_size

2015-06-23 Thread Don Slutz
From: Don Slutz Based on https://sites.google.com/site/chitchatvmback/backdoor and testing on ESXi, this should be in MB not bytes. Signed-off-by: Don Slutz CC: Don Slutz Acked-by: Paolo Bonzini --- v8: Added Acked-by: Paolo Bonzini hw/misc/vmport.c | 2 +- 1 file changed, 1 insertion(+

Re: [Qemu-devel] [PATCH v3 03/15] target-mips: remove an unused argument

2015-06-23 Thread Aurelien Jarno
On 2015-06-23 16:38, Yongbok Kim wrote: > remove an unused argument from decode_micromips32_opc() > > Signed-off-by: Yongbok Kim > Reviewed-by: Leon Alrae > --- > target-mips/translate.c |5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/target-mips/translate.c b

Re: [Qemu-devel] [PATCH v3 2/3] target-mips: improve exceptions handling

2015-06-23 Thread Aurelien Jarno
On 2015-06-18 16:28, Pavel Dovgalyuk wrote: > This patch improves exception handling in MIPS. > Instructions generate several types of exceptions. > When exception is generated, it breaks the execution of the current > translation > block. Implementation of the exceptions handling does not correct

[Qemu-devel] [PATCH] m68k: is_mem is useless

2015-06-23 Thread Laurent Vivier
Remove is_mem as it is never tested anymore since: commit bfa50bc2638d877cf2900712b7503be22e8811cb Author: aliguori Date: Tue Nov 18 20:26:41 2008 + Remove premature memop TB terminations (Jan Kiszka) Signed-off-by: Laurent Vivier --- target-m68k/translate.c | 7

Re: [Qemu-devel] [PATCH v3 1/3] softmmu: add helper function to pass through retaddr

2015-06-23 Thread Aurelien Jarno
On 2015-06-18 16:28, Pavel Dovgalyuk wrote: > This patch introduces several helpers to pass return address > which points to the TB. Correct return address allows correct > restoring of the guest PC and icount. These functions should be used when > helpers embedded into TB invoke memory operations.

Re: [Qemu-devel] incorrect memory size inside vm

2015-06-23 Thread Piotr Rybicki
Thanks, this is an unexpected behavior, because you are starting with small amount of total memory exposed to a balloon at the beginning and there should be no issues except if the inflation races with plugging in new DIMMs (just a wild guess), dmesg output will be helpful there as I pointed earli

Re: [Qemu-devel] [PATCH] Peek dont read for vmdescription

2015-06-23 Thread Alexander Graf
On 23.06.15 18:37, Dr. David Alan Gilbert wrote: > * Alexander Graf (ag...@suse.de) wrote: >> >> >> On 22.06.15 16:49, Dr. David Alan Gilbert (git) wrote: >>> From: "Dr. David Alan Gilbert" >>> >>> The VMDescription section maybe after the EOF mark, the current code >>> does a 'qemu_get_byte' an

Re: [Qemu-devel] [PATCH 10/23] userfaultfd: add new syscall to provide memory externalization

2015-06-23 Thread Andrea Arcangeli
Hi Dave, On Tue, Jun 23, 2015 at 12:00:19PM -0700, Dave Hansen wrote: > Down in userfaultfd_wake_function(), it looks like you intended for a > len=0 to mean "wake all". But the validate_range() that we do from > userspace has a !len check in it, which keeps us from passing a len=0 in > from user

  1   2   3   4   5   >