Re: [Qemu-devel] [PATCH 3/5] target-i386: call x86_cpu_realize() after APIC is initialized.

2012-07-09 Thread igor
On 06/20/2012 03:35 PM, Andreas Färber wrote: Am 20.06.2012 14:59, schrieb Igor Mammedov: It's not correct to make CPU runnable (i.e. calling x86_cpu_realize()) when not all properties are set (APIC in this case). Fix it by calling x86_cpu_realize() at board level after APIC is initia

[Qemu-devel] [Bug 1805445] [NEW] QEMU arm virt machine was stopped by STMFD command while debug process

2018-11-27 Thread Igor
Public bug reported: Hello, i have a big problem with QEMU arm virtual machine. So... I run QEMU machine with bare-metal ThreadX fullflash from Texet TM-333 phone (Spreadtrum platform) [CODE]qemu-system-arm -S -gdb tcp::1234,ipv4 -drive file=C:\cygwin64\home\flash.bin,if=mtd,format=raw -M palme

[Qemu-devel] [Bug 1805445] Re: QEMU arm virt machine was stopped by STMFD command while debug process

2018-11-27 Thread Igor
Okey, thank you for attentioned me to arm mode. The STR instruction is STR R11, [0x8212]. Can I set rule for qemu to write RAM from 0x8000 to 0x8FFF for execute basic arm instruction, Or need fix source and rebuild qemu? I have experience to rebuild source qemu for change spi flash f

[Qemu-devel] [Bug 1805445] Re: QEMU arm virt machine was stopped by STMFD command while debug process

2018-11-27 Thread Igor
Maybe this is correct for palmetto-board, but qemu user should be able to debug any basic arm instructions for generic arm board with general purpose SPI, I2C etc... My SPI Flash has 4 Mb, and RAM adress may start from 0x40, This is impossible for 256 Mb Flash. It would be great, if qemu can bu

[Qemu-devel] [Bug 1805445] Re: QEMU arm virt machine was stopped by STMFD command while debug process

2018-11-27 Thread Igor
** Description changed: Hello, i have a big problem with QEMU arm virtual machine. So... I run QEMU machine with bare-metal ThreadX fullflash from Texet TM-333 phone (Spreadtrum platform) [CODE]qemu-system-arm -S -gdb tcp::1234,ipv4 -drive file=C:\cygwin64\home\flash.bin,if=mtd,format=raw

[Qemu-devel] [Bug 1805445] Re: QEMU arm virt machine was stopped by STMFD command while debug process

2018-11-28 Thread Igor
Hm, I am create a new machine based on palmetto-bmc static const AspeedBoardConfig aspeed_boards[] = ...{ .name = MACHINE_TYPE_NAME("texet-tm-333"), .desc = "Spreadtrum teXet TM-333 (ARM926EJ-S)", .soc_name = "ast2500-a1", .hw_str

[Qemu-devel] [Bug 1805445] Re: QEMU arm virt machine was stopped by STMFD command while debug process

2018-11-28 Thread Igor
/* * Allocate RAM after the memory controller has checked the size * was valid. If not, a default value is used. */ ram_size = object_property_get_uint(OBJECT(&bmc->soc), "ram-size", &error_abort); memory_region_allocate_system_memory(&bmc->ram1, NULL, "ram1", ram_size);

Re: [Qemu-devel] [Bug 1715700] Re: Windows 7 guest won't boot on qemu 2.10 (works on 2.9)

2017-09-19 Thread Igor
On Tue, 19 Sep 2017 10:39:00 - Gerd Hoffmann <1715...@bugs.launchpad.net> wrote: > could be this commit breaks vbeshim ... > is there a way to fix vbeshim instead of reverting RO limitation that commit introduced? -- You received this bug notification because you are a member of qemu- deve

Re: [Qemu-devel] [Bug 1715700] Re: Windows 7 guest won't boot on qemu 2.10 (works on 2.9)

2017-09-19 Thread Igor
On Tue, 19 Sep 2017 10:39:00 - Gerd Hoffmann <1715...@bugs.launchpad.net> wrote: > could be this commit breaks vbeshim ... > Did a bit of testing: w7 iso boots to install screen with seabios but stuck at win boot logo with ovmf. I've heard (maybe wrongly) that seabios would also break in th

Re: [Qemu-devel] [Bug 1715700] Re: Windows 7 guest won't boot on qemu 2.10 (works on 2.9)

2017-09-19 Thread Igor
On Tue, 19 Sep 2017 10:59:51 - "Laszlo Ersek \(Red Hat\)" wrote: > Thanks, Gerd, for the CC -- I agree, this commit (208fa0e43645) almost > certainly breaks the VBE Shim. Displaying the patch with a bit larger > context, > > > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > > index 22e16031b03b..

[Qemu-devel] [Bug 1821884] [NEW] Extend uefi-test-tools to report SMBIOS location

2019-03-27 Thread Igor
Public bug reported: UEFI helper app exposes the pointer to RSDP ACPI table that firmware allocates in guest's RAM but it doesn't do so for SMBIOS tables. Hence bios table test would skip testing SMBIOS tables to workaround shortcoming. This bug is a request to expose two new entry point fields

Re: [Qemu-devel] [PATCH v5 09/15] hw: Added generic FIFO API.

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 06:16 AM, Peter A. G. Crosthwaite wrote: Added a FIFO API that can be used to create and operate byte FIFOs. Signed-off-by: Peter A. G. Crosthwaite --- hw/Makefile.objs |1 + hw/fifo.c| 79 ++ hw/fifo.h|

Re: [Qemu-devel] [PATCH v5 09/15] hw: Added generic FIFO API.

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 06:16 AM, Peter A. G. Crosthwaite wrote: Added a FIFO API that can be used to create and operate byte FIFOs. Signed-off-by: Peter A. G. Crosthwaite --- hw/Makefile.objs |1 + hw/fifo.c| 79 ++ hw/fifo.h|

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 02:30 PM, Peter Maydell wrote: On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: +static void sdhci_sdma_transfer_multi_blocks(SDHCIState *s) +{ +bool page_aligned = false; +unsigned int n, begin; +const uint16_t block_size = s->blksize & 0x0fff; +uint32_t bo

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 03:15 PM, Peter Maydell wrote: On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: From: Igor Mitsyanko Device model for standard SD Host Controller Interface (SDHCI) compliant with version 2.00 of SD association specification. +typedef struct ADMADescr

Re: [Qemu-devel] [PATCH v6 2/4] exynos4210: Added SD host controller model

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 02:56 PM, Peter Maydell wrote: On 6 August 2012 04:25, Peter A. G. Crosthwaite wrote: +static uint64_t +exynos4210_sdhci_readfn(void *opaque, target_phys_addr_t offset, unsigned size) +{ +Exynos4SDHCIState *s = (Exynos4SDHCIState *)opaque; +uint32_t ret; + +switch (of

Re: [Qemu-devel] [PATCH v6 1/4] hw: introduce standard SD host controller

2012-08-06 Thread Igor Mitsyanko
Recently I've noticed that drive_get_next() usage is not very convenient if you want to use specific SD controller interface. Maybe we should switch from drive_get_next() to DEFINE_PROP_DRIVE()? It'll still preserve "-sd .." behaviour. What do you think Peter?

Re: [Qemu-devel] [PATCH v5 09/15] hw: Added generic FIFO API.

2012-08-06 Thread Igor Mitsyanko
On 08/06/2012 01:48 PM, Peter Maydell wrote: On 6 August 2012 03:16, Peter A. G. Crosthwaite wrote: Added a FIFO API that can be used to create and operate byte FIFOs. I'm not asking for actual conversions, but it would be nice to see a list of some devices that could in principle be moved to

Re: [Qemu-devel] [PATCH v5 09/15] hw: Added generic FIFO API.

2012-08-06 Thread Igor Mitsyanko
On 08/07/2012 10:10 AM, Peter Crosthwaite wrote: + +extern const VMStateDescription vmstate_fifo8; + +#define VMSTATE_FIFO8(_field, _state) { \ +.name = (stringify(_field)), \ +.size = sizeof(Fifo8),

Re: [Qemu-devel] [PATCH 0/4 v2] target-i386: move tcg intialization inside CPU object

2012-08-08 Thread Igor Mammedov
ping - Original Message - > From: "Igor Mammedov" > To: qemu-devel@nongnu.org > Cc: "peter maydell" , aligu...@us.ibm.com, > ehabk...@redhat.com, s...@weilnetz.de, > mtosa...@redhat.com, ag...@suse.de, mdr...@linux.vnet.ibm.com, > blauwir

Re: [Qemu-devel] KVM call agenda for tuesday 31

2012-08-09 Thread Igor Mitsyanko
On 08/08/2012 08:25 PM, Andreas Färber wrote: Am 31.01.2012 15:01, schrieb Mitsyanko Igor: On 01/31/2012 05:15 PM, Andreas Färber wrote: Am 31.01.2012 00:53, schrieb Anthony Liguori: On 01/30/2012 05:41 PM, Andreas Färber wrote: Am 30.01.2012 19:55, schrieb Juan Quintela: Please send in any

[Qemu-devel] [RFC 00/20] target-i386: convert CPU features into properties

2012-08-10 Thread Igor Mammedov
build and run tested in FC17 host with x86_64-linux-user, x86_64-softmmu targets Igor Mammedov (20): target-i386: return Error from cpu_x86_find_by_name() target-i386: cpu_x86_register(): report error from property setter target-i386: if x86_cpu_realize() failed report error and do cleanup

[Qemu-devel] [RFC 01/20] target-i386: return Error from cpu_x86_find_by_name()

2012-08-10 Thread Igor Mammedov
it will allow to use property setters there later. Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 880cfea..ee25309 100644 --- a/target-i386/cpu.c +++ b/target

[Qemu-devel] [RFC 16/20] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t

2012-08-10 Thread Igor Mammedov
vendor[13] array to keep its value. And vendor property setter is used to access/set value on CPU. Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 76 +-- target-i386/cpu.h | 10 +++- 2 files changed, 20 insertions(+), 66 deletions

[Qemu-devel] [RFC 11/20] target-i386: convert 'check' and 'enforce' features into properties

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 68 ++- 1 file changed, 57 insertions(+), 11 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 7734613..a154e89 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c

[Qemu-devel] [RFC 20/20] target-i386: move default init of cpuid_kvm_features bitmap into CPU initializer from cpudef

2012-08-10 Thread Igor Mammedov
ff-by: Igor Mammedov --- target-i386/cpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 43601a3..e266792 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1093,6 +1093,9 @@ static void cpudef_2_x86_cpu(X86CPU

[Qemu-devel] [RFC 07/20] target-i386: convert cpuid features into properties

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 103 ++ 1 file changed, 103 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index a47cc12..4b22598 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -605,6 +605,103

Re: [Qemu-devel] [RFC 00/20] target-i386: convert CPU features into properties

2012-08-10 Thread Igor Mammedov
PS: forgot to add git tree for testing: https://github.com/imammedo/qemu/tree/x86-cpu-properties_RFC - Original Message - > From: "Igor Mammedov" > To: qemu-devel@nongnu.org > Cc: aligu...@us.ibm.com, stefa...@linux.vnet.ibm.com, g...@redhat.com, "jan > kisz

[Qemu-devel] [RFC 12/20] add visitor for parsing hz[KMG] input string

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- qapi/qapi-visit-core.c | 11 +++ qapi/qapi-visit-core.h | 2 ++ qapi/string-input-visitor.c | 22 ++ 3 files changed, 35 insertions(+) diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index 7a82b63..322cfa6

[Qemu-devel] [RFC 19/20] target-i386: move init of "hypervisor" feature into CPU initializer from cpudef

2012-08-10 Thread Igor Mammedov
"hypervisor" CPU feature is unconditionally enabled/overridden even if it's cleared in cpudef. Moving it inside CPU initializer from cpudef will help to split cpu_x86_find_by_name() into default init and user settable properties. Signed-off-by: Igor Mammedov --- target-i386/cp

[Qemu-devel] [RFC 17/20] target-i386: parse cpu_model string into set of stringified properties

2012-08-10 Thread Igor Mammedov
nused function but I guess it is easier for review this way Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 52 1 file changed, 52 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 6f1b66e..7555b08 100644 --- a/target

[Qemu-devel] [RFC 13/20] target-i386: use visit_type_hz to parse tsc_freq property value

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index a154e89..c935c04 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -952,7 +952,7 @@ static void x86_cpuid_set_tsc_freq(Object

Re: [Qemu-devel] [RFC 12/20] add visitor for parsing hz[KMG] input string

2012-08-10 Thread Igor Mammedov
- Original Message - > From: "Andreas Färber" > To: "Igor Mammedov" > Cc: qemu-devel@nongnu.org, g...@redhat.com, ler...@redhat.com, > pbonz...@redhat.com, stefa...@linux.vnet.ibm.com, > mdr...@linux.vnet.ibm.com, ak...@redhat.com, ehabk...@redhat

[Qemu-devel] [RFC 06/20] target-i386: xlevel should be more than 0x80000000, move fixup into setter

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 783c6f4..a47cc12 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -745,8 +745,17 @@ static void

[Qemu-devel] [RFC 02/20] target-i386: cpu_x86_register(): report error from property setter

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index ee25309..17e98e1 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1186,6 +1186,7 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model

[Qemu-devel] [RFC 14/20] target-i386: introduce vendor-override property

2012-08-10 Thread Igor Mammedov
t; property setter. It's up-to cpu_model string parser to maintain legacy behavior when user overrides vendor on command line. v2: - convert cpuid_vendor_override to bool to reflect its real usage Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 31 +-- t

[Qemu-devel] [RFC 05/20] target-i386: move out CPU features initialization in separate func

2012-08-10 Thread Igor Mammedov
later it could be used in cpu_x86_find_by_name() to init CPU from found cpu_def Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 62 ++- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

[Qemu-devel] [RFC 08/20] target-i386: convert 'hv_spinlocks' feature into property

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 4b22598..fb98bbd 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -964,6 +964,32 @@ static void

[Qemu-devel] [RFC 03/20] target-i386: if x86_cpu_realize() failed report error and do cleanup

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/helper.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index 8a5da3d..a0e4c89 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1151,6 +1151,7 @@ X86CPU

[Qemu-devel] [RFC 18/20] target-i386: use properties to set/unset user specified features on CPU

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 167 +++--- 1 file changed, 20 insertions(+), 147 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 7555b08..0174c4d 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c

[Qemu-devel] [RFC 15/20] target-i386: use define for cpuid vendor string size

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 6 +++--- target-i386/cpu.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index d3ce849..368360f 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -863,13 +863,13 @@ static

[Qemu-devel] [RFC 09/20] target-i386: convert 'hv_relaxed' feature into property

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index fb98bbd..f73309e 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -988,6 +988,26 @@ static void

[Qemu-devel] [RFC 04/20] target-i386: filter out not TCG features if running without kvm at realize time

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 17e98e1..d0dec63 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1171,17 +1171,6 @@ int

[Qemu-devel] [RFC 10/20] target-i386: convert 'hv_vapic' feature into property

2012-08-10 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index f73309e..7734613 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1008,6 +1008,26 @@ static void

[Qemu-devel] [PATCH] exec.c: fix dirty bitmap reallocation

2012-08-10 Thread Igor Mitsyanko
ween real dirty page number and value in ram_list.dirty_pages variable, which in turn could (and will) result in errors during VM migration. Zero initialize new dirty bitmap bytes to fix this problem. Signed-off-by: Igor Mitsyanko --- exec.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

Re: [Qemu-devel] [PATCH] vmstate: Add support for saving/loading bitmaps

2012-08-10 Thread Igor Mitsyanko
ne is: VMSTATE_BITMAP(wp_groups, SDState, 1, wpgrps_size), (and you'll need to make wpgrps_size an int32_t, not uint32_t). Igor: I've only tested this fairly lightly, you'll probably want to do things like testing save on 32 bit and load on 64 bit and vice-versa.

Re: [Qemu-devel] [PATCH V4 00/12] SD save/load support, SD qomification and bug fixes

2012-08-10 Thread Igor Mitsyanko
On 08/10/2012 07:06 PM, Peter Maydell wrote: On 27 July 2012 20:29, Igor Mitsyanko wrote: Igor Mitsyanko (12): hw/sd.c: convert wp_groups in SDState to bitfield hw/sd.c: make sd_wp_addr() accept 64 bit address argument hw/sd.c: introduce wrapper for conversion address to wp group

Re: [Qemu-devel] [PATCH] vmstate: Add support for saving/loading bitmaps

2012-08-10 Thread Igor Mitsyanko
On 08/10/2012 08:30 PM, Peter Maydell wrote: On 10 August 2012 17:22, Igor Mitsyanko wrote: On 08/09/2012 03:54 PM, Peter Maydell wrote: --- a/vmstate.h +++ b/vmstate.h @@ -139,6 +139,7 @@ extern const VMStateInfo vmstate_info_uint64; extern const VMStateInfo vmstate_info_timer; extern

[Qemu-devel] [PATCH 0/3 RESEND] Exynos4210: license and RAM vmstate fixes

2012-08-10 Thread Igor Mitsyanko
bably a bug too, but still.. Igor Mitsyanko (3): exynos4210: drop "All rights reserved" line from files license exynos4210.c: register chipid_mem and rom_mem with vmstate hw/exynos4210.c: set chipid_and_omr array size to TARGET_PAGE_SIZE hw/exynos4210.c |6 -- hw/exyno

[Qemu-devel] [PATCH 3/3] hw/exynos4210.c: set chipid_and_omr array size to TARGET_PAGE_SIZE

2012-08-10 Thread Igor Mitsyanko
, specifically, it could cause segfault during VM saving. Setting chipid_and_omr aray size to TARGET_PAGE_SIZE helps us to avoid any problems. Signed-off-by: Igor Mitsyanko --- hw/exynos4210.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/exynos4210.c b/hw/exynos4210

[Qemu-devel] [PATCH 2/3] exynos4210.c: register chipid_mem and rom_mem with vmstate

2012-08-10 Thread Igor Mitsyanko
id_mem and rom_mem for migration to avoid this problem. Signed-off-by: Igor Mitsyanko --- hw/exynos4210.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/exynos4210.c b/hw/exynos4210.c index a3a06f7..94d2e41 100644 --- a/hw/exynos4210.c +++ b/hw/exynos4210.c @@ -20

[Qemu-devel] [PATCH 1/3] exynos4210: drop "All rights reserved" line from files license

2012-08-10 Thread Igor Mitsyanko
It has been noted that "All rights reserved" statement conflicts with GPL, remove it. Signed-off-by: Igor Mitsyanko --- hw/exynos4210.c |2 +- hw/exynos4210.h |2 +- hw/exynos4210_combiner.c |3 +-- hw/exynos4210_fimd.c |3 +-- hw/exynos

Re: [Qemu-devel] ARM patches for QEMU 1.2: final call

2012-08-10 Thread Igor Mitsyanko
On 08/10/2012 08:21 PM, Peter Maydell wrote: Last call for any ARM related patches to go into 1.2. My current queue looks like this: 59cbd70 hw/sd.c: make sd_wp_addr() return bool 8b4cc14 hw/sd.c: make sd_dataready() return bool 025caa6 hw/sd.c: convert binary variables to bool 38d24e6 hw/sd.c:

[Qemu-devel] [NOT RFC] target-i386: prepare for convertion to subclasses

2012-08-10 Thread Igor Mammedov
crude attempt to show how to move out cpu_model string handling out of cpu.c and make CPU more suitable to converting into subclasses. Signed-off-by: Igor Mammedov --- target-i386/cpu.c| 83 target-i386/helper.c | 89

Re: [Qemu-devel] [RFC 01/15] cpus.h: include cpu-common.h

2012-08-13 Thread Igor Mammedov
-1,6 +1,8 @@ #ifndef QEMU_CPUS_H #define QEMU_CPUS_H +#include "qemu-common.h" + /* cpus.c */ void qemu_init_cpu_loop(void); void resume_all_vcpus(void); -- Regards, Igor

Re: [Qemu-devel] [RFC 02/15] hw/apic.c: rename bit functions to not conflict with bitops.h (v2)

2012-08-13 Thread Igor Mammedov
t(deliver_bitmask, s->idx); break; } @@ -566,8 +567,8 @@ int apic_get_interrupt(DeviceState *d) apic_sync_vapic(s, SYNC_TO_VAPIC); return s->spurious_vec & 0xff; } -reset_bit(s->irr, intno); -set_bit(s->isr, intno); +apic_reset_bit(s->irr, intno); +apic_set_bit(s->isr, intno); apic_sync_vapic(s, SYNC_TO_VAPIC); /* re-inject if there is still a pending PIC interrupt */ Looks good to me. -- Regards, Igor

Re: [Qemu-devel] [RFC 03/15] kvm: set vcpu_id to APIC ID instead of CPU index

2012-08-13 Thread Igor Mammedov
DPRINTF("kvm_init_vcpu\n"); -ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpu_index); +ret = kvm_vm_ioctl(s, KVM_CREATE_VCPU, env->cpuid_apic_id); if (ret < 0) { DPRINTF("kvm_create_vcpu failed\n"); goto err; -- Regards, Igor

Re: [Qemu-devel] [RFC 06/15] pc: set FW_CFG data based on APIC ID calculation

2012-08-13 Thread Igor Mammedov
unsigned int apic_id_limit(void); + /* helper.c */ int cpu_x86_handle_mmu_fault(CPUX86State *env, target_ulong addr, -- Regards, Igor

Re: [Qemu-devel] [RFC 14/15] i386: topology & APIC ID utility functions (v2)

2012-08-14 Thread Igor Mammedov
0), ==, (2 << 2) | 0); > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 2 * 3 + 1), ==, (2 << 2) | 1); > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 2 * 3 + 2), ==, (2 << 2) | 2); > + > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 5 * 3 + 0), ==, (5 << 2) | 0); > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 5 * 3 + 1), ==, (5 << 2) | 1); > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 5 * 3 + 2), ==, (5 << 2) | 2); > + > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 1 * 6 * 3 + 0 * 3 + 0), ==, > + (1 << 5)); > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 1 * 6 * 3 + 1 * 3 + 1), ==, > + (1 << 5) | (1 << 2) | 1); > +g_assert_cmpuint(topo_apicid_for_cpu(6, 3, 3 * 6 * 3 + 5 * 3 + 2), ==, > + (3 << 5) | (5 << 2) | 2); > + > + > +/* Check the APIC ID -> {pkg,core,thread} ID functions */ > +g_assert_cmpuint( apicid_pkg_id(6, 3, (3 << 5) | (5 << 2) | 2), ==, 3); > +g_assert_cmpuint(apicid_core_id(6, 3, (3 << 5) | (5 << 2) | 2), ==, 5); > +g_assert_cmpuint( apicid_smt_id(6, 3, (3 << 5) | (5 << 2) | 2), ==, 2); > +} > + > +int main(int argc, char **argv) > +{ > +g_test_init(&argc, &argv, NULL); > + > +g_test_add_func("/cpuid/topology/basic", test_topo_bits); > + > +g_test_run(); > + > +return 0; > +} > -- > 1.7.11.2 > > -- Regards, Igor

Re: [Qemu-devel] [RFC 11/20] target-i386: convert 'check' and 'enforce' features into properties

2012-08-14 Thread Igor Mammedov
On Fri, 10 Aug 2012 12:09:04 -0300 Eduardo Habkost wrote: > On Fri, Aug 10, 2012 at 01:22:27PM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > target-i386/cpu.c | 68 > > ++- > > 1 f

Re: [Qemu-devel] [RFC 18/20] target-i386: use properties to set/unset user specified features on CPU

2012-08-14 Thread Igor Mammedov
On Mon, 13 Aug 2012 17:48:24 -0300 Eduardo Habkost wrote: > On Fri, Aug 10, 2012 at 01:22:34PM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > target-i386/cpu.c | 167 > > +++--- > > 1 fi

Re: [Qemu-devel] [RFC 11/20] target-i386: convert 'check' and 'enforce' features into properties

2012-08-15 Thread Igor Mammedov
On Wed, 15 Aug 2012 08:39:54 -0300 Eduardo Habkost wrote: > On Tue, Aug 14, 2012 at 11:18:47PM +0200, Igor Mammedov wrote: > > On Fri, 10 Aug 2012 12:09:04 -0300 > > Eduardo Habkost wrote: > > > > > On Fri, Aug 10, 2012 at 01:22:27PM +0200, Igor Mammedov wrot

Re: [Qemu-devel] [RFC 20/20] target-i386: move default init of cpuid_kvm_features bitmap into CPU initializer from cpudef

2012-08-15 Thread Igor Mammedov
On Fri, 10 Aug 2012 12:24:48 -0300 Eduardo Habkost wrote: > On Fri, Aug 10, 2012 at 01:22:36PM +0200, Igor Mammedov wrote: > > Moving it inside CPU initializer from cpudef will help to split > > cpu_x86_find_by_name() into default init and user settable properties. > &

Re: [Qemu-devel] [RFC 18/20] target-i386: use properties to set/unset user specified features on CPU

2012-08-15 Thread Igor Mammedov
On Wed, 15 Aug 2012 09:37:22 -0300 Eduardo Habkost wrote: > Another issue: > > On Fri, Aug 10, 2012 at 01:22:34PM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > --- > > target-i386/cpu.c | 167 > > +++--

[Qemu-devel] [PATCH 00/21] target-i386: convert CPU features into properties

2012-08-15 Thread Igor Mammedov
build and run tested in FC17 host with x86_64-linux-user, x86_64-softmmu targets changes since RFC are documented in idividual patch descriptions Thanks Andreas, Blue, Eduardo for reviews and suggestions. git tree for testing: https://github.com/imammedo/qemu/tree/x86-cpu-properties_v1 Igor

[Qemu-devel] [PATCH 01/21] target-i386: return Error from cpu_x86_find_by_name()

2012-08-15 Thread Igor Mammedov
it will allow to use property setters there later. Signed-off-by: Igor Mammedov -- v2: style change, add braces (reqested by Blue Swirl) --- target-i386/cpu.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[Qemu-devel] [PATCH 11/21] target-i386: convert 'check' and 'enforce' features into properties

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov -- v2: * restore original behavior, check features against host before they might be filtered out by TCG masks. spotted-by: Eduardo Habkost --- target-i386/cpu.c | 68 ++- 1 file changed, 57 insertions(+), 11

[Qemu-devel] [PATCH 12/21] add visitor for parsing hz[KMG] input string

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov -- v2: * replaced _hz suffix for frequency visitor by _freq suffix suggested-by: Andreas Färber * fixed typo, spotted-by: Andreas Färber --- qapi/qapi-visit-core.c | 11 +++ qapi/qapi-visit-core.h | 2 ++ qapi/string-input-visitor.c | 22

Re: [Qemu-devel] [PATCH 06/11] Add xbzrle_encode_buffer and xbzrle_decode_buffer functions

2012-08-15 Thread Igor Mitsyanko
This patch broke master build, it causes compilation error with gcc 4.6.1: /home/mackross/eclipse_linux_cdt_space/qemu_exynos4/savevm.c: In function ‘xbzrle_encode_buffer’: /home/mackross/eclipse_linux_cdt_space/qemu_exynos4/savevm.c:2476:13: error: overflow in implicit constant conversion [-We

[Qemu-devel] [PATCH 18/21] target-i386: use properties to set/unset user specified features on CPU

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Signed-off-by: Eduardo Habkost -- v2: * fix error of initializing from incorrect cpu model definition use x86_cpu_def instead of def. spotted-by: Eduardo Habkost * add missing env in cpu_x86_find_by_name() * added cpu_x86_set_props() to make following code

[Qemu-devel] [PATCH 08/21] target-i386: convert 'hv_spinlocks' feature into property

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 440e724..777b8ce 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -963,6 +963,32 @@ static void

[Qemu-devel] [PATCH 13/21] target-i386: use visit_type_hz to parse tsc_freq property value

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov v2: * use visit_type_freq() which replaced visit_type_hz() --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 33326cc..3952368 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c

[Qemu-devel] [PATCH 20/21] target-i386: move default init of cpuid_kvm_features bitmap into CPU initializer from cpudef

2012-08-15 Thread Igor Mammedov
Moving it inside CPU initializer from cpudef will help to split cpu_x86_find_by_name() into default init and user settable properties. Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386

[Qemu-devel] [PATCH 16/21] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t

2012-08-15 Thread Igor Mammedov
vendor[13] array to keep its value. And vendor property setter is used to access/set value on CPU. Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 76 +-- target-i386/cpu.h | 10 +++- 2 files changed, 20 insertions(+), 66 deletions

[Qemu-devel] [PATCH 02/21] target-i386: cpu_x86_register(): report error from property setter

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 49286ca..b655dbc 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1209,6 +1209,7 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model

[Qemu-devel] [PATCH 21/21] target-i386: cleanup cpu_x86_find_by_name(), only fill x86_def_t in it

2012-08-15 Thread Igor Mammedov
-off-by: Igor Mammedov --- target-i386/cpu.c | 55 +++ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 75cbf48..ee2a90f 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1170,42

[Qemu-devel] [PATCH 07/21] target-i386: convert cpuid features into properties

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov -- v2: * replaced mask/ffs tricks by plain 'for (bit = 0; bit < 32; bit++)' as suggested by Eduardo Habkost --- target-i386/cpu.c | 101 ++ 1 file changed, 101 insertions(+) diff --git a/target

[Qemu-devel] [PATCH 10/21] target-i386: convert 'hv_vapic' feature into property

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index edf277e..4e7f22b 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1007,6 +1007,26 @@ static void

[Qemu-devel] [PATCH 03/21] target-i386: if x86_cpu_realize() failed report error and do cleanup

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Andreas Färber --- target-i386/helper.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index 8a5da3d..a0e4c89 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -1151,6

[Qemu-devel] [PATCH 06/21] target-i386: xlevel should be more than 0x80000000, move fixup into setter

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target-i386/cpu.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index f31462a..37ba5ef 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -746,8

[Qemu-devel] [PATCH 19/21] target-i386: move init of "hypervisor" feature into CPU initializer from cpudef

2012-08-15 Thread Igor Mammedov
"hypervisor" CPU feature is unconditionally enabled/overridden even if it's cleared in cpudef. Moving it inside CPU initializer from cpudef will help to split cpu_x86_find_by_name() into default init and user settable properties. Signed-off-by: Igor Mammedov --- target-i386/cp

Re: [Qemu-devel] [PATCH 12/21] add visitor for parsing hz[KMG] input string

2012-08-15 Thread Igor Mammedov
On Wed, 15 Aug 2012 18:44:59 +0200 Andreas Färber wrote: > Am 15.08.2012 18:13, schrieb Igor Mammedov: > > Signed-off-by: Igor Mammedov > > -- > > v2: > > * replaced _hz suffix for frequency visitor by _freq suffix > > suggested-by: Andreas Färber > &

[Qemu-devel] [PATCH 04/21] target-i386: filter out not TCG features if running without kvm at realize time

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target-i386/cpu.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index b655dbc..cc6ce48 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c

[Qemu-devel] [PATCH 15/21] target-i386: use define for cpuid vendor string size

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 6 +++--- target-i386/cpu.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index cb6ada0..af6c9a3 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -862,13 +862,13 @@ static

[Qemu-devel] [PATCH 09/21] target-i386: convert 'hv_relaxed' feature into property

2012-08-15 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 777b8ce..edf277e 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -987,6 +987,26 @@ static void

[Qemu-devel] [PATCH 05/21] target-i386: move out CPU features initialization in separate func

2012-08-15 Thread Igor Mammedov
later it could be used in cpu_x86_find_by_name() to init CPU from found cpu_def Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target-i386/cpu.c | 62 ++- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/target

[Qemu-devel] [PATCH 14/21] target-i386: introduce vendor-override property

2012-08-15 Thread Igor Mammedov
t; property setter. It's up-to cpu_model string parser to maintain legacy behavior when user overrides vendor on command line. v2: - convert cpuid_vendor_override to bool to reflect its real usage Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 31 +-- t

[Qemu-devel] [PATCH 17/21] target-i386: parse cpu_model string into set of stringified properties

2012-08-15 Thread Igor Mammedov
nused function but I guess it is easier for review this way Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 52 1 file changed, 52 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index d24ef84..98b6bbd 100644 --- a/target

Re: [Qemu-devel] [PATCH 08/21] target-i386: convert 'hv_spinlocks' feature into property

2012-08-15 Thread Igor Mammedov
On Wed, 15 Aug 2012 17:43:31 -0300 Eduardo Habkost wrote: > > On 15/08/2012, at 13:13, Igor Mammedov wrote: > > > Signed-off-by: Igor Mammedov > > --- > > target-i386/cpu.c | 31 +++ > > 1 file changed, 31 insertions(+) > >

[Qemu-devel] [PATCH 0/5 v2] cpu: make a child of DeviceState

2012-08-19 Thread Igor Mammedov
t's tested: - compile tested building all targets on FC17x64 host. - briefly tested i386 user and softmmu targets Anthony Liguori (1): qdev: split up header so it can be used in cpu.h Igor Mammedov (4): move qemu_irq typedef out of cpu-common.h qapi-types.h doesn't really need to i

[Qemu-devel] [PATCH 1/5] move qemu_irq typedef out of cpu-common.h

2012-08-19 Thread Igor Mammedov
it's necessary for making CPU child of DEVICE without causing circular header deps. Signed-off-by: Igor Mammedov --- hw/arm-misc.h |1 + hw/bt.h |2 ++ hw/devices.h |2 ++ hw/irq.h |2 ++ hw/omap.h |1 + hw/soc_dma.h |1 + hw/xen.h |1 +

[Qemu-devel] [PATCH 4/5] cleanup error.h, included qapi-types.h aready has stdbool.h

2012-08-19 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- error.h |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/error.h b/error.h index 96fc203..643a372 100644 --- a/error.h +++ b/error.h @@ -14,7 +14,6 @@ #include "compiler.h" #include "qapi-types.h" -#include

[Qemu-devel] [PATCH 5/5] make CPU a child of DeviceState

2012-08-19 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/qemu/cpu.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/cpu.h b/include/qemu/cpu.h index ad706a6..ac44057 100644 --- a/include/qemu/cpu.h +++ b/include/qemu/cpu.h @@ -20,7 +20,7 @@ #ifndef QEMU_CPU_H #define

[Qemu-devel] [PATCH 3/5] qapi-types.h doesn't really need to include qemu-common.h

2012-08-19 Thread Igor Mammedov
needed to prevent build breakage when CPU becomes a child of DeviceState Signed-off-by: Igor Mammedov --- scripts/qapi-types.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py index cf601ae..f34addb 100644 --- a/scripts

[Qemu-devel] [PATCH 2/5] qdev: split up header so it can be used in cpu.h

2012-08-19 Thread Igor Mammedov
y: Anthony Liguori Signed-off-by: Igor Mammedov --- hw/mc146818rtc.c |1 + hw/qdev-addr.c |1 + hw/qdev-core.h | 240 hw/qdev-monitor.h| 16 ++ hw/qdev-properties.c |1 + hw/qdev-properties.h | 128 + hw/qdev.c

Re: [Qemu-devel] [PATCH 1/5] move qemu_irq typedef out of cpu-common.h

2012-08-20 Thread Igor Mammedov
On Mon, 20 Aug 2012 06:41:04 +0200 Stefan Weil wrote: > Am 20.08.2012 01:39, schrieb Igor Mammedov: > > it's necessary for making CPU child of DEVICE without > > causing circular header deps. > > > > Signed-off-by: Igor Mammedov > > --- > > hw/ar

Re: [Qemu-devel] [PATCH 0/5 v2] cpu: make a child of DeviceState

2012-08-20 Thread Igor Mammedov
On Mon, 20 Aug 2012 06:52:51 +0200 Stefan Weil wrote: > Am 20.08.2012 01:39, schrieb Igor Mammedov: > > this is th 3rd approach to make CPU a child of DeviceState > > for both kinds of targets *-user and *-softmmu. It seems > > with current state of qemu it doesn't t

Re: [Qemu-devel] [RFC 2/6] i386: kill cpudef config section support

2012-08-20 Thread Igor Mammedov
"cpudef" models defined in configuration file. Here we first > - * preload any built-in definitions > +/* Initialize list of CPU models, filling some non-static fields if necessary > */ > void x86_cpudef_setup(void) > { > @@ -1502,7 +1409,6 @@ void x86_cpudef_setup(void) > for (i = 0; i < ARRAY_SIZE(builtin_x86_defs); ++i) { > x86_def_t *def = &builtin_x86_defs[i]; > def->next = x86_defs; > -def->flags = 1; > > /* Look for specific "cpudef" models that */ > /* have the QEMU version in .model_id */ > @@ -1518,9 +1424,6 @@ void x86_cpudef_setup(void) > > x86_defs = def; > } > -#if !defined(CONFIG_USER_ONLY) > -qemu_opts_foreach(qemu_find_opts("cpudef"), cpudef_register, NULL, 0); > -#endif > } > > static void get_cpuid_vendor(CPUX86State *env, uint32_t *ebx, > -- > 1.7.11.2 > > -- Regards, Igor

Re: [Qemu-devel] [RFC 0/6] i386: CPU: remove duplicate feature names

2012-08-20 Thread Igor Mammedov
gt; > target-i386/cpu.c | 153 > +- > target-i386/cpu.h | 12 + > target-i386/kvm.c | 2 +- > 3 files changed, 50 insertions(+), 117 deletions(-) > > -- > 1.7.11.2 > > -- Regards, Igor

Re: [Qemu-devel] [PATCH 07/21] target-i386: convert cpuid features into properties

2012-08-20 Thread Igor Mammedov
On Thu, 16 Aug 2012 15:10:50 -0300 Eduardo Habkost wrote: > On Wed, Aug 15, 2012 at 06:13:27PM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > -- > > v2: > > * replaced mask/ffs tricks by plain 'for (bit = 0; bit < 32; bit++)'

  1   2   3   4   5   6   7   8   9   10   >