[Qemu-devel] [PATCH] configure: factor out adding disas configure

2015-07-17 Thread Peter Crosthwaite
Every arch adds its disas configury to both its own config as well config_disas_all. Make a small function do to both at once. Signed-off-by: Peter Crosthwaite --- Prepares support for multi-arch where the disas configury for multi-arch will also need to be added where 3 more LOC are added for ea

[Qemu-devel] [PATCH 2/2] arm: Remove hw_error() usages.

2015-07-17 Thread Peter Crosthwaite
All of these hw_errors are fatal and indicate something wrong with QEMU implementation. Convert to g_assert_not_reached. Signed-off-by: Peter Crosthwaite --- Dropped the error messages as they are not hugely useful outside of a debug flow. --- target-arm/cpu.c| 4 ++-- target-arm/helper.c |

[Qemu-devel] [PATCH 0/2] Remove hw_error from target-arm

2015-07-17 Thread Peter Crosthwaite
Hi Peter, This removes the last of the hw_errors from target-arm. Regards, Peter Peter Crosthwaite (2): arm: cpu: Soften no-EL2 virt IRQ error condition. arm: Remove hw_error() usages. target-arm/cpu.c| 10 ++ target-arm/helper.c | 2 +- 2 files changed, 7 insertions(+), 5 del

[Qemu-devel] [PATCH 1/2] arm: cpu: Soften no-EL2 virt IRQ error condition.

2015-07-17 Thread Peter Crosthwaite
Replace the hw_error for no-EL2 VIRQ with a LOG_UNIMP. This is more accurate and handles the corner case where the user defeatures EL2 using overrides in a system that would otherwise have EL2 connectivity. Signed-off-by: Peter Crosthwaite --- I'm primarily interested in getting rid of the hw_err

Re: [Qemu-devel] [PATCH v2 6/6] hw/arm/virt: Enable TZ extensions on the GIC if we are using them

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:11 PM, Peter Maydell wrote: > If we're creating a board with support for TrustZone, then enable > it on the GIC model as well as on the CPUs. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite > --- > hw/arm/virt.c | 7 +-- > 1 file changed, 5 insert

Re: [Qemu-devel] [PATCH v2 5/6] hw/arm/virt: Default to not providing TrustZone support

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:11 PM, Peter Maydell wrote: > Switch the default for the 'virt' board to not providing TrustZone > support in either the CPU or the GIC. This is primarily for the > benefit of UEFI, which currently assumes there is no TrustZone > support, and does not set the GIC up corre

Re: [Qemu-devel] [PATCH v2 4/6] hw/cpu/{a15mpcore, a9mpcore}: enable TrustZone in GIC if it is enabled in CPUs

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:11 PM, Peter Maydell wrote: > If the A9 and A15 CPUs which we're creating the peripherals for have > TrustZone (EL3) enabled, then also enable it in the GIC we create. > > Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- P.S. My mail setup will be fixed

Re: [Qemu-devel] [PATCH v2 3/6] hw/intc/arm_gic_common: Configure IRQs as NS if doing direct NS kernel boot

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:11 PM, Peter Maydell wrote: > If we directly boot a kernel in NonSecure on a system where the GIC > supports the security extensions then we must cause the GIC to > configure its interrupts into group 1 (NonSecure) rather than the > usual group 0, and with their initial p

Re: [Qemu-devel] [PATCH v2 2/6] hw/arm: new interface for devices which need to behave differently for kernel boot

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:11 PM, Peter Maydell wrote: > For ARM we have a little minimalist bootloader in hw/arm/boot.c which > takes the place of firmware if we're directly booting a Linux kernel. > Unfortunately a few devices need special case handling in this situation > to do the initializatio

Re: [Qemu-devel] [PATCH v1 2/2] MAINTAINERS: Add ZynqMP to MAINTAINERS file

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:35 PM, Alistair Francis wrote: > Add the Xilinx ZynqMP SoC and EP108 machine to the maintainers > file. > > Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite > --- > > MAINTAINERS |8 > 1 files changed, 8 insertions(+), 0 deletions(-) > > di

Re: [Qemu-devel] [PATCH v1 1/2] MAINTAINERS: Update Xilinx Maintainership

2015-07-17 Thread Peter Crosthwaite
On Thu, Jul 16, 2015 at 1:35 PM, Alistair Francis wrote: > Peter C is leaving Xilinx, so update the maintainer list > to point to Alistair and Edgar from Xilinx and Peter's > personal email address. > > Signed-off-by: Alistair Francis > --- > > MAINTAINERS | 19 ++- > 1 files c

[Qemu-devel] [PATCH v3] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-17 Thread Programmingkid
Mac OS X can be picky when it comes to allowing the user to use physical devices in QEMU. Most mounted volumes appear to be off limits to QEMU. If an issue is detected, a message is displayed showing the user how to unmount a volume. Signed-off-by: John Arbuckle --- Replaced strncpy with pstrcp

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Marc-André Lureau
Hi On Fri, Jul 17, 2015 at 3:50 PM, Paolo Bonzini wrote: > The offset should be 0... Yeah, except if we want to prepend other kind of data in the same allocation, or we want to split somehow usage of this region. I think it's more future-proof to have it if we introduce a new message. > Do you

Re: [Qemu-devel] [PATCH 0/4] vhost-user: protocol updates

2015-07-17 Thread Flavio Leitner
On Fri, Jul 17, 2015 at 05:09:26PM +0300, Michael S. Tsirkin wrote: > This patchset sets the stage for extending the vhost user > protocol, with full backwards compatibility. > > The approach is to negotiate feature bits queried and > acknowledged during device setup. > > For now, there's no new

Re: [Qemu-devel] [PATCH 3/4] vhost-user: add protocol feature negotiation

2015-07-17 Thread Flavio Leitner
On Fri, Jul 17, 2015 at 05:09:38PM +0300, Michael S. Tsirkin wrote: > 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. > > Signed-off-by: Michael S. Tsirkin > --- > include/hw/vir

[Qemu-devel] Cannot open block device from library linked to Qemu-kvm

2015-07-17 Thread Patelczyk, Maciej
Hi, I have modified librbd to access for some data from a client local drive. I have tested it with FIO + librbd and it works fine when launched fio as root (as supposed to). The problem is that when I try this with qemu-kvm I see in logs that open fails since "Operation not permitted". I've ch

[Qemu-devel] [PATCH] target-arm: Fix arm_el_is_aa64() function to support EL2 and EL3

2015-07-17 Thread Sergey Sorokin
Function arm_el_is_aa64() was fixed to support EL2 and EL3. It is needed for a future support of EL2 and/or EL3, and 32 bit EL1 support for ARMv8 cpu. ARM_FEATURE_AARCH64 flag means that the highest exception level is in Aarch64 state. The state of lower exception levels is controlled by the HCR_EL

Re: [Qemu-devel] [RFC v3 0/8] Fix QEMU crash during memory hotplug with vhost=on

2015-07-17 Thread Andrey Korolyov
> This means that the issue is fixed elsewhere during rc, I am not > promising to find a commit quickly, but I would elaborate as fast as > possible in a spare time. Apologies again for messing things up a > little. Unfortunately it looks like that the fix is quantative rather than qualitative - w

Re: [Qemu-devel] [PATCH] hostmem: Fix qemu_opt_get_bool() crash in host_memory_backend_init()

2015-07-17 Thread Eduardo Habkost
On Thu, Jul 16, 2015 at 11:02:14PM +0200, Igor Mammedov wrote: > On Thu, 16 Jul 2015 17:39:17 -0300 > Eduardo Habkost wrote: > > > This fixes the following crash, introduced by commit > > 49d2e648e8087d154d8bf8b91f27c8e05e79d5a6: > > > > $ gdb --args qemu-system-x86_64 -machine pc,mem-merge=of

Re: [Qemu-devel] [PATCH v2] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-17 Thread Programmingkid
On Jul 17, 2015, at 9:41 AM, Stefan Hajnoczi wrote: > On Thu, Jul 16, 2015 at 04:46:07PM -0400, Programmingkid wrote: >> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIterator, >> char *bsdPath, CFIndex ma >> if ( bsdPathAsCFString ) { >> size_t devPathLe

Re: [Qemu-devel] [RFC PATCH qemu v3 4/4] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2015-07-17 Thread Alex Williamson
On Fri, 2015-07-17 at 15:20 +1000, David Gibson wrote: > On Thu, Jul 16, 2015 at 08:44:59AM -0600, Alex Williamson wrote: > > On Thu, 2015-07-16 at 15:11 +1000, David Gibson wrote: > > > On Tue, Jul 14, 2015 at 10:21:54PM +1000, Alexey Kardashevskiy wrote: > > > > This makes use of the new "memory

Re: [Qemu-devel] [PATCH for-2.4] crypto: Fix aes_decrypt_wrapper()

2015-07-17 Thread Daniel P. Berrange
On Fri, Jul 17, 2015 at 07:48:20PM +0200, Kevin Wolf wrote: > Commit d3462e3 broke qcow2's encryption functionality by using encrypt > instead of decrypt in the wrapper function it introduces. This was found > by qemu-iotests case 134. > > Signed-off-by: Kevin Wolf > --- > crypto/cipher-nettle.c

[Qemu-devel] [PATCH for-2.4] crypto: Fix aes_decrypt_wrapper()

2015-07-17 Thread Kevin Wolf
Commit d3462e3 broke qcow2's encryption functionality by using encrypt instead of decrypt in the wrapper function it introduces. This was found by qemu-iotests case 134. Signed-off-by: Kevin Wolf --- crypto/cipher-nettle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypt

Re: [Qemu-devel] [PATCH] ahci: Force ICC bits in PxCMD to zero

2015-07-17 Thread John Snow
On 07/16/2015 03:54 PM, Stefan Fritsch wrote: > The AHCI spec requires that the HBA sets the ICC bits to zero after the > ICC change is done. Since we don't do any ICC change, force the bits to > zero all the time. > > This fixes delays with some OSs (e.g. OpenBSD) waiting for the ICC bits > to

Re: [Qemu-devel] [PATCH v3 2/3] crypto: avoid undefined behavior in nettle calls

2015-07-17 Thread Kevin Wolf
Am 16.07.2015 um 18:04 hat Radim Krčmář geschrieben: > Calling a function pointer that was cast from an incompatible function > results in undefined behavior. 'void *' isn't compatible with 'struct > XXX *', so we can't cast to nettle_cipher_func, but have to provide a > wrapper. (Conversion from

Re: [Qemu-devel] [PATCH v7 34/42] Postcopy: Use helpers to map pages during migration

2015-07-17 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > In postcopy, the destination guest is running at the same time > > as it's receiving pages; as we receive new pages we must put > > them into the guests address space at

Re: [Qemu-devel] [PATCH v3] qemu-char: Fix missed data on unix socket

2015-07-17 Thread Paolo Bonzini
On 17/07/2015 19:11, pyssl...@ludd.ltu.se wrote: > From: Nils Carlson > > Commit 812c1057 introduced HUP detection on unix and tcp sockets prior > to a read in tcp_chr_read. This unfortunately broke CloudStack 4.2 > which relied on the old behaviour where data on a socket was readable > even if

Re: [Qemu-devel] Commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack

2015-07-17 Thread Nils Carlson
On Fri, 17 Jul 2015, Kirill Batuzov wrote: On Fri, 17 Jul 2015, Nils Carlson wrote: Hi, The commit 812c1057f, Handle G_IO_HUP in tcp_chr_read for tcp chardev, broke CloudStack. CloudStack was relying on fire-and-forget style messaging across a unix socket to the VM. Because the host "fires" th

[Qemu-devel] [PATCH v3] qemu-char: Fix missed data on unix socket

2015-07-17 Thread pyssling
From: Nils Carlson Commit 812c1057 introduced HUP detection on unix and tcp sockets prior to a read in tcp_chr_read. This unfortunately broke CloudStack 4.2 which relied on the old behaviour where data on a socket was readable even if a HUP was present. A working solution seems to be to simply c

Re: [Qemu-devel] [PATCH COLO-Frame v7 04/34] colo-comm/migration: skip colo info section for special cases

2015-07-17 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > For older machine types, we skip the colo info section when do > migration, in this way, we can migrate successfully between older mainchine > and > the new one. > > We also skip this section if colo is not enabled (i.e. > migrate_set_capa

Re: [Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-17 Thread Vasiliy Tolstov
2015-07-17 19:44 GMT+03:00 Hitoshi Mitake : > Current sheepdog driver only serializes create requests in oid > unit. This mechanism isn't enough for handling requests to > overwrapping area spanning multiple oids, so it can result bugs like > below: > https://bugs.launchpad.net/sheepdog-project/+bu

Re: [Qemu-devel] [PATCH v1 05/10] xen/pt: Remove XenPTReg->data field.

2015-07-17 Thread Konrad Rzeszutek Wilk
On Fri, Jul 17, 2015 at 05:30:39PM +0100, Stefano Stabellini wrote: > On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > > We do not want to have two entries to cache the guest configuration > > registers: XenPTReg->data and dev.config. Instead we want to use > > only the dev.config. > > > > To do

Re: [Qemu-devel] [PATCH v1 03/10] xen/pt: Check if reg->init function sets the 'data' past the reg->size

2015-07-17 Thread Konrad Rzeszutek Wilk
On Fri, Jul 17, 2015 at 05:03:44PM +0100, Stefano Stabellini wrote: > On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > > It should never happen, but in case it does (an developer adds > > a new register and the 'init_val' expands past the register > > size) we want to report. The code will only w

[Qemu-devel] [PATCH] sheepdog: serialize requests to overwrapping area

2015-07-17 Thread Hitoshi Mitake
Current sheepdog driver only serializes create requests in oid unit. This mechanism isn't enough for handling requests to overwrapping area spanning multiple oids, so it can result bugs like below: https://bugs.launchpad.net/sheepdog-project/+bug/1456421 This patch adds a new serialization mechani

Re: [Qemu-devel] [PATCH] xen/pt: Don't slurp wholesale the PCI configuration registers

2015-07-17 Thread Stefano Stabellini
On Wed, 8 Jul 2015, Konrad Rzeszutek Wilk wrote: > Instead we have the emulation registers ->init functions which > consult the host values to see what the initial value should be > and they are responsible for populating the dev.config. > > Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Stef

Re: [Qemu-devel] [PATCH v1 05/10] xen/pt: Remove XenPTReg->data field.

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > We do not want to have two entries to cache the guest configuration > registers: XenPTReg->data and dev.config. Instead we want to use > only the dev.config. > > To do without much complications we rip out the ->data field > and replace it with an

Re: [Qemu-devel] [PATCH] target-arm: Fix arm_el_is_aa64() function to support EL2 and EL3

2015-07-17 Thread Peter Maydell
On 17 July 2015 at 17:01, Sergey Sorokin wrote: > Function arm_el_is_aa64() was fixed to support EL2 and EL3. > It is needed for a future support of EL2 and/or EL3, > and 32 bit EL1 support for ARMv8 cpu. > ARM_FEATURE_AARCH64 flag means that the highest exception level is > in Aarch64 state. The

Re: [Qemu-devel] [RFC v3 13/13] softmmu_template.h: move to multithreading

2015-07-17 Thread alvise rigo
On Fri, Jul 17, 2015 at 5:57 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Exploiting the tcg_excl_access_lock, port the helper_{le,be}_st_name to >> work in real multithreading. >> >> - The macro lookup_cpus_ll_addr now uses directly the >> env->excl_protected_addr to invalidate others'

Re: [Qemu-devel] [PATCH v1 08/10] xen/pt: Make xen_pt_unregister_device idempotent

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > To deal with xen_host_pci_[set|get]_ functions returning error values > and clearing ourselves in the init function we should make the > .exit (xen_pt_unregister_device) function be idempotent in case > the generic code starts calling .exit (or for

Re: [Qemu-devel] [PATCH v1 03/10] xen/pt: Check if reg->init function sets the 'data' past the reg->size

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > It should never happen, but in case it does (an developer adds > a new register and the 'init_val' expands past the register > size) we want to report. The code will only write up to > reg->size so there is no runtime danger of the register spillin

Re: [Qemu-devel] [PATCH 0/4] vhost-user: protocol updates

2015-07-17 Thread Maxime Leroy
Hi Michael, On Fri, Jul 17, 2015 at 4:09 PM, Michael S. Tsirkin wrote: > This patchset sets the stage for extending the vhost user > protocol, with full backwards compatibility. > > The approach is to negotiate feature bits queried and > acknowledged during device setup. > > For now, there's no n

Re: [Qemu-devel] [PATCH v1 04/10] xen/pt: Use xen_host_pci_get_[byte, word, long] instead of xen_host_pci_get_long

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > Otherwise we get: > > xen_pt_config_reg_init: Offset 0x0004 mismatch! Emulated=0x, > host=0x2300017, syncing to 0x2300014. > xen_pt_config_reg_init: Error: Offset 0x0004:0x2300014 expands past register > size(2)! > > which is not surprising

Re: [Qemu-devel] [RFC v3 13/13] softmmu_template.h: move to multithreading

2015-07-17 Thread Alex Bennée
Alvise Rigo writes: > Exploiting the tcg_excl_access_lock, port the helper_{le,be}_st_name to > work in real multithreading. > > - The macro lookup_cpus_ll_addr now uses directly the > env->excl_protected_addr to invalidate others' LL/SC operations > > Suggested-by: Jani Kokkonen > Suggested-

Re: [Qemu-devel] [PATCH 2/2] tcg/i386: Reserve register for guest_base if a segment isn't available

2015-07-17 Thread Aurelien Jarno
On 2015-07-17 17:30, Paolo Bonzini wrote: > > > On 17/07/2015 03:33, Peter Maydell wrote: > > On 16 July 2015 at 22:25, Richard Henderson wrote: > > > This saves 2 insns and 10 bytes from the implementation of > > > each memory operation. > > > > Do we have an idea of which platforms/configs do

Re: [Qemu-devel] [PATCH v1 02/10] xen/pt: Sync up the dev.config and data values.

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > For a passthrough device we maintain a state of emulated > registers value contained within d->config. We also consult > the host registers (and apply ro and write masks) whenever > the guest access the registers. This is done in xen_pt_pci_write_c

Re: [Qemu-devel] [PATCH v2] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-17 Thread Christoffer Dall
On Fri, Jul 17, 2015 at 03:29:56PM +0100, Peter Maydell wrote: > On 16 July 2015 at 12:34, Christoffer Dall > wrote: > > Some registers like the CNTVCT register should only be written to the > > kernel as part of machine initialization or on vmload operations, but > > never during runtime, as thi

Re: [Qemu-devel] [RFC PATCH qemu v3 4/4] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2015-07-17 Thread Alexey Kardashevskiy
On 07/17/2015 11:39 PM, David Gibson wrote: On Fri, Jul 17, 2015 at 05:13:37PM +1000, Alexey Kardashevskiy wrote: On 07/16/2015 03:11 PM, David Gibson wrote: On Tue, Jul 14, 2015 at 10:21:54PM +1000, Alexey Kardashevskiy wrote: This makes use of the new "memory registering" feature. The idea i

Re: [Qemu-devel] [PATCH v1 01/10] xen/pt: Use xen_host_pci_get_[byte|word] instead of dev.config

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > During init time we treat the dev.config area as a cache > of the host view. However during execution time we treat it > as guest view (by the generic PCI API). We need to sync Xen's > code to the generic PCI API view. This is the first step > by r

Re: [Qemu-devel] [RFC v3 12/13] softmmu_llsc_template.h: move to multithreading

2015-07-17 Thread alvise rigo
On Fri, Jul 17, 2015 at 5:27 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Update the TCG LL/SC instructions to work in multi-threading. >> >> The basic idea remains untouched, but the whole mechanism is improved to >> make use of the callback support to query TLB flush requests and the >>

Re: [Qemu-devel] [PATCH v1 6/6] xen/pt: Use XEN_PT_LOG properly to guard against compiler warnings.

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > If XEN_PT_LOGGING_ENABLED is enabled the XEN_PT_LOG macros start > using the first argument. Which means if within the function there > is only one user of the argument ('d') and XEN_PT_LOGGING_ENABLED > is not set, we get compiler warnings. This i

Re: [Qemu-devel] [PATCH 2/2] tcg/i386: Reserve register for guest_base if a segment isn't available

2015-07-17 Thread Paolo Bonzini
On 17/07/2015 03:33, Peter Maydell wrote: > On 16 July 2015 at 22:25, Richard Henderson wrote: > > This saves 2 insns and 10 bytes from the implementation of > > each memory operation. > > Do we have an idea of which platforms/configs don't let > us have a segment register for guest_base? Ever

Re: [Qemu-devel] [RFC v3 12/13] softmmu_llsc_template.h: move to multithreading

2015-07-17 Thread Alex Bennée
Alvise Rigo writes: > Update the TCG LL/SC instructions to work in multi-threading. > > The basic idea remains untouched, but the whole mechanism is improved to > make use of the callback support to query TLB flush requests and the > rendezvous callback to synchronize all the currently running v

Re: [Qemu-devel] [PATCH v1 5/6] xen/pt/msi: Add the register value when printing logging and error messages

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > We would like to know what the MSI register value is to help > in troubleshooting in the field. As such modify the logging > logic to include such details in xen_pt_msgctrl_reg_write. > > Signed-off-by: Konrad Rzeszutek Wilk Reviewed-by: Stefano

Re: [Qemu-devel] [PATCH v1 4/6] xen: use errno instead of rc for xc_domain_add_to_physmap

2015-07-17 Thread Stefano Stabellini
On Thu, 2 Jul 2015, Konrad Rzeszutek Wilk wrote: > In Xen 4.6 commit cd2f100f0f61b3f333d52d1737dd73f02daee592 > "libxc: Fix do_memory_op to return negative value on errors" > made the libxc API less odd-ball: On errors, return value is > -1 and error code is in errno. On success the return value >

[Qemu-devel] [RFC PATCH V3 3/3] cpus: introduce async_run_safe_work_on_cpu.

2015-07-17 Thread fred . konrad
From: KONRAD Frederic We already had async_run_on_cpu but we need all VCPUs outside their execution loop to execute some tb_flush/invalidate task: async_run_on_cpu_safe schedule a work on a VCPU but the work start when no more VCPUs are executing code. When a safe work is pending cpu_has_work re

[Qemu-devel] [RFC PATCH V3 2/3] cpus: add tcg_exec_flag.

2015-07-17 Thread fred . konrad
From: KONRAD Frederic This flag indicates the state of the VCPU thread: * 0 if the VCPU is allowed to execute code. * 1 if the VCPU is currently executing code. * -1 if the VCPU is not allowed to execute code. This allows to atomically check and run safe work or check and continue the TCG

[Qemu-devel] [RFC PATCH V3 0/3] Multithread TCG async_safe_work part.

2015-07-17 Thread fred . konrad
From: KONRAD Frederic This is the async_safe_work introduction bit of the Multithread TCG work. Rebased on current upstream (6169b60285fe1ff730d840a49527e721bfb30899). (Currently untested as I need to rebase MTTCG first.) It can be cloned here: http://git.greensocs.com/fkonrad/mttcg.git branch

[Qemu-devel] [RFC PATCH V3 1/3] cpus: protect queued_work_* with work_mutex.

2015-07-17 Thread fred . konrad
From: KONRAD Frederic This protects queued_work_* used by async_run_on_cpu, run_on_cpu and flush_queued_work with a new lock (work_mutex) to prevent multiple (concurrent) access. Signed-off-by: KONRAD Frederic Changes V1 -> V2: * Unlock the mutex while running the callback. --- cpus.c

[Qemu-devel] [PULL 1/7] ipxe: update from 35c53797 to 24112d9 (upstream/master)

2015-07-17 Thread Gerd Hoffmann
git shortlog Alex Williamson (1): [dhcp] Extract timing parameters out to config/dhcp.h Bernd Wiebelt (1): [tg3] Add support for BCM57766 Christian Hesse (3): [intel] Add PCI device IDs for Intel I218-LM and I218-V [build] Add missing "const" qualifiers

[Qemu-devel] [PULL 2/7] ipxe: update to 87981bb (qemu)

2015-07-17 Thread Gerd Hoffmann
Add two patches we've been struggling to get upstream. They are available from "git://git.qemu.org/ipxe.git qemu" git shortlog Gerd Hoffmann (1): [efi] make load file protocol optional Laszlo Ersek (1): efi_snp: improve compliance with the EFI_SIMPLE_NETWORK_PROTOCOL spe

[Qemu-devel] [PULL for-2.4 0/7] update ipxe roms, fix efi support

2015-07-17 Thread Gerd Hoffmann
0100) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-ipxe-20150717-1 for you to fetch changes up to 4f0c601b71e53a7d225a1913b784242400788991: ipxe: update binaries (2015-07-16 17:39:12 +0200) update ipxe

[Qemu-devel] [PULL 5/7] ipxe: add qemu branding

2015-07-17 Thread Gerd Hoffmann
Apply qemu-project.org branding, so the official builds can easily be identified in the banner. Signed-off-by: Gerd Hoffmann Acked-by: Laszlo Ersek --- roms/Makefile | 4 ++-- roms/config.ipxe.branding.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644

[Qemu-devel] [PULL 7/7] ipxe: update binaries

2015-07-17 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- pc-bios/efi-e1000.rom| Bin 197120 -> 192512 bytes pc-bios/efi-eepro100.rom | Bin 197632 -> 192512 bytes pc-bios/efi-ne2k_pci.rom | Bin 195584 -> 190976 bytes pc-bios/efi-pcnet.rom| Bin 195584 -> 190976 bytes pc-bios/efi-rtl81

[Qemu-devel] [PULL 4/7] ipxe: disable load file protocol

2015-07-17 Thread Gerd Hoffmann
Activate the opt-out added by one not-upstream ipxe patch: [efi] make load file protocol optional Signed-off-by: Gerd Hoffmann Reviewed-by: Laszlo Ersek --- roms/config.ipxe.general.h | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/config.ipxe.general.h b/roms/config.ipxe.general.

[Qemu-devel] [PULL 3/7] ipxe: rm local config in cleanup

2015-07-17 Thread Gerd Hoffmann
ipxe build now generates empty local header files in case they are not present. Let's remove them on cleanup to make sure we store a fresh copy on the next build. Signed-off-by: Gerd Hoffmann Acked-by: Laszlo Ersek --- roms/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/roms/Make

[Qemu-devel] [PULL 6/7] ipxe: don't override GITVERSION

2015-07-17 Thread Gerd Hoffmann
We had build problems due to the git version checking in the ipxe build system in the past. Don't remember the details, but the problem seems to be gone now, so lets remove the workaround. Signed-off-by: Gerd Hoffmann [ most likely ipxe commit 6153c09c41034250408f3596555fcaae715da46c: [build]

Re: [Qemu-devel] [PATCH v2] target-arm: kvm: Differentiate registers based on write-back levels

2015-07-17 Thread Peter Maydell
On 16 July 2015 at 12:34, Christoffer Dall wrote: > Some registers like the CNTVCT register should only be written to the > kernel as part of machine initialization or on vmload operations, but > never during runtime, as this can potentially make time go backwards or > create inconsistent time obs

[Qemu-devel] [PATCH v2 1/2] raw-posix: warn about BDRV_O_NATIVE_AIO if libaio is unavailable

2015-07-17 Thread Stefan Hajnoczi
raw-posix.c silently ignores BDRV_O_NATIVE_AIO if libaio is unavailable. It is confusing when aio=native performance is identical to aio=threads because the binary was accidentally built without libaio. Print a deprecation warning if -drive aio=native is used with a binary that does not support li

[Qemu-devel] [PATCH v2 0/2] block: warn about aio=native if libaio is unavailable

2015-07-17 Thread Stefan Hajnoczi
v2: * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business [Kevin] * Print the warning in the same way as the aio=native,cache.direct=off deprecation warning [Kevin] Open question: what about the Windows case? We now pass the FILE_FLAG_OVERLAPPED flag which we didn't do

[Qemu-devel] [PATCH v2 2/2] blockdev: always compile in -drive aio= parsing

2015-07-17 Thread Stefan Hajnoczi
CONFIG_LINUX_AIO is an implementation detail of raw-posix.c. Don't mention CONFIG_LINUX_AIO in blockdev.c. Let raw-posix.c decide what to do with BDRV_O_NATIVE_AIO if CONFIG_LINUX_AIO is not defined. Signed-off-by: Stefan Hajnoczi --- blockdev.c | 2 -- 1 file changed, 2 deletions(-) diff --g

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Marc Zyngier
On Fri, 17 Jul 2015 15:04:27 +0100 Paolo Bonzini wrote: > > > On 17/07/2015 15:28, Marc Zyngier wrote: > > > > > > Marc, does it ring any bell? > > Well, this is an example of a guest accessing non-memory using an > > instruction that we cannot safely emulate - not an IO accessor (load > > mul

Re: [Qemu-devel] [PATCH for-2.4 1/4] Revert "vhost-user: add multi queue support"

2015-07-17 Thread Eric Blake
On 07/17/2015 08:09 AM, Michael S. Tsirkin wrote: > This reverts commit 830d70db692e374b5f4407f96a1ceefdcc97. > > The interface as merged isn't fully backwards-compatible with existing > clients. Revert it. Let's redo this after 2.4, based on protocol > extensions in follow-up patches. > > S

[Qemu-devel] [PATCH] Merge memory_region_init_reservation() into memory_region_init_io()

2015-07-17 Thread Pavel Fedin
Just speficying ops = NULL in some cases can be more convenient than having two functions. See vGICv3 v5 patch set for at least one such case. GICv2 code can be refactored in a way similar to what is done in the mentioned patchset, killing some code duplication. Signed-off-by: Pavel Fedin ---

[Qemu-devel] [PATCH 4/4] vhost-user: unit test for new messages

2015-07-17 Thread Michael S. Tsirkin
Data is empty for now, but do make sure master sets the new feature bit flag. Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 75fedf0..228acb6 100644 ---

[Qemu-devel] [PATCH 2/4] vhost-user: refactor ioctl translation

2015-07-17 Thread Michael S. Tsirkin
translate at the outset, have rest of code use vhost-user features exclusively. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 87 ++ 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio

[Qemu-devel] [PATCH 3/4] vhost-user: add protocol feature negotiation

2015-07-17 Thread 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. Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost.h | 1 + hw/net/vhost_net.c| 2 ++ hw/virtio/vhost-user.c| 52 ++

[Qemu-devel] [PATCH 1/4] Revert "vhost-user: add multi queue support"

2015-07-17 Thread Michael S. Tsirkin
This reverts commit 830d70db692e374b5f4407f96a1ceefdcc97. The interface as merged isn't fully backwards-compatible with existing clients. Revert it. Let's redo this after 2.4, based on protocol extensions in follow-up patches. Signed-off-by: Michael S. Tsirkin --- qapi-schema.json

[Qemu-devel] [PATCH 0/4] vhost-user: protocol updates

2015-07-17 Thread Michael S. Tsirkin
This patchset sets the stage for extending the vhost user protocol, with full backwards compatibility. The approach is to negotiate feature bits queried and acknowledged during device setup. For now, there's no new functionality: two new messages are added that will allow negotiating new messages

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Paolo Bonzini
On 17/07/2015 15:28, Marc Zyngier wrote: > > > > Marc, does it ring any bell? > Well, this is an example of a guest accessing non-memory using an > instruction that we cannot safely emulate - not an IO accessor (load > multiple, for example). > > In this case, we kill the guest (we could as wel

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Marc Zyngier
On Fri, 17 Jul 2015 14:53:06 +0100 "Richard W.M. Jones" wrote: > On Fri, Jul 17, 2015 at 02:48:40PM +0100, Marc Zyngier wrote: > > Still: there is nothing in the registers that remotely points to that > > area. X0 is the closest, but it'd take a big negative offset to get > > there. > > > > Is t

Re: [Qemu-devel] [PATCH] blockdev: warn about aio=native if libaio is unavailable

2015-07-17 Thread Stefan Hajnoczi
On Fri, Jul 17, 2015 at 12:56:15PM +0200, Kevin Wolf wrote: > Am 17.07.2015 um 11:59 hat Stefan Hajnoczi geschrieben: > > QEMU silently ignores aio=native if libaio is unavailable. It is > > confusing when aio=native performance is identical to aio=threads > > because the binary was accidentally b

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Laszlo Ersek
On 07/17/15 15:48, Marc Zyngier wrote: > On Fri, 17 Jul 2015 14:39:55 +0100 > Laszlo Ersek wrote: > >> On 07/17/15 15:28, Marc Zyngier wrote: >>> On Fri, 17 Jul 2015 10:30:38 +0100 >>> Paolo Bonzini wrote: >>> On 17/07/2015 06:44, Paolo Bonzini wrote: > > > On 16/07/20

Re: [Qemu-devel] [RFC v3 08/13] exec.c: introduce a simple rendezvous support

2015-07-17 Thread alvise rigo
On Fri, Jul 17, 2015 at 3:45 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> When a vCPU is about to set a memory page as exclusive, it needs to wait >> that all the running vCPUs finish to execute the current TB and to be aware >> of the exact moment when that happens. For this, add a simple

Re: [Qemu-devel] [PATCH 2/2 v3] virtio-rng: Serve pending request if any after timer bumps up quota.

2015-07-17 Thread Amit Shah
On (Thu) 16 Jul 2015 [02:34:34], Pankaj Gupta wrote: > > Anyway we can look at that later, patch 1 is already a big improvement > > so I think we should just stick with that, and think about other > > things in a different series. > > Sure. I think we can apply patch 1 for 2.4, since it reduces t

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Richard W.M. Jones
On Fri, Jul 17, 2015 at 02:48:40PM +0100, Marc Zyngier wrote: > Still: there is nothing in the registers that remotely points to that > area. X0 is the closest, but it'd take a big negative offset to get > there. > > Is that a Linux kernel? or something else? You're sure it's not this one? https:

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Paolo Bonzini
On 17/07/2015 15:35, Marc-André Lureau wrote: >> > LOG_FD is implemented in the kernel drivers/vhost/vhost.c. It seems to >> > be an eventfd-like mechanism to save on dirty bitmap scans. However, >> > it's not well documented how to implement it in a correct way. > and it's not used by qemu, so

[Qemu-devel] [PULL for-2.4 0/1] virtio-rng: reduce wakeups

2015-07-17 Thread Amit Shah
The following changes since commit 5b5e8cdd7da7a2214dd062afff5b866234aab228: Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20150717-1' into staging (2015-07-17 12:39:12 +0100) are available in the git repository at: https://git.kernel.org/pub/scm/virt/qemu/amit/virt

[Qemu-devel] [PULL for-2.4 1/1] virtio-rng: trigger timer only when guest requests for entropy

2015-07-17 Thread Amit Shah
From: Pankaj Gupta This patch triggers timer only when guest requests for entropy. As soon as first request from guest for entropy comes we set the timer. Timer bumps up the quota value when it gets triggered. Signed-off-by: Pankaj Gupta Reviewed-by: Amit Shah Message-Id: <1436962608-9961-2-gi

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Marc Zyngier
On Fri, 17 Jul 2015 14:39:55 +0100 Laszlo Ersek wrote: > On 07/17/15 15:28, Marc Zyngier wrote: > > On Fri, 17 Jul 2015 10:30:38 +0100 > > Paolo Bonzini wrote: > > > >> > >> > >> On 17/07/2015 06:44, Paolo Bonzini wrote: > >>> > >>> > >>> On 16/07/2015 21:05, Richard W.M. Jones wrote: > >

Re: [Qemu-devel] [RFC v3 08/13] exec.c: introduce a simple rendezvous support

2015-07-17 Thread Alex Bennée
Alvise Rigo writes: > When a vCPU is about to set a memory page as exclusive, it needs to wait > that all the running vCPUs finish to execute the current TB and to be aware > of the exact moment when that happens. For this, add a simple rendezvous > mechanism that will be used in softmmu_llsc_te

Re: [Qemu-devel] [PATCH v2 00/13] tcg/sparc v8plus code generation

2015-07-17 Thread Aurelien Jarno
On 2015-07-17 12:23, Aurelien Jarno wrote: > On 2015-07-16 22:29, Richard Henderson wrote: > > On 07/15/2015 09:54 PM, Aurelien Jarno wrote: > > >While I understand why we need the new trunc_shr_i32 opcode for MIPS64 > > >(the 32-bit values must be kept sign-extended), I currently fail to > > >see

Re: [Qemu-devel] [RFC PATCH qemu v3 4/4] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2015-07-17 Thread David Gibson
On Fri, Jul 17, 2015 at 05:13:37PM +1000, Alexey Kardashevskiy wrote: > On 07/16/2015 03:11 PM, David Gibson wrote: > >On Tue, Jul 14, 2015 at 10:21:54PM +1000, Alexey Kardashevskiy wrote: > >>This makes use of the new "memory registering" feature. The idea is > >>to provide the userspace ability t

Re: [Qemu-devel] [PATCH v2] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-17 Thread Stefan Hajnoczi
On Thu, Jul 16, 2015 at 04:46:07PM -0400, Programmingkid wrote: > @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIterator, > char *bsdPath, CFIndex ma > if ( bsdPathAsCFString ) { > size_t devPathLength; > strcpy( bsdPath, _PATH_DEV ); > -

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Laszlo Ersek
On 07/17/15 15:28, Marc Zyngier wrote: > On Fri, 17 Jul 2015 10:30:38 +0100 > Paolo Bonzini wrote: > >> >> >> On 17/07/2015 06:44, Paolo Bonzini wrote: >>> >>> >>> On 16/07/2015 21:05, Richard W.M. Jones wrote: Sorry to spoil things, but I'm still seeing this bug, although it is no

[Qemu-devel] STM32F407-Discovery led blinking video

2015-07-17 Thread Liviu Ionescu
as planned, the GNU ARM Eclipse QEMU branch is now fully functional for simple LED blinking applications. the board image is displayed in a SDL window and the LEDs are coloured rectangles shown over the image. a short demo video is available from: http://gnuarmeclipse.livius.net/mw/images/f

Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration

2015-07-17 Thread Marc-André Lureau
Hi On Fri, Jul 17, 2015 at 2:57 PM, Paolo Bonzini wrote: > LOG_FD is implemented in the kernel drivers/vhost/vhost.c. It seems to > be an eventfd-like mechanism to save on dirty bitmap scans. However, > it's not well documented how to implement it in a correct way. and it's not used by qemu, s

Re: [Qemu-devel] [PATCH v2 0/3] AioContext: ctx->dispatching is dead, all hail ctx->notify_me

2015-07-17 Thread Marc Zyngier
On Fri, 17 Jul 2015 10:30:38 +0100 Paolo Bonzini wrote: > > > On 17/07/2015 06:44, Paolo Bonzini wrote: > > > > > > On 16/07/2015 21:05, Richard W.M. Jones wrote: > >> > >> Sorry to spoil things, but I'm still seeing this bug, although it is > >> now a lot less frequent with your patch. I wo

Re: [Qemu-devel] [RFC v3 07/13] ram_addr.h: Make exclusive bitmap accessors atomic

2015-07-17 Thread Alex Bennée
Alvise Rigo writes: > Suggested-by: Jani Kokkonen > Suggested-by: Claudio Fontana > Signed-off-by: Alvise Rigo > --- > include/exec/ram_addr.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h > index 2766541..e51

[Qemu-devel] [PATCH v5 2/5] Extract some reusable vGIC code

2015-07-17 Thread Pavel Fedin
These functions are useful also for vGICv3 implementation. Make them accessible from within other modules. Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but they would require two extra parameters (s->dev_fd and s->num_cpu) as well as lots of typecasts of 's' to DeviceSta

Re: [Qemu-devel] [RFC v3 06/13] target-i386: translate: implement qemu_ldlink and qemu_stcond ops

2015-07-17 Thread alvise rigo
On Fri, Jul 17, 2015 at 2:56 PM, Alex Bennée wrote: > > Alvise Rigo writes: > >> Implement strex and ldrex instruction relying on TCG's qemu_ldlink and >> qemu_stcond. For the time being only 32bit configurations are supported. >> >> Suggested-by: Jani Kokkonen >> Suggested-by: Claudio Fontana

  1   2   >