Re: [Qemu-devel] [RFC 00/10] MultiThread TCG.

2015-03-30 Thread Mark Burton
understood. Cheers Mark. > On 30 Mar 2015, at 23:46, Peter Maydell wrote: > > On 30 March 2015 at 07:52, Mark Burton wrote: >> So - Fred is unwilling to send the patch set as it stands, because frankly >> this part is totally broken. >> >> There is an independent patch set that needs splittin

Re: [Qemu-devel] [PATCH 4/6] target-ppc: Convert PReP to machine class

2015-03-30 Thread David Gibson
On Mon, Mar 30, 2015 at 11:33:43PM +0200, Andreas Färber wrote: > Am 06.03.2015 um 05:18 schrieb David Gibson: > > The more commonly used ppc machine types: spapr, and newworld Mac have > > already been converted to the newer MachineClass representation, but some > > others still use QEMUMachine. >

Re: [Qemu-devel] [PATCH 1/6] Split serial-isa into its own config option

2015-03-30 Thread David Gibson
On Mon, Mar 30, 2015 at 09:28:39AM +0200, Markus Armbruster wrote: > David Gibson writes: > > > At present, the core device model code for 8250-like serial ports > > (serial.c) and the code for serial ports attached to ISA-style legacy IO > > (serial-isa.c) are both controlled by the CONFIG_ISA v

[Qemu-devel] [PATCH qemu v5 10/12] spapr_pci: Rework finish_realize()

2015-03-30 Thread Alexey Kardashevskiy
This renames and reworks finish_realize() which used to finalize DMA setup with an assumption that it will not change later. The new callback supports multiple windows and supports various parameters such as page and windows sizes. This is a mechanical change so no change in behaviour is expected

Re: [Qemu-devel] [PATCH] vhost: fix typo in vq_index description

2015-03-30 Thread Jason Wang
On 03/26/2015 07:10 PM, Greg Kurz wrote: > Signed-off-by: Greg Kurz > --- > include/hw/virtio/vhost.h |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h > index 71ef18f..88e1e56 100644 > --- a/include/hw/virtio/vhost

[Qemu-devel] [PATCH qemu v5 04/12] spapr_pci_vfio: Enable multiple groups per container

2015-03-30 Thread Alexey Kardashevskiy
This enables multiple IOMMU groups in one VFIO container which means that multiple devices from different groups can share the same IOMMU table (or tables if DDW). This removes a group id from vfio_container_ioctl(). The kernel support is required for this; if the host kernel does not have the sup

[Qemu-devel] [PATCH qemu v5 09/12] spapr_iommu: Add root memory region

2015-03-30 Thread Alexey Kardashevskiy
We are going to have multiple DMA windows at different offsets on a PCI bus. For the sake of migration, we will have as many TCE table objects pre-created as many windows supported. So we need a way to map windows dynamically onto a PCI bus when migration of a table is completed but at this stage a

[Qemu-devel] [PATCH qemu v5 06/12] vfio: spapr: Add SPAPR IOMMU v2 support (DMA memory preregistering)

2015-03-30 Thread Alexey Kardashevskiy
This makes use of the new "memory registering" feature. The idea is to provide the guest ability to notify the host kernel about pages which are going to be used for DMA. Having this information, the host kernel can pin them all once per user process, do locked pages accounting (once) and not spent

[Qemu-devel] [PATCH qemu v5 08/12] spapr_pci: Rework reset to reset DMA configuration

2015-03-30 Thread Alexey Kardashevskiy
On a system reset, DMA configuration has to reset too. At the moment it clears the table content. This is enough for the single table case but with DDW, we will also have to disable all DMA windows except the default one. Furthermore according to sPAPR, if the guest removed the default window and c

[Qemu-devel] [PATCH qemu v5 07/12] spapr_iommu: Rework TCE table initialization

2015-03-30 Thread Alexey Kardashevskiy
Currently TCE tables are created once at start and their size never changes. We are going to change that by introducing a Dynamic DMA windows support where DMA configuration may change during the guest execution. This changes spapr_tce_new_table() to create an empty stub object. Only LIOBN is assi

[Qemu-devel] [PATCH qemu v5 12/12] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW)

2015-03-30 Thread Alexey Kardashevskiy
This adds support for Dynamic DMA Windows (DDW) option defined by the SPAPR specification which allows to have additional DMA window(s) This implements DDW for emulated and VFIO PHB. This reserves RTAS token numbers for DDW calls. This adds callbacks definitions which PHB needs to implement in o

[Qemu-devel] [PATCH qemu v5 02/12] vmstate: Define VARRAY with VMS_ALLOC

2015-03-30 Thread Alexey Kardashevskiy
This allows dynamic allocation for migrating arrays. Signed-off-by: Alexey Kardashevskiy --- include/migration/vmstate.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index bc7616a..73b9d67 100644 --- a/include/migration

[Qemu-devel] [PATCH qemu v5 01/12] linux headers update for DDW on SPAPR

2015-03-30 Thread Alexey Kardashevskiy
Since the changes are not in upstream yet, no tag or branch is specified here. Signed-off-by: Alexey Kardashevskiy --- linux-headers/linux/vfio.h | 88 -- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/linux-headers/linux/vfio.h b/linux

[Qemu-devel] [PATCH qemu v5 05/12] vfio: spapr: Move SPAPR-related code to a separate file

2015-03-30 Thread Alexey Kardashevskiy
This moves SPAPR bits to a separate file to avoid pollution of x86 code. This is a mechanical patch. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/Makefile.objs | 1 + hw/vfio/common.c | 134 ++--- hw/vfio/spapr.c | 226

[Qemu-devel] [PATCH qemu v5 11/12] spapr_pci: Disable all DMA windows on reset

2015-03-30 Thread Alexey Kardashevskiy
This disables all DMA windows on a PHB reset. It does not make any difference now as there is just one DMA window but it will later with DDW patches. Signed-off-by: Alexey Kardashevskiy --- hw/ppc/spapr_pci.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH qemu v5 03/12] spapr_pci: Make find_phb()/find_dev() public

2015-03-30 Thread Alexey Kardashevskiy
This makes find_phb()/find_dev() public and changed its names to spapr_pci_find_phb()/spapr_pci_find_dev() as they are going to be used from other parts of QEMU such as VFIO DDW (dynamic DMA window) or VFIO PCI error injection or VFIO EEH handling - in all these cases there are RTAS calls which are

[Qemu-devel] [PATCH qemu v5 00/12] spapr: vfio: Enable Dynamic DMA windows (DDW)

2015-03-30 Thread Alexey Kardashevskiy
Each Partitionable Endpoint (IOMMU group) has an address range on a PCI bus where devices are allowed to do DMA. These ranges are called DMA windows. By default, there is a single DMA window, 1 or 2GB big, mapped at zero on a PCI bus. PAPR defines a DDW RTAS API which allows pseries guests queryin

Re: [Qemu-devel] [PATCH] e1000: work around win 8.0 boot hang

2015-03-30 Thread Jason Wang
On 02/20/2015 03:24 AM, Radim Krčmář wrote: > Window 8.0 driver has a particular behavior for a small time frame after > it enables rx interrupts: the interrupt handler never clears > E1000_ICR_RXT0. The handler does this something like this: > set_imc(-1) (1) disable all interr

Re: [Qemu-devel] [PATCH v3] spapr: populate ibm,loc-code

2015-03-30 Thread Nikunj A Dadhania
David Gibson writes: > On Tue, Mar 31, 2015 at 01:00:57PM +1100, Alexey Kardashevskiy wrote: >> On 03/30/2015 10:02 PM, Nikunj A Dadhania wrote: >> >Each hardware instance has a platform unique location code. The OF >> >device tree that describes a part of a hardware entity must include >> >the

Re: [Qemu-devel] Simulation or just emulation?

2015-03-30 Thread Abdullah Al-Mutairi
Thank you stefan, this should be the case, as I did later compare an QEMU machine with a real machine, The VM gave "2X" the results of a real hardware using openssl rsa4096. On 03/30/2015 06:28 PM, Stefan Hajnoczi wrote: On Sun, Mar 29, 2015 at 01:36:47AM +0300, Abdullah AL-Mutairi wrote: doe

Re: [Qemu-devel] [PATCH v5 00/28] drop qapi nested structs

2015-03-30 Thread Eric Blake
On 03/29/2015 10:03 AM, Markus Armbruster wrote: > What happens when I define a member key multiple times in a struct or > union type? > > If I do it directly, the parser rejects the duplicate key in > get_members(). Covered by tests/qapi-schema/duplicate-key.json. > > What if I hide the duplica

Re: [Qemu-devel] [PATCH V4 14/19] virtio: introduce vector to virtqueues mapping

2015-03-30 Thread Jason Wang
On Fri, Mar 20, 2015 at 7:39 PM, Cornelia Huck wrote: On Wed, 18 Mar 2015 17:35:04 +0800 Jason Wang wrote: Currently we will try to traverse all virtqueues to find a subset that using a specific vector. This is sub optimal when we will support hundreds or even thousands of virtqueues.

Re: [Qemu-devel] [PATCH V4 10/19] virtio-ccw: introduce ccw specific queue limit

2015-03-30 Thread Jason Wang
On Fri, Mar 20, 2015 at 7:33 PM, Cornelia Huck wrote: On Wed, 18 Mar 2015 17:35:00 +0800 Jason Wang wrote: Instead of depending on marco, using a bus specific limit. You should probably also mention the adapter routes change in your changelog: "Also make it clear that the number of gsi

Re: [Qemu-devel] [PATCH V4 09/19] virito: introduce bus specific queue limit

2015-03-30 Thread Jason Wang
On Fri, Mar 20, 2015 at 6:20 PM, Cornelia Huck wrote: On Wed, 18 Mar 2015 17:34:59 +0800 Jason Wang wrote: Typo in subject: s/virito/virtio/ Will correct this. This patch introduces a bus specific queue limitation. It will be useful for increasing the limit for one of the bus withou

Re: [Qemu-devel] [PATCH v3] spapr: populate ibm,loc-code

2015-03-30 Thread David Gibson
On Tue, Mar 31, 2015 at 01:00:57PM +1100, Alexey Kardashevskiy wrote: > On 03/30/2015 10:02 PM, Nikunj A Dadhania wrote: > >Each hardware instance has a platform unique location code. The OF > >device tree that describes a part of a hardware entity must include > >the “ibm,loc-code” property with

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy

2015-03-30 Thread David Gibson
On Mon, Mar 30, 2015 at 10:17:06AM +0200, Paolo Bonzini wrote: > > > On 19/03/2015 10:33, Dr. David Alan Gilbert wrote: > >> > But still pointless. Atomicity isn't magic pixie dust; it only makes > >> > sense if you're making atomic specific operations that need to be. > >> > Simple integer load

Re: [Qemu-devel] [RFC PATCH v2 22/23] spapr: Support ibm, dynamic-reconfiguration-memory

2015-03-30 Thread David Gibson
On Mon, Mar 30, 2015 at 02:41:50PM +0530, Bharata B Rao wrote: > On Thu, Mar 26, 2015 at 02:44:17PM +1100, David Gibson wrote: > > > +/* > > > + * TODO: Take care of sparsemem configuration ? > > > + */ > > > +static uint64_t numa_node_end(uint32_t nodeid) > > > +{ > > > +uint32_t i = 0; > > >

Re: [Qemu-devel] [PATCH v3] spapr: populate ibm,loc-code

2015-03-30 Thread Alexey Kardashevskiy
On 03/30/2015 10:02 PM, Nikunj A Dadhania wrote: Each hardware instance has a platform unique location code. The OF device tree that describes a part of a hardware entity must include the “ibm,loc-code” property with a value that represents the location code for that hardware entity. Introduce

Re: [Qemu-devel] [PATCH RFC for-2.3? 5/8] fdb: Move FDCtrlISABus to header

2015-03-30 Thread John Snow
You probably meant 'fdc' ! On 03/29/2015 01:53 PM, Andreas Färber wrote: To be used for embedding the device. Add gtk-doc private/public markers for parent field. Signed-off-by: Andreas Färber --- hw/block/fdc.c | 87 - include/hw/blo

Re: [Qemu-devel] [PATCH 2/6] Remove monitor.c dependency on CONFIG_I8259

2015-03-30 Thread David Gibson
On Mon, Mar 30, 2015 at 10:37:45AM +0200, Markus Armbruster wrote: > Markus Armbruster writes: > > > David Gibson writes: > > > >> The hmp commands "irq" and "pic" are a bit of a mess. They're implemented > >> on a number of targets, but not all. On sparc32 and LM32 they do target > >> specifi

Re: [Qemu-devel] [PATCH v5 20/45] Modify savevm handlers for postcopy

2015-03-30 Thread David Gibson
On Mon, Mar 30, 2015 at 10:10:05AM +0200, Paolo Bonzini wrote: > > > On 24/03/2015 23:32, David Gibson wrote: > >>> OK, that one I prefer. Are you OK with: > >>> qemu_savevm_state_complete_precopy calls -> > >>> save_live_complete_precopy > >>> > >>> qemu_savevm_state_complete_postcopy calls -

Re: [Qemu-devel] [PATCH] replaced get_ticks_per_sec() with constant

2015-03-30 Thread Peter Crosthwaite
On Tue, Mar 31, 2015 at 7:52 AM, Peter Maydell wrote: > On 30 March 2015 at 14:01, Stefan Hajnoczi wrote: >> On Sat, Mar 28, 2015 at 06:22:11PM +0200, Emil Condrea wrote: >>> diff --git a/target-arm/helper.c b/target-arm/helper.c >>> index 10886c5..504530a 100644 >>> --- a/target-arm/helper.c >>>

Re: [Qemu-devel] [PATCH v5 06/28] qapi: Add some union tests

2015-03-30 Thread Eric Blake
On 03/26/2015 09:58 AM, Markus Armbruster wrote: >>> /home/armbru/work/qemu/.git/rebase-apply/patch:325: new blank line at EOF. >> >> Huh. I thought I had git set up to reject me from making commits like >> that locally, but obviously not. > > There's another one in PATCH 13: > > /home/armbru/wo

Re: [Qemu-devel] [PATCH] qga: implement qmp_guest_network_get_interfaces for win32

2015-03-30 Thread Kirk Allan
>>> > Hi Kirk, > > Am 30.03.2015 um 22:44 schrieb Kirk Allan: >> Ping. >> >> Looking for feedback anyone might have regarding this patch. > > I would recommend to make the patch smaller and the commit message more > intuitive by splitting off the configure changes into its own patch > (rememb

Re: [Qemu-devel] [PATCH] replaced get_ticks_per_sec() with constant

2015-03-30 Thread Peter Maydell
On 30 March 2015 at 14:01, Stefan Hajnoczi wrote: > On Sat, Mar 28, 2015 at 06:22:11PM +0200, Emil Condrea wrote: >> diff --git a/target-arm/helper.c b/target-arm/helper.c >> index 10886c5..504530a 100644 >> --- a/target-arm/helper.c >> +++ b/target-arm/helper.c >> @@ -649,7 +649,7 @@ void pmccntr

Re: [Qemu-devel] [PATCH 3/6] pc: Use MachineClass callbacks for "irq" and "pic" hmp commands

2015-03-30 Thread Andreas Färber
Am 06.03.2015 um 05:18 schrieb David Gibson: > Currently PC machine types rely on fallback code in the monitor > implementation to correctly implement these hmp commands. Now that we have > MachineClass callbacks to control this properly, instantiate them in > pc_generic_machine_class_init(). > >

Re: [Qemu-devel] [RFC 00/10] MultiThread TCG.

2015-03-30 Thread Peter Maydell
On 30 March 2015 at 07:52, Mark Burton wrote: > So - Fred is unwilling to send the patch set as it stands, because frankly > this part is totally broken. > > There is an independent patch set that needs splitting out which deals with > just the atomic instruction issue - specifically for ARM (th

Re: [Qemu-devel] [PATCH 2/6] Remove monitor.c dependency on CONFIG_I8259

2015-03-30 Thread Andreas Färber
Am 06.03.2015 um 05:18 schrieb David Gibson: > The hmp commands "irq" and "pic" are a bit of a mess. They're implemented > on a number of targets, but not all. On sparc32 and LM32 they do target > specific things, but on the remainder (i386, ppc and mips) they call into > the i8259 PIC code. > >

Re: [Qemu-devel] [PATCH 4/6] target-ppc: Convert PReP to machine class

2015-03-30 Thread Andreas Färber
Am 06.03.2015 um 05:18 schrieb David Gibson: > The more commonly used ppc machine types: spapr, and newworld Mac have > already been converted to the newer MachineClass representation, but some > others still use QEMUMachine. > > This patch cleans things up slightly, by converting the "prep" machi

Re: [Qemu-devel] [PATCH 5/6] prep: Use MachineClass callbacks for "irq" and "pic" hmp commands

2015-03-30 Thread Andreas Färber
Am 06.03.2015 um 05:18 schrieb David Gibson: > Currently all ppc targets rely on fallback code in monitor.c to implement > the "irq" and "pic" hmp commands, by calling into the i8259 code. For the > PReP machine type, which does usually have an ISA bridge and legacy IO, > including an i8259, this

Re: [Qemu-devel] QTest information needed

2015-03-30 Thread Andreas Färber
Am 30.03.2015 um 20:48 schrieb Nidugala Muralikrishna: > Can anyone point me to any reference document / Wiki on "QTest" like how > to write the Tests, build test suite, compile etc. Search linux-kvm.org for KVM Forum presentations on the topic. For how to build and run, see "make check-help". By

Re: [Qemu-devel] [PATCH] qga: implement qmp_guest_network_get_interfaces for win32

2015-03-30 Thread Andreas Färber
Hi Kirk, Am 30.03.2015 um 22:44 schrieb Kirk Allan: > Ping. > > Looking for feedback anyone might have regarding this patch. I would recommend to make the patch smaller and the commit message more intuitive by splitting off the configure changes into its own patch (remember to include a short co

[Qemu-devel] QTest information needed

2015-03-30 Thread Nidugala Muralikrishna
Can anyone point me to any reference document / Wiki on "QTest" like how to write the Tests, build test suite, compile etc. Regards, Murali IBM India Systems and Technology Lab, ISTL IBM India private Limited, MK 1F B295 K-Manyata Embassy Business Park,Rachenahalli, Nagawara, Outer Ring Road, Ba

Re: [Qemu-devel] [PATCH] qga: implement qmp_guest_network_get_interfaces for win32

2015-03-30 Thread Kirk Allan
Ping. Looking for feedback anyone might have regarding this patch. Thanks, Kirk >>> > For Windows guest greater than or equal to Vista/2008, _WIN32_WINNT may be > defined via the configure option with-win32-winnt=. The use of > with-win32-wint= to set _WIN32_WINNT is optional. Setting this va

Re: [Qemu-devel] [PATCH v4 12/15] Add optional parameters to QMP command query-cpu-definitions

2015-03-30 Thread Eric Blake
On 03/30/2015 08:28 AM, Michael Mueller wrote: > The patch adds optional parameters to the QMP command query-cpu-definitions. > Thus the signature of routine arch_query_cpu_definitions needs to be changed > for the stub function and all target implementations: > > target-arm > target-i386 > target

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Eric Blake
On 03/30/2015 02:17 PM, Eduardo Habkost wrote: > On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: >> This patch implements a new QMP request named 'query-cpu-model'. >> It returns the cpu model of cpu 0 and its backing accelerator. >> >> request: >> {"execute" : "query-cpu-model"

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Eric Blake
On 03/30/2015 08:28 AM, Michael Mueller wrote: > This patch implements a new QMP request named 'query-cpu-model'. > It returns the cpu model of cpu 0 and its backing accelerator. > > request: > {"execute" : "query-cpu-model" } > > answer: > {"return" : {"name": "2827-ga2", "accel": "kvm" }} >

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: > This patch implements a new QMP request named 'query-cpu-model'. > It returns the cpu model of cpu 0 and its backing accelerator. > > request: > {"execute" : "query-cpu-model" } > > answer: > {"return" : {"name": "2827-ga2", "

Re: [Qemu-devel] [PATCH v4 13/15] target-s390x: Extend QMP command query-cpu-definitions

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:26PM +0200, Michael Mueller wrote: [...] > CpuDefinitionInfoList *arch_query_cpu_definitions(bool has_machine, >const char *machine, >bool has_accel, >

Re: [Qemu-devel] [PATCH v4 11/15] target-s390x: New QMP command query-cpu-model

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:24PM +0200, Michael Mueller wrote: [...] > diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c > index 829945d..1698b52 100644 > --- a/target-s390x/cpu.c > +++ b/target-s390x/cpu.c > @@ -37,6 +37,11 @@ > #define CR0_RESET 0xE0UL > #define CR14_RESET 0xC20

Re: [Qemu-devel] [PATCH v4 07/15] target-s390x: Update linux-headers/asm-s390/kvm.h

2015-03-30 Thread Christian Borntraeger
Am 30.03.2015 um 16:28 schrieb Michael Mueller: > Signed-off-by: Michael Mueller > --- > linux-headers/asm-s390/kvm.h | 18 +- > 1 file changed, 9 insertions(+), 9 deletions(-) > Looks like a leftover. Drop that patch and rename ibc_range to ibc in the other patch. > diff --g

Re: [Qemu-devel] [PATCH v4 10/15] target-s390x: Prepare accelerator during cpu object realization

2015-03-30 Thread Eduardo Habkost
On Mon, Mar 30, 2015 at 04:28:23PM +0200, Michael Mueller wrote: > This patch implements routine s390_cpu_model_init(). It is called by the > realize function during instantiation of an cpu object. Its task is to > initialize the current accelerator with the properties of the selected > processor m

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-30 Thread Andrey Korolyov
On Mon, Mar 30, 2015 at 9:56 PM, Radim Krčmář wrote: > 2015-03-27 13:16+0300, Andrey Korolyov: >> On Fri, Mar 27, 2015 at 12:03 AM, Bandan Das wrote: >> > Radim Krčmář writes: >> >> I second Bandan -- checking that it reproduces on other machine would be >> >> great for sanity :) (Although a bu

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-30 Thread Radim Krčmář
2015-03-27 14:54+0300, Andrey Korolyov: > Trace with new bits: Thanks. > KVM internal error. Suberror: 2 > extra data[0]: 80ef > extra data[1]: 8b0d > extra data[2]: 77b The #GP code looks formatted as documented under INT in SDM, (vector << 3) | 2 | ext where 'ext' stands for 'externa

Re: [Qemu-devel] [PATCH v5 17/45] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2015-03-30 Thread Paolo Bonzini
On 30/03/2015 19:46, Dr. David Alan Gilbert wrote: >>> > > +PostcopyState postcopy_state_get(MigrationIncomingState *mis) >>> > > +{ >>> > > +return atomic_fetch_add(&mis->postcopy_state, 0); >>> > > +} >>> > > + >>> > > +/* Set the state and return the old state */ >>> > > +PostcopyState po

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy

2015-03-30 Thread Paolo Bonzini
On 30/03/2015 19:04, Dr. David Alan Gilbert wrote: >>> > > That one's a trickier question. Compilers are absolutely capable >>> > > of optimizing that far, *but* the C rules about when it's allowed >>> > > to assume in-memory values remain unchanged are pretty >>> > > conservative. I think any

Re: [Qemu-devel] [PATCH] target-mips: save cpu state before calling MSA load and store helpers

2015-03-30 Thread Richard Henderson
On 03/16/2015 09:29 AM, Leon Alrae wrote: > PC needs to be saved if an exception can be generated by an helper. > This fixes a problem related to resuming the execution at unexpected address > after an exception (caused by MSA load/store instruction) has been serviced. Only if the helper doesn't u

Re: [Qemu-devel] E5-2620v2 - emulation stop error

2015-03-30 Thread Radim Krčmář
2015-03-27 13:16+0300, Andrey Korolyov: > On Fri, Mar 27, 2015 at 12:03 AM, Bandan Das wrote: > > Radim Krčmář writes: > >> I second Bandan -- checking that it reproduces on other machine would be > >> great for sanity :) (Although a bug in our APICv is far more likely.) > > > > If it's APICv re

Re: [Qemu-devel] [PATCH v5 08/45] Return path: socket_writev_buffer: Block even on non-blocking fd's

2015-03-30 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> >> >> On 29/03/2015 06:07, David Gibson wrote: >> > On Sat, Mar 28, 2015 at 04:30:06PM +0100, Paolo Bonzini wrote: >> >> >> >> >> >> On 25/02/2015 17:51, Dr. David Alan Gilbert (git) wrote: >> >>> +

Re: [Qemu-devel] [PATCH RFC for-2.3? 0/8] prep: Fix pc87312 for -device usage

2015-03-30 Thread Markus Armbruster
Andreas Färber writes: > Am 30.03.2015 um 18:12 schrieb Paolo Bonzini: >> On 30/03/2015 16:25, Markus Armbruster wrote: >>> Andreas Färber writes: >>> Hello Markus et al., This series attempts to fix the -device pc87312 issues you reported. I can't add alias properties f

Re: [Qemu-devel] [PATCH RFC for-2.3? 0/8] prep: Fix pc87312 for -device usage

2015-03-30 Thread Andreas Färber
David, Am 29.03.2015 um 19:53 schrieb Andreas Färber: > Hello Markus et al., > > This series attempts to fix the -device pc87312 issues you reported. > > I can't add alias properties for devices that don't get created before > realize. > Therefore this involves moving code for various ISA devic

Re: [Qemu-devel] [PATCH v5 17/45] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages.

2015-03-30 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 25/02/2015 17:51, Dr. David Alan Gilbert (git) wrote: > > +PostcopyState postcopy_state_get(MigrationIncomingState *mis) > > +{ > > +return atomic_fetch_add(&mis->postcopy_state, 0); > > +} > > + > > +/* Set the state and return the old s

[Qemu-devel] [PULL 1/4] fw_cfg-test: Fix test path to include architecture

2015-03-30 Thread Andreas Färber
Use qtest_add_func() instead of g_test_add_func() to reflect the architecture tested, changing GTester paths as follows: /fw_cfg/foo -> /x86_64/fw_cfg/foo etc. Cc: qemu-sta...@nongnu.org Reviewed-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/fw_cfg-test.c | 26 +--

Re: [Qemu-devel] [PATCH 0/6] Clean up ISA dependencies so we make ISA optional to build

2015-03-30 Thread Michael S. Tsirkin
On Mon, Mar 30, 2015 at 01:41:23PM +1100, David Gibson wrote: > On Tue, Mar 10, 2015 at 10:56:22AM -0400, Luiz Capitulino wrote: > > On Tue, 10 Mar 2015 15:20:29 +0100 > > "Michael S. Tsirkin" wrote: > > > > > On Fri, Mar 06, 2015 at 03:18:20PM +1100, David Gibson wrote: > > > > At present, ISA b

[Qemu-devel] [PULL 3/4] qtest: Add qtest_add() wrapper macro

2015-03-30 Thread Andreas Färber
It extends g_test_add() macro with the architecture path. Reviewed-by: John Snow Signed-off-by: Andreas Färber --- tests/libqtest.h | 20 1 file changed, 20 insertions(+) diff --git a/tests/libqtest.h b/tests/libqtest.h index 9281f5c..03469b8 100644 --- a/tests/libqtest.h

[Qemu-devel] [PULL 2/4] qtest: Add qtest_add_data_func() wrapper function

2015-03-30 Thread Andreas Färber
It calls g_test_add_data_func() with a path supplemented by the architecture, like qtest_add_func() does. Reviewed-by: John Snow Reviewed-by: Stefan Hajnoczi Signed-off-by: Andreas Färber --- tests/libqtest.c | 7 +++ tests/libqtest.h | 12 2 files changed, 19 insertions(+)

[Qemu-devel] [PULL 4/4] i440fx-test: Fix test paths to include architecture

2015-03-30 Thread Andreas Färber
Replace g_test_add_func() with new qtest_add_func() and g_test_add() macro with qtest_add() macro. This effectively changes GTester paths: /i440fx/foo -> /x86_64/i440fx/foo etc. Cc: qemu-sta...@nongnu.org Reviewed-by: John Snow Signed-off-by: Andreas Färber --- tests/i440fx-test.c | 12 +

[Qemu-devel] [PULL 0/4] QTest patch queue 2015-03-30

2015-03-30 Thread Andreas Färber
Hello Peter, This is my QTest queue for 2.3. Please pull. Regards, Andreas Cc: Peter Maydell Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: John Snow The following changes since commit 627f91b1f80fecc73d00727181a9ddb6162cc30e: Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-reques

Re: [Qemu-devel] [PULL] tricore patches for 2.3-rc2

2015-03-30 Thread Bastian Koppelmann
On 03/30/2015 06:34 PM, Andreas Färber wrote: Hi Bastian, Am 30.03.2015 um 13:46 schrieb Bastian Koppelmann: Bastian Koppelmann (1): target-tricore: fix CACHEA/I_POSTINC/PREINC using data register.. FYI git-format-patch has a --numbered option that forces [PULL 1/1]. Thanks. I'll cha

Re: [Qemu-devel] [PATCH v5 10/45] Return path: Control commands

2015-03-30 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 25/02/2015 17:51, Dr. David Alan Gilbert (git) wrote: > > > > Add two src->dest commands: > >* OPEN_RETURN_PATH - To request that the destination open the return path > >* SEND_PING - Request an acknowledge from the destination > > I

Re: [Qemu-devel] [PATCH v5 23/45] migrate_start_postcopy: Command to trigger transition to postcopy

2015-03-30 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 23/03/2015 03:20, David Gibson wrote: > >>> 1) There's no barrier after the write, so there's no guarantee > >>> the other thread will eventually see it (in practice we've got > >>> other pthread ops we take so we will get a barrier somewhere,

Re: [Qemu-devel] [PATCH v8 0/9] rocker: add new rocker ethernet switch device

2015-03-30 Thread Scott Feldman
2.4 is fine, thanks On Mar 30, 2015 7:52 AM, "Stefan Hajnoczi" wrote: > On Fri, Mar 13, 2015 at 09:09:24PM -0700, sfel...@gmail.com wrote: > > From: Scott Feldman > > > > v8: > > > > - From Stefan Hajnoczi's net-pull-request v3, merge in these changes: > > - Squash David Ahern's clang stru

Re: [Qemu-devel] [PATCH v5 08/45] Return path: socket_writev_buffer: Block even on non-blocking fd's

2015-03-30 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 29/03/2015 06:07, David Gibson wrote: > > On Sat, Mar 28, 2015 at 04:30:06PM +0100, Paolo Bonzini wrote: > >> > >> > >> On 25/02/2015 17:51, Dr. David Alan Gilbert (git) wrote: > >>> +if (err != EAGAIN) { > >> > >> if (err != EA

Re: [Qemu-devel] [PATCH RFC for-2.3? 0/8] prep: Fix pc87312 for -device usage

2015-03-30 Thread Markus Armbruster
Paolo Bonzini writes: > On 30/03/2015 16:25, Markus Armbruster wrote: >> Andreas Färber writes: >> >>> Hello Markus et al., >>> >>> This series attempts to fix the -device pc87312 issues you reported. >>> >>> I can't add alias properties for devices that don't get created >>> before realize. >>

Re: [Qemu-devel] [PULL] tricore patches for 2.3-rc2

2015-03-30 Thread Andreas Färber
Hi Bastian, Am 30.03.2015 um 13:46 schrieb Bastian Koppelmann: > Bastian Koppelmann (1): > target-tricore: fix CACHEA/I_POSTINC/PREINC using data register.. FYI git-format-patch has a --numbered option that forces [PULL 1/1]. Cheers, Andreas -- SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnb

Re: [Qemu-devel] [PATCH for-2.3] pc: acpi: fix pvpanic regression

2015-03-30 Thread Michael S. Tsirkin
On Mon, Mar 30, 2015 at 02:18:27PM +0200, Igor Mammedov wrote: > Commit cd61cb2 pc: acpi-build: generate pvpanic device description > dynamically > > introduced regression changing pvpanic device HID from > QEMU0001 to QEMU0002. > Fix AML generated code so that pvpanic device > would keep its or

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

2015-03-30 Thread Alberto Garcia
The throttle group support use a cooperative round robin scheduling algorithm. The principles of the algorithm are simple: - Each BDS of the group is used as a token in a circular way. - The active BDS computes if a wait must be done and arms the right timer. - If a wait must be done the token t

[Qemu-devel] [PATCH 5/7] throttle: acquire the ThrottleGroup lock in bdrv_swap()

2015-03-30 Thread Alberto Garcia
bdrv_swap() touches the fields of a BlockDriverState that are protected by the ThrottleGroup lock. Although those fields end up in their original place, they are temporarily swapped in the process, so there's a chance that an operation on a member of the same group happening on a different thread c

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

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- block/Makefile.objs | 1 + block/throttle-groups.c | 261 include/block/block_int.h | 1 + include/block/throttle-groups.h | 39 ++ 4 files changed, 302 insertions(+) create mode 100644

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

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/test-throttle.c | 79 --- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/tests/test-throttle.c b/tests/test-throttle.c index 458f577..aa0e297 100644 --- a/tests/test-throttle.c +++ b/tests/tes

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

2015-03-30 Thread Alberto Garcia
From: 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 paves the way for each bs of a comm

[Qemu-devel] [PATCH 6/7] throttle: add the name of the ThrottleGroup to BlockDeviceInfo

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- block/qapi.c | 3 +++ hmp.c| 6 -- qapi/block-core.json | 4 +++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 65af057..ee823d1 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -91,6

[Qemu-devel] [PATCH v6 0/7] Block Throttle Group Support

2015-03-30 Thread Alberto Garcia
This updates test-throttle.c following Stefan's advice to init the QEMU main loop. V6: - Use qemu_init_main_loop() in the throttling tests to make sure that all BDS have an AioContext attached. V5: https://lists.gnu.org/archive/html/qemu-devel/2015-03/msg05990.html - Fixed and expanded the tes

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

2015-03-30 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- include/qemu/throttle.h | 8 +--- util/throttle.c | 8 +--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h index 2c560db..5af76f0 100644 --- a/include/qemu/throttle.h +++ b/include

Re: [Qemu-devel] [PATCH RFC for-2.3? 0/8] prep: Fix pc87312 for -device usage

2015-03-30 Thread Andreas Färber
Am 30.03.2015 um 18:12 schrieb Paolo Bonzini: > On 30/03/2015 16:25, Markus Armbruster wrote: >> Andreas Färber writes: >> >>> Hello Markus et al., >>> >>> This series attempts to fix the -device pc87312 issues you reported. >>> >>> I can't add alias properties for devices that don't get created b

Re: [Qemu-devel] [PATCH RFC for-2.3? 0/8] prep: Fix pc87312 for -device usage

2015-03-30 Thread Paolo Bonzini
On 30/03/2015 16:25, Markus Armbruster wrote: > Andreas Färber writes: > >> Hello Markus et al., >> >> This series attempts to fix the -device pc87312 issues you reported. >> >> I can't add alias properties for devices that don't get created before >> realize. >> Therefore this involves moving

[Qemu-devel] [Bug 1437367] Re: Qemu guest fails to write files with raw disk (like \\.\PhysicalDrive1) on Windows host.

2015-03-30 Thread Kevin Wolf
The documentation of FlushFileBuffers() only mentions that consoles cannot be flushed. It doesn't specifically mention physical drives, but it does explicitly mention that whole volumes can be flushed this way: https://msdn.microsoft.com/en- us/library/windows/desktop/aa364439%28v=vs.85%29.aspx O

Re: [Qemu-devel] [PATCH 2/5] qapi: Clean up documentation of alternate mappings

2015-03-30 Thread Eric Blake
On 03/27/2015 05:02 AM, Markus Armbruster wrote: > Eric Blake writes: > >> QObject is an internal coding concept and requires the reader to >> reverse engineer the mapping; it is nicer to be explicit and call >> out specific JSON types. >> >> +for QMP, instead appearing only in the generated C c

Re: [Qemu-devel] [PATCH v5 1/7] docs: update documentation for memory hot unplug

2015-03-30 Thread Igor Mammedov
On Fri, 27 Mar 2015 17:20:34 +0800 Zhu Guihua wrote: > Add specification about how to use memory hot unplug, and add > a flow diagram to explain memory hot unplug process. > > Signed-off-by: Zhu Guihua > --- > docs/memory-hotplug.txt | 24 > docs/specs/acpi_mem

Re: [Qemu-devel] [PATCH 5/7] omap_intc: convert ffs(3) to ctz32() in omap_inth_sir_update()

2015-03-30 Thread Richard Henderson
On 03/17/2015 07:58 AM, Paolo Bonzini wrote: > On 17/03/2015 12:56, Stefan Hajnoczi wrote: >> +for (f = ctz32(level) + 1, i = f - 1, level >>= f - 1; >> + f != 33; >> + i += f, level >>= f) { >> p = s->bank[j].priority[i]; >> if (p <= p_intr

Re: [Qemu-devel] [PATCH 3/7] Convert ffs() != 0 callers to ctz32()

2015-03-30 Thread Richard Henderson
On 03/17/2015 04:56 AM, Stefan Hajnoczi wrote: > @@ -1989,8 +1989,7 @@ static void omap_mpuio_write(void *opaque, hwaddr addr, > case 0x04: /* OUTPUT_REG */ > diff = (s->outputs ^ value) & ~s->dir; > s->outputs = value; > -while ((ln = ffs(diff))) { > -

Re: [Qemu-devel] block-commit & dropping privs

2015-03-30 Thread Kevin Wolf
Am 27.03.2015 um 18:12 hat Eric Blake geschrieben: > On 03/27/2015 09:36 AM, Michael Tokarev wrote: > > Wonder how to specify cache mode, or should I open these with proper > > O_DIRECT/O_SYNC/whatever? It looks like it's possible to change O_DIRECT > > at runtime but not O_SYNC. > > > > And the

Re: [Qemu-devel] Help for backport virtio to older kernel 2.6.18

2015-03-30 Thread Stefan Hajnoczi
On Mon, Mar 30, 2015 at 04:25:50PM +0800, Halsey Pian wrote: > It seems that virtio disk driver is included in kernel version started from > 2.6.32, but for 2.6.18 (using redhat5 as VM), we have to > backport the virtio driver. And I found that there is a link in link below, > but cannot be ope

Re: [Qemu-devel] Simulation or just emulation?

2015-03-30 Thread Stefan Hajnoczi
On Sun, Mar 29, 2015 at 01:36:47AM +0300, Abdullah AL-Mutairi wrote: > does qemu simulates the behavior of ARM machines, or just emulate the code? QEMU is an emulator. It does not simulate cycle timings, caches, etc. Stefan pgpX0hPKJYnBW.pgp Description: PGP signature

Re: [Qemu-devel] [PATCH] block: avoid unnecessary bottom halves

2015-03-30 Thread Stefan Hajnoczi
On Sat, Mar 28, 2015 at 07:37:18AM +0100, Paolo Bonzini wrote: > bdrv_aio_* APIs can use coroutines to achieve asynchronicity. However, > the coroutine may terminate without having yielded back to the caller > (for example because of something that invokes a nested event loop, > or because the cor

Re: [Qemu-devel] [PATCH v4 0/7] Block Throttle Group Support

2015-03-30 Thread Stefan Hajnoczi
On Thu, Mar 26, 2015 at 07:52:50PM +0100, Alberto Garcia wrote: > On Thu, Mar 26, 2015 at 07:24:54PM +0200, Alberto Garcia wrote: > > > - The creation/destruction of ThrottleTimers is now handled internally > > when a BlockDriverState is added/removed from a group, since > > there's not much p

Re: [Qemu-devel] [PATCH v5 01/28] qapi: Document type-safety considerations

2015-03-30 Thread Eric Blake
On 03/26/2015 01:52 AM, Markus Armbruster wrote: I'm not sure if it is okay to assert GPLv2+ licensing without an explicit Copyright, but as I am not the original author, I don't know who to attribute any original Copyright to. Advice? Should I split the license addition to a

Re: [Qemu-devel] [PATCH v5 0/4] configure: clang 3.5.0 build fixes

2015-03-30 Thread Stefan Hajnoczi
On Wed, Mar 25, 2015 at 06:57:35PM -0400, John Snow wrote: > QEMU does not compile cleanly under clang 3.5.0. These patches eliminate the > avalanche of warnings and make the build usable. > > The result is that you *should* be able to use clang 3.5.0 *with* ccache and > -Werror and produce all t

Re: [Qemu-devel] Output of fprintf messages in qemu source

2015-03-30 Thread Stefan Hajnoczi
On Tue, Mar 24, 2015 at 07:04:59PM +0530, Toms Varghese wrote: > In my Fedora, I couldn't find the file in the mentioned path. I got it > finally from > /var/log/libvirt/qemu/.log Sorry, my mistake. "lib" was a typo. Stefan pgpGswe66BblP.pgp Description: PGP signature

Re: [Qemu-devel] [PATCH v4] block/null: Latency simulation by adding new option "latency-ns"

2015-03-30 Thread Stefan Hajnoczi
On Wed, Mar 18, 2015 at 02:49:28PM +0800, Fam Zheng wrote: > +static coroutine_fn int null_co_common(BlockDriverState *bs) > +{ > +BDRVNullState *s = bs->opaque; > + > +/* Only emulate latency after vcpu is running. */ > +if (s->latency_ns && qemu_clock_get_us(QEMU_CLOCK_VIRTUAL) > 0) {

  1   2   3   >