Re: [Qemu-devel] [PATCH v5 07/33] target-arm: extend async excp masking

2014-10-07 Thread Peter Maydell
On 7 October 2014 04:16, Greg Bellows wrote: > > > On 6 October 2014 10:53, Peter Maydell wrote: >> > switch (excp_idx) { >> > case EXCP_FIQ: >> > -if (irq_can_hyp && (env->cp15.hcr_el2 & HCR_FMO)) { >> > -return true; >> > +if (arm_feature(env, ARM_FEATURE_

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

2014-10-07 Thread Peter Maydell
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 specifying two fieldoffsets per >> > register definition. This will allow us

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-07 Thread Michael S. Tsirkin
On Tue, Sep 30, 2014 at 10:43:09AM +0800, Chen, Tiejun wrote: > On 2014/9/29 18:01, Michael S. Tsirkin wrote: > >On Sun, Sep 28, 2014 at 10:59:05AM +0800, Chen, Tiejun wrote: > >>On 2014/9/3 9:40, Kay, Allen M wrote: > >>> > >>> > -Original Message- > From: Chen, Tiejun > Sent:

Re: [Qemu-devel] [Xen-devel] [PATCH 2/2] xen:i386:pc_piix: create isa bridge specific to IGD passthrough

2014-10-07 Thread Michael S. Tsirkin
On Sun, Sep 28, 2014 at 01:38:43PM +0800, Chen, Tiejun wrote: > >**errp) > >{ > > uint32_t value = 0; > > XenHostPCIDevice hdev; > > int r = 0, num; > > > > r = xen_host_pci_device_get(&hdev, 0, 0, 0x02, 0); > > if (!r) { > > value = hdev.device_id; > > > > num =

Re: [Qemu-devel] [PATCH] pcie: change confused comment clearer

2014-10-07 Thread Michael S. Tsirkin
On Tue, Oct 07, 2014 at 02:53:48PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > This comment applies to all functions below it. > It is not appropriate that called capability allocation > functions, change it into capability list management functions. > > Signed-off-by: Gonglei Ap

[Qemu-devel] [PATCH v11 02/34] bootindex: add check bootindex function

2014-10-07 Thread arei.gonglei
From: Gonglei Determine whether a given bootindex exists or not. If exists, we report an error. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- bootdevice.c| 15 +++ include/sysemu/sysemu.h | 1 + 2 files changed, 16 insertions(+) diff --git a/bootdevice.c b/bo

[Qemu-devel] [PATCH v11 03/34] bootindex: add del_boot_device_path function

2014-10-07 Thread arei.gonglei
From: Gonglei Introduce del_boot_device_path() to clean up fw_cfg content when hot-unplugging a device that refers to a bootindex or update a existent devcie's bootindex. Signed-off-by: Gonglei Signed-off-by: Chenliang Reviewed-by: Gerd Hoffmann --- bootdevice.c| 20 +

[Qemu-devel] [PATCH v11 10/34] eepro100: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/eepro100.c | 11 +++

[Qemu-devel] [PATCH v11 33/34] bootindex: delete bootindex when device is removed

2014-10-07 Thread arei.gonglei
From: Gonglei Device should be removed from global boot list when it is hot-unplugged. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- bootdevice.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootdevice.c b/bootdevice.c index 79c2327..56b1952 100644 --- a/bootdevice.c +++ b/bo

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Markus Armbruster
[Quoted material edited somewhat to provide better context] Paolo Bonzini writes: > Il 02/10/2014 16:59, Markus Armbruster ha scritto: >> Andreas Färber writes: >> >>> Am 02.10.2014 um 16:21 schrieb Markus Armbruster: Andreas Färber writes: > Am 02.10.2014 um 15:21 schrieb Stefa

[Qemu-devel] [PATCH v11 18/34] virtio-net: alias bootindex property explicitly for virt-net-pci/ccw/s390

2014-10-07 Thread arei.gonglei
From: Gonglei Since the "bootindex" property is a QOM property and not a qdev property now, we must alias it explicitly for virtio-net-pci, as well as CCW and s390-virtio. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/s390x/s390-virtio-bus.c | 2 ++ hw/s390x/virtio-ccw.c | 2 +

[Qemu-devel] [PATCH v11 08/34] virtio-net: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/virtio-net.c | 3 ++

[Qemu-devel] [PATCH v11 23/34] isa-fdc: remove bootindexA/B property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindexA/B form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/block/fdc.c | 15 +-- 1 file changed, 13 insertions(+

[Qemu-devel] [PATCH v11 19/34] host-libusb: remove bootindex property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindex form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/usb/host-libusb.c | 12 +++- 1 file changed, 11 insertions(+

[Qemu-devel] [PATCH v11 07/34] bootindex: add a setter/getter functions wrapper for bootindex property

2014-10-07 Thread arei.gonglei
From: Gonglei when we remove bootindex form qdev.property to qom.property, we can use those functions set/get bootindex property for all correlative devices. Meanwhile set the initial value of bootindex to -1. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- bootdevice.c| 73

[Qemu-devel] [PATCH v11 11/34] ne2000: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. At present, isa_ne2000 device does not support to boot os, so we register two sepra

[Qemu-devel] [PATCH v11 27/34] block: remove bootindex property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindex form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/scsi/scsi-bus.c | 3 ++- hw/scsi/scsi-disk.c | 1 - hw/sc

[Qemu-devel] [PATCH v11 20/34] pci-assign: remove bootindex property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindex form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/i386/kvm/pci-assign.c | 12 +++- 1 file changed, 11 insertio

[Qemu-devel] [PATCH v11 16/34] usb-net: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/usb/dev-network.c | 11

[Qemu-devel] [PATCH v11 14/34] spapr_lian: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/spapr_llan.c | 10 +

[Qemu-devel] [PATCH v11 13/34] rtl8139: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/rtl8139.c | 10

[Qemu-devel] [PATCH v11 01/34] bootdevice: move bootdevice related code to new file bootdevice.c

2014-10-07 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- Makefile.target | 2 +- bootdevice.c| 142 include/sysemu/sysemu.h | 1 + vl.c| 118 +--- 4 files

[Qemu-devel] [PATCH v11 31/34] ide: add calling add_boot_device_patch in bootindex setter function

2014-10-07 Thread arei.gonglei
From: Gonglei On this way, we can assure the new bootindex take effect during vm rebooting. Meanwhile set the initial value of bootindex to -1. Because ide devcies's unit property maybe do not initialize when set_bootindex function is called, so that we don't know its suffix. So we have to save

[Qemu-devel] [PATCH v11 21/34] vfio: remove bootindex property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindex form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/misc/vfio.c | 12 +++- 1 file changed, 11 insertions(+), 1 d

[Qemu-devel] [PATCH v11 09/34] e1000: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/e1000.c | 10 ++

[Qemu-devel] [PATCH v11 12/34] pcnet: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/lance.c | 12 ++

Re: [Qemu-devel] [PATCH v4 00/47] Postcopy implementation

2014-10-07 Thread Dr. David Alan Gilbert
* Cristian Klein (cristian.kl...@cs.umu.se) wrote: > On 04 Oct 2014, at 4:21 , Dr. David Alan Gilbert wrote: > > > > > I've updated our github at: > > https://github.com/orbitfp7/qemu/tree/wp3-postcopy > > > > to have this version. > > > > and it corresponds to the tag: > > https://github.com/

[Qemu-devel] [PATCH v11 15/34] vmxnet3: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/net/vmxnet3.c | 8 +

[Qemu-devel] [PATCH v11 26/34] virtio-blk: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/block/virtio-blk.c | 3

[Qemu-devel] [PATCH v11 30/34] nvma: ide: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei At present, nvma cannot boot. However, it provides already a bootindex property, so change bootindex to qom for nvma device, but not call add_boot_device_path. Signed-off-by: Gonglei --- hw/block/nvme.c | 44 1 file changed, 44 inserti

[Qemu-devel] [PATCH v11 05/34] bootindex: rework add_boot_device_path function

2014-10-07 Thread arei.gonglei
From: Gonglei Add the function of updating bootindex about fw_boot_order list in add_boot_device_path(). We should delete the old one if a device has existed in global fw_boot_order list. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- bootdevice.c | 2 ++ 1 file changed, 2 insertions(+

[Qemu-devel] [PATCH v11 06/34] bootindex: support to set a existent device's bootindex to -1

2014-10-07 Thread arei.gonglei
From: Gonglei When set a device's bootindex to -1, we remove it from global fw_boot_order list. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- bootdevice.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bootdevice.c b/bootdevice.c index aac0ffb..a38479a 100644 --- a/bootdevice.c +

[Qemu-devel] [PATCH v11 22/34] redirect: remove bootindex property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindex form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/usb/redirect.c | 12 +++- 1 file changed, 11 insertions(+),

[Qemu-devel] [PATCH v11 24/34] scsi: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/scsi/scsi-bus.c | 11 ++

[Qemu-devel] [PATCH v11 34/34] bootindex: change fprintf to error_report

2014-10-07 Thread arei.gonglei
From: Gonglei The function may be called by qmp command, we should report error message to the caller. Signed-off-by: Gonglei --- bootdevice.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootdevice.c b/bootdevice.c index 56b1952..b29970c 100644 --- a/bootdevice.c +++

[Qemu-devel] [PATCH v11 28/34] virtio-blk: alias bootindex property explicitly for virt-blk-pci/ccw/s390

2014-10-07 Thread arei.gonglei
From: Gonglei Since the "bootindex" property is a QOM property and not a qdev property now, we must alias it explicitly for virtio-blk-pci, as well as CCW and s390-virtio. Signed-off-by: Gonglei --- hw/s390x/s390-virtio-bus.c | 2 ++ hw/s390x/virtio-ccw.c | 2 ++ hw/virtio/virtio-pci.c

[Qemu-devel] [PATCH v11 32/34] bootindex: move calling add_boot_device_patch to bootindex setter function

2014-10-07 Thread arei.gonglei
From: Gonglei On this way, we can assure the new bootindex take effect during vm rebooting. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- bootdevice.c | 2 ++ hw/block/fdc.c | 3 --- hw/block/virtio-blk.c| 2 -- hw/i386/kvm/pci-assign.c | 2 -- hw/misc/vfio.c

[Qemu-devel] [PATCH v11 29/34] usb-storage: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Because usb-storage rely on scsi-disk which is created in usb_msg_realize_storage()

[Qemu-devel] [PATCH v11 04/34] fw_cfg: add fw_cfg_machine_reset function

2014-10-07 Thread arei.gonglei
From: Gonglei We must assure that the changed bootindex can take effect when guest is rebooted. So we introduce fw_cfg_machine_reset(), which change the fw_cfg file's bootindex data using the new global fw_boot_order list. Signed-off-by: Chenliang Signed-off-by: Gonglei Reviewed-by: Gerd Hoffm

[Qemu-devel] [PATCH v11 25/34] ide: add bootindex to qom property

2014-10-07 Thread arei.gonglei
From: Gonglei Add a qom property with the same name 'bootindex', when we remove it form qdev property, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- hw/ide/qdev.c | 42 +++

[Qemu-devel] [PATCH v11 00/34] modify boot order of guest, and take effect after rebooting

2014-10-07 Thread arei.gonglei
From: Gonglei Changes since v10: 1. add handler for virtio-blk-pci/s390/ccw in PATCH 28. 2. add especial bootidnex setter/getter functions for usb-storage device in PATCH 29. 3. add bootindex qom property for nvma and ne2k_isa devices, avoid regrassion in PATCH 30. 4. change fprintf t

[Qemu-devel] [PATCH v11 17/34] net: remove bootindex property from qdev to qom

2014-10-07 Thread arei.gonglei
From: Gonglei Remove bootindex form qdev property to qom, things will continue to work just fine, and we can use qom features which are not supported by qdev property. Signed-off-by: Gonglei Reviewed-by: Gerd Hoffmann --- include/net/net.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(

Re: [Qemu-devel] [PATCH] linuxboot: compute initrd loading address

2014-10-07 Thread Michael S. Tsirkin
On Mon, Oct 06, 2014 at 04:49:57PM +0200, Paolo Bonzini wrote: > Even though hw/i386/pc.c tries to compute a valid loading address for the > initrd, close to the top of RAM, this does not take into account other > data that is malloced into that memory by SeaBIOS. > > Luckily we can easily look at

Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops

2014-10-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > > > +/* These are ORable flags */ > > ... make them an "enum". OK, will do - I'd generally tended to avoid using enum for things that were ORable where the combinations weren't thems

Re: [Qemu-devel] [PATCH 07/17] mm: madvise MADV_USERFAULT: prepare vm_flags to allow more than 32bits

2014-10-07 Thread Kirill A. Shutemov
On Fri, Oct 03, 2014 at 07:07:57PM +0200, Andrea Arcangeli wrote: > We run out of 32bits in vm_flags, noop change for 64bit archs. > > Signed-off-by: Andrea Arcangeli > --- > fs/proc/task_mmu.c | 4 ++-- > include/linux/huge_mm.h | 4 ++-- > include/linux/ksm.h | 4 ++-- > include/li

Re: [Qemu-devel] [PATCH v4 08/47] socket shutdown

2014-10-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > +#ifndef WIN32 > > +if (rd) { > > +how = SHUT_RD; > > +} > > + > > +if (wr) { > > +how = rd ? SHUT_RDWR : SHUT_WR; > > +} > > + > > +#else > > +/* Unt

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 10:01, Markus Armbruster ha scritto: > "Automatic arrayification" isn't about array-valued properties, it's a > convenience feature for creating a bunch of properties with a common > type, accessors and so forth, named in a peculiar way: "foo[0]", > "foo[1]", ... > > The feature save

Re: [Qemu-devel] [PATCH] linuxboot: compute initrd loading address

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 10:46, Michael S. Tsirkin ha scritto: > On Mon, Oct 06, 2014 at 04:49:57PM +0200, Paolo Bonzini wrote: >> Even though hw/i386/pc.c tries to compute a valid loading address for the >> initrd, close to the top of RAM, this does not take into account other >> data that is malloced into t

Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 10:58, Dr. David Alan Gilbert ha scritto: > >>> > > +if (exitcode & LOADVM_EXITCODE_QUITPARENT) { >>> > > +DPRINTF("loadvm_handlers_state_main: End of loop with >>> > > QUITPARENT"); >>> > > +exitcode &= ~LOADVM_EXITCODE_QUITPARENT; >>> > > +exitcode &= L

Re: [Qemu-devel] [PATCH v4 19/47] Rework loadvm path for subloops

2014-10-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 07/10/2014 10:58, Dr. David Alan Gilbert ha scritto: > > > >>> > > +if (exitcode & LOADVM_EXITCODE_QUITPARENT) { > >>> > > +DPRINTF("loadvm_handlers_state_main: End of loop with > >>> > > QUITPARENT"); > >>> > > +exitcode &= ~L

Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy

2014-10-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > +mis->postcopy_ram_state); > > +if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) { > > +/* > > + * Where a migration had postcopy enabled (and

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

2014-10-07 Thread Kirill A. Shutemov
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 > userland touches a still unmapped virtual address, a sigbus signal is > sent instead of allo

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

2014-10-07 Thread Dr. David Alan Gilbert
* Kirill A. Shutemov (kir...@shutemov.name) 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 > > userland touches a still unmapped

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

2014-10-07 Thread Kirill A. Shutemov
On Tue, Oct 07, 2014 at 11:46:04AM +0100, Dr. David Alan Gilbert wrote: > * Kirill A. Shutemov (kir...@shutemov.name) 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 V

[Qemu-devel] [PATCH 1/8] linux-headers: update to 3.17-rc7

2014-10-07 Thread Cornelia Huck
From: Jens Freimann Sync headers with 3.17-rc7 Acked-by: Paolo Bonzini Signed-off-by: Jens Freimann Signed-off-by: Cornelia Huck --- linux-headers/asm-mips/kvm_para.h |6 +- linux-headers/asm-powerpc/kvm.h |2 ++ linux-headers/asm-x86/kvm.h |3 +++ linux-headers/linux

[Qemu-devel] [PATCH 2/8] s390x/kvm: introduce proper states for s390 cpus

2014-10-07 Thread Cornelia Huck
From: David Hildenbrand Until now, when a s390 cpu was stopped or halted, the number of running CPUs was tracked in a global variable. This was problematic for migration, so Jason came up with a per-cpu running state. As it turns out, we want to track the full logical state of a target vcpu, so w

[Qemu-devel] [PATCH 7/8] s390x/migration: migrate CPU state

2014-10-07 Thread Cornelia Huck
From: Thomas Huth This patch provides the cpu save information for dumps and later life migration and enables migration of the CPU state. The code is based on earlier work from Christian Borntraeger and Jason Herne. Signed-off-by: Thomas Huth Signed-off-by: David Hildenbrand [provide cpu_post_

[Qemu-devel] [PATCH 0/8] pending s390x patches for 2.2

2014-10-07 Thread Cornelia Huck
Here's what I currently have on git://github.com/cohuck/qemu s390-next A headers update, cpu state handling in qemu and migration, and a vhost-scsi-ccw bugfix. The gdb patch needs further discussion. I plan to send a pull request later this week. Cornelia Huck (1): s390x/virtio-ccw: fix vhost

[Qemu-devel] [PATCH 3/8] s390x/kvm: proper use of the cpu states OPERATING and STOPPED

2014-10-07 Thread Cornelia Huck
From: David Hildenbrand This patch makes sure that halting a cpu and stopping a cpu are two different things. Stopping a cpu will also set the cpu halted - this is needed for common infrastructure to work (note that the stop and stopped flag cannot be used for our purpose because they are already

[Qemu-devel] [PATCH 6/8] s390x/kvm: synchronize the cpu state after SIGP (INITIAL) CPU RESET

2014-10-07 Thread Cornelia Huck
From: David Hildenbrand We need to synchronize registers after a reset has been performed. The current code does that in qemu_system_reset(), load_normal_reset() and modified_clear_reset() for all vcpus. After SIGP (INITIAL) CPU RESET, this needs to be done for the targeted vcpu as well, so let's

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

2014-10-07 Thread Dr. David Alan Gilbert
* Kirill A. Shutemov (kir...@shutemov.name) wrote: > On Tue, Oct 07, 2014 at 11:46:04AM +0100, Dr. David Alan Gilbert wrote: > > * Kirill A. Shutemov (kir...@shutemov.name) wrote: > > > On Fri, Oct 03, 2014 at 07:07:58PM +0200, Andrea Arcangeli wrote: > > > > MADV_USERFAULT is a new madvise flag th

[Qemu-devel] [PATCH 5/8] s390x/kvm: reuse kvm_s390_reset_vcpu() to get rid of ifdefs

2014-10-07 Thread Cornelia Huck
From: David Hildenbrand This patch reuses kvm_s390_reset_vcpu() to get rid of some CONFIG_KVM and CONFIG_USER_ONLY ifdefs in cpu.c. In order to get rid of CONFIG_USER_ONLY, kvm_s390_reset_vcpu() has to provide a dummy implementation - the two definitions are moved to the proper section in cpu.h.

[Qemu-devel] [PATCH 8/8] s390x/virtio-ccw: fix vhost-scsi intialization

2014-10-07 Thread Cornelia Huck
The vhost-scsi-ccw backend is of type VHostSCSICcw, not VirtIOSCSICcw. This fixes a segfault when invoking qemu-system-s390x -device vhost-scsi-ccw,? Reviewed-by: Thomas Huth Signed-off-by: Cornelia Huck --- hw/s390x/virtio-ccw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-10-07 Thread Andrew Jones
On Mon, Sep 22, 2014 at 02:20:09PM +0300, Michael S. Tsirkin wrote: > On Fri, Sep 19, 2014 at 04:42:59PM +0800, zhanghailiang wrote: > > On 2014/9/19 15:34, zhanghailiang wrote: > > >On 2014/9/19 7:17, Andrew Jones wrote: > > >>Replace all the fprintf(stderr, ...) calls with error_report. > > >>Als

Re: [Qemu-devel] [PATCH v4 08/47] socket shutdown

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 12:00, Dr. David Alan Gilbert ha scritto: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: >>> +#ifndef WIN32 >>> +if (rd) { >>> +how = SHUT_RD; >>> +} >>> + >>> +if (wr) { >>> +how = rd ? SHUT_

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

2014-10-07 Thread Kirill A. Shutemov
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, but this is not a limitation when used to handle userland page > faults with MADV_USERFAU

Re: [Qemu-devel] [PATCH v4 47/47] End of migration for postcopy

2014-10-07 Thread Paolo Bonzini
Il 07/10/2014 12:29, Dr. David Alan Gilbert ha scritto: > You mean something like this (untested) ? > > if (mis->postcopy_ram_state != POSTCOPY_RAM_INCOMING_NONE) { > if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) { > /* >* Where a migration had postcopy

[Qemu-devel] [PATCH 4/8] s390x/kvm: propagate s390 cpu state to kvm

2014-10-07 Thread Cornelia Huck
From: David Hildenbrand Let QEMU propagate the cpu state to kvm. If kvm doesn't yet support it, it is silently ignored as kvm will still handle the cpu state itself in that case. The state is not synced back, thus kvm won't have a chance to actively modify the cpu state. To do so, control has to

[Qemu-devel] [PATCH v3] ivshmem: use error_report

2014-10-07 Thread Andrew Jones
Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. While at it cleanup some indentation in the printf argument lists. Signed-off-by: Andrew Jones --- v3: fix indentation of printf argument lists [Hailiang Z

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

2014-10-07 Thread Kirill A. Shutemov
On Tue, Oct 07, 2014 at 12:01:02PM +0100, Dr. David Alan Gilbert wrote: > * Kirill A. Shutemov (kir...@shutemov.name) wrote: > > On Tue, Oct 07, 2014 at 11:46:04AM +0100, Dr. David Alan Gilbert wrote: > > > * Kirill A. Shutemov (kir...@shutemov.name) wrote: > > > > On Fri, Oct 03, 2014 at 07:07:58P

Re: [Qemu-devel] [PATCH v4 37/47] Page request: Consume pages off the post-copy queue

2014-10-07 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 03/10/2014 19:47, Dr. David Alan Gilbert (git) ha scritto: > > +/* > > + * Don't break host-page chunks up with queue items > > + * so only unqueue if, > > + * a) The last item came from the queue anyway > > +

Re: [Qemu-devel] [RFC PATCH] target-i386: move generic memory hotplug methods to DSDTs

2014-10-07 Thread Igor Mammedov
On Mon, 6 Oct 2014 16:51:53 +0200 Paolo Bonzini wrote: > This makes it simpler to keep the SSDT byte-for-byte identical for a > given machine type, which is a goal we want to have for 2.2 and newer > types. > > This is not tested well and is still missing update of "make check" > data, but I wa

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

2014-10-07 Thread Markus Armbruster
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/blockdev.h | 1 - 4 files changed, 7 insertions(+), 10

[Qemu-devel] [PATCH v6 11/24] block: Eliminate DriveInfo member bdrv, use blk_by_legacy_dinfo()

2014-10-07 Thread Markus Armbruster
The patch is big, but all it really does is replacing dinfo->bdrv by blk_bs(blk_by_legacy_dinfo(dinfo)) The replacement is repetitive, but the conversion of device models to BlockBackend is imminent, and will shorten it to just blk_legacy_dinfo(dinfo). Line wrapping muddies the waters

[Qemu-devel] [PATCH v6 01/24] block: Split bdrv_new_root() off bdrv_new()

2014-10-07 Thread Markus Armbruster
Creating an anonymous BDS can't fail. Make that obvious. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Benoît Canet Reviewed-by: Kevin Wolf --- block.c | 28 +++- block/iscsi.c | 2 +- block/vvfat.c | 2 +- blockd

[Qemu-devel] [PATCH v6 08/24] block: Eliminate bdrv_iterate(), use bdrv_next()

2014-10-07 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block-migration.c | 30 +++--- block.c | 9 - blockdev.c| 31 +-- include/block/block.h | 2

[Qemu-devel] [PATCH v6 14/24] virtio-blk: Drop redundant VirtIOBlock member conf

2014-10-07 Thread Markus Armbruster
Commit 12c5674 turned it into a pointer to member blk.conf. Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- hw/block/virtio-blk.c | 28 ++-- include/hw/virtio/virtio-blk.h | 1 - 2 files changed, 1

[Qemu-devel] [PATCH v6 05/24] block: Code motion to get rid of stubs/blockdev.c

2014-10-07 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block/block-backend.c | 13 + blockdev.c| 11 --- include/sysemu/blockdev.h | 1 - stubs/Makefile.objs | 1 - stubs/blockdev.c

[Qemu-devel] [PATCH v6 10/24] block: Merge BlockBackend and BlockDriverState name spaces

2014-10-07 Thread Markus Armbruster
BlockBackend's name space is separate only to keep the initial patches simple. Time to merge the two. Retain bdrv_find() and bdrv_get_device_name() for now, to keep this series manageable. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz --- block.c | 48 -

[Qemu-devel] [PATCH v6 06/24] block: Make BlockBackend own its BlockDriverState

2014-10-07 Thread Markus Armbruster
On BlockBackend destruction, unref its BlockDriverState. Replaces the callers' unrefs. This turns the pointer from BlockBackend to BlockDriverState into a strong reference, managed with bdrv_ref() / bdrv_unref(). The back-pointer remains weak. Signed-off-by: Markus Armbruster Reviewed-by: Max

[Qemu-devel] [PATCH v6 00/24] Split BlockBackend off BDS with an axe

2014-10-07 Thread Markus Armbruster
My last attempt got bogged down because I tried to do a reasonably complete job, and the complexity proved more than I could handle with the limited amount of uninterrupted time available. This time, I'm cutting BlockBackend off with an axe, leaving most of the work for later. Done in this series

[Qemu-devel] [PATCH v6 02/24] block: New BlockBackend

2014-10-07 Thread Markus Armbruster
A block device consists of a frontend device model and a backend. A block backend has a tree of block drivers doing the actual work. The tree is managed by the block layer. We currently use a single abstraction BlockDriverState both for tree nodes and the backend as a whole. Drawbacks: * Its AP

[Qemu-devel] [PATCH v6 17/24] ide: Complete conversion from BlockDriverState to BlockBackend

2014-10-07 Thread Markus Armbruster
Add a BlockBackend member to TrimAIOCB, so ide_issue_trim_cb() can use blk_aio_discard() instead of bdrv_aio_discard(). Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- hw/ide/core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw

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

2014-10-07 Thread Markus Armbruster
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 blockdev.c| 73 ++

[Qemu-devel] [PATCH v6 21/24] block/qapi: Convert qmp_query_block() to BlockBackend

2014-10-07 Thread Markus Armbruster
Much more command code needs conversion. I start with this one because it's using bdrv_dev_* functions, which I'm about to lift into BlockBackend. While there, give bdrv_query_info() internal linkage. Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-b

[Qemu-devel] [PATCH v6 15/24] virtio-blk: Rename VirtIOBlkConf variables to conf

2014-10-07 Thread Markus Armbruster
This is consistent with how VirtIOFOOConf variables are named elsewhere, and makes blk available for BlockBackend variables. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz --- hw/block/dataplane/virtio-blk.c | 33 ++- hw/block/dataplane/virtio-blk.h | 2 +- hw/

[Qemu-devel] [PATCH v6 24/24] block: Make device model's references to BlockBackend strong

2014-10-07 Thread Markus Armbruster
Doesn't make a difference just yet, but it's the right thing to do. Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Kevin Wolf Reviewed-by: Max Reitz --- block/block-backend.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/block-backend.c b/block/block-bac

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

2014-10-07 Thread Markus Armbruster
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 works, we need a way to hide a BlockBackend, just l

[Qemu-devel] [PATCH v6 23/24] block: Lift device model API into BlockBackend

2014-10-07 Thread Markus Armbruster
Move device model attachment / detachment and the BlockDevOps device model callbacks and their wrappers from BlockDriverState to BlockBackend. Wrapper calls in block.c change from bdrv_dev_FOO_cb(bs, ...) to if (bs->blk) { bdrv_dev_FOO_cb(bs->blk, ...); } No change, because

[Qemu-devel] [PATCH v6 09/24] block: Eliminate BlockDriverState member device_name[]

2014-10-07 Thread Markus Armbruster
device_name[] can become non-empty only in bdrv_new_root() and bdrv_move_feature_fields(). The latter is used only to undo damage done by bdrv_swap(). The former is called only by blk_new_with_bs(). Therefore, when a BlockDriverState's device_name[] is non-empty, then it's been created with a Blo

[Qemu-devel] [PATCH v6 19/24] blockdev: Drop superfluous DriveInfo member id

2014-10-07 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block/block-backend.c | 1 - blockdev.c| 5 ++--- include/sysemu/blockdev.h | 1 - 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/block/block-backen

[Qemu-devel] [PATCH v6 12/24] block: Rename BlockDriverAIOCB* to BlockAIOCB*

2014-10-07 Thread Markus Armbruster
I'll use BlockDriverAIOCB with block backends shortly, and the name is going to fit badly there. It's a block layer thing anyway, not just a block driver thing. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz --- block-migration.c | 2 +- block.c | 124 +

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, 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 it by replacing recursive search on sysbus with path >

[Qemu-devel] [PATCH v6 22/24] blockdev: Convert qmp_eject(), qmp_change_blockdev() to BlockBackend

2014-10-07 Thread Markus Armbruster
Much more command code needs conversion. I'm converting these now because they're using bdrv_dev_* functions, which I'm about to lift into BlockBackend. Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- blockdev.c | 20 -

[Qemu-devel] [PATCH v6 20/24] blockdev: Fix blockdev-add not to create DriveInfo

2014-10-07 Thread Markus Armbruster
blockdev_init() always creates a DriveInfo, but only drive_new() fills it in. qmp_blockdev_add() leaves it blank. This results in a drive with type = IF_IDE, bus = 0, unit = 0. Screwed up in commit ee13ed1c. Board initialization code looking for IDE drive (0,0) can pick up one of these bogus dr

[Qemu-devel] [PATCH v6 13/24] block: Rename BlockDriverCompletionFunc to BlockCompletionFunc

2014-10-07 Thread Markus Armbruster
I'll use it with block backends shortly, and the name is going to fit badly there. It's a block layer thing anyway, not just a block driver thing. Signed-off-by: Markus Armbruster Reviewed-by: Max Reitz --- block.c | 30 +++--- block/archipelago.c

[Qemu-devel] [PATCH v6 18/24] pc87312: Drop unused members of PC87312State

2014-10-07 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Benoît Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- include/hw/isa/pc87312.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/isa/pc87312.h b/include/hw/isa/pc87312.h index befc8bd..bf74470 100644 --- a/include/hw/isa/pc

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 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 it by replacing recursive search on sysbus with path > lookup in 'peripheral' container, which could handle both > B

Re: [Qemu-devel] IDs in QOM

2014-10-07 Thread Markus Armbruster
Paolo Bonzini writes: > Il 07/10/2014 10:01, Markus Armbruster ha scritto: >> "Automatic arrayification" isn't about array-valued properties, it's a >> convenience feature for creating a bunch of properties with a common >> type, accessors and so forth, named in a peculiar way: "foo[0]", >> "foo[

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

2014-10-07 Thread Linus Torvalds
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_ bytes from user space into a newly allocated page that gets mapped) t

  1   2   3   >