[Qemu-devel] [RFC PATCH v0] numa: API to lookup NUMA node by address

2015-05-07 Thread Bharata B Rao
Keep track of start and end address of each NUMA node in numa_info structure so that lookup of node by address becomes easier. Add an API numa_get_node() to lookup a node by address. This is needed by sPAPR PowerPC to support ibm,dynamic-reconfiguration-memory device tree node which is needed for

[Qemu-devel] [PATCH qemu] pseries: Update SLOF firmware image to qemu-slof-20150429

2015-05-07 Thread Alexey Kardashevskiy
The changelog is: > version: update to 20150429 > pci: Use QEMU created PCI device nodes > usb: support 64-bit pci bars > pci: Support 64-bit address translation > pci: program correct bridge limit registers during probe > scsi: handle report-luns failure > Fix "key?" Forth word when

[Qemu-devel] [PATCH v4 0/4] spapr_pci: DT field fixes and PCI DT node creation in QEMU

2015-05-07 Thread Nikunj A Dadhania
The patch series creates PCI device tree(DT) nodes in QEMU. The new hotplug code needs the device node creation in QEMU. While during boot, nodes were created in SLOF. It makes more sense to consolidate the code to one place for better maintainability. Based on David's spapr-next https://github.c

[Qemu-devel] [PATCH v4 1/4] spapr_pci: encode missing 64-bit memory address space

2015-05-07 Thread Nikunj A Dadhania
The properties reg/assigned-resources need to encode 64-bit memory address space as part of phys.hi dword. 00 if configuration space 01 if IO region, 10 if 32-bit MEM region 11 if 64-bit MEM region Signed-off-by: Nikunj A Dadhania Reviewed-by: Thomas Huth --- hw/ppc/spapr_pci.c | 10 ++

[Qemu-devel] [PATCH v4 2/4] spapr_pci: encode class code including Prog IF register

2015-05-07 Thread Nikunj A Dadhania
Current code missed the Prog IF register. All Class Code, Subclass, and Prog IF registers are needed to identify the accurate device type. For example: USB controllers use the PROG IF for denoting: USB FullSpeed, HighSpeed or SuperSpeed. Signed-off-by: Nikunj A Dadhania Reviewed-by: Thomas Huth

[Qemu-devel] [PATCH v4 3/4] spapr_pci: enumerate and add PCI device tree

2015-05-07 Thread Nikunj A Dadhania
All the PCI enumeration and device node creation was off-loaded to SLOF. With PCI hotplug support, code needed to be added to add device node. This creates multiple copy of the code one in SLOF and other in hotplug code. To unify this, the patch adds the pci device node creation in Qemu. For backwa

[Qemu-devel] [PATCH v4 4/4] spapr_pci: populate ibm,loc-code

2015-05-07 Thread Nikunj A Dadhania
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. Populate ibm,loc-code. 1) PCI passthru devices need to ident

[Qemu-devel] [PATCH] uhci: controller is halted after reset

2015-05-07 Thread Gerd Hoffmann
... and the status register should say so. Fixes "usbus0: controller did not stop" error printed by freebsd. Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-uhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 64a7d87..3f0ed62 100644

Re: [Qemu-devel] [PATCH v6 01/17] Introduce stub routine cpu_desc_avail

2015-05-07 Thread Michael Mueller
On Wed, 6 May 2015 14:06:16 -0300 Eduardo Habkost wrote: > On Wed, May 06, 2015 at 06:23:05PM +0200, Michael Mueller wrote: > > On Wed, 6 May 2015 08:23:32 -0300 > > Eduardo Habkost wrote: > [...] > > > > > >cpudef_init(); > > > > > > > > > > > >if (cpu_model && cpu_desc_avail() && is_h

Re: [Qemu-devel] [PATCH RFC V2 4/4] Add virtv2 machine that uses GIC-500

2015-05-07 Thread Shlomo Pongratz
On Thursday, May 7, 2015, Pavel Fedin wrote: > Hello! > > Why do we need 'virt2' ? I am currently working on testing your > implementation, and i try to use different approach. I see this as > '-machine > virt,gicv=N' option, where N is 2 or 3. Isn't it better than duplicating > the > whole vir

Re: [Qemu-devel] [PATCH v6 05/17] Add optional parameters to QMP command query-cpu-definitions

2015-05-07 Thread Michael Mueller
On Wed, 6 May 2015 09:42:26 -0300 Eduardo Habkost wrote: > On Mon, Apr 27, 2015 at 04:53:19PM +0200, Michael Mueller wrote: > [...] > > diff --git a/qapi-schema.json b/qapi-schema.json > > index 215a7bc..285b2d3 100644 > > --- a/qapi-schema.json > > +++ b/qapi-schema.json > > @@ -2536,21 +2536,43

Re: [Qemu-devel] [PATCH v3 02/14] qapi: Rename identical c_fun()/c_var() into c_name()

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Now that the two functions are identical, we only need one of them, > and we might as well give it a more descriptive name. Basically, > the function serves as the translation from a QAPI name into a > (portion of a) C identifier, without regards to whether it is a > variabl

Re: [Qemu-devel] [PATCH v3 08/14] qapi: Make c_type() consistently convert qapi names

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Continuing the string of cleanups for supporting downstream names > containing '.', this patch focuses on ensuring c_type() can > handle a downstream name. This patch alone does not fix the > places where generator output should be calling this function > but was open-coding

Re: [Qemu-devel] [PATCH v3 09/14] qapi: Support downstream enums

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Enhance the testsuite to cover a downstream enum type and enum > string. Update the generator to mangle the enum name in the > appropriate places. The code for generating list visitors must > be careful how it mangles names for enum lists differently than > code for builtin

Re: [Qemu-devel] [PATCH v3 10/14] qapi: Support downstream structs

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Enhance the testsuite to cover downstream structs, including struct > members and base structs. Update the generator to mangle the > struct names in the appropriate places. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v3 11/14] qapi: Support downstream simple unions

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Enhance the testsuite to cover downstream simple unions, including > when a union branch is a downstream name. Update the generator to > mangle the union names in the appropriate places. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v3 13/14] qapi: Support downstream alternates

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Enhance the testsuite to cover downstream alternates, including > whether the branch name or type is downstream. Update the > generator to mangle alternate names in the appropriate places. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v3 12/14] qapi: Support downstream flat unions

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Enhance the testsuite to cover downstream flat unions, including > the base type, discriminator name and type, and branch name and > type. Update the generator to mangle the union names in the > appropriate places. > > Signed-off-by: Eric Blake Reviewed-by: Markus Armbrust

[Qemu-devel] [PATCH RFC v8 3/7] qemu-iotests: s390x: fix test 041

2015-05-07 Thread Bo Tu
From: Xiao Guang Chen There is no 'ide-cd' device defined on s390 platform, so test_medium_not_found() test should be skipped. Reviewed-by: Max Reitz Reviewed-by: Michael Mueller Signed-off-by: Xiao Guang Chen --- tests/qemu-iotests/041 | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Qemu-devel] [PATCH RFC v8 7/7] qemu-iotests: s390x: fix test 130

2015-05-07 Thread Bo Tu
The default device id of hard disk on the s390 platform is "virtio0" which differs to the "ide0-hd0" for the x86 platform. Setting id in the drive definition, ie:"qemu -drive id=testdisk", will be the same on all platforms. Signed-off-by: Bo Tu --- tests/qemu-iotests/130 | 8 tests/

[Qemu-devel] [PATCH RFC v8 1/7] qemu-iotests: qemu machine type support

2015-05-07 Thread Bo Tu
From: Xiao Guang Chen This patch adds qemu machine type support to the io test suite. Based on the qemu default machine type and alias of the default machine type the reference output file can now vary from the default to a machine specific output file if necessary. When using a machine specific

[Qemu-devel] [PATCH RFC v8 5/7] qemu-iotests: s390x: fix test 049

2015-05-07 Thread Bo Tu
when creating an image qemu-img enable us specifying the size of the image using -o size=xx options. But when we specify an invalid size such as a negtive size then different platform gives different result. parse_option_size() function in util/qemu-option.c will be called to parse the size, a cas

[Qemu-devel] [PATCH RFC v8 2/7] qemu-iotests: run qemu with -nodefaults and fix 067, 071, 081 and 087

2015-05-07 Thread Bo Tu
From: Xiao Guang Chen This patch fixes an io test suite issue that was introduced with the commit c88930a6866e74953e931ae749781e98e486e5c8 'qemu-char: Permit only a single "stdio" character device'. The option supresses the creation of default devices such as the floopy and cdrom. Output files fo

[Qemu-devel] [PATCH RFC v8 4/7] qemu-iotests: s390x: fix test 055

2015-05-07 Thread Bo Tu
From: Xiao Guang Chen There is no 'ide-cd' device defined on s390 platform, so test_medium_not_found() test should be skipped. Reviewed-by: Max Reitz Reviewed-by: Michael Mueller Signed-off-by: Xiao Guang Chen --- tests/qemu-iotests/055 | 9 + 1 file changed, 9 insertions(+) diff --

Re: [Qemu-devel] [PATCH v6 02/17] Add accelerator id and model name to CPUState

2015-05-07 Thread Michael Mueller
On Wed, 6 May 2015 08:41:50 -0300 Eduardo Habkost wrote: > On Wed, May 06, 2015 at 11:59:38AM +0200, Michael Mueller wrote: > > On Tue, 5 May 2015 10:26:02 -0300 > > Eduardo Habkost wrote: > > > > > On Mon, Apr 27, 2015 at 04:53:16PM +0200, Michael Mueller wrote: > > > > The patch defines ids p

[Qemu-devel] [PATCH RFC v8 6/7] qemu-iotests: s390x: fix test 051

2015-05-07 Thread Bo Tu
The tests for device type "ide_cd" should only be tested for the pc platform. The default device id of hard disk on the s390 platform differs to that of the x86 platform. A new variable device_id is defined and "virtio0" set for the s390 platform. A x86 platform specific output file is also needed.

[Qemu-devel] [PATCH RFC v8 0/7] Update tests/qemu-iotests failing cases for the s390 platform

2015-05-07 Thread Bo Tu
v8. 1.Modify error message in qemu-option.c when image size is invalid 2.Remove Reviewed-by statements if any functional changes in a new patch version for test 049,051,130 3.Change patch subject for test 130 4.Add id definition for a drive which will work for all platforms in test 130 5.Disable vi

Re: [Qemu-devel] [PATCH v3 14/14] qapi: Support downstream events and commands

2015-05-07 Thread Markus Armbruster
Eric Blake writes: > Enhance the testsuite to cover downstream events and commands. > Events worked without more tweaks, but commands needed a few final > updates in the generator to mangle names in the appropriate places. > In making those tweaks, it was easier to drop type_visitor() and > inlin

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

2015-05-07 Thread Dr. David Alan Gilbert
* Li, Liang Z (liang.z...@intel.com) wrote: > > > > > Thanks Dave, I will retry according to your suggestion. > > > > > > > > Did that work for you? > > > > > > > > > > Yes, it works. > > > > Great. > > > > > Bye the way, I found that the source guest will resume after about 15 > > > minuets if t

Re: [Qemu-devel] [PATCH RFC V2 4/4] Add virtv2 machine that uses GIC-500

2015-05-07 Thread Pavel Fedin
Hello! ➢ Thank you for your comment, I might do it after solving the stability issues. What kind of stability issues do you have ? You know, i was testing 64-bit qemu in TCG mode, and i have also seen weird behavior. The kernel just stops and waits until you hit any key on the console, then

Re: [Qemu-devel] [PATCH 1/4] spapr: Merge sPAPREnvironment into sPAPRMachineState

2015-05-07 Thread Thomas Huth
On Thu, 7 May 2015 13:57:01 +1000 David Gibson wrote: > The code for -machine pseries maintains a global sPAPREnvironment structure > which keeps track of general state information about the guest platform. > This predates the existence of the MachineState structure, but performs > basically the

Re: [Qemu-devel] [Qemu-block] [PATCH 5/6] qcow2: use a hash to look for entries in the L2 cache

2015-05-07 Thread Alberto Garcia
On Wed 06 May 2015 06:42:30 PM CEST, Stefan Hajnoczi wrote: >> By using a hash of the offset as the starting point, lookups are >> faster and independent from the array size. >> >> The hash is computed using the cluster number of the table, multiplied >> by 4 to make it perform better when there

Re: [Qemu-devel] [PATCH RFC V2 4/4] Add virtv2 machine that uses GIC-500

2015-05-07 Thread Shlomo Pongratz
On Thursday, May 7, 2015, Pavel Fedin wrote: > Hello! > > ➢ Thank you for your comment, I might do it after solving the stability > issues. > > What kind of stability issues do you have ? > You know, i was testing 64-bit qemu in TCG mode, and i have also seen > weird behavior. The kernel just

[Qemu-devel] [PATCH v6 00/22] Generate ACPI v5.1 tables and expose them to guest over fw_cfg on ARM

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao This patch series generate seven ACPI tables for machine virt on ARM. The set of generated tables are: - RSDP - RSDT - MADT - GTDT - FADT - DSDT - MCFG (For PCIe host bridge) These tables are created dynamically using the function of aml-build.c, taking into account the needed

[Qemu-devel] [PATCH v6 08/22] hw/arm/virt-acpi-build: Generate MADT table

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao MADT describes GIC enabled ARM platforms. The GICC and GICD subtables are used to define the GIC regions. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée --- hw/arm/virt-acpi-build.c | 57 in

[Qemu-devel] [PATCH v6 09/22] hw/arm/virt-acpi-build: Generate GTDT table

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao ACPI v5.1 defines GTDT for ARM devices as a place to describe timer related information in the system. The Arch Timer interrupts must be provided for GTDT. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c| 30 +

[Qemu-devel] [PATCH v6 15/22] hw/acpi/aml-build: Add aml_or() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 10 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index d9c9876..bda99bf 100644 --- a/hw/acpi/

[Qemu-devel] [PATCH v6 04/22] hw/acpi/aml-build: Add aml_memory32_fixed() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Add aml_memory32_fixed() for describing device mmio region in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 27 +++ include/hw/

[Qemu-devel] [PATCH v6 02/22] hw/i386/acpi-build: move generic acpi building helpers into dedictated file

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Move generic acpi building helpers into dedictated file and this can be shared with other machines. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 58 ++ hw/i386/acpi-build.c| 77

[Qemu-devel] [PATCH v6 10/22] hw/arm/virt-acpi-build: Generate RSDT table

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao RSDT points to other tables FADT, MADT, GTDT. This code is shared with x86. Here we still use RSDT as UEFI puts ACPI tables below 4G address space, and UEFI ignore the RSDT or XSDT. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 2

[Qemu-devel] [PATCH v6 03/22] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Introduce a preliminary framework in virt-acpi-build.c with the main ACPI build functions. It exposes the generated ACPI contents to guest over fw_cfg. The required ACPI v5.1 tables for ARM are: - RSDP: Initial table that points to XSDT - RSDT: Points to FADT GTDT MADT tables

[Qemu-devel] [PATCH v6 07/22] hw/arm/virt-acpi-build: Generate FADT table and update ACPI headers

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao In the case of mach virt, it is used to set the Hardware Reduced bit and enable PSCI SMP booting through HVC. So ignore FACS and FADT points to DSDT. Update the header definitions for FADT taking into account the new additions of ACPI v5.1 in `include/hw/acpi/acpi-defs.h` Sig

[Qemu-devel] [PATCH v6 18/22] hw/acpi/aml-build: Add aml_create_dword_field() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée --- hw/acpi/aml-build.c | 11 +++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index f5d74a4..2e

[Qemu-devel] [PATCH v6 19/22] hw/acpi/aml-build: Add aml_dword_io() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée --- hw/acpi/aml-build.c | 18 ++ include/hw/acpi/aml-build.h | 5 + 2 files changed, 23 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index

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

2015-05-07 Thread Shannon Zhao
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-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/

[Qemu-devel] [PATCH v6 05/22] hw/acpi/aml-build: Add aml_interrupt() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Add aml_interrupt() for describing device interrupt in resource template. These can be used to generating DSDT table for ACPI on ARM. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 28 + include/hw/acpi/aml-

[Qemu-devel] [PATCH v6 17/22] hw/acpi/aml-build: Add aml_else() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée --- hw/acpi/aml-build.c | 7 +++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index b03740d..f5d74a4 1

[Qemu-devel] [PATCH v6 13/22] hw/acpi/aml-build: Make aml_buffer() definition consistent with the spec

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao According to ACPI spec, DefBuffer can take two parameters: BufferSize and ByteList. Make it consistent with the spec. If we want to request uninitialized buffer, pass ByteList as NULL to aml_buffer() to reserve spaces. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao

[Qemu-devel] [PATCH v6 14/22] hw/acpi/aml-build: Add ToUUID macro

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Add ToUUID macro, this is useful for generating PCIe ACPI table. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 46 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 47 insertions(+)

[Qemu-devel] [PATCH v6 06/22] hw/arm/virt-acpi-build: Generation of DSDT table for virt devices

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao DSDT consists of the usual common table header plus a definition block in AML encoding which describes all devices in the platform. After initializing DSDT with header information the namespace is created which is followed by the device encodings. The devices are described usi

[Qemu-devel] [PATCH v6 22/22] hw/arm/virt: Enable dynamic generation of ACPI v5.1 tables

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Expose the needed device information to the table generation insfrastructure and register a machine_init_done notify to call virt_acpi_build(). Add CONFIG_ACPI to arm-softmmu.mak. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- default-configs/arm-softmmu.mak

[Qemu-devel] [PATCH v6 20/22] hw/acpi/aml-build: Add Unicode macro

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/acpi/aml-build.c | 18 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 19 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 67b7719..06f9d37 100644 --- a/

[Qemu-devel] [PATCH v6 11/22] hw/arm/virt-acpi-build: Generate RSDP table

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao RSDP points to RSDT which in turn points to other tables. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée --- hw/arm/virt-acpi-build.c | 35 ++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/h

[Qemu-devel] [PATCH v6 16/22] hw/acpi/aml-build: Add aml_lnot() term

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao Reviewed-by: Alex Bennée --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index bda99bf..b03740d

[Qemu-devel] [PATCH v6 12/22] hw/arm/virt-acpi-build: Add PCIe info and generate MCFG table

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Add PCIe info struct, prepare for building PCIe table. And generate MCFG table. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 21 + include/hw/arm/virt-acpi-build.h | 9 + 2 files changed, 30 inse

[Qemu-devel] [PATCH v6 21/22] hw/arm/virt-acpi-build: Add PCIe controller in ACPI DSDT table

2015-05-07 Thread Shannon Zhao
From: Shannon Zhao Add PCIe controller in ACPI DSDT table, so the guest can detect the PCIe. Signed-off-by: Shannon Zhao Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 152 +++ 1 file changed, 152 insertions(+) diff --git a/hw/arm/virt-

Re: [Qemu-devel] [RFC v0 PATCH] cpus: Convert cpu_index into a bitmap

2015-05-07 Thread Bharata B Rao
On Wed, Mar 18, 2015 at 11:50:04AM +0530, Bharata B Rao wrote: > On Tue, Mar 17, 2015 at 11:56:04AM +0100, Andreas Färber wrote: > > Am 17.03.2015 um 09:39 schrieb Bharata B Rao: > > > On Tue, Mar 17, 2015 at 07:56:41AM +0100, Alexander Graf wrote: > > >> > > >> > > >> On 13.03.15 12:56, Bharata B

Re: [Qemu-devel] [PATCH 4/4] semihosting: add --semihosting-config arg sub-argument

2015-05-07 Thread Leon Alrae
On 07/05/2015 07:51, Liviu Ionescu wrote: > >> On 06 May 2015, at 17:57, Leon Alrae wrote: >> >> +static int add_semihosting_arg(const char *name, const char *val, void >> *opaque) >> +{ >> +SemihostingConfig *s = opaque; >> +if (strcmp(name, "arg") == 0) { >> +s->argc++; >> +

Re: [Qemu-devel] Bug report - Windows XP guest failure

2015-05-07 Thread Michael Tokarev
07.05.2015 09:47, Michael Tokarev wrote: > 07.05.2015 09:12, Michael Tokarev wrote: >> 07.05.2015 04:11, G 3 wrote: >>> Did you boot Windows XP to the desktop? I have tested Windows 95, Windows >>> 2000, and Windows XP. All of them fail to boot to the desktop. >> >> Yes, booted to desktop and did

Re: [Qemu-devel] [PATCH v3] block/vdi: Use bdrv_flush after metadata updates

2015-05-07 Thread Stefan Hajnoczi
On Thu, May 07, 2015 at 12:04:56PM +0800, Zhe Qiu wrote: > From: phoeagon > > In reference to > b0ad5a455d7e5352d4c86ba945112011dbeadfb8~078a458e077d6b0db262c4b05fee51d01de2d1d2, > metadata writes to qcow2/cow/qcow/vpc/vmdk are all synced prior to > succeeding writes. > > Only when write is s

Re: [Qemu-devel] [PATCH 1/7] qcow2: use one single memory block for the L2/refcount cache tables

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:25PM +0300, Alberto Garcia wrote: > The qcow2 L2/refcount cache contains one separate table for each cache > entry. Doing one allocation per table adds unnecessary overhead and it > also requires us to store the address of each table separately. > > Since the size of

Re: [Qemu-devel] [Qemu-block] [PATCH 2/7] qcow2: simplify qcow2_cache_put() and qcow2_cache_entry_mark_dirty()

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:26PM +0300, Alberto Garcia wrote: > Since all tables are now stored together, it is possible to obtain > the position of a particular table directly from its address, so the > operation becomes O(1). > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c | 32

Re: [Qemu-devel] [Qemu-block] [PATCH 3/7] qcow2: use an LRU algorithm to replace entries from the L2 cache

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:27PM +0300, Alberto Garcia wrote: > The current algorithm to evict entries from the cache gives always > preference to those in the lowest positions. As the size of the cache > increases, the chances of the later elements of being removed decrease > exponentially. > >

Re: [Qemu-devel] [PATCH 4/7] qcow2: remove qcow2_cache_find_entry_to_replace()

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:28PM +0300, Alberto Garcia wrote: > A cache miss means that the whole array was traversed and the entry > we were looking for was not found, so there's no need to traverse it > again in order to select an entry to replace. > > Signed-off-by: Alberto Garcia > --- > b

Re: [Qemu-devel] [Qemu-block] [PATCH 5/7] qcow2: use a hash to look for entries in the L2 cache

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:29PM +0300, Alberto Garcia wrote: > The current cache algorithm traverses the array starting always from > the beginning, so the average number of comparisons needed to perform > a lookup is proportional to the size of the array. > > By using a hash of the offset as t

Re: [Qemu-devel] [PATCH 6/7] qcow2: make qcow2_cache_put() a void function

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:30PM +0300, Alberto Garcia wrote: > This function never receives an invalid table pointer, so we can make > it void and remove all the error checking code. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c| 7 +-- > block/qcow2-cluster.c | 50

Re: [Qemu-devel] [PATCH 7/7] qcow2: style fixes in qcow2-cache.c

2015-05-07 Thread Stefan Hajnoczi
On Wed, May 06, 2015 at 04:39:31PM +0300, Alberto Garcia wrote: > Fix pointer declaration to make it consistent with the rest of the > code. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi

[Qemu-devel] [PATCH v3 0/3] Introduce eventfd support for virtio-mmio

2015-05-07 Thread Pavel Fedin
Hello! This is updated version of my eventfd for virtio-mmio patch. Style notes have been considered, hopefully it's OK now. It's now 3 parts instead of 4, because the last one was actually a small fix, i decided to merge it with no 3. Kind regards, Pavel Fedin Expert Engineer Samsung Electron

[Qemu-devel] [PATCH v2 1/3] virtio-mmio: introduce set_host_notifier()

2015-05-07 Thread Pavel Fedin
set_host_notifier() is introduced into virtio-mmio now. Most of codes came from virtio-pci. Signed-off-by: Ying-Shiuan Pan Signed-off-by: Pavel Fedin --- hw/virtio/virtio-mmio.c | 72 + 1 file changed, 72 insertions(+) diff --git a/hw/virtio/virt

Re: [Qemu-devel] [PATCH v6 03/22] hw/arm/virt-acpi-build: Basic framework for building ACPI tables on ARM

2015-05-07 Thread Alex Bennée
Shannon Zhao writes: > From: Shannon Zhao > > Introduce a preliminary framework in virt-acpi-build.c with the main > ACPI build functions. It exposes the generated ACPI contents to > guest over fw_cfg. > > The required ACPI v5.1 tables for ARM are: > - RSDP: Initial table that points to XSDT >

[Qemu-devel] [PATCH v2 2/3] virtio-mmio: introduce set_guest_notifiers

2015-05-07 Thread Pavel Fedin
Same as host notifier of virtio-mmio, most of codes came from virtio-pci. The kvm-arm does not yet support irqfd, need to fix the hard-coded part after kvm-arm gets irqfd support. Signed-off-by: Ying-Shiuan Pan Signed-off-by: Pavel Fedin --- hw/virtio/virtio-mmio.c | 61

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Jérémy Fanguède
On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall wrote: > Hi Jérémy, > > On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: >> To maintain cache coherency on ARM, we may need a mechanism to flush >> the data cache. > > In addition to generally just making this functionality available

[Qemu-devel] [PATCH v2 3/3] virtio-mmio: start ioeventfd when status gets DRIVER_OK

2015-05-07 Thread Pavel Fedin
Signed-off-by: Ying-Shiuan Pan Signed-off-by: Pavel Fedin --- hw/virtio/virtio-mmio.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 8756240..0ab270d 100644 --- a/hw/virtio/virtio-mmio.c

Re: [Qemu-devel] [PATCH v3 0/3] Introduce eventfd support for virtio-mmio

2015-05-07 Thread Shannon Zhao
Hi Pavel, Have you noticed below thread? This thread is based on the patchset from Ying-Shiuan Pan. http://lists.gnu.org/archive/html/qemu-devel/2014-11/msg00594.html On 2015/5/7 18:46, Pavel Fedin wrote: > Hello! > > This is updated version of my eventfd for virtio-mmio patch. Style notes >

[Qemu-devel] [PATCH] glib-compat.h: change assert to g_assert

2015-05-07 Thread Michael Tokarev
include/glib-compat.h defines a bunch of functions based on glib primitives, and uses assert() without including assert.h. Replace assert() with g_assert() to make the file more self-contained, and to fix compilation breakage after 28507a415a9b1e. Reported-by: Laurent Desnogues Signed-off-by: Mi

Re: [Qemu-devel] [RFC] ARM/ARM64: KVM: Implement KVM_FLUSH_DCACHE_GPA ioctl

2015-05-07 Thread Christoffer Dall
On Thu, May 07, 2015 at 12:50:50PM +0200, Jérémy Fanguède wrote: > On Wed, May 6, 2015 at 4:12 PM, Christoffer Dall > wrote: > > Hi Jérémy, > > > > On Tue, May 05, 2015 at 11:13:11AM +0200, Jérémy Fanguède wrote: > >> To maintain cache coherency on ARM, we may need a mechanism to flush > >> the da

[Qemu-devel] [PATCH RFC 0/2] virt bare-metal payload infrastructure with atomic test case

2015-05-07 Thread Alexander Spyridakis
This series implements a bare-metal test payload for the ARM and AARCH64 virt machine models. With the new direction of TCG to finally get multi-threaded capabilities, simple and easily deployed tests are needed, to reproduce race conditions and intuitively debug QEMU's TCG internals. The goal of

[Qemu-devel] [PATCH 2/2] atomic-test: Add spinlock test case

2015-05-07 Thread Alexander Spyridakis
Sample spinlock test case with the option to implement the spinlock by means of GCC atomic instructions or unsafe memory operations. Additionally, printf is wrapped around a spinlock to avoid concurrent access to the serial device. Suggested-by: Jani Kokkonen Suggested-by: Claudio Fontana Signed

[Qemu-devel] [PATCH RFC 1/2] atomic-test: Implement ARM and AARCH64 basic bare-metal infrastructure

2015-05-07 Thread Alexander Spyridakis
Minimal payload initialization for the virt machine model. Setup a stack and jump to C code, where CPU0 will boot any discovered secondary cores through PSCI. Immediately after all cores are turned-off and the guest is powered down. Added printf functionality is based on the multiboot test. In a s

Re: [Qemu-devel] [PULL 00/15] migration pull request

2015-05-07 Thread Juan Quintela
Eric Blake wrote: > On 05/06/2015 12:37 PM, Peter Maydell wrote: >> On 6 May 2015 at 18:49, Juan Quintela wrote: >>> Hi >>> > >> >> Fails to build on 32 bit, I'm afraid: >> >> /root/qemu/arch_init.c: In function ‘do_data_decompress’: >> /root/qemu/arch_init.c:1486:28: error: passing argument 2

Re: [Qemu-devel] [PATCH] migration: Fix migration state update issue

2015-05-07 Thread Dr. David Alan Gilbert
* Liang Li (liang.z...@intel.com) wrote: > If live migration is very fast and can be completed in 1 second, > the dirty_sync_count of MigrationState will not be updated. > Then you will see "dirty sync count: 0" in qemu monitor even if > the actual dirty sync count is not 0. > > Signed-off-by: Lia

Re: [Qemu-devel] [PATCH] migration: Fix migration state update issue

2015-05-07 Thread Juan Quintela
Liang Li wrote: > If live migration is very fast and can be completed in 1 second, > the dirty_sync_count of MigrationState will not be updated. > Then you will see "dirty sync count: 0" in qemu monitor even if > the actual dirty sync count is not 0. > > Signed-off-by: Liang Li Reviewed-by: Juan

Re: [Qemu-devel] [PATCH v3 0/3] Introduce eventfd support for virtio-mmio

2015-05-07 Thread Pavel Fedin
Hello! > Have you noticed below thread? This thread is based on the patchset from Ying- > Shiuan Pan. > > http://lists.gnu.org/archive/html/qemu-devel/2014-11/msg00594.html Yes, of course. Actually my set is based on that one, it's just updated against current master and improved a little bit.

[Qemu-devel] [PATCH v2 2/2] semihosting: add --semihosting-config arg sub-argument

2015-05-07 Thread Leon Alrae
Add new "arg" sub-argument to the --semihosting-config allowing to pass multiple input argument separately. It is required for example by UHI semihosting to construct argc and argv. Signed-off-by: Leon Alrae --- include/exec/semihost.h | 12 qemu-options.hx | 8 +--- vl

[Qemu-devel] [PATCH v2 1/2] semihosting: create SemihostingConfig structure and semihost.h

2015-05-07 Thread Leon Alrae
Remove semihosting_enabled and semihosting_target and replace them with SemihostingConfig structure containing equivalent fields. The structure is defined in vl.c where it is actually set. Also introduce separate header file include/exec/semihost.h allowing to access semihosting config related stu

[Qemu-devel] [PULL 01/16] docs: Add a doc about multiple thread compression

2015-05-07 Thread Juan Quintela
From: Liang Li Give some details about the multiple thread (de)compression and how to use it in live migration. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- docs/multi-thread-compression.txt

[Qemu-devel] [PULL 03/16] migration: Add the framework of multi-thread decompression

2015-05-07 Thread Juan Quintela
From: Liang Li Add the code to create and destroy the multiple threads those will be used to do data decompression. Left some functions empty just to keep clearness, and the code will be added later. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Reviewed

Re: [Qemu-devel] [PATCH 4/4] semihosting: add --semihosting-config arg sub-argument

2015-05-07 Thread Liviu Ionescu
> On 07 May 2015, at 12:52, Leon Alrae wrote: > >> is it that difficult to count the "arg"s and correctly alloc the array? > > This probably would require going through the list twice the code to iterate is already there, for other options, you just need to add a branch to the existing case.

[Qemu-devel] [PULL 05/16] arch_init: Alloc and free data struct for compression

2015-05-07 Thread Juan Quintela
From: Liang Li Define the data structure and variables used to do multiple thread compression, and add the code to initialize and free them. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- arch

[Qemu-devel] [PULL 06/16] arch_init: Add and free data struct for decompression

2015-05-07 Thread Juan Quintela
From: Liang Li Define the data structure and variables used to do multiple thread decompression, and add the code to initialize and free them. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- ar

[Qemu-devel] [PULL 02/16] migration: Add the framework of multi-thread compression

2015-05-07 Thread Juan Quintela
From: Liang Li Add the code to create and destroy the multiple threads those will be used to do data compression. Left some functions empty to keep clearness, and the code will be added later. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Reviewed-by: Ju

[Qemu-devel] [PULL 00/16] Migration pull request (v2)

2015-05-07 Thread Juan Quintela
wing changes since commit 38003aee196a96edccd4d64471beb1b67e9b2b17: Merge remote-tracking branch 'remotes/rth/tags/tcg-next-20150505' into staging (2015-05-06 11:16:35 +0100) are available in the git repository at: git://github.com/juanquintela/qemu.git tags/migration/20150

[Qemu-devel] [PULL 08/16] migration: Add the core code of multi-thread compression

2015-05-07 Thread Juan Quintela
From: Liang Li Implement the core logic of the multiple thread compression. At this point, multiple thread compression can't co-work with xbzrle yet. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Signed-off-by: Juan Quintela --- arch_init.c | 184 +

[Qemu-devel] [PULL 11/16] migration: Add interface to control compression

2015-05-07 Thread Juan Quintela
From: Liang Li The multiple compression threads can be turned on/off through qmp and hmp interface before doing live migration. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Reviewed-by: Eric Blake Signed-off-by: Juan Quintela --- migration/migration.

[Qemu-devel] [PULL 04/16] qemu-file: Add compression functions to QEMUFile

2015-05-07 Thread Juan Quintela
From: Liang Li qemu_put_compression_data() compress the data and put it to QEMUFile. qemu_put_qemu_file() put the data in the buffer of source QEMUFile to destination QEMUFile. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- incl

[Qemu-devel] [PULL 13/16] migration: Add qmp commands to set and query parameters

2015-05-07 Thread Juan Quintela
From: Liang Li Add the qmp commands to tune and query the parameters used in live migration. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Signed-off-by: Juan Quintela --- migration/migration.c | 56 ++ qapi-schema.json | 45 ++

[Qemu-devel] [PULL 10/16] migration: Add the core code for decompression

2015-05-07 Thread Juan Quintela
From: Liang Li Implement the core logic of multiple thread decompression, the decompression can work now. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Signed-off-by: Juan Quintela --- arch_init.c | 50 -- 1 file changed, 48 insertions(+),

[Qemu-devel] [PATCH v2 0/2] semihosting: clean up and add --semihosting-config arg

2015-05-07 Thread Leon Alrae
Hi, This patch series adds "arg=" sub-option to --semihosting-config group. It allows building up a list of input arguments as it can appear multiple times in the command line. This is a flexible solution for creating argc/argv for the guest program (needed by UHI semihosting for example). RFC pat

[Qemu-devel] [PULL 07/16] migration: Split save_zero_page from ram_save_page

2015-05-07 Thread Juan Quintela
From: Liang Li Split the function save_zero_page from ram_save_page so that we can reuse it later. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- arch_init.c | 61 +++-- 1

[Qemu-devel] [PULL 09/16] migration: Make compression co-work with xbzrle

2015-05-07 Thread Juan Quintela
From: Liang Li Now, multiple thread compression can co-work with xbzrle. when xbzrle is on, multiple thread compression will only work at the first round of RAM data sync. Signed-off-by: Liang Li Signed-off-by: Yang Zhang Reviewed-by: Dr.David Alan Gilbert Signed-off-by: Juan Quintela --- a

  1   2   3   >