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

2015-04-14 Thread thh
A similar bug has been fixed already for rc3 (see http://git.qemu.org/?p=qemu.git;a=commit;h=cf811fff2ae20008f00455d0ab2212a4dea0b56f ). Could you please: 1) Try with rc3 to see whether it still happens there 2) Check whether your qemu binary is compiled as 32-bit or 64-bit application? (running

Re: [Qemu-devel] Failing iotests in v2.3.0-rc2 / master

2015-04-14 Thread Jeff Cody
On Tue, Apr 14, 2015 at 11:57:35AM +0200, Kevin Wolf wrote: > Am 11.04.2015 um 05:41 hat Andreas Färber geschrieben: > > Hi, > > > > 001 seems to hang for -qcow (or is not reasonably "quick": >5 min). > > > > 033 is failing for -vhdx. > > > > (Note that `make check-block` only tests -qcow2, so d

[Qemu-devel] [PATCH v1 0/1] s390 pci infrastucture modeling

2015-04-14 Thread Hong Bo Li
This patch extends the current s390 pci implementation to provide more flexibility in configuration of s390 specific device handling. For this we had to introduce a new facility (and bus) to hold devices representing information actually provided by s390 firmware and I/O configuration. For each vf

[Qemu-devel] [PATCH v1 1/1] s390 pci infrastructure modeling

2015-04-14 Thread Hong Bo Li
This patch contains the actual interesting changes. usage example: -device s390-pcihost -device vfio-pci,host=:00:00.0,id=vpci1 -device zpci,fid=2,uid=5,pci_id=vpci1,id=zpci1 The first line will create a s390 pci host bridge and init the root bus. The second line will create a standard vfio pc

Re: [Qemu-devel] [PATCH qemu v6 02/15] vmstate: Define VARRAY with VMS_ALLOC

2015-04-14 Thread David Gibson
On Sat, Apr 11, 2015 at 01:24:31AM +1000, Alexey Kardashevskiy wrote: > This allows dynamic allocation for migrating arrays. > > Already existing VMSTATE_VARRAY_UINT32 requires an array to be > pre-allocated, however there are cases when the size is not known in > advance and there is no real need

[Qemu-devel] [PATCH] vhost: pass corrent log base to kernel

2015-04-14 Thread Wen Congyang
Signed-off-by: Wen Congyang --- hw/virtio/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 5a12861..4e334ca 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1060,7 +1060,7 @@ int vhost_dev_start(struct vhost_dev *hde

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

2015-04-14 Thread vt
On 2015/4/15 9:08, Rob Landley wrote: > On Mon, Apr 13, 2015 at 6:29 AM, vt wrote: >> Hi, guys >> >> I saw the architecture code about mips in the qemu and kvm modules, so it is >> no doubt that mips cpu can be supported. > > It looks like the 32 bit one should work fine. I haven't played with >

Re: [Qemu-devel] [PATCH v4 01/20] hw/i386: Move ACPI header definitions in an arch-independent location

2015-04-14 Thread Shannon Zhao
On 2015/4/3 18:03, Shannon Zhao wrote: > From: Shannon Zhao > > The ACPI related header file acpi-defs.h, includes definitions that > apply on other architectures as well. Move it in `include/hw/acpi/` > to sanely include it from other architectures. > > Signed-off-by: Alvise Rigo > Signed-off-

[Qemu-devel] [PATCH] s390x: Fix stoc direction

2015-04-14 Thread Alexander Graf
The store conditional instruction wants to store when the condition is fulfilled, so we should branch out when it's not true. The code today branches out when the condition is true, clearly reversing the logic. Fix it up by negating the condition. Signed-off-by: Alexander Graf --- target-s390x/

Re: [Qemu-devel] [PATCH v2 01/14] memory: Define API for MemoryRegionOps to take attrs and return status

2015-04-14 Thread Edgar E. Iglesias
On Mon, Apr 13, 2015 at 02:21:51PM +0100, Peter Maydell wrote: > Define an API so that devices can register MemoryRegionOps whose read > and write callback functions are passed an arbitrary pointer to some > transaction attributes and can return a success-or-failure status code. > This will allow u

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

2015-04-14 Thread Rob Landley
On Mon, Apr 13, 2015 at 6:29 AM, vt wrote: > Hi, guys > > I saw the architecture code about mips in the qemu and kvm modules, so it is > no doubt that mips cpu can be supported. It looks like the 32 bit one should work fine. I haven't played with 64 bit yet but there's some support for it in the

Re: [Qemu-devel] [PATCH] block/iscsi: do not forget to logout from target

2015-04-14 Thread ronnie sahlberg
Reviewed-By: Ronnie Sahlberg On Tue, Apr 14, 2015 at 1:37 AM, Peter Lieven wrote: > 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 inser

Re: [Qemu-devel] [V9fs-developer] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files

2015-04-14 Thread Al Viro
On Tue, Apr 14, 2015 at 04:19:41PM +, Eric Van Hensbergen wrote: > That patch looks fine by me. Happy to put it in the queue. Thanks Al. OK... Here's one more: 9p: don't bother with __getname() in ->follow_link() We copy there a kmalloc'ed string and proceed to kfree that string i

Re: [Qemu-devel] [PATCH v2 16/16] hw/intc/arm_gic: add gic_update() for grouping

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > GICs with grouping (GICv2 or GICv1 with Security Extensions) have a > different exception generation model which is more complicated than > without interrupt grouping. We add a new function to handle this model. > > Signe

Re: [Qemu-devel] [PATCH v2 15/16] hw/intc/arm_gic: Break out gic_update() function

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > Prepare to split gic_update() in two functions, one for GICs with > interrupt grouping and one without grouping (existing). > > Signed-off-by: Fabian Aggeler > --- > hw/intc/arm_gic.c | 11 --- > hw/intc/gi

Re: [Qemu-devel] [PATCH v2 11/16] hw/intc/arm_gic: Handle grouping for GICC_HPPIR

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > Grouping (GICv2) and Security Extensions change the behaviour of reads > of the highest priority pending interrupt register (ICCHPIR/GICC_HPPIR). > > Signed-off-by: Fabian Aggeler > --- > hw/intc/arm_gic.c | 29 +++

Re: [Qemu-devel] [PATCH v2 14/16] hw/intc/arm_gic: Restrict priority view

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > GICs with Security Extensions restrict the non-secure view of the > interrupt priority and priority mask registers. > > Signed-off-by: Fabian Aggeler > --- > hw/intc/arm_gic.c | 66 > ++

Re: [Qemu-devel] [PATCH v2 13/16] hw/intc/arm_gic: Change behavior of IAR writes

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > Grouping (GICv2) and Security Extensions change the behavior of IAR > reads. Acknowledging Group0 interrupts is only allowed from Secure > state and acknowledging Group1 interrupts from Secure state is only > allowed if A

Re: [Qemu-devel] [PATCH v2 12/16] hw/intc/arm_gic: Change behavior of EOIR writes

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > Grouping (GICv2) and Security Extensions change the behavior of EOIR > writes. Completing Group0 interrupts is only allowed from Secure state > and completing Group1 interrupts from Secure state is only allowed if > AckCt

Re: [Qemu-devel] [PATCH v2 10/16] hw/intc/arm_gic: Implement Non-secure view of RPR

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > For GICs with Security Extensions Non-secure reads have a restricted > view on the current running priority. > > Signed-off-by: Fabian Aggeler > --- > hw/intc/arm_gic.c | 17 - > hw/intc/gic_interna

Re: [Qemu-devel] [PATCH v2 09/16] hw/intc/arm_gic: Make ICCBPR/GICC_BPR banked

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > This register is banked in GICs with Security Extensions. Storing the > non-secure copy of BPR in the abpr, which is an alias to the non-secure > copy for secure access. ABPR itself is only accessible from secure state >

Re: [Qemu-devel] [PATCH v2 08/16] hw/intc/arm_gic: Make ICCICR/GICC_CTLR banked

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > ICCICR/GICC_CTLR is banked in GICv1 implementations with Security > Extensions or in GICv2 in independent from Security Extensions. > This makes it possible to enable forwarding of interrupts from > the CPU interfaces to

Re: [Qemu-devel] [PATCH v2 00/16] target-arm: Add GICv1/SecExt and GICv2/Grouping

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:11, Greg Bellows wrote: > This patch series adds ARM GICv1 and GICv2 security extension support. As a > result GIC interrupt grouping and FIQ enablement have also been added. FIQ > enablement is limited to ARM the ARM vexpress and virt machines. > > At the current moment

Re: [Qemu-devel] [PATCH v2 07/16] hw/intc/arm_gic: Make ICDDCR/GICD_CTLR banked

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > ICDDCR/GICD_CTLR is banked in GICv1 implementations with Security > Extensions or in GICv2 in independent from Security Extensions. > This makes it possible to enable forwarding of interrupts from > Distributor to the CPU

Re: [Qemu-devel] [PATCH v2 06/16] hw/intc/arm_gic: Add Interrupt Group Registers

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > Interrupt Group Registers (previously called Interrupt Security > Registers) as defined in GICv1 with Security Extensions or GICv2 allow > to configure interrupts as Secure (Group0) or Non-secure (Group1). > In GICv2 thes

Re: [Qemu-devel] [PATCH v2 05/16] hw/intc/arm_gic: Add ns_access() function

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > Security Extensions for GICv1 and GICv2 use register banking > to provide transparent access to seperate Secure and Non-secure > copies of GIC configuration registers. This function will later > be replaced by code determ

Re: [Qemu-devel] [PATCH v2 04/16] hw/intc/arm_gic: Add Security Extensions property

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:12, Greg Bellows wrote: > From: Fabian Aggeler > > The existing implementation does not support Security Extensions mentioned > in the GICv1 and GICv2 architecture specification. Security Extensions are > not available on all GICs. This property makes it possible to enabl

Re: [Qemu-devel] [PATCH v2 02/16] hw/arm/vexpress.c: Wire FIQ between CPU <> GIC

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:11, Greg Bellows wrote: > From: Fabian Aggeler > > Connect FIQ output of the GIC CPU interfaces to the CPUs. > > Signed-off-by: Fabian Aggeler > --- > hw/arm/vexpress.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c > in

Re: [Qemu-devel] [PATCH v2 01/16] hw/intc/arm_gic: Request FIQ sources

2015-04-14 Thread Peter Maydell
On 30 October 2014 at 22:11, Greg Bellows wrote: > From: Fabian Aggeler > > Preparing for FIQ lines from GIC to CPUs, which is needed for GIC > Security Extensions. > > Signed-off-by: Fabian Aggeler (Yes, this is review on a six month old patchset. My punishment for taking so long to get to thi

Re: [Qemu-devel] feature proposal: checkpoint-assisted migration

2015-04-14 Thread Dr. David Alan Gilbert
* Thomas Knauth (thomas.kna...@googlemail.com) wrote: > Dear list, > > my research revolves around cloud computing, virtual machines and > migration. In this context I came across the following: a recent study > by IBM indicates that a typical VM only migrates between a small set > of physical ser

Re: [Qemu-devel] [PATCH v6 27/47] MIGRATION_STATUS_POSTCOPY_ACTIVE: Add new migration state

2015-04-14 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 04/14/2015 11:03 AM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > 'MIGRATION_STATUS_POSTCOPY_ACTIVE' is entered after migrate_start_postcopy > > > > 'migration_postcopy_phase' is provided for other sections to know if

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

2015-04-14 Thread Liviu Ionescu
> On 08 Apr 2015, at 19:20, Leon Alrae wrote: > > ... I do understand > however that in your particular case cmdline is more convenient, thus I > personally don’t mind having both options: the user-friendly cmdline and > more flexible arg. I was a bit optimistic with the first implementation of

Re: [Qemu-devel] [PATCH v6 27/47] MIGRATION_STATUS_POSTCOPY_ACTIVE: Add new migration state

2015-04-14 Thread Eric Blake
On 04/14/2015 11:03 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > 'MIGRATION_STATUS_POSTCOPY_ACTIVE' is entered after migrate_start_postcopy > > 'migration_postcopy_phase' is provided for other sections to know if > they're in postcopy. > > Signed-off-by: Dr. Davi

Re: [Qemu-devel] [PATCH v6 26/47] migrate_start_postcopy: Command to trigger transition to postcopy

2015-04-14 Thread Dr. David Alan Gilbert
* Eric Blake (ebl...@redhat.com) wrote: > On 04/14/2015 11:03 AM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Once postcopy is enabled (with migrate_set_capability), the migration > > will still start on precopy mode. To cause a transition into postcopy > > the

Re: [Qemu-devel] [PATCH v6 26/47] migrate_start_postcopy: Command to trigger transition to postcopy

2015-04-14 Thread Eric Blake
On 04/14/2015 11:03 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Once postcopy is enabled (with migrate_set_capability), the migration > will still start on precopy mode. To cause a transition into postcopy > the: > > migrate_start_postcopy > > command must be

[Qemu-devel] Cross-Compiling Static QEMU for Windows

2015-04-14 Thread Liviu Ionescu
> [1] http://gnuarmeclipse.livius.net/wiki/How_to_build_QEMU this page is quite old, there is a new one in my wiki, and in the latest Windows builds I no longer use the --static option, but... I don't remember exactly the reason for this... regards, Liviu

[Qemu-devel] [Bug 1438144] Re: Page sizes are not interpreted correctly for E500/E500MC

2015-04-14 Thread WGH
You're absolutely right. Sorry for bothering. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1438144 Title: Page sizes are not interpreted correctly for E500/E500MC Status in QEMU: Invalid Bug d

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

2015-04-14 Thread luigiburdo
Public bug reported: this appened to me with last 2.3.0 rc 2 qemu-system-x86-64 crash , with only 2047 or 1024 -m option and -hda set qemu: fatal: Trying to execute code outside RAM or ROM at 0x00181f9a000a EAX= EBX= ECX= EDX=0663 ESI= EDI= EBP=00

[Qemu-devel] [PATCH v6 47/47] Inhibit ballooning during postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy detects accesses to pages that haven't been transferred yet using userfaultfd, and it causes exceptions on pages that are 'not present'. Ballooning also causes pages to be marked as 'not present' when the guest inflates the balloon. Potentially a balloon co

[Qemu-devel] [PATCH v6 45/47] End of migration for postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Tweak the end of migration cleanup; we don't want to close stuff down at the end of the main stream, since the postcopy is still sending pages on the other thread. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 25 - tra

[Qemu-devel] [PATCH v6 44/47] postcopy: Wire up loadvm_postcopy_handle_ commands

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire up more of the handlers for the commands on the destination side, in particular loadvm_postcopy_handle_run now has enough to start the guest running. Signed-off-by: Dr. David Alan Gilbert --- savevm.c | 29 - trace-events | 2

[Qemu-devel] [PATCH v6 42/47] Postcopy; Handle userfault requests

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" userfaultfd is a Linux syscall that gives an fd that receives a stream of notifications of accesses to pages registered with it and allows the program to acknowledge those stalls and tell the accessing thread to carry on. Signed-off-by: Dr. David Alan Gilbert ---

[Qemu-devel] [PATCH v6 41/47] Host page!=target page: Cleanup bitmaps

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Prior to the start of postcopy, ensure that everything that will be transferred later is a whole host-page in size. This is accomplished by discarding partially transferred host pages and marking any that are partially dirty as fully dirty. Signed-off-by: Dr. Davi

[Qemu-devel] [PATCH v6 40/47] Don't sync dirty bitmaps in postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Once we're in postcopy the source processors are stopped and memory shouldn't change any more, so there's no need to look at the dirty map. There are two notes to this: 1) If we do resync and a page had changed then the page would get sent again, which the d

[Qemu-devel] [PATCH v6 43/47] Start up a postcopy/listener thread ready for incoming page data

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The loading of a device state (during postcopy) may access guest memory that's still on the source machine and thus might need a page fill; split off a separate thread that handles the incoming page data so that the original incoming migration code can finish off th

[Qemu-devel] [PATCH v6 38/47] Postcopy: Use helpers to map pages during migration

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In postcopy, the destination guest is running at the same time as it's receiving pages; as we receive new pages we must put them into the guests address space atomically to avoid a running CPU accessing a partially written page. Use the helpers in postcopy-ram.c to

[Qemu-devel] [PATCH v6 46/47] Disable mlock around incoming postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Userfault doesn't work with mlock; mlock is designed to nail down pages so they don't move, userfault is designed to tell you when they're not there. munlock the pages we userfault protect before postcopy. mlock everything again at the end if mlock is enabled. Sig

[Qemu-devel] [PATCH v6 34/47] Page request: Add MIG_RP_MSG_REQ_PAGES reverse command

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add MIG_RP_MSG_REQ_PAGES command on Return path for the postcopy destination to request a page from the source. Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h | 4 +++ migration/migration.c | 70 ++

[Qemu-devel] [PATCH v6 37/47] postcopy_ram.c: place_page and helpers

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" postcopy_place_page (etc) provide a way for postcopy to place a page into guests memory atomically (using the copy ioctl on the ufd). Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h| 1 + include/migration/postcopy-ram.h | 16

[Qemu-devel] [PATCH v6 35/47] Page request: Process incoming page request

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" On receiving MIG_RPCOMM_REQ_PAGES look up the address and queue the page. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 64 ++- include/exec/cpu-all.h| 2 -- include/migration/migration.

[Qemu-devel] [PATCH v6 31/47] postcopy: ram_enable_notify to switch on userfault

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Mark the area of RAM as 'userfault' Start up a fault-thread to handle any userfaults we might receive from it (to be filled in later) Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.h| 3 ++ include/migration/

[Qemu-devel] [PATCH v6 29/47] Postcopy: Maintain sentmap and calculate discard

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Where postcopy is preceeded by a period of precopy, the destination will have received pages that may have been dirtied on the source after the page was sent. The destination must throw these pages away before starting it's CPUs. Maintain a 'sentmap' of pages that

[Qemu-devel] [PATCH v6 39/47] qemu_ram_block_from_host

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy sends RAMBlock names and offsets over the wire (since it can't rely on the order of ramaddr being the same), and it starts out with HVA fault addresses from the kernel. qemu_ram_block_from_host translates a HVA into a RAMBlock, an offset in the RAMBlock an

[Qemu-devel] [PATCH v6 36/47] Page request: Consume pages off the post-copy queue

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When transmitting RAM pages, consume pages that have been queued by MIG_RPCOMM_REQPAGE commands and send them ahead of normal page scanning. Note: a) After a queued page the linear walk carries on from after the unqueued page; there is a reasonable chance that th

[Qemu-devel] [PATCH v6 33/47] Postcopy end in migration_thread

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The end of migration in postcopy is a bit different since some of the things normally done at the end of migration have already been done on the transition to postcopy. The end of migration code is getting a bit complciated now, so move out into its own function.

[Qemu-devel] [PATCH v6 25/47] postcopy: OS support test

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Provide a check to see if the OS we're running on has all the bits needed for postcopy. Creates postcopy-ram.c which will get most of the other helpers we need. Signed-off-by: Dr. David Alan Gilbert --- include/migration/postcopy-ram.h | 19 + migration/Mak

[Qemu-devel] [PATCH v6 21/47] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The state of the postcopy process is managed via a series of messages; * Add wrappers and handlers for sending/receiving these messages * Add state variable that track the current state of postcopy Signed-off-by: Dr. David Alan Gilbert --- include/migration

[Qemu-devel] [PATCH v6 28/47] Add qemu_savevm_state_complete_postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add qemu_savevm_state_complete_postcopy to complement qemu_savevm_state_complete_precopy together with a new save_live_complete_postcopy method on devices. The save_live_complete_precopy method is called on all devices during a precopy migration, and all non-postco

[Qemu-devel] [PATCH v6 30/47] postcopy: Incoming initialisation

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- arch_init.c | 11 include/migration/migration.h| 3 + include/migration/postcopy-ram.h | 12 migration/postcopy-ram.c | 116

[Qemu-devel] [PATCH v6 24/47] Modify save_live_pending for postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Modify save_live_pending to return separate postcopiable and non-postcopiable counts. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 8 ++-- include/migration/vmstate.h | 5 +++-- include/sysemu/sysemu.h | 4 +++- migration/blo

[Qemu-devel] [PATCH v6 18/47] Move loadvm_handlers into MigrationIncomingState

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In postcopy we need the loadvm_handlers to be used in a couple of different instances of the loadvm loop/routine, and thus it can't be local any more. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.h | 5 + i

[Qemu-devel] [PATCH v6 26/47] migrate_start_postcopy: Command to trigger transition to postcopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Once postcopy is enabled (with migrate_set_capability), the migration will still start on precopy mode. To cause a transition into postcopy the: migrate_start_postcopy command must be issued. Postcopy will start sometime after this (when it's next checked in t

[Qemu-devel] [PATCH v6 32/47] Postcopy: Postcopy startup in migration thread

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Rework the migration thread to setup and start postcopy. Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h | 3 + migration/migration.c | 163 -- trace-events | 4 ++ 3 fil

[Qemu-devel] [PATCH v6 22/47] MIG_CMD_PACKAGED: Send a packaged chunk of migration stream

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" MIG_CMD_PACKAGED is a migration command that wraps a chunk of migration stream inside a package whose length can be determined purely by reading its header. The destination guarantees that the whole MIG_CMD_PACKAGED is read off the stream prior to parsing the conte

[Qemu-devel] [PATCH v6 17/47] ram_debug_dump_bitmap: Dump a migration bitmap as text

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Misses out lines that are all the expected value so the output can be quite compact depending on the circumstance. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 40 +++- include/migration/migration.h

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

2015-04-14 Thread Dr. David Alan Gilbert (git)
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 Reviewed-by: David Gibson --- include/migration/migration.

[Qemu-devel] [PATCH v6 27/47] MIGRATION_STATUS_POSTCOPY_ACTIVE: Add new migration state

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" 'MIGRATION_STATUS_POSTCOPY_ACTIVE' is entered after migrate_start_postcopy 'migration_postcopy_phase' is provided for other sections to know if they're in postcopy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.

[Qemu-devel] [PATCH v6 12/47] Return path: socket_writev_buffer: Block even on non-blocking fd's

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The destination sets the fd to non-blocking on incoming migrations; this also affects the return path from the destination, and thus we need to make sure we can safely write to the return path. Signed-off-by: Dr. David Alan Gilbert --- migration/qemu-file-unix.c

[Qemu-devel] [PATCH v6 20/47] Add migration-capability boolean for postcopy-ram.

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The 'postcopy ram' capability allows postcopy migration of RAM; note that the migration starts off in precopy mode until postcopy mode is triggered (see the migrate_start_postcopy patch later in the series). Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Eric

[Qemu-devel] [PATCH v6 19/47] Rework loadvm path for subloops

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy needs to have two migration streams loading concurrently; one from memory (with the device state) and the other from the fd with the memory transactions. Split the core of qemu_loadvm_state out so we can use it for both. Allow the inner loadvm loop to qui

[Qemu-devel] [PATCH v6 16/47] Return path: Source handling of return path

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Open a return path, and handle messages that are received upon it. Signed-off-by: Dr. David Alan Gilbert --- include/migration/migration.h | 8 ++ migration/migration.c | 177 +- trace-events | 1

[Qemu-devel] [PATCH v6 10/47] Rename save_live_complete to save_live_complete_precopy

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" In postcopy we're going to need to perform the complete phase for postcopiable devices at a different point, start out by renaming all of the 'complete's to make the difference obvious. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 2 +-

[Qemu-devel] [PATCH v6 15/47] Return path: Send responses from destination to source

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add migrate_send_rp_message to send a message from destination to source along the return path. (It uses a mutex to let it be called from multiple threads) Add migrate_send_rp_shut to send a 'shut' message to indicate the destination is finished with the RP. Ad

[Qemu-devel] [PATCH v6 14/47] Return path: Control commands

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add two src->dest commands: * OPEN_RETURN_PATH - To request that the destination open the return path * PING - Request an acknowledge from the destination Signed-off-by: Dr. David Alan Gilbert Reviewed-by: David Gibson --- include/migration/migration.h |

[Qemu-devel] [PATCH v6 08/47] Add qemu_get_buffer_less_copy to avoid copies some of the time

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" qemu_get_buffer always copies the data it reads to a users buffer, however in many cases the file buffer inside qemu_file could be given back to the caller, avoiding the copy. This isn't always possible depending on the size and alignment of the data. Thus 'qemu_g

[Qemu-devel] [PATCH v6 07/47] Move copy out of qemu_peek_buffer

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" qemu_peek_buffer currently copies the data it reads into a buffer, however the next patch wants access to the buffer without the copy, hence rework to remove the copy to the layer above. Signed-off-by: Dr. David Alan Gilbert --- include/migration/qemu-file.h | 2

[Qemu-devel] [PATCH v6 09/47] Add wrapper for setting blocking status on a QEMUFile

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a wrapper to change the blocking status on a QEMUFile rather than having to use qemu_set_block(qemu_get_fd(f)); it seems best to avoid exposing the fd since not all QEMUFile's really have one. With this wrapper we could move the implementation down to be differ

[Qemu-devel] [PATCH v6 11/47] Return path: Open a return path on QEMUFile for sockets

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's using a dup'd fd. Signed-off-by: Dr. David Alan Gilbert --- include/migration/qemu-file.h | 7 + migration/qemu-f

[Qemu-devel] [PATCH v6 05/47] Create MigrationIncomingState

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" There are currently lots of pieces of incoming migration state scattered around, and postcopy is adding more, and it seems better to try and keep it together. allocate MIS in process_incoming_migration_co Signed-off-by: Dr. David Alan Gilbert --- include/migrati

[Qemu-devel] [PATCH v6 13/47] Migration commands

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Create QEMU_VM_COMMAND section type for sending commands from source to destination. These commands are not intended to convey guest state but to control the migration process. For use in postcopy. Signed-off-by: Dr. David Alan Gilbert --- include/migration/mig

[Qemu-devel] [PATCH v6 03/47] qemu_ram_foreach_block: pass up error value, and down the ramblock name

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" check the return value of the function it calls and error if it's non-0 Fixup qemu_rdma_init_one_block that is the only current caller, and rdma_add_block the only function it calls using it. Pass the name of the ramblock to the function; helps in debugging. Sig

[Qemu-devel] [PATCH v6 06/47] Provide runtime Target page information

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The migration code generally is built target-independent, however there are a few places where knowing the target page size would avoid artificially moving stuff into arch_init. Provide 'qemu_target_page_bits()' that returns TARGET_PAGE_BITS to other bits of code s

[Qemu-devel] [PATCH v6 01/47] Start documenting how postcopy works.

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- docs/migration.txt | 167 + 1 file changed, 167 insertions(+) diff --git a/docs/migration.txt b/docs/migration.txt index 0492a45..f975c75 100644 --- a/docs/migration.txt

[Qemu-devel] [PATCH v6 02/47] Split header writing out of qemu_savevm_state_begin

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Split qemu_savevm_state_begin to: qemu_savevm_state_header That writes the initial file header. qemu_savevm_state_beginThat sets up devices and does the first device pass. Used later in postcopy. Signed-off-by: Dr. David Alan

[Qemu-devel] [PATCH v6 04/47] Add qemu_get_counted_string to read a string prefixed by a count byte

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" and use it in loadvm_state and ram_load. Signed-off-by: Dr. David Alan Gilbert --- arch_init.c | 5 + include/migration/qemu-file.h | 3 +++ migration/qemu-file.c | 16 savevm.c | 11 ++

[Qemu-devel] [PATCH v6 00/47] Postcopy implementation

2015-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This is the 6th cut of my version of postcopy; it is designed for use with the Linux kernel additions posted by Andrea Arcangeli here: git clone --reference linux -b userfault18 git://git.kernel.org/pub/scm/linux/kernel/git/andrea/aa.git (Note this is a differe

Re: [Qemu-devel] [Spice-devel] [PATCH] spice: fix simple display on bigendian hosts

2015-04-14 Thread Denis Kirjanov
On 4/14/15, Denis Kirjanov wrote: > On 4/14/15, Denis Kirjanov wrote: >> On 4/14/15, Gerd Hoffmann wrote: >>> Denis Kirjanov is busy getting spice run on ppc64 and trapped into this >>> one. Spice wire format is little endian, so we have to explicitly say >>> we want little endian when letting

Re: [Qemu-devel] [Spice-devel] [PATCH] spice: fix simple display on bigendian hosts

2015-04-14 Thread Denis Kirjanov
On 4/14/15, Gerd Hoffmann wrote: > Denis Kirjanov is busy getting spice run on ppc64 and trapped into this > one. Spice wire format is little endian, so we have to explicitly say > we want little endian when letting pixman convert the data for us. > > Reported-by: Denis Kirjanov > Signed-off-by:

Re: [Qemu-devel] [Spice-devel] [PATCH] spice: fix simple display on bigendian hosts

2015-04-14 Thread Denis Kirjanov
On 4/14/15, Denis Kirjanov wrote: > On 4/14/15, Gerd Hoffmann wrote: >> Denis Kirjanov is busy getting spice run on ppc64 and trapped into this >> one. Spice wire format is little endian, so we have to explicitly say >> we want little endian when letting pixman convert the data for us. >> >> Rep

[Qemu-devel] feature proposal: checkpoint-assisted migration

2015-04-14 Thread Thomas Knauth
Dear list, my research revolves around cloud computing, virtual machines and migration. In this context I came across the following: a recent study by IBM indicates that a typical VM only migrates between a small set of physical servers; often just two. The potential for optimization is clear. By

[Qemu-devel] QUESTION:use tlb with alignment address

2015-04-14 Thread pandayt
hi all, When translate a read/write instruction, qemu will check tlb first, but why alignment is needed when read/write data is 2/4/8 bytes? For example, if there's a instruction which read a double word(such as mov ebx, [eax]), and the source address(i.e. eax) is 0x00401003, not aligns by

Re: [Qemu-devel] [PATCH 10/15] smbios: Add a function to directly add an entry

2015-04-14 Thread Paolo Bonzini
On 14/04/2015 08:31, Michael S. Tsirkin wrote: > On Mon, Apr 13, 2015 at 06:40:46PM +0200, Paolo Bonzini wrote: >> >> >> On 13/04/2015 18:34, Corey Minyard wrote: > I made this the same as the ACPI code, which you have to have as a > callback if you are adding it to a common SSDT. >>

Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Martin Kletzander
On Tue, Apr 14, 2015 at 10:07:00AM -0600, Eric Blake wrote: [adding qemu] On 04/14/2015 09:58 AM, Marc-André Lureau wrote: Hi On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander wrote: Is this not exposed in any way in QEMU? Do we really need to use this (what we're trying to avoid)? Tha

Re: [Qemu-devel] [V9fs-developer] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files

2015-04-14 Thread Eric Van Hensbergen
That patch looks fine by me. Happy to put it in the queue. Thanks Al. On Tue, Apr 14, 2015 at 11:07 AM Al Viro wrote: > On Mon, Apr 13, 2015 at 04:05:28PM +, Eric Van Hensbergen wrote: > > Well, technically fid 3 isn't 'open', only fid 2 is open - at least > > according to the protocol. f

Re: [Qemu-devel] [V9fs-developer] [Bug 1336794] Re: 9pfs does not honor open file handles on unlinked files

2015-04-14 Thread Al Viro
On Mon, Apr 13, 2015 at 04:05:28PM +, Eric Van Hensbergen wrote: > Well, technically fid 3 isn't 'open', only fid 2 is open - at least > according to the protocol. fid 3 and fid 2 are both clones of fid 1. > However, thanks for the alternative workaround. If you get a chance, can > you check

Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add QEMU_CAPS_MACHINE_VMPORT_OPT

2015-04-14 Thread Eric Blake
[adding qemu] On 04/14/2015 09:58 AM, Marc-André Lureau wrote: > Hi > > On Tue, Apr 14, 2015 at 4:25 PM, Martin Kletzander > wrote: > >> Is this not exposed in any way in QEMU? Do we really need to use this >> (what we're trying to avoid)? >> > > That works with the following change: > > dif

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-14 Thread Michael S. Tsirkin
On Tue, Apr 14, 2015 at 05:41:14PM +0200, Michael S. Tsirkin wrote: > On Tue, Apr 14, 2015 at 03:12:39PM +0200, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > --- > > hw/pci-host/q35.c | 17 - > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/hw/

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-14 Thread Michael S. Tsirkin
On Tue, Apr 14, 2015 at 03:12:39PM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/pci-host/q35.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c > index 79bab15..9227489 100644 > --- a/hw/pci-

Re: [Qemu-devel] [PATCH 10/15] smbios: Add a function to directly add an entry

2015-04-14 Thread Corey Minyard
On 04/14/2015 01:31 AM, Michael S. Tsirkin wrote: > On Mon, Apr 13, 2015 at 06:40:46PM +0200, Paolo Bonzini wrote: >> >> On 13/04/2015 18:34, Corey Minyard wrote: > I made this the same as the ACPI code, which you have to have as a > callback if you are adding it to a common SSDT. Not

[Qemu-devel] [PATCH] m25p80: add missing blk_attach_dev_nofail

2015-04-14 Thread Paolo Bonzini
Of the block devices that poked into -drive options via drive_get_next, m25p80 was the only one who also did not attach itself to the BlockBackend. Since sd does it, and all other devices go through a "drive" property, with this change all block backends attached to the guest will have a non-NULL

  1   2   >