Re: [Qemu-devel] [PATCH 1/2] qemu-char: Fix reconnect socket error reporting

2014-10-07 Thread Markus Armbruster
miny...@acm.org writes: > From: Corey Minyard > > If reconnect was set, errors wouldn't always be reported. > Fix that and also only report a connect error once until a > connection has been made. > > The primary purpose of this is to tell the user that a > connection failed so they can know they

Re: [Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support

2014-10-07 Thread Fam Zheng
On Tue, 10/07 15:24, Benoît Canet wrote: > The throttle group support use a cooperative round robin scheduling algorithm. > > The principle of the algorithm are simple: s/principle/principles/ > - Each BDS of the group is used as a token in a circular way. > - The active BDS compute if a wait mu

Re: [Qemu-devel] [PATCH v1 6/8] throttle: Add a way to fire one of the timers asap like a bottom half

2014-10-07 Thread Fam Zheng
On Tue, 10/07 15:24, Benoît Canet wrote: > This will be needed by the group throttling algorithm. > > Signed-off-by: Benoit Canet > --- > include/qemu/throttle.h | 2 ++ > util/throttle.c | 11 +++ > 2 files changed, 13 insertions(+) > > diff --git a/include/qemu/throttle.h b/i

Re: [Qemu-devel] [PATCH v1 3/8] throttle: Add throttle group infrastructure tests

2014-10-07 Thread Fam Zheng
On Tue, 10/07 15:24, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > tests/test-throttle.c | 51 > +++ > 1 file changed, 51 insertions(+) > > diff --git a/tests/test-throttle.c b/tests/test-throttle.c > index 3e52df3..ecb5504 100644 > --

Re: [Qemu-devel] [PATCH v1 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure

2014-10-07 Thread Fam Zheng
On Tue, 10/07 15:24, Benoît Canet wrote: > Group throttling will share ThrottleState between multiple bs. > As a consequence the ThrottleState will be accessed by multiple aio context. > > Timers are tied to their aio context so they must go out of the ThrottleState > structure. > > This commit

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Zhu Guihua
On Tue, 2014-10-07 at 15:53 +0200, Igor Mammedov wrote: > On Tue, 07 Oct 2014 15:23:45 +0200 > Andreas Färber wrote: > > > Am 07.10.2014 um 14:10 schrieb Igor Mammedov: > > > On Tue, 7 Oct 2014 19:59:51 +0800 > > > Zhu Guihua wrote: > > > > > >> On Thu, 2014-10-02 at 10:08 +, Igor Mammedov

Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of pcie devices

2014-10-07 Thread Gonglei (Arei)
> Subject: Re: [Qemu-devel] [PATCH v4 2/3] pcie: add check for ari capability of > pcie devices > > On Fri, 2014-10-03 at 13:22 +0200, Knut Omang wrote: > > On Wed, 2014-10-01 at 17:08 +0300, Marcel Apfelbaum wrote: > > > On Wed, 2014-10-01 at 07:26 +0200, Knut Omang wrote: > > > > On Tue, 2014-09

Re: [Qemu-devel] [PATCH v5 1/2] QEMUSizedBuffer based QEMUFile

2014-10-07 Thread zhanghailiang
On 2014/9/29 17:41, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" This is based on Stefan and Joel's patch that creates a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg05036.html Using the QEMUFile interface, this pat

Re: [Qemu-devel] [PATCH v4 36/47] Page request: Process incoming page request

2014-10-07 Thread zhanghailiang
On 2014/10/4 1:47, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" On receiving MIG_RPCOMM_REQPAGES look up the address and queue the page. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 52 +++ include/m

Re: [Qemu-devel] [PATCH v4 23/47] migrate_init: Call from savevm

2014-10-07 Thread zhanghailiang
On 2014/10/4 1:47, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Suspend to file is very much like a migrate, and it makes life easier if we have the Migration state available, so initialise it in the savevm.c code for suspending. Signed-off-by: Dr. David Alan Gilbert ---

Re: [Qemu-devel] [PATCH v4 01/47] QEMUSizedBuffer based QEMUFile

2014-10-07 Thread zhanghailiang
On 2014/10/4 1:47, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" * Please comment on separate thread for this QEMUSizedBuffer patch * This is based on Stefan and Joel's patch that creates a QEMUFile that goes to a memory buffer; from: http://lists.gnu.org/archive/html/qem

Re: [Qemu-devel] [PATCH V4 5/8] pc: Update rtc_cmos in pc_cpu_plug

2014-10-07 Thread Gu Zheng
Hi Igor, On 10/07/2014 09:01 PM, Igor Mammedov wrote: > On Mon, 29 Sep 2014 18:52:34 +0800 > Gu Zheng wrote: > >> Update rtc_cmos in pc_cpu_plug directly instead of the notifier. >> >> v4: >> -Make link property in PCMachine rather than the global >> variables. >> -Split out the removal of

Re: [Qemu-devel] [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-07 Thread Andy Lutomirski
On 10/07/2014 07:39 AM, Cornelia Huck wrote: > This patchset aims to get us some way to implement virtio-1 compliant > and transitional devices in qemu. Branch available at > > git://github.com/cohuck/qemu virtio-1 > > I've mainly focused on: > - endianness handling > - extended feature bits > -

Re: [Qemu-devel] [PATCH v7 2/2] dump: Turn some functions to void to make code cleaner

2014-10-07 Thread zhanghailiang
Hi, Ping...:( Thanks, zhanghailiang On 2014/9/30 17:20, zhanghailiang wrote: Functions shouldn't return an error code and an Error object at the same time. Turn all these functions that returning Error object to void. We also judge if a function success or fail by reference to the local_err.

Re: [Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Wei Huang
On 10/07/2014 04:36 PM, Paolo Bonzini wrote: Il 07/10/2014 23:16, Wei Huang ha scritto: It isn't a bug IMO. I tested various combinations; and current QEMU handles it very well. It converts threads=n to proper CPUID__0001_EBX[LogicalProcCount] and CPUID_8000_0008_ECX[NC] accordingly for AM

Re: [Qemu-devel] [Bug 1378554] [NEW] qemu segfault in virtio_scsi_handle_cmd_req_submit on ARM 32 bit

2014-10-07 Thread Paolo Bonzini
Does this work: diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 203e624..c6d4f2e 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio-scsi.c @@ -545,11 +545,12 @@ bool virtio_scsi_handle_cmd_req_prepare(VirtIOSCSI *s, VirtIOSCSIReq *req) void virtio_scsi_handle_cmd_req_subm

[Qemu-devel] [Bug 1378554] [NEW] qemu segfault in virtio_scsi_handle_cmd_req_submit on ARM 32 bit

2014-10-07 Thread Richard Jones
Public bug reported: /home/rjones/d/qemu/arm-softmmu/qemu-system-arm \ -global virtio-blk-device.scsi=off \ -nodefconfig \ -enable-fips \ -nodefaults \ -display none \ -M virt \ -machine accel=kvm:tcg \ -m 500 \ -no-reboot \ -rtc driftfix=slew \ -global

[Qemu-devel] [Bug 1378554] Re: qemu segfault in virtio_scsi_handle_cmd_req_submit on ARM 32 bit

2014-10-07 Thread Richard Jones
This is qemu from git today (2014-10-07). The hardware is 32 bit ARM (ODROID-XU Samsung Exynos 5410). It is running Ubuntu 14.04 LTS as the main operating system, but I am NOT using qemu from Ubuntu (which is ancient). -- You received this bug notification because you are a member of qemu- deve

Re: [Qemu-devel] [PATCH v5 11/33] target-arm: arrayfying fieldoffset for banking

2014-10-07 Thread Peter Maydell
On 7 October 2014 22:50, Greg Bellows wrote: > I'm still trying to wrap my head around it, but I believe there are > cases where we use a different register set depending on whether a > given EL is 32 or 64-bit. Well, if an EL is 64-bit then it sees (effectively) a totally different register set

Re: [Qemu-devel] [PATCH v5 0/5] add description field in ObjectProperty and PropertyInfo struct

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 08:33, arei.gong...@huawei.com ha scritto: > From: Gonglei > > v5 -> v4: > 1. add some improvements by Michael's suggtion, Thanks. (Michael) > 2. add 'Reviewed-by' tag (Paolo, Michael, Eric) Andreas, this series depends on patches in qom-next so you'll have to take it. Thanks,

Re: [Qemu-devel] [PATCH 2/2] qemu-sockets: Add error to non-blocking connect handler

2014-10-07 Thread Paolo Bonzini
Il 06/10/2014 19:59, miny...@acm.org ha scritto: > +error_setg_errno(&err, errno, "Error connecting to socket"); > closesocket(s->fd); > s->fd = rc; > } > @@ -257,9 +259,14 @@ static void wait_for_connect(void *opaque) > while (s->current_addr->ai_next != NUL

Re: [Qemu-devel] [PATCH v5 11/33] target-arm: arrayfying fieldoffset for banking

2014-10-07 Thread Greg Bellows
On 7 October 2014 02:12, Peter Maydell wrote: > On 7 October 2014 06:06, Greg Bellows wrote: > > > > > > On 6 October 2014 11:19, Peter Maydell wrote: > >> > >> On 30 September 2014 22:49, Greg Bellows > wrote: > >> > From: Fabian Aggeler > >> > > >> > Prepare ARMCPRegInfo to support specifyi

Re: [Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 23:16, Wei Huang ha scritto: > It isn't a bug IMO. I tested various combinations; and current QEMU > handles it very well. It converts threads=n to proper > CPUID__0001_EBX[LogicalProcCount] and CPUID_8000_0008_ECX[NC] > accordingly for AMD. So if it ain't broken, don't fix it. :

Re: [Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Wei Huang
On 10/07/2014 03:58 PM, Paolo Bonzini wrote: Il 07/10/2014 21:44, Wei Huang ha scritto: AMD CPU doesn't support hyperthreading. Even though QEMU fixes this issue by setting CPUID__0001_EBX and CPUID_8000_0008_ECX via conversion, it is better to stop end-users in the first place with a warn

Re: [Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 21:44, Wei Huang ha scritto: > AMD CPU doesn't support hyperthreading. Even though QEMU fixes > this issue by setting CPUID__0001_EBX and CPUID_8000_0008_ECX > via conversion, it is better to stop end-users in the first place > with a warning message. Hi Wei, what exactly breaks

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Peter Feiner
On Tue, Oct 07, 2014 at 05:52:47PM +0200, Andrea Arcangeli wrote: > I probably grossly overestimated the benefits of resolving the > userfault with a zerocopy page move, sorry. [...] For posterity, I think it's worth noting that most expensive aspect of a TLB shootdown is the interprocessor interr

[Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Wei Huang
AMD CPU doesn't support hyperthreading. Even though QEMU fixes this issue by setting CPUID__0001_EBX and CPUID_8000_0008_ECX via conversion, it is better to stop end-users in the first place with a warning message. Signed-off-by: Wei Huang --- target-i386/cpu.c | 23 ---

Re: [Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Wei Huang
Sorry, please skip this version. I am sending out a updated one. -Wei On 10/07/2014 02:17 PM, Wei Huang wrote: AMD CPU doesn't support hyperthreading. Even though QEMU fixes this issue by setting CPUID__0001_EBX and CPUID_8000_0008_ECX via conversion, it is better to stop end-users in the f

[Qemu-devel] [PATCH 1/1] target-i386: prevent users from setting threads>1 for AMD CPUs

2014-10-07 Thread Wei Huang
AMD CPU doesn't support hyperthreading. Even though QEMU fixes this issue by setting CPUID__0001_EBX and CPUID_8000_0008_ECX via conversion, it is better to stop end-users in the first place with a warning message. Signed-off-by: Wei Huang --- target-i386/cpu.c | 18 ++ 1 fil

[Qemu-devel] [PATCH RFC 07/11] dataplane: allow virtio-1 devices

2014-10-07 Thread Cornelia Huck
Handle endianness conversion for virtio-1 virtqueues correctly. Note that dataplane now needs to be built per-target. Signed-off-by: Cornelia Huck --- hw/block/dataplane/virtio-blk.c |3 +- hw/scsi/virtio-scsi-dataplane.c |2 +- hw/virtio/Makefile.objs |2 +- hw/

[Qemu-devel] [PATCH RFC 07/11] virtio_net: use v1.0 endian.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell [Cornelia Huck: converted some missed fields] Signed-off-by: Rusty Russell Signed-off-by: Cornelia Huck --- drivers/net/virtio_net.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/ne

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 20:41, Kevin Wolf ha scritto: > Is there any way to add netdevs/chardevs/devices in a non-QemuOpts way? For chardevs, yes. > I think always checking for the same allowed set of characters is the > only sane way to do things. Otherwise you end up with names that can be > used in one

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 20:39, Markus Armbruster ha scritto: >> > 1) always use the same restriction when a user creates objects; >> > >> > 2) do not introduce restrictions when a user is not using QemuOpts. >> > >> > We've been doing (2) so far; often it is just because QMP wrappers

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Kevin Wolf
Am 07.10.2014 um 17:14 hat Paolo Bonzini geschrieben: > Il 07/10/2014 14:16, Markus Armbruster ha scritto: > >> > Possibly, except this would propagate all the way through the APIs. For > >> > example, right now [*] is added automatically to MemoryRegion > >> > properties, but this can change in t

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Markus Armbruster
Paolo Bonzini writes: > Il 07/10/2014 14:16, Markus Armbruster ha scritto: >>> > Possibly, except this would propagate all the way through the APIs. For >>> > example, right now [*] is added automatically to MemoryRegion >>> > properties, but this can change in the future since many MemoryRegion

[Qemu-devel] [PATCH RFC 06/11] virtio: allow transports to get avail/used addresses

2014-10-07 Thread Cornelia Huck
For virtio-1, we can theoretically have a more complex virtqueue layout with avail and used buffers not on a contiguous memory area with the descriptor table. For now, it's fine for a transport driver to stay with the old layout: It needs, however, a way to access the locations of the avail/used ri

[Qemu-devel] [PATCH RFC 01/11] linux-headers/virtio_config: Update with VIRTIO_F_VERSION_1

2014-10-07 Thread Cornelia Huck
From: Thomas Huth Add the new VIRTIO_F_VERSION_1 definition to the virtio_config.h linux header. Signed-off-by: Thomas Huth Signed-off-by: Cornelia Huck --- linux-headers/linux/virtio_config.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/linux-headers/linux/virtio_config.h b/lin

Re: [Qemu-devel] [PULL v2 0/5] linux-user patches for 2.2

2014-10-07 Thread Peter Maydell
On 6 October 2014 20:11, wrote: > From: Riku Voipio > > The following changes since commit 2472b6c07bb50179019589af1c22f43935ab7f5c: > > gdbstub: Allow target CPUs to specify watchpoint STOP_BEFORE_ACCESS flag > (2014-10-06 14:25:43 +0100) > > are available in the git repository at: > > git

[Qemu-devel] [PATCH RFC 04/11] s390x/virtio-ccw: fix check for WRITE_FEAT

2014-10-07 Thread Cornelia Huck
We need to check guest feature size, not host feature size to find out whether we should call virtio_set_features(). This check is possible now that vdev->guest_features is an array. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c |2 +- 1 file changed, 1 ins

[Qemu-devel] [PATCH RFC 00/11] linux: towards virtio-1 guest support

2014-10-07 Thread Cornelia Huck
This patchset tries to go towards implementing both virtio-1 compliant and transitional virtio drivers in Linux. Branch available at git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux virtio-1 This is based on some old patches by Rusty to handle extended feature bits and endianness conve

[Qemu-devel] [PATCH RFC 06/11] virtio: allow virtio-1 queue layout

2014-10-07 Thread Cornelia Huck
For virtio-1 devices, we allow a more complex queue layout that doesn't require descriptor table and rings on a physically-contigous memory area: add virtio_queue_set_rings() to allow transports to set this up. Signed-off-by: Cornelia Huck --- hw/virtio/virtio.c | 16

[Qemu-devel] [PATCH RFC 10/11] s390x/virtio-ccw: support virtio-1 set_vq format

2014-10-07 Thread Cornelia Huck
Support the new CCW_CMD_SET_VQ format for virtio-1 devices. While we're at it, refactor the code a bit and enforce big endian fields (which had always been required, even for legacy). Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 114 +++

[Qemu-devel] [PATCH RFC 02/11] virtio: add support for 64 bit features.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell Change the u32 to a u64, and make sure to use 1ULL everywhere! Cc: Brian Swetland Cc: Christian Borntraeger [Thomas Huth: fix up virtio-ccw get_features] Signed-off-by: Rusty Russell Signed-off-by: Cornelia Huck Acked-by: Pawel Moll Acked-by: Ohad Ben-Cohen --- drivers

[Qemu-devel] [PATCH RFC 05/11] virtio: introduce legacy virtio devices

2014-10-07 Thread Cornelia Huck
Introduce a helper function to indicate whether a virtio device is operating in legacy or virtio standard mode. It may be used to make decisions about the endianess of virtio accesses and other virtio-1 specific changes, enabling us to support transitional devices. Reviewed-by: Thomas Huth Sign

[Qemu-devel] [PATCH RFC 05/11] virtio_config: endian conversion for v1.0.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell Reviewed-by: David Hildenbrand Signed-off-by: Rusty Russell Signed-off-by: Cornelia Huck --- include/linux/virtio_config.h |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index a0

[Qemu-devel] [PATCH RFC 00/11] qemu: towards virtio-1 host support

2014-10-07 Thread Cornelia Huck
This patchset aims to get us some way to implement virtio-1 compliant and transitional devices in qemu. Branch available at git://github.com/cohuck/qemu virtio-1 I've mainly focused on: - endianness handling - extended feature bits - virtio-ccw new/changed commands Thanks go to Thomas for some p

[Qemu-devel] [PATCH RFC 11/11] KVM: s390: enable virtio-ccw revision 1

2014-10-07 Thread Cornelia Huck
Now that virtio-ccw has everything needed to support virtio 1.0 in place, try to enable it if the host supports it. Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- drivers/s390/kvm/virtio_ccw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/k

[Qemu-devel] [PATCH RFC 09/11] KVM: s390: Set virtio-ccw transport revision

2014-10-07 Thread Cornelia Huck
From: Thomas Huth With the new SET-VIRTIO-REVISION command of the virtio 1.0 standard, we can now negotiate the virtio-ccw revision after setting a channel online. Note that we don't negotiate version 1 yet. [Cornelia Huck: reworked revision loop a bit] Reviewed-by: David Hildenbrand Signed-of

[Qemu-devel] [PATCH RFC 02/11] virtio: cull virtio_bus_set_vdev_features

2014-10-07 Thread Cornelia Huck
The only user of this function was virtio-ccw, and it should use virtio_set_features() like everybody else: We need to make sure that bad features are masked out properly, which this function did not do. Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c |

[Qemu-devel] [PATCH RFC 11/11] s390x/virtio-ccw: enable virtio 1.0

2014-10-07 Thread Cornelia Huck
virtio-ccw should now have everything in place to operate virtio 1.0 devices, so let's enable revision 1. Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.h b/hw/s390x/virtio-ccw.h index 03d5955..08e

[Qemu-devel] [PATCH RFC 08/11] virtio_blk: use virtio v1.0 endian

2014-10-07 Thread Cornelia Huck
Note that we care only about the fields still in use for virtio v1.0. Reviewed-by: Thomas Huth Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- drivers/block/virtio_blk.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio

[Qemu-devel] [PATCH RFC 04/11] virtio_ring: implement endian reversal based on VERSION_1 feature.

2014-10-07 Thread Cornelia Huck
From: Rusty Russell [Cornelia Huck: we don't need the vq->vring.num -> vq->ring_mask change] Signed-off-by: Rusty Russell Signed-off-by: Cornelia Huck --- drivers/virtio/virtio_ring.c | 195 ++ 1 file changed, 138 insertions(+), 57 deletions(-) diff --

[Qemu-devel] [PATCH RFC 03/11] virtio: support more feature bits

2014-10-07 Thread Cornelia Huck
With virtio-1, we support more than 32 feature bits. Let's make vdev->guest_features depend on the number of supported feature bits, allowing us to grow the feature bits automatically. We also need to enhance the internal functions dealing with getting and setting features with an additional index

[Qemu-devel] [PATCH RFC 01/11] virtio: use u32, not bitmap for struct virtio_device's features

2014-10-07 Thread Cornelia Huck
From: Rusty Russell It seemed like a good idea, but it's actually a pain when we get more than 32 feature bits. Just change it to a u32 for now. Cc: Brian Swetland Cc: Christian Borntraeger Signed-off-by: Rusty Russell Signed-off-by: Cornelia Huck Acked-by: Pawel Moll Acked-by: Ohad Ben-Co

[Qemu-devel] [PATCH RFC 08/11] s390x/css: Add a callback for when subchannel gets disabled

2014-10-07 Thread Cornelia Huck
From: Thomas Huth We need a possibility to run code when a subchannel gets disabled. This patch adds the necessary infrastructure. Signed-off-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/css.c | 12 hw/s390x/css.h |1 + 2 files changed, 13 insertions(+) diff -

[Qemu-devel] [PATCH RFC 03/11] virtio: endianess conversion helpers

2014-10-07 Thread Cornelia Huck
Provide helper functions that convert from/to LE for virtio devices that are not operating in legacy mode. We check for the VERSION_1 feature bit to determine that. Based on original patches by Rusty Russell and Thomas Huth. Reviewed-by: David Hildenbrand Signed-off-by: Cornelia Huck --- drive

[Qemu-devel] [PATCH RFC 10/11] KVM: s390: virtio-ccw revision 1 SET_VQ

2014-10-07 Thread Cornelia Huck
The CCW_CMD_SET_VQ command has a different format for revision 1+ devices, allowing to specify a more complex virtqueue layout. For now, we stay however with the old layout and simply use the new command format for virtio-1 devices. Signed-off-by: Cornelia Huck --- drivers/s390/kvm/virtio_ccw.c

[Qemu-devel] [PATCH RFC 09/11] s390x/virtio-ccw: add virtio set-revision call

2014-10-07 Thread Cornelia Huck
From: Thomas Huth Handle the virtio-ccw revision according to what the guest sets. When revision 1 is selected, we have a virtio-1 standard device with byteswapping for the virtio rings. When a channel gets disabled, we have to revert to the legacy behavior in case the next user of the device do

Re: [Qemu-devel] [PATCH v5 09/33] target-arm: add macros to access banked registers

2014-10-07 Thread Greg Bellows
Converted in v6 On 7 October 2014 01:54, Peter Maydell wrote: > On 7 October 2014 05:02, Greg Bellows wrote: > > Right, we need the macros to do string concatenation so they have to be > > macros. That combination occurs 3 times from a quick look. I agree > that it > > may be cumbersome to tr

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Dr. David Alan Gilbert
* Linus Torvalds (torva...@linux-foundation.org) wrote: > On Mon, Oct 6, 2014 at 12:41 PM, Andrea Arcangeli wrote: > > > > Of course if somebody has better ideas on how to resolve an anonymous > > userfault they're welcome. > > So I'd *much* rather have a "write()" style interface (ie _copying_ >

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 07/10/2014 19:07, Dr. David Alan Gilbert ha scritto: > >> > > >> > So I'd *much* rather have a "write()" style interface (ie _copying_ > >> > bytes from user space into a newly allocated page that gets mapped) > >> > than a "remap page" style inter

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 19:07, Dr. David Alan Gilbert ha scritto: >> > >> > So I'd *much* rather have a "write()" style interface (ie _copying_ >> > bytes from user space into a newly allocated page that gets mapped) >> > than a "remap page" style interface > Something like that might work for the postcopy

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Linus Torvalds
On Tue, Oct 7, 2014 at 10:19 AM, Andrea Arcangeli wrote: > > I see what you mean. The only cons I see is that we couldn't use then > recv(tmp_addr, PAGE_SIZE), remap_anon_pages(faultaddr, tmp_addr, > PAGE_SIZE, ..) and retain the zerocopy behavior. Or how could we? > There's no recvfile(userfault

[Qemu-devel] [Bug 1378407] [NEW] [feature request] Partition table wrapper for single-filesystem images

2014-10-07 Thread felix
Public bug reported: Suppose you have a single filesystem image. It would be nice if QEMU could generate a virtual partition table for it and make it available to the guest as a partitioned disk. Otherwise you have to use workarounds like this: wiki.archlinux.org/index.php/QEMU#Simulate_virtual_di

Re: [Qemu-devel] [PATCH v6 16/24] hw: Convert from BlockDriverState to BlockBackend, mostly

2014-10-07 Thread Max Reitz
On 07.10.2014 13:59, Markus Armbruster wrote: Device models should access their block backends only through the block-backend.h API. Convert them, and drop direct includes of inappropriate headers. Just four uses of BlockDriverState are left: * The Xen paravirtual block device backend (xen_dis

Re: [Qemu-devel] [PATCH v6 07/24] blockdev: Eliminate drive_del()

2014-10-07 Thread Max Reitz
On 07.10.2014 13:59, Markus Armbruster wrote: drive_del() has become a trivial wrapper around blk_unref(). Get rid of it. Signed-off-by: Markus Armbruster --- blockdev.c| 9 ++--- device-hotplug.c | 3 ++- hw/ide/piix.c | 4 +++- include/sysemu/blo

Re: [Qemu-devel] [PATCH v6 04/24] block: Connect BlockBackend and DriveInfo

2014-10-07 Thread Max Reitz
On 07.10.2014 13:59, Markus Armbruster wrote: Make the BlockBackend own the DriveInfo. Change blockdev_init() to return the BlockBackend instead of the DriveInfo. Signed-off-by: Markus Armbruster --- block.c | 2 -- block/block-backend.c | 38

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Andy Lutomirski
On Tue, Oct 7, 2014 at 8:52 AM, Andrea Arcangeli wrote: > On Tue, Oct 07, 2014 at 04:19:13PM +0200, Andrea Arcangeli wrote: >> mremap like interface, or file+commands protocol interface. I tend to >> like mremap more, that's why I opted for a remap_anon_pages syscall >> kept orthogonal to the user

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Andrea Arcangeli
On Tue, Oct 07, 2014 at 04:19:13PM +0200, Andrea Arcangeli wrote: > mremap like interface, or file+commands protocol interface. I tend to > like mremap more, that's why I opted for a remap_anon_pages syscall > kept orthogonal to the userfaultfd functionality (remap_anon_pages > could be also used s

Re: [Qemu-devel] [PATCH v6 03/24] block: Connect BlockBackend to BlockDriverState

2014-10-07 Thread Max Reitz
On 07.10.2014 13:59, Markus Armbruster wrote: Convenience function blk_new_with_bs() creates a BlockBackend with its BlockDriverState. Callers have to unref both. The commit after next will relieve them of the need to unref the BlockDriverState. Complication: due to the silly way drive_del wor

Re: [Qemu-devel] [PATCH 08/17] mm: madvise MADV_USERFAULT

2014-10-07 Thread Kirill A. Shutemov
On Tue, Oct 07, 2014 at 03:24:58PM +0200, Andrea Arcangeli wrote: > Hi Kirill, > > On Tue, Oct 07, 2014 at 01:36:45PM +0300, Kirill A. Shutemov wrote: > > On Fri, Oct 03, 2014 at 07:07:58PM +0200, Andrea Arcangeli wrote: > > > MADV_USERFAULT is a new madvise flag that will set VM_USERFAULT in the

Re: [Qemu-devel] [PATCH 10/11] block: let commit blockjob run in BDS AioContext

2014-10-07 Thread Max Reitz
On 06.10.2014 11:30, Stefan Hajnoczi wrote: On Sat, Oct 04, 2014 at 11:28:22PM +0200, Max Reitz wrote: On 01.10.2014 19:01, Stefan Hajnoczi wrote: The commit block job must run in the BlockDriverState AioContext so that it works with dataplane. Acquire the AioContext in blockdev.c so starting

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 14:16, Markus Armbruster ha scritto: >> > Possibly, except this would propagate all the way through the APIs. For >> > example, right now [*] is added automatically to MemoryRegion >> > properties, but this can change in the future since many MemoryRegions >> > do not need array-like

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Andrea Arcangeli
Hello, On Tue, Oct 07, 2014 at 08:47:59AM -0400, Linus Torvalds wrote: > On Mon, Oct 6, 2014 at 12:41 PM, Andrea Arcangeli wrote: > > > > Of course if somebody has better ideas on how to resolve an anonymous > > userfault they're welcome. > > So I'd *much* rather have a "write()" style interface

Re: [Qemu-devel] [Patch v4 6/8] target_arm: Change the reset values based on the ELF entry

2014-10-07 Thread Martin Galvan
On Tue, Oct 7, 2014 at 11:13 AM, Alistair Francis wrote: > The Netduino 2 machine won't run unless the reset_pc is based > on the ELF entry point. > > Signed-off-by: Alistair Francis > Signed-off-by: Peter Crosthwaite > --- > V2: > - Malloc straight away, thanks to Peter C > > hw/arm/armv7m.c

[Qemu-devel] [Patch v4 6/8] target_arm: Change the reset values based on the ELF entry

2014-10-07 Thread Alistair Francis
The Netduino 2 machine won't run unless the reset_pc is based on the ELF entry point. Signed-off-by: Alistair Francis Signed-off-by: Peter Crosthwaite --- V2: - Malloc straight away, thanks to Peter C hw/arm/armv7m.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-)

[Qemu-devel] [Patch v4 8/8] netduino2: Add the Netduino 2 Machine

2014-10-07 Thread Alistair Francis
This patch adds the Netduino 2 Machine. This is a Cortex-M3 based machine. Information can be found at: http://www.netduino.com/netduino2/specs.htm Signed-off-by: Alistair Francis --- Changes from RFC: - Remove CPU passthrough hw/arm/Makefile.objs | 1 + hw/arm/netduino2.c | 54 +++

[Qemu-devel] [Patch v4 5/8] target_arm: Parameterise the irq lines for armv7m_init

2014-10-07 Thread Alistair Francis
This patch allows the board to specifiy the number of NVIC interrupt lines when using armv7m_init. Signed-off-by: Alistair Francis --- hw/arm/armv7m.c | 7 --- hw/arm/stellaris.c | 5 - include/hw/arm/arm.h | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hw

[Qemu-devel] [Patch v4 7/8] stm32f205: Add the stm32f205 SoC

2014-10-07 Thread Alistair Francis
This patch adds the stm32f205 SoC. This will be used by the Netduino 2 to create a machine. Signed-off-by: Alistair Francis --- Changes from RFC: - Small changes thanks to Peter C - Split the config settings to device level default-configs/arm-softmmu.mak | 1 + hw/arm/Makefile.objs

[Qemu-devel] [Patch v4 3/8] stm32f205_SYSCFG: Add the stm32f205 SYSCFG

2014-10-07 Thread Alistair Francis
This patch adds the stm32f205 System Configuration Controller. This is used to configure what memory is mapped at address 0 (although that is not supported) as well as configure how the EXTI interrupts work (also not supported at the moment). This device is not required for basic examples, but mor

[Qemu-devel] [Patch v4 1/8] stm32f205_timer: Add the stm32f205 Timer

2014-10-07 Thread Alistair Francis
This patch adds the stm32f205 timers: TIM2, TIM3, TIM4 and TIM5 to QEMU. Signed-off-by: Alistair Francis --- V4: - Update timer units again - Thanks to Peter C V3: - Update debug statements - Correct the units for timer_mod - Correctly set timer_offset from resets V2: - Reorder the Makef

[Qemu-devel] [Patch v4 4/8] target_arm: Remove memory region init from armv7m_init

2014-10-07 Thread Alistair Francis
This patch moves the memory region init code from the armv7m_init function to the stellaris_init function Signed-off-by: Alistair Francis --- V3: - Rename the flash_size argument to mem_size - Remove the sram_size and related code - Thanks to Peter C V2: - Change the memory region names to

[Qemu-devel] [PATCH] Tracing docs fix configure option and description

2014-10-07 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fix the example trace configure option. Update the text to say that multiple backends are allowed and what happens when multiple backends are enabled. Signed-off-by: Dr. David Alan Gilbert --- docs/tracing.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deleti

[Qemu-devel] [Patch v4 2/8] stm32f205_USART: Add the stm32f205 USART Controller

2014-10-07 Thread Alistair Francis
This patch adds the stm32f205 USART controller (UART also uses the same controller). Signed-off-by: Alistair Francis --- V3: - Update debug printing V2: - Drop charecters if the device is not enabled - Thanks to Peter C Changes from RFC: - Small changes thanks to Peter C - USART now imple

[Qemu-devel] [Patch v4 0/8] Netduino 2 Machine Model

2014-10-07 Thread Alistair Francis
This patch series adds the Netduino 2 Machine to QEMU Information on the board is avalible at: http://www.netduino.com/netduino2/specs.htm The git tree can be found at: https://github.com/alistair23/qemu/tree/netduino2.4 This patch series makes some changes to the armv7m_init function that allow

[Qemu-devel] qemu-nbd and discard

2014-10-07 Thread Peter Lieven
Hi, if I use qemu-nbd from master and 3.13 host kernel and attach a QCOW2 image via local device to /dev/nbd0 and then mount an ext4 partition inside the image with -o discard. Is then fstrim supposed to work? Thank you, Peter

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Igor Mammedov
On Tue, 07 Oct 2014 15:23:45 +0200 Andreas Färber wrote: > Am 07.10.2014 um 14:10 schrieb Igor Mammedov: > > On Tue, 7 Oct 2014 19:59:51 +0800 > > Zhu Guihua wrote: > > > >> On Thu, 2014-10-02 at 10:08 +, Igor Mammedov wrote: > >>> device_add puts every device with 'id' inside of 'periphera

Re: [Qemu-devel] [PATCH 10/17] mm: rmap preparation for remap_anon_pages

2014-10-07 Thread Andrea Arcangeli
Hi Kirill, On Tue, Oct 07, 2014 at 02:10:26PM +0300, Kirill A. Shutemov wrote: > On Fri, Oct 03, 2014 at 07:08:00PM +0200, Andrea Arcangeli wrote: > > There's one constraint enforced to allow this simplification: the > > source pages passed to remap_anon_pages must be mapped only in one > > vma, b

Re: [Qemu-devel] [PATCH V4 4/8] pc: add cpu hotplug handler to PC_MACHINE

2014-10-07 Thread Igor Mammedov
On Mon, 29 Sep 2014 18:52:33 +0800 Gu Zheng wrote: > Add cpu hotplug handler to PC_MACHINE, which will perform the acpi > cpu hotplug callback via hotplug_handler API. > > v3: > -deal with start up cpus in a more neat way as Igor suggested. > v2: > -just rebase. > > Signed-off-by: Gu Zheng >

[Qemu-devel] [PATCH v1 4/8] throttle: Prepare to have multiple timers for one ThrottleState

2014-10-07 Thread Benoît Canet
This patch transform the timer_pending call into two boolean values in the ThrottleState structure. This way we are sure that when multiple timers will be used only one can be armed at a time. Signed-off-by: Benoit Canet --- block.c | 2 ++ include/qemu/throttle.h | 3 +++ uti

[Qemu-devel] [PATCH v1 1/8] throttle: Extract timers from ThrottleState into a separate ThrottleTimers structure

2014-10-07 Thread Benoît Canet
Group throttling will share ThrottleState between multiple bs. As a consequence the ThrottleState will be accessed by multiple aio context. Timers are tied to their aio context so they must go out of the ThrottleState structure. This commit pave the way for each bs of a common ThrottleState to h

[Qemu-devel] [PATCH v1 7/8] throttle: Add throttle group support

2014-10-07 Thread Benoît Canet
The throttle group support use a cooperative round robin scheduling algorithm. The principle of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS compute if a wait must be done and arm the right timer. - If a wait must be done the token timer

[Qemu-devel] [PATCH v1 3/8] throttle: Add throttle group infrastructure tests

2014-10-07 Thread Benoît Canet
Signed-off-by: Benoit Canet --- tests/test-throttle.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 3e52df3..ecb5504 100644 --- a/tests/test-throttle.c +++ b/tests/test-throttle.c @@ -15

[Qemu-devel] [PATCH v1 6/8] throttle: Add a way to fire one of the timers asap like a bottom half

2014-10-07 Thread Benoît Canet
This will be needed by the group throttling algorithm. Signed-off-by: Benoit Canet --- include/qemu/throttle.h | 2 ++ util/throttle.c | 11 +++ 2 files changed, 13 insertions(+) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 3a16c48..3b9d1b8 100644 --- a/

[Qemu-devel] [PATCH v1 8/8] throttle: Update throttle infrastructure copyright

2014-10-07 Thread Benoît Canet
Signed-off-by: Benoit Canet --- include/qemu/throttle.h | 4 ++-- tests/test-throttle.c | 4 ++-- util/throttle.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 3b9d1b8..8abd94d 100644 --- a/include/qemu/t

[Qemu-devel] [PATCH v1 2/8] throttle: Add throttle group infrastructure

2014-10-07 Thread Benoît Canet
The throttle_group_incref increment the refcount of a throttle group given it's name and return the associated throttle state. The throttle_group_unref is the mirror function for cleaning up. Signed-off-by: Benoit Canet --- block/Makefile.objs | 1 + block/throttle-groups.c

[Qemu-devel] [PATCH v1 5/8] throttle: Add a way to know if throttle_schedule_timer had armed a timer

2014-10-07 Thread Benoît Canet
This will be needed by the group throttling patches for the algorithm to be accurate. Signed-off-by: Benoit Canet --- block.c | 7 +-- include/qemu/throttle.h | 3 ++- util/throttle.c | 12 +++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a

[Qemu-devel] [PATCH v1 0/8] Block Throttle Group Support

2014-10-07 Thread Benoît Canet
Hi, For the user interface I implemented Stefanha's idea proposed in Stuttgart. For the throttling algorithm I use a cooperative round robin scheduler. Classical round robin works with a fixed HZ ticks and it's totaly incompatible with the throttling algorithm. So the cooperative round robin sc

Re: [Qemu-devel] [PATCH 08/17] mm: madvise MADV_USERFAULT

2014-10-07 Thread Andrea Arcangeli
Hi Kirill, On Tue, Oct 07, 2014 at 01:36:45PM +0300, Kirill A. Shutemov wrote: > On Fri, Oct 03, 2014 at 07:07:58PM +0200, Andrea Arcangeli wrote: > > MADV_USERFAULT is a new madvise flag that will set VM_USERFAULT in the > > vma flags. Whenever VM_USERFAULT is set in an anonymous vma, if > > user

Re: [Qemu-devel] [PATCH v2 37/36] qdev: device_del: search for to be unplugged device in 'peripheral' container

2014-10-07 Thread Andreas Färber
Am 07.10.2014 um 14:10 schrieb Igor Mammedov: > On Tue, 7 Oct 2014 19:59:51 +0800 > Zhu Guihua wrote: > >> On Thu, 2014-10-02 at 10:08 +, Igor Mammedov wrote: >>> device_add puts every device with 'id' inside of 'peripheral' >>> container using id's value as the last component name. >>> Use i

  1   2   3   >