Re: [Qemu-devel] [PATCH v11 6/7] vhost-user: add multiple queue support

2015-09-22 Thread Yuanhan Liu
On Wed, Sep 23, 2015 at 12:20:00PM +0800, Yuanhan Liu wrote: > From: Changchun Ouyang > [...] > static void net_vhost_user_event(void *opaque, int event) > { > -VhostUserState *s = opaque; > +const char *name = opaque; > +NetClientState *ncs[MAX_QUEUE_NUM]; > +VhostUserState *s;

[Qemu-devel] [PATCH 1/1] target-i386: get/put MSR_TSC_AUX across reset and migration

2015-09-22 Thread Amit Shah
There's one report of migration breaking due to missing MSR_TSC_AUX save/restore. Fix this by adding a new subsection that saves the state of this MSR. https://bugzilla.redhat.com/show_bug.cgi?id=1261797 Reported-by: Xiaoqing Wei Signed-off-by: Amit Shah CC: Paolo Bonzini CC: Juan Quintela C

Re: [Qemu-devel] [PATCH v5 00/38] blockdev: BlockBackend and media

2015-09-22 Thread Wen Congyang
On 09/22/2015 11:09 PM, Max Reitz wrote: > On 22.09.2015 16:45, Kevin Wolf wrote: >> Am 18.09.2015 um 17:22 hat Max Reitz geschrieben: >>> This series reworks a lot regarding BlockBackend and media. Basically, >>> it allows empty BlockBackends, that is BBs without a BDS tree. >>> >>> Before this se

[Qemu-devel] [PATCH] .travis.yml: Run make check for all targets, not just some

2015-09-22 Thread David Gibson
ed173cb ".travis.yml: remove "make check" from main matrix" stopped running make check for all the Travis build targets for various reasons. It continued to run make check on one Travis build, which builds for a big list of all (? nearly all) our supported softmmu targets. Unfortunately, due to a

Re: [Qemu-devel] [PATCH qemu v3] target-ppc: Define get_monitor_def

2015-09-22 Thread David Gibson
On Fri, Aug 14, 2015 at 01:34:30PM +1000, Alexey Kardashevskiy wrote: > At the moment get_monitor_def() prints only registers from monitor_defs. > However there is a lot of BOOK3S SPRs which are not in the list and > cannot be printed. > > This makes use of the new get_monitor_def() callback and p

Re: [Qemu-devel] [RFC PATCH v0 2/2] spapr: Abort when HTAB of requested size isn't allocated

2015-09-22 Thread David Gibson
On Tue, Sep 22, 2015 at 09:09:49AM +0530, Bharata B Rao wrote: > Terminate the guest when HTAB of requested size isn't allocated by > the host. > > When memory hotplug is attempted on a guest that has booted with > less than requested HTAB size, the guest kernel will not be able > to gracefully fa

Re: [Qemu-devel] [RFC PATCH v0 1/2] spapr: Allocate HTAB from machine init

2015-09-22 Thread David Gibson
On Tue, Sep 22, 2015 at 09:09:48AM +0530, Bharata B Rao wrote: > Allocate HTAB from ppc_spapr_init() so that we can abort the guest > if requested HTAB size is't allocated by the host. However retain the > htab reset call in spapr_reset_htab() so that HTAB gets reset (and > not allocated) during ma

[Qemu-devel] [PATCH v11 5/7] vhost: introduce vhost_backend_get_vq_index method

2015-09-22 Thread Yuanhan Liu
Minusing the idx with the base(dev->vq_index) for vhost-kernel, and then adding it back for vhost-user doesn't seem right. Here introduces a new method vhost_backend_get_vq_index() for getting the right vq index for following vhost messages calls. Suggested-by: Jason Wang Signed-off-by: Yuanhan L

[Qemu-devel] [PATCH v11 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-09-22 Thread Yuanhan Liu
This is for querying how many queues the backend supports if it has mq support(when VHOST_USER_PROTOCOL_F_MQ flag is set from the quried protocol features). vhost_net_get_max_queues() is the interface to export that value, and to tell if the backend supports # of queues user requested, which is do

[Qemu-devel] [PATCH v11 3/7] vhost: rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE

2015-09-22 Thread Yuanhan Liu
Quote from Michael: We really should rename VHOST_RESET_OWNER to VHOST_RESET_DEVICE. Suggested-by: Michael S. Tsirkin Signed-off-by: Yuanhan Liu --- docs/specs/vhost-user.txt | 4 ++-- hw/net/vhost_net.c | 2 +- hw/virtio/vhost-user.c | 6 +++--- linux-headers/linux/vhost.h

[Qemu-devel] [PATCH v11 2/7] vhost-user: add protocol feature negotiation

2015-09-22 Thread Yuanhan Liu
From: "Michael S. Tsirkin" Support a separate bitmask for vhost-user protocol features, and messages to get/set protocol features. Invoke them at init. No features are defined yet. [ leverage vhost_user_call for request handling -- Yuanhan Liu ] Signed-off-by: Michael S. Tsirkin Signed-off-b

[Qemu-devel] [PATCH v11 0/7] vhost-user multiple queue support

2015-09-22 Thread Yuanhan Liu
Hi, Here is the updated patch set for enabling vhost-user multiple queue. And I did proper and formal testing this time. This patch set introduces 2 more vhost user messages: VHOST_USER_GET_QUEUE_NUM, for querying how many queues the backend supports, and VHOST_USER_SET_VRING_ENABLE, for enablin

[Qemu-devel] [PATCH v11 7/7] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-22 Thread Yuanhan Liu
From: Changchun Ouyang Add a new message, VHOST_USER_SET_VRING_ENABLE, to enable or disable a specific virt queue, which is similar to attach/detach queue for tap device. virtio driver on guest doesn't have to use max virt queue pair, it could enable any number of virt queue ranging from 1 to ma

[Qemu-devel] [PATCH v11 6/7] vhost-user: add multiple queue support

2015-09-22 Thread Yuanhan Liu
From: Changchun Ouyang This patch is initially based a patch from Nikolay Nikolaev. This patch adds vhost-user multiple queue support, by creating a nc and vhost_net pair for each queue. Qemu exits if find that the backend can't support the number of requested queues (by providing queues=# opti

[Qemu-devel] [PATCH v11 1/7] vhost-user: use VHOST_USER_XXX macro for switch statement

2015-09-22 Thread Yuanhan Liu
So that we could let vhost_user_call to handle extented requests, such as VHOST_USER_GET/SET_PROTOCOL_FEATURES, instead of invoking vhost_user_read/write and constructing the msg again by ourself. Signed-off-by: Yuanhan Liu --- hw/virtio/vhost-user.c | 38 ++

Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support

2015-09-22 Thread Yuanhan Liu
On Tue, Sep 22, 2015 at 06:14:14PM +0800, Jason Wang wrote: > > [...] > > -static void net_vhost_link_down(VhostUserState *s, bool link_down) > > +static void net_vhost_link_down(int queues, NetClientState *ncs[], > > +bool link_down) > > { > > -s->nc.link_dow

Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support

2015-09-22 Thread Yuanhan Liu
On Wed, Sep 23, 2015 at 10:12:10AM +0800, Jason Wang wrote: > > > On 09/23/2015 09:57 AM, Yuanhan Liu wrote: > > On Tue, Sep 22, 2015 at 06:14:14PM +0800, Jason Wang wrote: > >> > > [...] > >>> -static void net_vhost_link_down(VhostUserState *s, bool link_down) > >>> +static void net_vhost_link_d

[Qemu-devel] [PULL 32/36] spapr: Fix default NUMA node allocation for threads

2015-09-22 Thread David Gibson
At present, if guest numa nodes are requested, but the cpus in each node are not specified, spapr just uses the default behaviour or assigning each vcpu round-robin to nodes. If smp_threads != 1, that will assign adjacent threads in a core to different NUMA nodes. As well as being just weird, tha

Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support

2015-09-22 Thread Jason Wang
On 09/23/2015 09:57 AM, Yuanhan Liu wrote: > On Tue, Sep 22, 2015 at 06:14:14PM +0800, Jason Wang wrote: >> > [...] >>> -static void net_vhost_link_down(VhostUserState *s, bool link_down) >>> +static void net_vhost_link_down(int queues, NetClientState *ncs[], >>> +

[Qemu-devel] [PULL 33/36] ppc/spapr: Fix buffer overflow in spapr_populate_drconf_memory()

2015-09-22 Thread David Gibson
From: Thomas Huth The buffer that is allocated in spapr_populate_drconf_memory() is used for setting both, the "ibm,dynamic-memory" and the "ibm,associativity-lookup-arrays" property. However, only the size of the first one is taken into account when allocating the memory. So if the length of the

Re: [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-22 Thread Yuanhan Liu
On Tue, Sep 22, 2015 at 08:06:58PM -0600, Eric Blake wrote: > On 09/22/2015 08:05 PM, Yuanhan Liu wrote: > > >>> + * VHOST_USER_SET_VRING_ENABLE > >>> + > >>> + Id: 18 > >>> + Equivalent ioctl: N/A > >>> + Master payload: vring state description > >>> + > >>> + Signal slave to

[Qemu-devel] [PULL 31/36] spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type

2015-09-22 Thread David Gibson
From: Bharata B Rao Till now memory hotplug used RTAS_LOG_V6_HP_ID_DRC_INDEX hotplug type which meant that we generated one hotplug type of EPOW event for every 256MB (SPAPR_MEMORY_BLOCK_SIZE). This quickly overruns the kernel rtas log buffer thus resulting in loss of memory hotplug events. Switc

Re: [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-22 Thread Eric Blake
On 09/22/2015 08:05 PM, Yuanhan Liu wrote: >>> + * VHOST_USER_SET_VRING_ENABLE >>> + >>> + Id: 18 >>> + Equivalent ioctl: N/A >>> + Master payload: vring state description >>> + >>> + Signal slave to enable or disable corresponding vring. >> >> Does there need to be any QMP con

Re: [Qemu-devel] [PATCH v10 7/7] vhost-user: add a new message to disable/enable a specific virt queue.

2015-09-22 Thread Yuanhan Liu
On Tue, Sep 22, 2015 at 08:47:04AM -0600, Eric Blake wrote: > On 09/18/2015 08:58 AM, Yuanhan Liu wrote: > > From: Changchun Ouyang > > > > Add a new message, VHOST_USER_SET_VRING_ENABLE, to enable or disable > > a specific virt queue, which is similar to attach/detach queue for > > tap device. >

[Qemu-devel] [PULL 30/36] spapr: Support hotplug by specifying DRC count

2015-09-22 Thread David Gibson
From: Bharata B Rao Support hotplug identifier type RTAS_LOG_V6_HP_ID_DRC_COUNT that allows hotplugging of DRCs by specifying the DRC count. While we are here, rename spapr_hotplug_req_add_event() to spapr_hotplug_req_add_by_index() spapr_hotplug_req_remove_event() to spapr_hotplug_req_remove_b

Re: [Qemu-devel] [PATCH v10 4/7] vhost-user: add VHOST_USER_GET_QUEUE_NUM message

2015-09-22 Thread Yuanhan Liu
On Tue, Sep 22, 2015 at 05:56:16PM +0800, Jason Wang wrote: > > > On 09/18/2015 10:58 PM, Yuanhan Liu wrote: > > This is for querying how many queues the backend supports if it has mq > > support(when VHOST_USER_PROTOCOL_F_MQ flag is set from the quried > > protocol features). > > > > vhost_net_g

[Qemu-devel] [PULL 28/36] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA

2015-09-22 Thread David Gibson
From: Bharata B Rao When NUMA isn't configured explicitly, assume node 0 is present for the purpose of creating ibm,associativity-lookup-arrays property under ibm,dynamic-reconfiguration-memory DT node. This ensures that the associativity index property is correctly updated in ibm,dynamic-memory

[Qemu-devel] [PULL 35/36] sPAPR: Revert don't enable EEH on emulated PCI devices

2015-09-22 Thread David Gibson
From: Gavin Shan This reverts commit 7cb18007 ("sPAPR: Don't enable EEH on emulated PCI devices") as rtas_ibm_set_eeh_option() isn't the right place to check if there has the corresponding PCI device for the input address, which can be PE address, not PCI device address. Signed-off-by: Gavin Sha

[Qemu-devel] [PULL 16/36] spapr_pci: fix device tree props for MSI/MSI-X

2015-09-22 Thread David Gibson
From: Michael Roth PAPR requires ibm,req#msi and ibm,req#msi-x to be present in the device node to define the number of msi/msi-x interrupts the device supports, respectively. Currently we have ibm,req#msi-x hardcoded to a non-sensical constant that happens to be 2, and are missing ibm,req#msi e

[Qemu-devel] [PULL 36/36] sPAPR: Enable EEH on VFIO PCI device only

2015-09-22 Thread David Gibson
From: Gavin Shan This checks if the PCI device retrieved from the PCI device address is VFIO PCI device when enabling EEH functionality. If it's not VFIO PCI device, the EEH functonality isn't enabled. Signed-off-by: Gavin Shan Signed-off-by: David Gibson --- hw/ppc/spapr_pci_vfio.c | 2 +- 1

[Qemu-devel] [PULL 34/36] ppc/spapr: Implement H_RANDOM hypercall in QEMU

2015-09-22 Thread David Gibson
From: Thomas Huth The PAPR interface defines a hypercall to pass high-quality hardware generated random numbers to guests. Recent kernels can already provide this hypercall to the guest if the right hardware random number generator is available. But in case the user wants to use another source li

[Qemu-devel] [PULL 23/36] spapr: Support ibm, dynamic-reconfiguration-memory

2015-09-22 Thread David Gibson
From: Bharata B Rao Parse ibm,architecture.vec table obtained from the guest and enable memory node configuration via ibm,dynamic-reconfiguration-memory if guest supports it. This is in preparation to support memory hotplug for sPAPR guests. This changes the way memory node configuration is done

[Qemu-devel] [PULL 24/36] spapr: Make hash table size a factor of maxram_size

2015-09-22 Thread David Gibson
From: Bharata B Rao The hash table size is dependent on ram_size, but since with hotplug the memory can grow till maxram_size. Hence make hash table size dependent on maxram_size. This allows to hotplug huge amounts of memory to the guest. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson

[Qemu-devel] [PULL 26/36] spapr: Don't allow memory hotplug to memory less nodes

2015-09-22 Thread David Gibson
From: Bharata B Rao Currently PowerPC kernel doesn't allow hot-adding memory to memory-less node, but instead will silently add the memory to the first node that has some memory. This causes two unexpected behaviours for the user. - Memory gets hotplugged to a different node than what the user s

[Qemu-devel] [PULL 27/36] spapr: Provide better error message when slots exceed max allowed

2015-09-22 Thread David Gibson
From: Bharata B Rao Currently when user specifies more slots than allowed max of SPAPR_MAX_RAM_SLOTS (32), we error out like this: qemu-system-ppc64: unsupported amount of memory slots: 64 Let the user know about the max allowed slots like this: qemu-system-ppc64: Specified number of memory sl

[Qemu-devel] [PULL 17/36] spapr_drc: don't allow 'empty' DRCs to be unisolated or allocated

2015-09-22 Thread David Gibson
From: Michael Roth Logical resources start with allocation-state:UNUSABLE / isolation-state:ISOLATED. During hotplug, guests will transition them to allocation-state:USABLE, and then to isolation-state:UNISOLATED. For cases where we cannot transition to allocation-state:USABLE, in this case due

[Qemu-devel] [PULL 25/36] spapr: Memory hotplug support

2015-09-22 Thread David Gibson
From: Bharata B Rao Make use of pc-dimm infrastructure to support memory hotplug for PowerPC. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr.c| 118 ++ hw/ppc/spapr_events.c | 8 ++-

[Qemu-devel] [PULL 21/36] spapr: Use QEMU limit for maximum CPUs number

2015-09-22 Thread David Gibson
From: Alexey Kardashevskiy sPAPR uses hard coded limit of maximum 255 supported CPUs which is exactly the same as QEMU-wide limit which is MAX_CPUMASK_BITS and also defined as 255. This makes use of a global CPU number limit for the "pseries" machine. In order to anticipate future increase of t

[Qemu-devel] [PULL 08/36] spapr_drc: Fix potential undefined behaviour

2015-09-22 Thread David Gibson
The DRC_INDEX_ID_MASK macro does a left shift on ~0, which is a signed quantity, and therefore undefined behaviour according to the C spec. In particular this causes warnings from the clang sanitizer. This fixes it by calculating the same mask without using ~0 (I think the new method is a more co

[Qemu-devel] [PULL 29/36] spapr: Revert to memory@XXXX representation for non-hotplugged memory

2015-09-22 Thread David Gibson
From: Bharata B Rao Don't represent non-hotluggable memory under drconf node. With this we don't have to create DRC objects for them. The effect of this patch is that we revert back to memory@ representation for all the memory specified with -m option and represent the cold plugged memory an

[Qemu-devel] [PULL 05/36] spapr: Make ibm, change-msi respect 3 return values

2015-09-22 Thread David Gibson
From: Sam Bobroff Currently, rtas_ibm_change_msi() always returns four values even if less are specified. Correct this by only returning the fourth parameter if it was requested. This is specified by PAPR. Signed-off-by: Sam Bobroff Reviewed-by: David Gibson Signed-off-by: David Gibson ---

[Qemu-devel] [PULL 22/36] spapr: Add LMB DR connectors

2015-09-22 Thread David Gibson
Enable memory hotplug for pseries 2.4 and add LMB DR connectors. With memory hotplug, enforce RAM size, NUMA node memory size and maxmem to be a multiple of SPAPR_MEMORY_BLOCK_SIZE (256M) since that's the granularity in which LMBs are represented and hot-added. LMB DR connectors will be used by th

[Qemu-devel] [PULL 10/36] spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add

2015-09-22 Thread David Gibson
From: Bharata B Rao If drmgr is used in the guest to hotplug a device before a device_add has been issued via the QEMU monitor, QEMU segfaults in configure_connector call. This occurs due to accessing of NULL FDT which otherwise would have been created and associated with the DRC during device_ad

[Qemu-devel] [PULL 02/36] spapr: Create pseries-2.5 machine

2015-09-22 Thread David Gibson
Add pseries-2.5 machine version. Signed-off-by: Bharata B Rao [Altered to merge before memory hotplug -- dwg] [Altered to work with b9f072d01 -- dwg] Signed-off-by: David Gibson --- hw/ppc/spapr.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spa

[Qemu-devel] [PULL 19/36] spapr_drc: use RTAS return codes for methods called by RTAS

2015-09-22 Thread David Gibson
From: Michael Roth Certain methods in sPAPRDRConnector objects are only ever called by RTAS and in many cases are responsible for the logic that determines the RTAS return codes. Rather than having a level of indirection requiring RTAS code to re-interpret return values from such methods to dete

[Qemu-devel] [PULL 07/36] spapr: add dumpdtb support

2015-09-22 Thread David Gibson
From: Andrew Jones dumpdtb (-machine dumpdtb=) allows one to inspect the generated device tree of machine types that generate device trees. This is useful for a) seeing what's there b) debugging/testing device tree generator patches. It can be used as follows $QEMU_CMDLINE -machine dumpdtb=dtb d

[Qemu-devel] [PULL 18/36] spapr: Initialize hotplug memory address space

2015-09-22 Thread David Gibson
From: Bharata B Rao Initialize a hotplug memory region under which all the hotplugged memory is accommodated. Also enable memory hotplug by setting CONFIG_MEM_HOTPLUG. Modelled on i386 memory hotplug. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: David Gibson --- def

[Qemu-devel] [PULL 14/36] pseries: Fix incorrect calculation of threads per socket for chip-id

2015-09-22 Thread David Gibson
The device tree presented to pseries machine type guests includes an ibm,chip-id property which gives essentially the socket number of each vcpu core (individual vcpu threads don't get a node in the device tree). To calculate this, it uses a vcpus_per_socket variable computed as (smp_cpus / #socke

[Qemu-devel] [PULL 15/36] spapr: Enable in-kernel H_SET_MODE handling

2015-09-22 Thread David Gibson
From: Alexey Kardashevskiy For setting debug watchpoints, sPAPR guests use H_SET_MODE hypercall. The existing QEMU H_SET_MODE handler does not support this but the KVM handler in HV KVM does. However it is not enabled. This enables the in-kernel H_SET_MODE handler which handles: - Completed Inst

[Qemu-devel] [PULL 04/36] spapr: Add /rtas/ibm, change-msix-capable

2015-09-22 Thread David Gibson
From: Sam Bobroff QEMU is MSI-X capable and makes it available via ibm,change-msi, so we should indicate this by adding /rtas/ibm,change-msix-capable to the device tree. This is specificed by PAPR. Signed-off-by: Sam Bobroff Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/s

[Qemu-devel] [PULL 12/36] pseries: define coldplugged devices as "configured"

2015-09-22 Thread David Gibson
From: Laurent Vivier When a device is hotplugged, attach() sets "configured" to false, waiting an action from the OS to configure it and then to call ibm,configure-connector. On ibm,configure-connector, the hypervisor sets "configured" to true. In case of coldplugged device, attach() sets "confi

[Qemu-devel] [PULL 11/36] sPAPR: Introduce rtas_ldq()

2015-09-22 Thread David Gibson
From: Gavin Shan This introduces rtas_ldq() to load 64-bits parameter from continuous two 4-bytes memory chunk of RTAS parameter buffer, to simplify the code. Signed-off-by: Gavin Shan Reviewed-by: Thomas Huth Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr_pci.c

[Qemu-devel] [PULL 06/36] spapr: SPLPAR Characteristics

2015-09-22 Thread David Gibson
From: Sam Bobroff Improve the SPLPAR Characteristics information: Add MaxPlatProcs: set to max_cpus, the maximum CPUs that could be addded to the system. Add DesMem: set to the initial memory of the system. Add DesProcs: set to smp_cpus, the inital number of CPUs in the syste

[Qemu-devel] [PULL 20/36] spapr: Don't use QOM [*] syntax for DR connectors.

2015-09-22 Thread David Gibson
The dynamic reconfiguration (hotplug) code for the pseries machine type uses a "DR connector" QOM object for each resource it will be possible to hotplug. Each of these is added to its owner using object_property_add_child(owner, "dr-connector[*], ...); That works ok, mostly, but it means tha

[Qemu-devel] [PULL 00/36] spapr-next queue 20150923

2015-09-22 Thread David Gibson
The following changes since commit 27c7275a56948f48f536e2d1599b22355f5714ac: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ipxe-20150903-1' into staging (2015-09-22 19:22:23 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/spapr-next-20150923 f

[Qemu-devel] [PULL 03/36] spapr: Add /ibm,partition-name

2015-09-22 Thread David Gibson
From: Sam Bobroff QEMU has a notion of the guest name, so if it's present we might as well put that into the device tree as /ibm,partition-name. This is specificed by PAPR. Signed-off-by: Sam Bobroff Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr.c | 5 + 1 file

[Qemu-devel] [PULL 01/36] spapr: Provide an error message when migration fails due to htab_shift mismatch

2015-09-22 Thread David Gibson
From: Bharata B Rao Include an error message when migration fails due to mismatch in htab_shift values at source and target. This should provide a bit more verbose message in addition to the current migration failure message that reads like: qemu-system-ppc64: error while loading state for insta

[Qemu-devel] [PULL 09/36] ppc/spapr: Use qemu_log_mask() for hcall_dprintf()

2015-09-22 Thread David Gibson
From: Thomas Huth To see the output of the hcall_dprintf statements, you currently have to enable the DEBUG_SPAPR_HCALLS macro in include/hw/ppc/spapr.h. This is ugly because a) not every user who wants to debug guest problems can or wants to recompile QEMU to be able to see such issues, and b) s

Re: [Qemu-devel] [PATCH v10 6/7] vhost-user: add multiple queue support

2015-09-22 Thread Yuanhan Liu
On Tue, Sep 22, 2015 at 03:52:49PM -0300, Eduardo Habkost wrote: > On Fri, Sep 18, 2015 at 10:58:43PM +0800, Yuanhan Liu wrote: > [...] > > diff --git a/net/vhost-user.c b/net/vhost-user.c > > index 93dcecd..4fa3d64 100644 > > --- a/net/vhost-user.c > > +++ b/net/vhost-user.c > [...] > > +i

Re: [Qemu-devel] [PATCH v5 0/4] qapi: child add/delete support

2015-09-22 Thread Wen Congyang
On 09/22/2015 07:15 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> If quorum's child is broken, we can use mirror job to replace it. >> But sometimes, the user only need to remove the broken child, and >> add it later when the problem is fixed. >> > > Hi, > T

Re: [Qemu-devel] [PULL 00/33] spapr-next queue 2015-09-16

2015-09-22 Thread David Gibson
On Mon, Sep 21, 2015 at 02:33:12PM -0700, Peter Maydell wrote: > On 20 September 2015 at 18:05, David Gibson > wrote: > > The following changes since commit 18640989a9f5e4d2e84b566c52ff1fccfa0dbf4a: > > > > Merge remote-tracking branch > > 'remotes/afaerber/tags/qom-devices-for-peter' into sta

Re: [Qemu-devel] [PATCH V6 2/2] sdhci: Split sdhci.h for public and internal device usage

2015-09-22 Thread Alistair Francis
On Mon, Sep 21, 2015 at 11:28 PM, Sai Pavan Boddu wrote: > Split sdhci.h into Pubilc version (i.e include/hw/sd/sdhci.h) and > Internal version (i.e hw/sd/sdhci-interna.h) based on register > declarations and object declaration. > > Signed-off-by: Sai Pavan Boddu Reviewed-by: Alistair Francis

[Qemu-devel] [ANNOUNCE] QEMU 2.4.0.1 CVE update released

2015-09-22 Thread Michael Roth
Hi everyone, As part of recent planning around stable releases discussed during KVM Forum, I'm releasing the first of what will be regular (hopefully not *too* regular) CVE-only stable updates. These updates are intended to reduce the gap between vulnerability disclosures and patched/packaged rele

Re: [Qemu-devel] [PATCH v7 14/14] tests: add BlockJobTxn unit test

2015-09-22 Thread John Snow
On 09/21/2015 10:46 PM, Fam Zheng wrote: > From: Stefan Hajnoczi > > The BlockJobTxn unit test verifies that both single jobs and pairs of > jobs behave as a transaction group. Either all jobs complete > successfully or the group is cancelled. > > Signed-off-by: Stefan Hajnoczi > Signed-off-

[Qemu-devel] [PATCH] hw/usb/dev-audio.c: make USB audio card sound perfect

2015-09-22 Thread Programmingkid
The USB audio card would not play audio well because its buffer was too small. Increasing it made it play perfectly. All the crackling and dropouts are gone. Signed-off-by: John Arbuckle --- This patch was tested on qemu-system-ppc running Linux and qemu-system-i386 running Windows XP. Window

Re: [Qemu-devel] [PATCH v7 11/14] block/backup: support block job transactions

2015-09-22 Thread John Snow
On 09/22/2015 06:34 PM, Eric Blake wrote: > On 09/22/2015 03:08 PM, John Snow wrote: >> Eric, Markus: I've CC'd you for some crazy what-if QAPI questions >> after my R-B on this patch. >> > >> The current design of this patch is such that the blockdev-backup >> and drive-backup QMP commands are

Re: [Qemu-devel] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-22 Thread John Snow
On 09/22/2015 07:15 PM, Eric Blake wrote: > Commit 50b7b000 improved HMP error messages, but forgot to update > qemu-iotests to match. > > Reported-by: Kevin Wolf > Signed-off-by: Eric Blake > --- > > I'm not sure if this should go through Markus' "error" tree, > since that's where the break

[Qemu-devel] [PATCH] tests: Fix test 049 fallout from improved HMP error messages

2015-09-22 Thread Eric Blake
Commit 50b7b000 improved HMP error messages, but forgot to update qemu-iotests to match. Reported-by: Kevin Wolf Signed-off-by: Eric Blake --- I'm not sure if this should go through Markus' "error" tree, since that's where the break was introduced, or through a "block" tree since it touches qem

Re: [Qemu-devel] [Qemu-block] [PULL 2/8] hmp: Allow for error message hints on HMP

2015-09-22 Thread John Snow
On 09/22/2015 01:02 PM, Eric Blake wrote: > On 09/22/2015 09:23 AM, Kevin Wolf wrote: >> Am 18.09.2015 um 15:22 hat Markus Armbruster geschrieben: >>> From: Eric Blake >>> >>> Commits 7216ae3d and d2828429 disabled some error message hints, >>> all because a change to use modern error reporting

[Qemu-devel] [PATCH 2/2] hw/vfio/platform: do not set resamplefd for edge-sensitive IRQS

2015-09-22 Thread Eric Auger
In irqfd mode, current code attempts to set a resamplefd whatever the type of the IRQ. For an edge-sensitive IRQ this attempt fails and as a consequence the whole irqfd setup fails and we fall back to the slow mode. This patch bypasses the resamplefd setting for non level-sentive IRQs. Signed-off-

[Qemu-devel] [PATCH 1/2] hw/vfio/platform: irqfd setup sequence update

2015-09-22 Thread Eric Auger
With current implementation, eventfd VFIO signaling is first set up and then irqfd is setup, if supported and allowed. This start sequence causes several issues with IRQ forwarding setup which, if supported, is transparently attempted on irqfd setup: IRQ forwarding setup is likely to fail if the I

[Qemu-devel] [PATCH 0/2] hw/vfio/platform: irqfd setup changes

2015-09-22 Thread Eric Auger
This series fixes a bug related to irqfd setup for edge sensitive IRQs and proposes a new startup sequence for irqfd signaling. The current startup sequence brings some issues with respect to the oncoming ARM IRQ forwarding support. The new startup sequence starts either irqfd signaling or eventfd

Re: [Qemu-devel] [PATCH v7 11/14] block/backup: support block job transactions

2015-09-22 Thread Eric Blake
On 09/22/2015 03:08 PM, John Snow wrote: > Eric, Markus: I've CC'd you for some crazy what-if QAPI questions after > my R-B on this patch. > > The current design of this patch is such that the blockdev-backup and > drive-backup QMP commands are extended for use in the transaction > action. This m

[Qemu-devel] [PATCH v3] target-tilegx: Implement v*add and v*sub instructions

2015-09-22 Thread gang . chen . 5i5j
From: Chen Gang v4* are implemented in normal code, another are implemented in helper functions. Signed-off-by: Chen Gang --- target-tilegx/helper.h | 5 + target-tilegx/simd_helper.c | 23 +++ target-tilegx/translate.c | 46 +

Re: [Qemu-devel] [PATCH] target-tilegx: Implement v*add and v*sub instructions

2015-09-22 Thread Chen Gang
On 9/22/15 22:45, Richard Henderson wrote: > On 09/21/2015 10:54 PM, Chen Gang wrote: >> On 2015年09月19日 10:34, Richard Henderson wrote: >>> >>> There's a trick for this that's more efficient for 4 or more elements >>> per vector (i.e. good for v2 and v1, but not v4): >>> >>>a + b = (a & 0x7f7f

Re: [Qemu-devel] [PATCH 2/2] target-ppc: fix xscmpodp and xscmpudp decoding

2015-09-22 Thread Aurelien Jarno
On 2015-09-22 12:26, Thomas Huth wrote: > On 13/09/15 23:03, Aurelien Jarno wrote: > > The xscmpodp and xscmpudp instructions only have the AX, BX bits in > > there encoding, the lowest bit (usually TX) is marked as an invalid > > bit. We therefore can't decode them with GEN_XX2FORM, which decodes

Re: [Qemu-devel] [PATCH v3 12/25] target-sparc: Tidy gen_branch_a interface

2015-09-22 Thread Aurelien Jarno
On 2015-09-22 13:24, Richard Henderson wrote: > We always pass pc2 == dc->npc and r_cond == cpu_cond, > and always set is_br afterward. Infer all of that. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > target-sparc/translate.c | 21 ++--- > 1 file cha

Re: [Qemu-devel] [PATCH] target-arm: Implement AArch64 OSLSR_EL1 sysreg dummy

2015-09-22 Thread Alistair Francis
On Tue, Sep 22, 2015 at 11:35 AM, Davorin Mista wrote: > Define a dummy version of the AArch64 OSLAR_EL1 system register > which just ignores reads. > Linux reads from this register during its suspend/resume procedure. > > Signed-off-by: Davorin Mista Looks good to me Reviewed-by: Alistair Fran

Re: [Qemu-devel] [PATCH v7 11/14] block/backup: support block job transactions

2015-09-22 Thread John Snow
Eric, Markus: I've CC'd you for some crazy what-if QAPI questions after my R-B on this patch. On 09/21/2015 10:46 PM, Fam Zheng wrote: > From: Stefan Hajnoczi > > Join the transaction when the 'transactional-cancel' QMP argument is > true. > > This ensures that the sync bitmap is not thrown awa

[Qemu-devel] [PATCH] target-arm: Implement AArch64 OSLSR_EL1 sysreg dummy

2015-09-22 Thread Davorin Mista
Define a dummy version of the AArch64 OSLAR_EL1 system register which just ignores reads. Linux reads from this register during its suspend/resume procedure. Signed-off-by: Davorin Mista --- target-arm/helper.c | 4 1 file changed, 4 insertions(+) diff --git a/target-arm/helper.c b/targe

Re: [Qemu-devel] [PATCH v7 00/14] block: incremental backup transactions using BlockJobTxn

2015-09-22 Thread John Snow
On 09/21/2015 10:46 PM, Fam Zheng wrote: > v7: Add Eric's rev-by in 1, 11. > Add Max's rev-by in 4, 5, 9, 10, 11. > Add John's rev-by in 5, 6, 8. > Fix wording for 6. [John] > Fix comment of block_job_txn_add_job() in 9. [Max] > Remove superfluous hunks, and document default v

Re: [Qemu-devel] [PATCH 1/3] pc: Set hw_version on all machine classes

2015-09-22 Thread Eduardo Habkost
On Tue, Sep 22, 2015 at 10:26:14PM +0200, Laszlo Ersek wrote: > On 09/22/15 22:16, Eduardo Habkost wrote: > > In 2012, QEMU had a bug where it exposed QEMU version information to the > > guest, meaning a QEMU upgrade would expose different hardware to the > > guest OS even if the same machine-type

[Qemu-devel] [PATCH v3 15/25] target-sparc: Add npc state to insn_start

2015-09-22 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/cpu.h | 1 + target-sparc/translate.c | 7 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 72ea171..ac8f383 100644 --- a/target-sparc/cpu.h +++ b

[Qemu-devel] [PATCH v3 18/25] tcg: Add TCG_MAX_INSNS

2015-09-22 Thread Richard Henderson
Adjust all translators to respect it. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/translate.c | 3 +++ target-arm/translate-a64.c| 3 +++ target-arm/translate.c| 6 +- target-cris/translate.c | 3 +++ target-i386/translate.c

Re: [Qemu-devel] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Eduardo Habkost
On Tue, Sep 22, 2015 at 10:33:32PM +0200, Laszlo Ersek wrote: > On 09/22/15 22:16, Eduardo Habkost wrote: > > Guest visible data shouldn't change with a simple QEMU upgrade, so use > > qemu_hw_version() to ensure it won't change (as long as the machine > > class being used has hw_version set). > >

[Qemu-devel] [PATCH v3 22/25] tcg: Remove tcg_gen_code_search_pc

2015-09-22 Thread Richard Henderson
It's no longer used, so tidy up everything reached by it. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tcg/tcg.c | 59 +++ tcg/tcg.h | 2 -- 2 files changed, 19 insertions(+), 42 deletions(-) diff --git a/tcg/tcg.c b/t

Re: [Qemu-devel] [PATCH 3/3] megasas: Use qemu_hw_version() instead of QEMU_VERSION

2015-09-22 Thread Laszlo Ersek
On 09/22/15 22:16, Eduardo Habkost wrote: > Guest visible data shouldn't change with a simple QEMU upgrade, so use > qemu_hw_version() to ensure it won't change (as long as the machine > class being used has hw_version set). > > Cc: Hannes Reinecke > Cc: Paolo Bonzini > Cc: qemu-bl...@nongnu.org

[Qemu-devel] [PATCH v3 20/25] tcg: Save insn data and use it in cpu_restore_state_from_tb

2015-09-22 Thread Richard Henderson
We can now restore state without retranslation. Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1 + tcg/tcg.c | 40 - tcg/tcg.h | 4 +- translate-all.c | 149 +++- 4 files changed, 13

[Qemu-devel] [PATCH v3 14/25] target-sparc: Remove gen_opc_jump_pc

2015-09-22 Thread Richard Henderson
Since jump_pc[1] is always npc + 4, we can infer after incrementing that jump_pc[1] == pc + 4. Because of that, we can encode the branch destination into a single word, and store that in npc. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/translate.c | 19

[Qemu-devel] [PATCH v3 11/25] target-cris: Mirror gen_opc_pc into insn_start

2015-09-22 Thread Richard Henderson
This perhaps isn't ideal in terms of (ab)using the "pc" field to encode both pc and ppc + delay branch state, as one has to be aware of this when examining opcode dumps. But it preserves existing logic, which will be good for bisection, and it certainly does save storage space. Reviewed-by: Aurel

Re: [Qemu-devel] [PATCH 1/3] pc: Set hw_version on all machine classes

2015-09-22 Thread Laszlo Ersek
On 09/22/15 22:16, Eduardo Habkost wrote: > In 2012, QEMU had a bug where it exposed QEMU version information to the > guest, meaning a QEMU upgrade would expose different hardware to the > guest OS even if the same machine-type is being used. > > The bug was fixed by commit 93bfef4c6e4b23caea9d51

[Qemu-devel] [PATCH v3 21/25] tcg: Remove gen_intermediate_code_pc

2015-09-22 Thread Richard Henderson
It is no longer used, so tidy up everything reached by it. This includes the gen_opc_* arrays, the search_pc parameter and the inline gen_intermediate_code_internal functions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 1 - target-alpha/tran

[Qemu-devel] [PATCH v3 17/25] target-*: Drop cpu_gen_code define

2015-09-22 Thread Richard Henderson
This symbol no longer exists. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-alpha/cpu.h | 1 - target-arm/cpu.h| 1 - target-cris/cpu.h | 1 - target-i386/cpu.h | 1 - target-lm32/cpu.h | 1 - target-m68k/cpu.h | 1 - target-microbla

[Qemu-devel] [PATCH v3 10/25] target-sh4: Add flags state to insn_start

2015-09-22 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sh4/cpu.h | 1 + target-sh4/translate.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/target-sh4/cpu.h b/target-sh4/cpu.h index 1f68b27..ea854cb 100644 --- a/target-s

[Qemu-devel] [PATCH v3 25/25] tcg: Check for overflow via highwater mark

2015-09-22 Thread Richard Henderson
We currently pre-compute an worst case code size for any TB, which works out to be 122kB. Since the average TB size is near 1kB, this wastes quite a lot of storage. Instead, check for overflow in between generating code for each opcode. The overhead of the check isn't measurable and wastage is mi

[Qemu-devel] [PATCH v3 24/25] tcg: Allocate a guard page after code_gen_buffer

2015-09-22 Thread Richard Henderson
This will catch any overflow of the buffer. Add a native win32 alternative for alloc_code_gen_buffer; remove the malloc alternative. Signed-off-by: Richard Henderson --- translate-all.c | 210 1 file changed, 119 insertions(+), 91 deletio

[Qemu-devel] [PATCH v3 08/25] target-mips: Add delayed branch state to insn_start

2015-09-22 Thread Richard Henderson
Reviewed-by: Aurelien Jarno Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-mips/cpu.h | 1 + target-mips/translate.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index ed7d86d..fd23832 100644 --- a/tar

[Qemu-devel] [PATCH v3 19/25] tcg: Pass data argument to restore_state_to_opc

2015-09-22 Thread Richard Henderson
The gen_opc_* arrays are already redundant with the data stored in the insn_start arguments. Transition restore_state_to_opc to use data from the latter. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 2 +- target-alpha/translate.c | 5 ++

[Qemu-devel] [PATCH v3 12/25] target-sparc: Tidy gen_branch_a interface

2015-09-22 Thread Richard Henderson
We always pass pc2 == dc->npc and r_cond == cpu_cond, and always set is_br afterward. Infer all of that. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target-sparc/translate.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/target-s

[Qemu-devel] [PATCH v3 23/25] tcg: Emit prologue to the beginning of code_gen_buffer

2015-09-22 Thread Richard Henderson
By putting the prologue at the end, we risk overwriting the prologue should our estimate of maximum TB size. Given the two different placements of the call to tcg_prologue_init, move the high water mark computation into tcg_prologue_init. Signed-off-by: Richard Henderson --- tcg/tcg.c | 2

  1   2   3   4   >