[Qemu-devel] [PATCH v6 08/16] virtio: introduce bus specific queue limit

2015-04-16 Thread Jason Wang
This patch introduces a bus specific queue limitation. It will be useful for increasing the limit for one of the bus without disturbing other buses. Cc: Michael S. Tsirkin Cc: Alexander Graf Cc: Richard Henderson Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Paolo Bonzini Signed-off-by: Ja

[Qemu-devel] [PATCH v6 10/16] virtio-s390: switch to bus specific queue limit

2015-04-16 Thread Jason Wang
Instead of depending on marco, switch to use a bus specific queue limit. Cc: Alexander Graf Cc: Richard Henderson Cc: Christian Borntraeger Cc: Cornelia Huck Signed-off-by: Jason Wang --- hw/s390x/s390-virtio-bus.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/h

[Qemu-devel] [PATCH v6 13/16] virtio: introduce vector to virtqueues mapping

2015-04-16 Thread Jason Wang
Currently we will try to traverse all virtqueues to find a subset that using a specific vector. This is sub optimal when we will support hundreds or even thousands of virtqueues. So this patch introduces a method which could be used by transport to get all virtqueues that using a same vector. This

[Qemu-devel] Character order of ATA identity

2015-04-16 Thread 乔天香
Hi, all I'm learning operating system and trying to write a little toy kernel. Before doing disk I/O, I issued the *ATA identify* command to obtain information about the master device on the primary channel. When I ran my code with QEMU, I found it gives some ASCII string fields in a wrong byte or

[Qemu-devel] Missing interrupts on g3beige and mac99 machines

2015-04-16 Thread Cormac O'Brien
While trying to implement OS 9 support on QEMU, I've run into the following errors from the operating system: g3beige: *** MacOS: Fatal Error! (0xF3B37FDB) *** Official Apple copyright message missing. *** MacOS: Fatal Error! (0xF3B37FD

[Qemu-devel] [PATCH v6 12/16] virtio-pci: switch to use bus specific queue limit

2015-04-16 Thread Jason Wang
Instead of depending on a macro, switch to use a bus specific queue limit. Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-pci.c | 12 +++- include/hw/virtio/virtio.h | 2 -- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/virtio/virtio-pci.c

[Qemu-devel] [PATCH v6 11/16] virtio-mmio: switch to bus specific queue limit

2015-04-16 Thread Jason Wang
Cc: Michael S. Tsirkin Signed-off-by: Jason Wang --- hw/virtio/virtio-mmio.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 2ae6942..dbd44b6 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c @@

[Qemu-devel] [PATCH v6 07/16] virtio-ccw: using VIRTIO_NO_VECTOR instead of 0 for invalid virtqueue

2015-04-16 Thread Jason Wang
There's no need to use vector 0 for invalid virtqueue. So this patch changes to use VIRTIO_NO_VECTOR instead. Cc: Michael S. Tsirkin Cc: Cornelia Huck CC: Christian Borntraeger Cc: Richard Henderson Cc: Alexander Graf Signed-off-by: Jason Wang --- hw/s390x/virtio-ccw.c | 2 +- 1 file change

[Qemu-devel] [PATCH v6 16/16] pci: remove hard-coded bar size in msix_init_exclusive_bar()

2015-04-16 Thread Jason Wang
This patch lets msix_init_exclusive_bar() can calculate the bar and pba size based on the number of MSI-X vectors other than using a hard-coded limit 4096. This is needed to allow device to have more than 128 MSI_X vectors. To keep migration compatibility, keep using 4096 as bar size and 2048 for p

[Qemu-devel] [PATCH v6 15/16] virtio-pci: increase the maximum number of virtqueues to 513

2015-04-16 Thread Jason Wang
This patch increases the maximum number of virtqueues for pci from 64 to 513. This will allow booting a virtio-net-pci device with 256 queue pairs on recent Linux host (which supports up to 256 tuntap queue pairs). To keep migration compatibility, 64 was kept for legacy machine types. This is beca

[Qemu-devel] [PATCH v6 14/16] virtio-pci: speedup MSI-X masking and unmasking

2015-04-16 Thread Jason Wang
This patch tries to speed up the MSI-X masking and unmasking through the mapping between vector and queues. With this patch it will there's no need to go through all possible virtqueues, which may help to reduce the time spent when doing MSI-X masking/unmasking a single vector when more than hundre

[Qemu-devel] [PATCH v6 06/16] monitor: check return value of qemu_find_net_clients_except()

2015-04-16 Thread Jason Wang
qemu_find_net_clients_except() may return a value which is greater than the size of array we provided. So we should check this value before using it, otherwise this may cause unexpected memory access. This patch fixes the net related command completion when we have a virtio-net nic with more than

[Qemu-devel] [PATCH v6 09/16] virtio-ccw: introduce ccw specific queue limit

2015-04-16 Thread Jason Wang
Instead of depending on marco, using a bus specific limit. Also make it clear that the number of gsis per I/O adapter is not directly depending on the number of virtio queues, but rather the other way around. Cc: Alexander Graf Cc: Cornelia Huck Cc: Christian Borntraeger Cc: Richard Henderson

[Qemu-devel] [PATCH v6 04/16] ppc: spapr: add 2.4 machine type

2015-04-16 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr

[Qemu-devel] [PATCH v6 00/16] Support more virtio queues

2015-04-16 Thread Jason Wang
We current limit the max virtio queues to 64. This is not sufficient to support multiqueue devices (e.g recent Linux support up to 256 tap queues). So this series tries to let virtio to support more queues. No much works need to be done except: - Introducing transport specific queue limitation. T

[Qemu-devel] [PATCH v6 05/16] monitor: replace the magic number 255 with MAX_QUEUE_NUM

2015-04-16 Thread Jason Wang
This patch replace the magic number 255, and increase it to MAX_QUEUE_NUM which is maximum number of queues supported by a nic. Cc: Luiz Capitulino Signed-off-by: Jason Wang --- monitor.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/monitor.c b/monitor.

[Qemu-devel] [PATCH v6 01/16] virtio-net: fix the upper bound when trying to delete queues

2015-04-16 Thread Jason Wang
Virtqueue were indexed from zero, so don't delete virtqueue whose index is n->max_queues * 2 + 1. Cc: Michael S. Tsirkin Cc: qemu-stable Signed-off-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net

[Qemu-devel] [PATCH v6 02/16] pc: add 2.4 machine types

2015-04-16 Thread Jason Wang
The following patches will limit the following things to legacy machine type: - maximum number of virtqueues for virtio-pci were limited to 64 - auto msix bar size for virtio-net-pci were disabled by default Cc: Paolo Bonzini Cc: Richard Henderson Cc: Michael S. Tsirkin Signed-off-by: Jason Wa

[Qemu-devel] [PATCH v6 03/16] spapr: add machine type specific instance init function

2015-04-16 Thread Jason Wang
This patches adds machine type specific instance initialization functions. Those functions will be used by following patches to compat class properties for legacy machine types. Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Jason Wang --- hw/ppc/spapr.c | 23 +++

Re: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused.

2015-04-16 Thread Alexandre DERUMIER
Hi, Isn't it related to drive options ? " werror=action,rerror=action Specify which action to take on write and read errors. Valid actions are: “ignore” (ignore the error and try to continue), “stop” (pause QEMU), “report” (report the error to the guest), “enospc” (pause QEMU only if the host

Re: [Qemu-devel] [PATCH] vhost: fix log base address

2015-04-16 Thread Wen Congyang
On 04/17/2015 05:26 AM, Paolo Bonzini wrote: > > > On 15/04/2015 11:56, zhanghailiang wrote: >> On 2015/4/15 17:37, Michael S. Tsirkin wrote: >>> VHOST_SET_LOG_BASE got an incorrect address, causing >>> migration errors and potentially even memory corruption. >>> >>> Cc: Peter Maydell >>> Report

[Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused.

2015-04-16 Thread chenxg
Hi Kevin, While installing a guest into a qcow2 image if the qcow2 image run out of disk space, the guest will stop work and change state to paused without messages. When we tried to free up disk space in the host and the virsh resume to work. The guest then got I/O errors but later on QEMU

Re: [Qemu-devel] [PATCH v3 0/7] aio: Support epoll by introducing qemu_poll abstraction

2015-04-16 Thread Fam Zheng
On Thu, 04/16 14:03, Stefan Hajnoczi wrote: > On Thu, Apr 16, 2015 at 12:57:29PM +0800, Fam Zheng wrote: > > v3: Rebase to master for 2.4. > > Although epoll_pwait1 syscall is still being worked on [1], the QEMU > > part > > (if any) will base on this, so let's merge it first. > > > >

Re: [Qemu-devel] [PATCH qemu v6 10/15] spapr_pci_vfio: Remove unnecessary cast to sPAPRPHBVFIOState

2015-04-16 Thread Alexey Kardashevskiy
On 04/16/2015 08:31 PM, Thomas Huth wrote: Am Sat, 11 Apr 2015 01:24:39 +1000 schrieb Alexey Kardashevskiy : EEH handlers only need AddressSpace to get to the right VFIO container to call ioctl() so remove unnecessary cast of sPAPRPHBState to sPAPRPHBVFIOState. Signed-off-by: Alexey Kardashevs

Re: [Qemu-devel] Missing interrupts on g3beige and mac99 machines

2015-04-16 Thread Alexander Graf
> Am 16.04.2015 um 21:31 schrieb Mark Cave-Ayland > : > >> On 16/04/15 19:03, Cormac O'Brien wrote: >> >> While trying to implement OS 9 support on QEMU, I've run into the following >> errors from the operating system: >> >> g3beige: >>*** MacOS: Fatal Error! (0xF3B37FDB)

Re: [Qemu-devel] [PATCH v12 4/9] hw/vfio/platform: add capability to start IRQ propagation

2015-04-16 Thread Alex Williamson
On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: > Add a reset notify function that enables to start the propagation of > interrupts to the guest. > > Signed-off-by: Eric Auger > > --- > v10 -> v11: > - comment reword > > v8 -> v9: > - handle failure in vfio_irq_starter > --- > hw/vfio/pla

Re: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Mark Cave-Ayland
On 16/04/15 22:53, Paolo Bonzini wrote: > Ok, that's the equivalent of "migrate exec:cat>foo.save" and "-incoming > 'exec:cat > Paolo Thanks - that's exactly what I needed to reproduce here. Not working (git master) $ ./qemu-system-ppc64 -m 128 -prom-env 'auto-boot?=false' -incoming 'exec:cat

Re: [Qemu-devel] [PATCH v12 5/9] hw/arm/virt: start VFIO IRQ propagation

2015-04-16 Thread Alex Williamson
On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: > Although the dynamic instantiation of VFIO QEMU devices already is > possible, VFIO IRQ signaling is not yet started. This patch enables > IRQ forwarding by registering a reset notifier that kick off VFIO > signaling for all VFIO devices. > >

Re: [Qemu-devel] [PATCH v12 1/9] linux-headers: update VFIO header for VFIO platform/amba drivers

2015-04-16 Thread Alex Williamson
On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: > Update according to the vfio.h header found in > ssh://g...@git.linaro.org/people/eric.auger/linux.git > branch 4.0-rc3-v14 A Sign-off is still needed here. > --- > > v10 -> v11: > - only includes header modifications related to vfio platfor

Re: [Qemu-devel] [PATCH v12 2/9] hw/vfio/platform: vfio-platform skeleton

2015-04-16 Thread Alex Williamson
On Thu, 2015-03-19 at 17:16 +, Eric Auger wrote: > Minimal VFIO platform implementation supporting register space > user mapping but not IRQ assignment. > > Signed-off-by: Kim Phillips > Signed-off-by: Eric Auger > > --- > v11 -> v12: > - add x-mmap property definition, without which the de

Re: [Qemu-devel] [Question]Support of China loogson processor

2015-04-16 Thread Peter Maydell
On 16 April 2015 at 16:17, Paolo Bonzini wrote: > > > On 16/04/2015 17:05, Leon Alrae wrote: >> On 16/04/2015 13:02, Paolo Bonzini wrote: >>> >>> >>> On 16/04/2015 13:07, Leon Alrae wrote: Since I also haven't had a chance to test Loongson emulation, I thought I'd give it a try (TCG only

Re: [Qemu-devel] [Qemu-ppc] Missing interrupts on g3beige and mac99 machines

2015-04-16 Thread BALATON Zoltan
On Thu, 16 Apr 2015, Cormac O'Brien wrote: The mac99 machine does list a PIC: 0 > dev /pci/mac-io/interrupt-controller ok 0 > .properties name "interrupt-controller" device_type "open-pic" compatible"chrp,open-pic" built-in

Re: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 23:24, Stefan Berger wrote: > On 04/16/2015 04:53 PM, Mark Cave-Ayland wrote: >> On 16/04/15 20:49, Stefan Berger wrote: H the fix is correct in that internal MSR variables need to be updated post-restore (as noted in the message above it was the exception pr

Re: [Qemu-devel] [[PATCH] 1/7] target-arm: Add exception target el infrastructure

2015-04-16 Thread Greg Bellows
On Thu, Apr 16, 2015 at 12:50 PM, Peter Maydell wrote: > On 27 March 2015 at 19:10, Greg Bellows wrote: > > Add a CPU state exception target EL field that will be used for > communicating > > the EL to which an exception should be routed. > > > > Add a target EL argument to the generic exception

Re: [Qemu-devel] [PATCH] vhost: fix log base address

2015-04-16 Thread Paolo Bonzini
On 15/04/2015 11:56, zhanghailiang wrote: > On 2015/4/15 17:37, Michael S. Tsirkin wrote: >> VHOST_SET_LOG_BASE got an incorrect address, causing >> migration errors and potentially even memory corruption. >> >> Cc: Peter Maydell >> Reported-by: Wen Congyang >> Signed-off-by: Michael S. Tsirkin

Re: [Qemu-devel] [[PATCH] 3/7] target-arm: Update interrupt handling to use target EL

2015-04-16 Thread Peter Maydell
On 16 April 2015 at 22:03, Greg Bellows wrote: > > > On Thu, Apr 16, 2015 at 12:52 PM, Peter Maydell > wrote: >> >> On 27 March 2015 at 19:10, Greg Bellows wrote: >> > Updated the interrupt handling to utilize and report through the target >> > EL >> > exception field. This includes consolidati

Re: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Stefan Berger
On 04/16/2015 04:53 PM, Mark Cave-Ayland wrote: On 16/04/15 20:49, Stefan Berger wrote: H the fix is correct in that internal MSR variables need to be updated post-restore (as noted in the message above it was the exception prefix variables that weren't updated by having MSR_EP set). Maybe

Re: [Qemu-devel] [[PATCH] 3/7] target-arm: Update interrupt handling to use target EL

2015-04-16 Thread Greg Bellows
On Thu, Apr 16, 2015 at 12:52 PM, Peter Maydell wrote: > On 27 March 2015 at 19:10, Greg Bellows wrote: > > Updated the interrupt handling to utilize and report through the target > EL > > exception field. This includes consolidating and cleaning up code where > > needed. Target EL is now calcu

Re: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Mark Cave-Ayland
On 16/04/15 20:49, Stefan Berger wrote: >> H the fix is correct in that internal MSR variables need to be >> updated post-restore (as noted in the message above it was the exception >> prefix variables that weren't updated by having MSR_EP set). >> >> Maybe on ppc64 there is another bit similar

Re: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Stefan Berger
On 04/16/2015 03:42 PM, Mark Cave-Ayland wrote: On 16/04/15 17:43, Stefan Berger wrote: The culprit patch seems to be the following commit. If I remove these changes from the tip of the tree it works again (on SLOF level): commit 2360b6e84f78d41fa0f76555a947148b73645259 Author: Mark Cave-Aylan

Re: [Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Mark Cave-Ayland
On 16/04/15 17:43, Stefan Berger wrote: > The culprit patch seems to be the following commit. If I remove these > changes from the tip of the tree it works again (on SLOF level): > > commit 2360b6e84f78d41fa0f76555a947148b73645259 > Author: Mark Cave-Ayland > Date: Mon Feb 9 22:40:48 2015 +000

Re: [Qemu-devel] [Question]Support of China loogson processor

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 21:25, Leon Alrae wrote: > On 16/04/15 16:17, Paolo Bonzini wrote: >> >> >> On 16/04/2015 17:05, Leon Alrae wrote: >>> On 16/04/2015 13:02, Paolo Bonzini wrote: On 16/04/2015 13:07, Leon Alrae wrote: > Since I also haven't had a chance to test Loongson emulation,

Re: [Qemu-devel] Missing interrupts on g3beige and mac99 machines

2015-04-16 Thread Mark Cave-Ayland
On 16/04/15 19:03, Cormac O'Brien wrote: > While trying to implement OS 9 support on QEMU, I've run into the following > errors from the operating system: > > g3beige: > *** MacOS: Fatal Error! (0xF3B37FDB) *** > Official Apple copyright message missing. >

Re: [Qemu-devel] [Question]Support of China loogson processor

2015-04-16 Thread Leon Alrae
On 16/04/15 16:17, Paolo Bonzini wrote: > > > On 16/04/2015 17:05, Leon Alrae wrote: >> On 16/04/2015 13:02, Paolo Bonzini wrote: >>> >>> >>> On 16/04/2015 13:07, Leon Alrae wrote: Since I also haven't had a chance to test Loongson emulation, I thought I'd give it a try (TCG only, Loong

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-16 Thread Stefan Berger
On 04/16/2015 02:55 PM, Michael S. Tsirkin wrote: On Thu, Apr 16, 2015 at 03:35:06PM +0200, Igor Mammedov wrote: On Wed, 15 Apr 2015 18:38:43 -0400 Stefan Berger wrote: The following series of patches extends TPM support with an external TPM that offers a Linux CUSE (character device in users

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-16 Thread Michael S. Tsirkin
On Thu, Apr 16, 2015 at 03:35:06PM +0200, Igor Mammedov wrote: > On Wed, 15 Apr 2015 18:38:43 -0400 > Stefan Berger wrote: > > > The following series of patches extends TPM support with an > > external TPM that offers a Linux CUSE (character device in userspace) > > interface. This TPM lets each

[Qemu-devel] [PATCH for-2.4 0/2] vfio-pci: Fixes for fixes

2015-04-16 Thread Alex Williamson
Fix a couple issues spotted by Laszlo in downstream review. Thanks, Alex --- Alex Williamson (2): vfio-pci: Further fix BAR size overflow vfio-pci: Fix error path sign hw/vfio/pci.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH for-2.4 1/2] vfio-pci: Further fix BAR size overflow

2015-04-16 Thread Alex Williamson
In an analysis by Laszlo, the resulting type of our calculation for the end of the MSI-X table, and thus the start of memory after the table, is uint32_t. We're therefore not correctly preventing the corner case overflow that we intended to fix here where a BAR >=4G could place the MSI-X table to

Re: [Qemu-devel] [PATCH v10] Support vhd type VHD_DIFFERENCING

2015-04-16 Thread John Baboval
Thank you for this patch. I found a few places where you have 32-bit integer overflows that result in failure. They are marked inline below. On 03/04/2015 09:18 AM, Xiaodong Gong wrote: diff --git a/block/vpc.c b/block/vpc.c index 46803b1..d9a8d19 100644 --- a/block/vpc.c +++ b/block/vpc.c @@

Re: [Qemu-devel] [[PATCH] 7/7] target-arm: Add WFx instruction trap support

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Add support for trapping WFI and WFE instructions to the proper EL when > SCTLR/SCR/HCR settings apply. > > Signed-off-by: Greg Bellows > --- > target-arm/op_helper.c | 75 > +++--- > 1 file changed, 71

Re: [Qemu-devel] [PATCH for-2.4 0/2] vfio-pci: Fixes for fixes

2015-04-16 Thread Laszlo Ersek
On 04/16/15 20:00, Alex Williamson wrote: > Fix a couple issues spotted by Laszlo in downstream review. Thanks, > > Alex > > --- > > Alex Williamson (2): > vfio-pci: Further fix BAR size overflow > vfio-pci: Fix error path sign > > > hw/vfio/pci.c |4 ++-- > 1 file changed, 2

Re: [Qemu-devel] [[PATCH] 4/7] target-arm: Add AArch64 CPTR registers

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Adds CPTR_EL2/3 system registers definitions and access function. > > Signed-off-by: Greg Bellows > --- > target-arm/cpu.h| 18 +- > target-arm/helper.c | 43 ++- > 2 files changed, 59 in

Re: [Qemu-devel] [[PATCH] 6/7] target-arm: Add WFx syndrome function

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Adds a utility function for creating a WFx exception syndrome > > Signed-off-by: Greg Bellows > --- Reviewed-by: Peter Maydell -- PMM

Re: [Qemu-devel] [[PATCH] 5/7] target-arm: Add TTBR regime function and use

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Add a utility function for choosing the correct TTBR system register based on > the specified MMU index. Add use of function on physical address lookup. > @@ -5376,20 +5390,26 @@ static int get_phys_addr_lpae(CPUARMState *env, > target_ulong addre

[Qemu-devel] [PATCH for-2.4 2/2] vfio-pci: Fix error path sign

2015-04-16 Thread Alex Williamson
This is an impossible error path due to the fact that we're reading a kernel provided, rather than user provided link, which will certainly always fit in PATH_MAX. Currently it returns a fixed 26 char path plus %d group number, which typically maxes out at double digits. However, the caller of the

Re: [Qemu-devel] [[PATCH] 3/7] target-arm: Update interrupt handling to use target EL

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Updated the interrupt handling to utilize and report through the target EL > exception field. This includes consolidating and cleaning up code where > needed. Target EL is now calculated once in arm_cpu_exec_interrupt() and > do_interrupt was updat

Re: [Qemu-devel] [[PATCH] 2/7] target-arm: Extend helpers to route exceptions

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Updated the various helper routines to set the target EL as needed. > > Signed-off-by: Greg Bellows > --- > target-arm/op_helper.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c > inde

Re: [Qemu-devel] [[PATCH] 1/7] target-arm: Add exception target el infrastructure

2015-04-16 Thread Peter Maydell
On 27 March 2015 at 19:10, Greg Bellows wrote: > Add a CPU state exception target EL field that will be used for communicating > the EL to which an exception should be routed. > > Add a target EL argument to the generic exception helper for callers to > specify > the EL to which the exception sho

Re: [Qemu-devel] driver enhancement for Intel IGD passthrough

2015-04-16 Thread Tian, Kevin
ping... > From: Tian, Kevin > Sent: Friday, April 10, 2015 10:33 AM > > Hi, > > We are working on Linux/Windows graphics driver enhancement to > remove those non-standard PCI resource accesses, e.g. to PCH/MCH > registers, in parallel with the ongoing effort from Tiejun on current > driver suppo

[Qemu-devel] ppc64 not resuming with v2.3.0-rc3

2015-04-16 Thread Stefan Berger
The culprit patch seems to be the following commit. If I remove these changes from the tip of the tree it works again (on SLOF level): commit 2360b6e84f78d41fa0f76555a947148b73645259 Author: Mark Cave-Ayland Date: Mon Feb 9 22:40:48 2015 + target-ppc: force update of msr bits in cpu_

Re: [Qemu-devel] [PATCH qemu v6 04/15] vfio: spapr: Move SPAPR-related code to a separate file

2015-04-16 Thread Alexey Kardashevskiy
On 04/16/2015 05:50 PM, Thomas Huth wrote: Am Sat, 11 Apr 2015 01:24:33 +1000 schrieb Alexey Kardashevskiy : This moves SPAPR bits to a separate file to avoid pollution of x86 code. This is a mechanical patch. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson --- hw/vfio/Makef

Re: [Qemu-devel] ARM: PCI devices emulation broken with KVM due to cache issue

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 17:54, Jérémy Fanguède wrote: > The guest kernel driver of the lsi device fails to enable it correctly > with a cache error: > [...] > sym53c8xx :00:01.0: enabling device (0100 -> 0103) > sym0: <895a> rev 0x0 at pci :00:01.0 irq 54 > sym0: No NVRAM, ID 7, Fast-40, LVD, parit

[Qemu-devel] ARM: PCI devices emulation broken with KVM due to cache issue

2015-04-16 Thread Jérémy Fanguède
Hello, Attaching PCI devices to the virt model works fine with TCG, but fails once KVM is enabled. For instance, with this command line: ./qemu-system-arm -m 512 -machine type=virt \ -enable-kvm -cpu host \ -nographic \ -kernel zImage \ -drive if=none,file=ubuntu.img,id=fs,format=

[Qemu-devel] [PATCH 7/8] qemu-iotests: fix test_stream_partial()

2015-04-16 Thread Alberto Garcia
This test is streaming to the top layer using the intermediate image as the base. This is a mistake since block-stream never copies data from the base image and its backing chain, so this is effectively a no-op. In addition to fixing the base parameter, this patch also writes some data to the inte

Re: [Qemu-devel] [Question]Support of China loogson processor

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 17:05, Leon Alrae wrote: > On 16/04/2015 13:02, Paolo Bonzini wrote: >> >> >> On 16/04/2015 13:07, Leon Alrae wrote: >>> Since I also haven't had a chance to test Loongson emulation, I thought >>> I'd give it a try (TCG only, Loongson-2E cpu and fulong2e machine). >>> >>> Good news

[Qemu-devel] [PATCH 4/8] block: Support streaming to an intermediate layer

2015-04-16 Thread Alberto Garcia
This makes sure that the image we are steaming into is open in read-write mode during the operation. Operation blockers are also set in all intermediate nodes, since they will be removed from the chain afterwards. Finally, this also unblocks the stream operation in backing files. Signed-off-by:

[Qemu-devel] [PATCH 2/8] block: allow block jobs in any arbitrary node

2015-04-16 Thread Alberto Garcia
Currently, block jobs can only be owned by root nodes. This patch allows block jobs to be in any arbitrary node, by making the following changes: - Block jobs can now be identified by the node name of their BlockDriverState in addition to the device name. Since both device and node names live

[Qemu-devel] [PATCH v4 0/8] Support streaming to an intermediate layer

2015-04-16 Thread Alberto Garcia
New series. As I wrote in a separate e-mail, we don't need to have any additional checks on the top image before reopening it in R/W mode since bdrv_reopen_prepare() already takes care of checking the BDRV_O_ALLOW_RDWR flag, which serves our purpose. v4: - Refactor find_block_job to use the error

[Qemu-devel] [PATCH 1/8] block: keep a list of block jobs

2015-04-16 Thread Alberto Garcia
The current way to obtain the list of existing block jobs is to iterate over all root nodes and check which ones own a job. Since we want to be able to support block jobs in other nodes as well, this patch keeps a list of jobs that is updated everytime one is created or destroyed. This also updat

[Qemu-devel] [PATCH 3/8] block: never cancel a streaming job without running stream_complete()

2015-04-16 Thread Alberto Garcia
We need to call stream_complete() in order to do all the necessary clean-ups, even if there's an early failure. At the moment it's only useful to make sure that s->backing_file_str is not leaked, but it will become more important as we introduce support for streaming to any intermediate node. Sign

[Qemu-devel] [PATCH 5/8] block: Add QMP support for streaming to an intermediate layer

2015-04-16 Thread Alberto Garcia
This patch makes the 'device' paramater of the 'block-stream' command accept a node name as well as a device name. In addition to that, operation blockers will be checked in all intermediate nodes between the top and the base node. Since qmp_block_stream() now uses the error from bdrv_lookup_bs()

[Qemu-devel] [PATCH 8/8] qemu-iotests: test streaming to an intermediate layer

2015-04-16 Thread Alberto Garcia
This adds test_stream_intermediate(), similar to test_stream() but streams to the intermediate image instead. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 18 +- tests/qemu-iotests/030.out | 4 ++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 6/8] docs: Document how to stream to an intermediate layer

2015-04-16 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- docs/live-block-ops.txt | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..3bf86be 100644 --- a/docs/live-block-ops.txt +++ b/docs/live-block-ops.tx

Re: [Qemu-devel] [Question]Support of China loogson processor

2015-04-16 Thread Leon Alrae
On 16/04/2015 13:02, Paolo Bonzini wrote: > > > On 16/04/2015 13:07, Leon Alrae wrote: >> Since I also haven't had a chance to test Loongson emulation, I thought >> I'd give it a try (TCG only, Loongson-2E cpu and fulong2e machine). >> >> Good news is that I'm able to get to the login prompt usin

Re: [Qemu-devel] How to modify QEMU source to read the bus for SATA directly?

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 16:26, Peter Teoh wrote: > > You can use PCI passthrough and let the guest use the whole SATA bus, if > you have another way to access other disks on the same bus (e.g. boot > from a USB stick or access the filesystems on NFS). > > Or you can use SCSI passthrough a

Re: [Qemu-devel] [Qemu-block] [PATCH 4/6] block: Support streaming to an intermediate layer

2015-04-16 Thread Alberto Garcia
On Wed 15 Apr 2015 06:09:18 PM CEST, Max Reitz wrote: >> +orig_bs_flags = bdrv_get_flags(bs); >> +if (!(orig_bs_flags & BDRV_O_RDWR)) { > > I feel like we don't want to do this if we're not streaming to an > intermediate layer but to the top layer (because that means there is > some reaso

Re: [Qemu-devel] How to modify QEMU source to read the bus for SATA directly?

2015-04-16 Thread Peter Teoh
On Thu, Apr 16, 2015 at 9:43 PM, Paolo Bonzini wrote: > > > On 16/04/2015 15:25, Peter Teoh wrote: > > > > Now my question is: Is it possible to modify the QEMU source code, or > > pass in the correct parameters in the command line, so as provide direct > > I/O access from the QEMU guest all th

Re: [Qemu-devel] [RFC PATCH] vl.c: add -semihosting-config "arg" sub-argument

2015-04-16 Thread Peter Maydell
On 15 April 2015 at 10:09, Liviu Ionescu wrote: > we currently have two solutions: > > - multiple: --semihosting-config arg="..." > - a single option, placed at the end, and followed by any number > of arguments: --semihosting-cmdline $@ \n > > both can generate the array of args required by UHI

[Qemu-devel] [PATCH for-2.4 V2 9/9] block/iscsi: use the allocationmap also if cache.direct=on

2015-04-16 Thread Peter Lieven
the allocationmap has only a hint character. The driver always double checks that blocks marked unallocated in the cache are still unallocated before taking the fast path and return zeroes. So using the allocationmap is migration safe and can also be enabled with cache.direct=on. Signed-off-by: Pe

[Qemu-devel] [PATCH for-2.4 V2 1/9] block/iscsi: do not forget to logout from target

2015-04-16 Thread Peter Lieven
We actually were always impolitely dropping the connection and not cleanly logging out. CC: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven --- block/iscsi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index ba33290..be8af46 100644 --- a/block/iscsi

[Qemu-devel] [PATCH for-2.4 V2 7/9] block/iscsi: handle SCSI_STATUS_TASK_SET_FULL

2015-04-16 Thread Peter Lieven
a target may issue a SCSI_STATUS_TASK_SET_FULL status if there is more than one "BUSY" command queued already. Signed-off-by: Peter Lieven --- block/iscsi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 5999f74..328907b 100644 ---

[Qemu-devel] [PATCH for-2.4 V2 5/9] block/iscsi: optimize WRITE10/16 if cache.writeback is not set

2015-04-16 Thread Peter Lieven
SCSI allowes to tell the target to not return from a write command if the date is not written to the disk. Use this so called FUA bit if it is supported to optimize WRITE commands if writeback is not allowed. In this case qemu always issues a WRITE followed by a FLUSH. This is 2 round trip times.

[Qemu-devel] [PATCH for-2.4 V2 4/9] block/iscsi: store DPOFUA bit from the modesense command

2015-04-16 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 221c9fc..237faa1 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -66,6 +66,7 @@ typedef struct IscsiLun { bool write_protected; bool lbpme; boo

[Qemu-devel] [PATCH for-2.4 V2 3/9] block/iscsi: rename iscsi_write_protected and let it return void

2015-04-16 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 6cf7e99..221c9fc 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1253,11 +1253,11 @@ static void iscsi_attach_aio_context(BlockDriver

[Qemu-devel] [PATCH for-2.4 V2 6/9] block/iscsi: increase retry count

2015-04-16 Thread Peter Lieven
The idea is that a command is retried in a BUSY condition up a time of approx. 60 seconds before it is failed. This should be far higher than any command timeout in the guest. Signed-off-by: Peter Lieven --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/

[Qemu-devel] [PATCH for-2.4 V2 8/9] block/iscsi: bump year in copyright notice

2015-04-16 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/iscsi.c b/block/iscsi.c index 328907b..8364f97 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -2,7 +2,7 @@ * QEMU Block driver for iSCSI images * * Copyright (c) 2010-2

[Qemu-devel] [PATCH for-2.4 V2 0/9] various improvements for the iSCSI driver

2015-04-16 Thread Peter Lieven
v1->v2: - removed the requirement for libiscsi 1.10.0 [Paolo] - reworked to force_next_flush logic [Paolo] Peter Lieven (9): block/iscsi: do not forget to logout from target block/iscsi: change all iscsilun properties from uint8_t to bool block/iscsi: rename iscsi_write_protected and

[Qemu-devel] [PATCH for-2.4 V2 2/9] block/iscsi: change all iscsilun properties from uint8_t to bool

2015-04-16 Thread Peter Lieven
Signed-off-by: Peter Lieven --- block/iscsi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index be8af46..6cf7e99 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -57,9 +57,6 @@ typedef struct IscsiLun { int events; QE

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-16 Thread Stefan Berger
On 04/16/2015 09:35 AM, Igor Mammedov wrote: On Wed, 15 Apr 2015 18:38:43 -0400 Stefan Berger wrote: The following series of patches extends TPM support with an external TPM that offers a Linux CUSE (character device in userspace) interface. This TPM lets each VM access its own private vTPM. T

[Qemu-devel] [Bug 1444081] Re: x86_64 heavy crash on PPC 64 host

2015-04-16 Thread luigiburdo
** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1444081 Title: x86_64 heavy crash on PPC 64 host Status in QEMU: Fix Released Bug descriptio

[Qemu-devel] Unparking vCPU mechanism

2015-04-16 Thread Mohsin Kazmi
Hi Zhu, I am testing the hot unplug feature using your github branch 'cpu-hotplug'. It is working fine when first time I added and deleted cpu. But when I tried to add cpu second time, it showed me the following error: (qemu) device_add kvm64-x86_64-cpu,apic-id=1,id=cpu1 Duplic

[Qemu-devel] unknown keycodes

2015-04-16 Thread Daniel Moyle
Hello, I’m running OS X 10.5.10 running the X11 server XQuartz 2.7.7 (xorg-server 1.15.2). Qemu is running on freeBSD being transmitted to the local machine over SSH. Qemu version: QEMU PC emulator version 0.11.1, Copyright (c) 2003-2008 Fabrice Bellard. All keypresses seem to send the incorrect

Re: [Qemu-devel] How to modify QEMU source to read the bus for SATA directly?

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 15:25, Peter Teoh wrote: > > Now my question is: Is it possible to modify the QEMU source code, or > pass in the correct parameters in the command line, so as provide direct > I/O access from the QEMU guest all the way to the underlying host's AHCI > sata bus (based on my AMD's h

Re: [Qemu-devel] [PATCH 0/5] Extend TPM support with a QEMU-external TPM

2015-04-16 Thread Igor Mammedov
On Wed, 15 Apr 2015 18:38:43 -0400 Stefan Berger wrote: > The following series of patches extends TPM support with an > external TPM that offers a Linux CUSE (character device in userspace) > interface. This TPM lets each VM access its own private vTPM. > The CUSE TPM supports suspend/resume and

[Qemu-devel] How to modify QEMU source to read the bus for SATA directly?

2015-04-16 Thread Peter Teoh
My objective is not to emulate the SATA disk in anyway, but to passthrough all command the guest OS (either Windows or Linux) issued directly to the underlying harddisk. Will the following parameters achieved that goal? ./x86_64-softmmu/qemu-system-x86_64 \ -drive file=...,if=none,id=mydisk \

Re: [Qemu-devel] [PATCH for-2.4 07/10] block/iscsi: bump libiscsi requirement to 1.10.0

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 14:58, Peter Lieven wrote: >> >> On 16/04/2015 14:18, Peter Lieven wrote: >>> We need this to support SCSI_STATUS_TASK_SET_FULL. >> Any reason apart from the missing constant? > > No, but I wanted to avoid starting checking for constants that were > added shortly after this. > You

Re: [Qemu-devel] [PATCH for-2.4 05/10] block/iscsi: optimize WRITE10/16 if cache.writeback is not set

2015-04-16 Thread Paolo Bonzini
On 16/04/2015 15:02, Peter Lieven wrote: >>> >> Also, I think it is iscsi_co_generic_cb that should set >> force_next_flush, so that it is only set on failure. Not really for the >> optimization value, but because it's clearer. > > I don't get what you mean with it should only "set on failure".

Re: [Qemu-devel] [PATCH v3 0/7] aio: Support epoll by introducing qemu_poll abstraction

2015-04-16 Thread Stefan Hajnoczi
On Thu, Apr 16, 2015 at 12:57:29PM +0800, Fam Zheng wrote: > v3: Rebase to master for 2.4. > Although epoll_pwait1 syscall is still being worked on [1], the QEMU part > (if any) will base on this, so let's merge it first. > > That part is not included in this version because I'm st

Re: [Qemu-devel] [PATCH for-2.4 05/10] block/iscsi: optimize WRITE10/16 if cache.writeback is not set

2015-04-16 Thread Peter Lieven
Am 16.04.2015 um 14:42 schrieb Paolo Bonzini: On 16/04/2015 14:18, Peter Lieven wrote: SCSI allowes to tell the target to not return from a write command if the date is not written to the disk. Use this so called FUA bit if it is supported to optimize WRITE commands if writeback is not allowed.

Re: [Qemu-devel] [PATCH v3 7/7] poll-linux: Add timerfd support

2015-04-16 Thread Stefan Hajnoczi
On Thu, Apr 16, 2015 at 12:57:36PM +0800, Fam Zheng wrote: > +static int qemu_poll_timerfd(QEMUPoll *qpoll, int64_t timeout_ns) > +{ > +int r; > +struct itimerspec its = { { 0 } }; > + > +if (timeout_ns > 0) { > +its.it_value.tv_sec = timeout_ns / 10LL; > +its.it

  1   2   >