Re: [Qemu-devel] [PATCH] kvm: Set default accelerator to "kvm" if the host supports it

2012-10-02 Thread Michael Tokarev
On 02.10.2012 11:46, Markus Armbruster wrote: > "Daniel P. Berrange" writes: >> IMHO, default to KVM, fallback to TCG is the most friendly default >> behaviour. > > Friendly perhaps, generating an infinite series of questions "why is my > guest slow as molasses?" certainly. With a warning about

Re: [Qemu-devel] [PATCH] esp: On qemu-system-sparc's esp, TC is not set properly

2012-10-02 Thread odanet
Could you please try this patch. The TC (count to zero) flag is wrongly cleared after reading the RINTR register. (contradicting the comment just above the patch in the source file.) Regards Olivier diff --rup a/hw/esp.c b/hw/esp.c --- a/hw/esp.c  2012-10-01 22:06:39.0 +0200 +++ b/hw/esp

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

2012-10-02 Thread Eduardo Habkost
(Now replying on the right thread, to keep the discussion in the right place. I don't know how I ended up replying to a pre-historic version of the patch, sorry.) On Tue, Oct 02, 2012 at 05:36:59PM +0200, Igor Mammedov wrote: [...] > @@ -1938,6 +2043,12 @@ static void x86_cpu_initfn(Object *obj) >

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

2012-10-02 Thread Eduardo Habkost
On Fri, Aug 10, 2012 at 01:22:23PM +0200, Igor Mammedov wrote: [...] > static void x86_cpuid_version_get_family(Object *obj, Visitor *v, void > *opaque, > const char *name, Error **errp) > { > @@ -1801,6 +1898,12 @@ static void x86_cpu_initfn(Object *obj

Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-02 Thread Alex Williamson
On Tue, 2012-10-02 at 14:55 -0500, Anthony Liguori wrote: > Alex Williamson writes: > > > In the event that a pci-assign device is added to a chipset that > > hasn't yet implemented the INTx routing interface, exit gracefully > > instead of killing the VM. I'm sure we'll implement this for q35,

Re: [Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-02 Thread Anthony Liguori
Alex Williamson writes: > In the event that a pci-assign device is added to a chipset that > hasn't yet implemented the INTx routing interface, exit gracefully > instead of killing the VM. I'm sure we'll implement this for q35, > but there's no reason for such a harsh response. > > Signed-off-by

[Qemu-devel] [PATCH 4/6] pci-assign: Use pci_intx_route_changed()

2012-10-02 Thread Alex Williamson
Replace open coded version Signed-off-by: Alex Williamson --- hw/kvm/pci-assign.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 7ce0f37..ddde573 100644 --- a/hw/kvm/pci-assign.c +++ b/hw/kvm/pci-assign.c @@ -894,8 +894,7

[Qemu-devel] [PATCH 3/6] pci: Helper function for testing if an INTx route changed

2012-10-02 Thread Alex Williamson
Signed-off-by: Alex Williamson --- hw/pci.c |5 + hw/pci.h |1 + 2 files changed, 6 insertions(+) diff --git a/hw/pci.c b/hw/pci.c index 9cb0ad4..6adb3b7 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1102,6 +1102,11 @@ PCIINTxRoute pci_device_route_intx_to_irq(PCIDevice *dev, int pin)

[Qemu-devel] [PATCH 6/6] pci-assign: Use msi_get_message()

2012-10-02 Thread Alex Williamson
pci-assign only uses a subset of the flexibility msi_get_message() provides, but it's still worthwhile to use it. Signed-off-by: Alex Williamson --- hw/kvm/pci-assign.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index ddd

[Qemu-devel] [PATCH 2/6] pci-assign: Add support for no-route

2012-10-02 Thread Alex Williamson
In the event that a pci-assign device is added to a chipset that hasn't yet implemented the INTx routing interface, exit gracefully instead of killing the VM. I'm sure we'll implement this for q35, but there's no reason for such a harsh response. Signed-off-by: Alex Williamson --- hw/kvm/pci-a

[Qemu-devel] [PATCH 5/6] msi: Add msi_get_message()

2012-10-02 Thread Alex Williamson
vfio-pci and pci-assign both do this on their own for setting up direct MSI injection through KVM. Provide a helper function for this in MSI code. Signed-off-by: Alex Williamson --- hw/msi.c | 45 + hw/msi.h |1 + 2 files changed, 30 insertions

[Qemu-devel] [PATCH 1/6] pci: Add INTx no-route option

2012-10-02 Thread Alex Williamson
pci_device_route_intx_to_irq() has no probe capability. vfio-pci can make use of KVM acceleration if this information is available, but can still operate without it. Make it non-fatal to call this on a platform or chipset where it hasn't been implemented yet. Signed-off-by: Alex Williamson ---

[Qemu-devel] [PATCH 0/6] Misc PCI cleanups

2012-10-02 Thread Alex Williamson
A few cleanups that I'll also apply to vfio-pci. First make intx route checking non-fatal. vfio-pci has a fallback INTx mechanism that doesn't rely on this, so we can already run on q35, but not if we can't even probe for intx routing w/o blowing up. Next, both vfio-pci and pci-assign test wheth

[Qemu-devel] [PATCH] exec: Fix walk_memory_regions

2012-10-02 Thread Toshiki Iwata
This patch fixes strange output of page_dump. Signed-off-by: Toshiki Iwata --- Example(in the case of TARGET_PAGE_BITS=12) [Before] startend size prot -1000 1000 --- 1000-2000 1000 r-x 2000-3000 1000 rw- 3000-4000 1000 r-- 0004

[Qemu-devel] [PATCH 07/10] tcg: Do constant folding on double-word comparisons

2012-10-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 93 +- 1 file changed, 72 insertions(+), 21 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 38027dc..d9251e4 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -398,6 +3

[Qemu-devel] [PATCH 06/10] tcg: Split out subroutines from do_constant_folding_cond

2012-10-02 Thread Richard Henderson
We can re-use these for implementing double-word folding. Signed-off-by: Richard Henderson --- tcg/optimize.c | 146 - 1 file changed, 81 insertions(+), 65 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 5804b66..38027dc 10

[Qemu-devel] [PATCH 09/10] tcg: Optimize half-dead add2/sub2

2012-10-02 Thread Richard Henderson
When x86_64 guest is not in 64-bit mode, the high-part of the 64-bit add is dead. When the host is 32-bit, we can simplify to 32-bit arithmetic. Signed-off-by: Richard Henderson --- tcg/tcg.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/

[Qemu-devel] [PATCH 08/10] tcg: Constant fold add2 and sub2

2012-10-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 35 +++ tcg/tcg-op.h | 9 + 2 files changed, 44 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index d9251e4..05891ef 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -796,6 +796,41 @@

[Qemu-devel] [PATCH 10/10] tcg: Optimize mulu2

2012-10-02 Thread Richard Henderson
Like add2, do operand ordering, constant folding, and dead operand elimination. The latter happens about 15% of all mulu2 during an x86_64 bios boot. Signed-off-by: Richard Henderson --- tcg/optimize.c | 26 ++ tcg/tcg-op.h | 2 ++ tcg/tcg.c | 19

[Qemu-devel] [PATCH V5 3/5] exec: Introduce helper to set dirty flags.

2012-10-02 Thread Anthony PERARD
This new helper/hook is used in the next patch to add an extra call in a single place. Signed-off-by: Anthony PERARD Reviewed-by: Avi Kivity --- exec.c | 52 +--- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/exec.c b/exec.c inde

[Qemu-devel] [PATCH 05/10] tcg: Optimize double-word comparisons against zero

2012-10-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index 592d166..5804b66 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -746,6 +746,45 @@ static TCGArg *tcg_constant

[Qemu-devel] [PATCH 04/10] tcg: Use common code when failing to optimize

2012-10-02 Thread Richard Henderson
This saves a whole lot of repetitive code sequences. Signed-off-by: Richard Henderson --- tcg/optimize.c | 91 +- 1 file changed, 32 insertions(+), 59 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index a713513..592d166 100644

[Qemu-devel] [PATCH 02/10] tcg: Canonicalize add2 operand ordering

2012-10-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index 5e0504a..3539826 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -472,6 +472,11 @@ static TCGArg *tcg_constant_folding(TCGContext *s, uint16_t *t

[Qemu-devel] [PATCH 03/10] tcg: Swap commutative double-word comparisons

2012-10-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/tcg/optimize.c b/tcg/optimize.c index 3539826..a713513 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -399,6 +399,22 @@ static bool swap_commutative(TCGArg dest

[Qemu-devel] [PATCH 01/10] tcg: Split out swap_commutative as a subroutine

2012-10-02 Thread Richard Henderson
Reduces code duplication and prefers movcond d, c1, c2, const, s to movcond d, c1, c2, s, const It also prefers add r, r, c over add r, c, r when both inputs are known constants. This doesn't matter for true add, as we will fully constant fold that. But it matters for a follow-on patc

[Qemu-devel] [PATCH v2 00/10] Double-word tcg/optimize improvements

2012-10-02 Thread Richard Henderson
Changes v1->v2: * Patch 1 changes the exact swap condition. This helps add2 for e.g. add2 tmp4,tmp5,tmp4,tmp5,c1,c2 where tmp5, c1, and c2 are all input constants. Since tmp4 is variable, we cannot constant fold this. But the existing swap condition would give add2 tmp4.tmp5,tmp4

[Qemu-devel] [PATCH V5 2/5] xen: Introduce xen_modified_memory.

2012-10-02 Thread Anthony PERARD
This function is to be used during live migration. Every write access to the guest memory should call this funcion so the Xen tools knows which pages are dirty. Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- hw/xen.h | 1 + xen-all.c | 21 + xen-stub.c |

[Qemu-devel] [PATCH V5 1/5] QMP, Introduce xen-set-global-dirty-log command.

2012-10-02 Thread Anthony PERARD
This command is used during a migration of a guest under Xen. It calls memory_global_dirty_log_start or memory_global_dirty_log_stop according to the argument pass to the command. Signed-off-by: Anthony PERARD Reviewed-by: Luiz Capitulino --- qapi-schema.json | 13 + qmp-commands.hx

[Qemu-devel] [PATCH V5 0/5] Xen, introducing dirty log for migration.

2012-10-02 Thread Anthony PERARD
Hi, This patch set will fix live migration under Xen. For this I introduce a new QMP command to switch global-dirty log and few calls (in exec.c and memory.c) to xen set_dirty function. Change since v5: - fix initial version number for the xen-set-global-dirty-log QMP command. Change since v4:

[Qemu-devel] [PATCH V5 5/5] xen: Set the vram dirty when an error occur.

2012-10-02 Thread Anthony PERARD
If the call to xc_hvm_track_dirty_vram() fails, then we set dirtybit on all the video ram. This case happens during migration. Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- xen-all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen-all.c b/xen-all.c ind

[Qemu-devel] [PATCH V5 4/5] exec, memory: Call to xen_modified_memory.

2012-10-02 Thread Anthony PERARD
This patch add some calls to xen_modified_memory to notify Xen about dirtybits during migration. Signed-off-by: Anthony PERARD Reviewed-by: Avi Kivity --- exec-obsolete.h | 2 ++ exec.c | 1 + 2 files changed, 3 insertions(+) diff --git a/exec-obsolete.h b/exec-obsolete.h index c09925

Re: [Qemu-devel] [PATCH V5 1/5] QMP, Introduce xen-set-global-dirty-log command.

2012-10-02 Thread Anthony PERARD

Re: [Qemu-devel] Block Migration and xbzrle

2012-10-02 Thread lieven-lists
Orit Wasserman wrote: > On 09/16/2012 01:39 PM, Peter Lieven wrote: >> Hi, >> >> I remember that this was broken some time ago and currently with >> qemu-kvm 1.2.0 I am still not able to use >> block migration plus xbzrle. The migration fails if both are used >> together. XBZRLE without block migra

Re: [Qemu-devel] [PATCH v9 2/4] qemu: URI parsing library

2012-10-02 Thread Daniel Veillard
On Thu, Sep 27, 2012 at 11:07:49AM +0200, Paolo Bonzini wrote: > Il 27/09/2012 11:03, Avi Kivity ha scritto: > > On 09/24/2012 01:11 PM, Paolo Bonzini wrote: > > > A better plan would be to incorporate this code into glib, completing > > > the extremely sparse URI support that is already there. Ho

[Qemu-devel] [PATCH V5 5/5] xen: Set the vram dirty when an error occur.

2012-10-02 Thread Anthony PERARD
If the call to xc_hvm_track_dirty_vram() fails, then we set dirtybit on all the video ram. This case happens during migration. Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- xen-all.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen-all.c b/xen-all.c ind

[Qemu-devel] [PATCH V5 0/5] Xen, introducing dirty log for migration.

2012-10-02 Thread Anthony PERARD
Hi, This patch set will fix live migration under Xen. For this I introduce a new QMP command to switch global-dirty log and few calls (in exec.c and memory.c) to xen set_dirty function. Change since v4: - call xen_modified_memory in cpu_physical_memory_set_dirty_range instead of calling it

[Qemu-devel] [PATCH V5 4/5] exec, memory: Call to xen_modified_memory.

2012-10-02 Thread Anthony PERARD
This patch add some calls to xen_modified_memory to notify Xen about dirtybits during migration. Signed-off-by: Anthony PERARD --- exec-obsolete.h | 2 ++ exec.c | 1 + 2 files changed, 3 insertions(+) diff --git a/exec-obsolete.h b/exec-obsolete.h index c099256..286e2f7 100644 --- a/e

Re: [Qemu-devel] [PATCH V5 1/5] QMP, Introduce xen-set-global-dirty-log command.

2012-10-02 Thread Eric Blake
On 10/02/2012 10:52 AM, Anthony PERARD wrote: > This command is used during a migration of a guest under Xen. It calls > memory_global_dirty_log_start or memory_global_dirty_log_stop according to the > argument pass to the command. > > Signed-off-by: Anthony PERARD > Reviewed-by: Luiz Capitulino

[Qemu-devel] [PATCH 17/23] target-i386: postpone cpuid_level update to realize time

2012-10-02 Thread Igor Mammedov
delay force set cpuid_level to 7 to realize time so property setters for cpuid_7_0_ebx_features and "level" could be used in any order/time between x86_cpu_initfn() and x86_cpu_realize(). Signed-off-by: Igor Mammedov --- target-i386/cpu.c |8 +--- 1 files changed, 5 insertions(+), 3 dele

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Andreas Färber --- v2: - replaced "if (error_is_set(&error))" with "if (error)" --- target-i386/helper.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index c635667..1d39ba9

[Qemu-devel] [PATCH V5 1/5] QMP, Introduce xen-set-global-dirty-log command.

2012-10-02 Thread Anthony PERARD
This command is used during a migration of a guest under Xen. It calls memory_global_dirty_log_start or memory_global_dirty_log_stop according to the argument pass to the command. Signed-off-by: Anthony PERARD Reviewed-by: Luiz Capitulino --- qapi-schema.json | 13 + qmp-commands.hx

Re: [Qemu-devel] [PATCH V5 4/5] exec, memory: Call to xen_modified_memory.

2012-10-02 Thread Avi Kivity
On 10/02/2012 06:52 PM, Anthony PERARD wrote: > This patch add some calls to xen_modified_memory to notify Xen about dirtybits > during migration. Reviewed-by: Avi Kivity -- error compiling committee.c: too many arguments to function

[Qemu-devel] [PATCH V5 3/5] exec: Introduce helper to set dirty flags.

2012-10-02 Thread Anthony PERARD
This new helper/hook is used in the next patch to add an extra call in a single place. Signed-off-by: Anthony PERARD Reviewed-by: Avi Kivity --- exec.c | 52 +--- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/exec.c b/exec.c inde

[Qemu-devel] [PATCH V5 2/5] xen: Introduce xen_modified_memory.

2012-10-02 Thread Anthony PERARD
This function is to be used during live migration. Every write access to the guest memory should call this funcion so the Xen tools knows which pages are dirty. Signed-off-by: Anthony PERARD Acked-by: Stefano Stabellini --- hw/xen.h | 1 + xen-all.c | 21 + xen-stub.c |

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Andreas Färber --- v2: * use visit_type_freq() which replaced visit_type_hz() --- target-i386/cpu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 9bfa521..7bb6caa 100644 --- a/targ

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 536dde5..0788a1e 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1235,6 +1235,26 @@ static void

[Qemu-devel] [PATCH 15/23] target-i386: introduce vendor-override property

2012-10-02 Thread Igor Mammedov
currently 'cpuid_vendor_override' can be set only via cmd line cpu_model string. But setting it in 'vendor' property prevents using 'vendor' property on its own without setting cpuid_vendor_override. So fix/remove enabling cpuid_vendor_override from "vendor" property setter. It's up-to cpu_model s

[Qemu-devel] [PATCH 13/23] add visitor for parsing hz[KMG] input string

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Acked-by: Andreas Färber --- v2: * replaced _hz suffix for frequency visitor by _freq suffix suggested-by: Andreas Färber * fixed typo & extra space spotted-by: Andreas Färber * initialize val, due to a silly CentOS6 compiler warning, that breakes build

[Qemu-devel] [PATCH 08/23] target-i386: add stubs for hyperv_(vapic_recommended|relaxed_timing_enabled|get_spinlock_retries)()

2012-10-02 Thread Igor Mammedov
It's needed for the next 3 patches to avoid build breakage when qemu is built with --disable-kvm option. Signed-off-by: Igor Mammedov Reported-by: Eduardo Habkost --- target-i386/hyperv.h |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/target-i386/hyperv.h b/tar

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

2012-10-02 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/cpu.c |3 +-- 1

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

2012-10-02 Thread Igor Mammedov
Do in cpu_x86_find_by_name() only what name implies. i.e. leave only cpudef search and copy/fill passed in x86_def_t structure. and move out of it cpu_model parsing and CPU initializing into cpu_x86_register(). Plus add hints to where blocks should go when cpu_x86_register() is disbanded. Signed-

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

2012-10-02 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 files changed, 57 insertions(+), 11 d

Re: [Qemu-devel] [PATCH V4 4/5] exec, memory: Call to xen_modified_memory.

2012-10-02 Thread Avi Kivity
On 10/02/2012 06:16 PM, Anthony PERARD wrote: > >> Possibly the first bit too? > > But the call from invalidate_and_set_dirty, I can not remove it because > it does not work. The xen function must be called without condition as > xen and qemu does not maintained the same dirtymap. Right, in fac

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

2012-10-02 Thread Igor Mammedov
git tree for testing: https://github.com/imammedo/qemu/tree/x86-cpu-properties.v4 Rebased on top of a9321a4d49d "x86: Implement SMEP and SMAP". Igor Mammedov (23): target-i386: return Error from cpu_x86_find_by_name() target-i386: cpu_x86_register(): report error from property setter tar

Re: [Qemu-devel] [PATCH V4 4/5] exec, memory: Call to xen_modified_memory.

2012-10-02 Thread Anthony PERARD
On 10/02/2012 11:25 AM, Avi Kivity wrote: > On 10/01/2012 12:36 PM, Stefano Stabellini wrote: >> On Thu, 27 Sep 2012, Anthony PERARD wrote: >>> This patch add some calls to xen_modified_memory to notify Xen about dirtybits >>> during migration. >>> >>> Signed-off-by: Anthony PERARD >> >> If I am n

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- v2: - replace "if (error_is_set(&error))" with "if (error)" --- target-i386/cpu.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index e1ffa40..f7ca776 100644 --- a

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

2012-10-02 Thread Igor Mammedov
On Tue, 2 Oct 2012 13:01:40 -0300 Eduardo Habkost wrote: > On Tue, Oct 02, 2012 at 05:37:12PM +0200, Igor Mammedov wrote: > > Signed-off-by: Igor Mammedov > > Signed-off-by: Eduardo Habkost > > --- > > v2: > > * fix error of initializing from incorrect cpu model definition > > use x86_cpu

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

2012-10-02 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 -- v2: - rebased on top of "i386: cpu: remove duplicate feature names" http://www.mail-archive.com/qemu-devel@nongnu.org/msg129458.html --- target-

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

2012-10-02 Thread Eduardo Habkost
On Tue, Oct 02, 2012 at 05:37:12PM +0200, Igor Mammedov wrote: > 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

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- target-i386/cpu.c | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 3b7bdbd..a58b30d 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -984,8 +98

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 25 ++--- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index f7ca776..ad831a0 100644 --- a/target-i386

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

2012-10-02 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 19/23] target-i386: parse cpu_model string into set of stringified properties

2012-10-02 Thread Igor Mammedov
cpu_model string does represent features in following format: ([+-]feat)|(feat=foo)|(feat) which makes it impossible directly use property infrastructure to set features on CPU. This patch introduces parser that splits CPU name from cpu_model and converts legacy features string into canonized set

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

2012-10-02 Thread Igor Mammedov
Vendor property setter takes string as vendor value but cpudefs use uint32_t vendor[123] fields to define vendor value. It makes it difficult to unify and use property setter for values from cpudefs. Simplify code by using vendor property setter, vendor[123] fields are converted into vendor[13] ar

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

2012-10-02 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 Signed-off-by: Eduardo Habkost --- [ehabkost: rebase on top of latest qemu.git master, where the bitmap initialization is now differ

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 23 +++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 0788a1e..86f60b1 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1255,6 +1255,26 @@ static void

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

2012-10-02 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 04497f1..038b37e 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1110,13 +1110,13 @@

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

2012-10-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 31 +++ 1 files changed, 31 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 5604f13..536dde5 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1211,6 +1211,32 @@ sta

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

2012-10-02 Thread Igor Mammedov
add property accessors for cpuid feature bits defined by *_feature_name arrays. Signed-off-by: Igor Mammedov --- v2: * replaced mask/ffs tricks by plain 'for (bit = 0; bit < 32; bit++)' as suggested by Eduardo Habkost v3: * check if property exists before adding it * rebased on top of

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

2012-10-02 Thread Igor Mammedov
it will allow to use property setters there later. Signed-off-by: Igor Mammedov Reviewed-by: Don Slutz Reviewed-by: Eduardo Habkost -- v2: - style change, add braces (reqested by Blue Swirl) - removed unused error_is_set(errp) in properties set loop --- target-i386/cpu.c | 15 +++

Re: [Qemu-devel] a user here - pci-assign

2012-10-02 Thread Michael Roth
On Tue, Oct 02, 2012 at 08:46:32AM +0100, lejeczek wrote: > rhel in general seem reluctant, I filed a bug a few days ago and > although I believe there is problem with repo's version of seabios > as soon as I mentioned VGA report was closed as 'wontfix' > and I would still prefer them over Oracle,

Re: [Qemu-devel] [PATCH v2 2/9] qapi: add socket address types

2012-10-02 Thread Paolo Bonzini
Il 02/10/2012 17:27, Luiz Capitulino ha scritto: >>> > > Wouldn't it be cleaner to pass a list of port numbers? We could have: >>> > > >>> > > *port-list: [ 'int' ] >>> > > *service: 'str' >> > >> > A list of ports doesn't work too well for say 5900-5999. I think the >> > port + count is the s

Re: [Qemu-devel] [PATCH v2 2/9] qapi: add socket address types

2012-10-02 Thread Luiz Capitulino
On Tue, 02 Oct 2012 16:24:48 +0200 Paolo Bonzini wrote: > Il 02/10/2012 14:27, Luiz Capitulino ha scritto: > > >> for a port range, all because of the possibility of named ports; > > >> should > > >> '*to' be a 'str' if only for symmetry in the output? But it's > > >> bike-s

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-10-02 Thread Shawn Starr
On Monday, September 24, 2012 10:38:57 AM Shawn Starr wrote: > On Monday, September 24, 2012 04:36:15 PM Hans de Goede wrote: > > Hi, > > Hello, Reopening this issue with usb-host stalling now ehci warning: guest updated active QH USBDEVFS_DISCARDURB: Invalid argument USBDEVFS_DISCARDURB: Inval

Re: [Qemu-devel] [PATCH] vfio_pci: fix build on 32-bit systems

2012-10-02 Thread Anthony Liguori
Paolo Bonzini writes: > Il 01/10/2012 20:49, Alex Williamson ha scritto: >>> > @@ -768,7 +768,7 @@ static int vfio_dma_map(VFIOContainer *container, >>> > target_phys_addr_t iova, >>> > struct vfio_iommu_type1_dma_map map = { >>> > .argsz = sizeof(map), >>> > .flags = VFIO

Re: [Qemu-devel] [PATCH] vfio_pci: fix build on 32-bit systems

2012-10-02 Thread Alex Williamson
On Tue, 2012-10-02 at 08:11 +0200, Paolo Bonzini wrote: > Il 01/10/2012 20:49, Alex Williamson ha scritto: > >> > @@ -768,7 +768,7 @@ static int vfio_dma_map(VFIOContainer *container, > >> > target_phys_addr_t iova, > >> > struct vfio_iommu_type1_dma_map map = { > >> > .argsz = sizeo

Re: [Qemu-devel] [PATCH v2 2/9] qapi: add socket address types

2012-10-02 Thread Paolo Bonzini
Il 02/10/2012 14:27, Luiz Capitulino ha scritto: > >> for a port range, all because of the possibility of named ports; > >> should > >> '*to' be a 'str' if only for symmetry in the output? But it's > >> bike-shedding, so I'll live with whatever works (that is, I'm not > >

[Qemu-devel] KVM call minutes 2012-10-02

2012-10-02 Thread Juan Quintela
2012-10-02 -- - TODO to finish off qemu-kvm.git/master... (anthony) posibilibites: Problems of compatability (options, migration, ...) * configuration file to specify what versions are done * scripts that converts the format * documentation * look at argv[0] and start f

[Qemu-devel] [PATCH 18/22 v3] target-i386: parse cpu_model string into set of stringified properties

2012-10-02 Thread Igor Mammedov
cpu_model string does represent features in following format: ([+-]feat)|(feat=foo)|(feat) which makes it impossible directly use property infrastructure to set features on CPU. This patch introduces parser that splits CPU name from cpu_model and converts legacy features string into canonized set

[Qemu-devel] [PATCH 22/41] buffered_file: unfold migrate_fd_close

2012-10-02 Thread Juan Quintela
We only used it once, just remove the callback indirection. Signed-off-by: Juan Quintela --- buffered_file.c | 7 ++- buffered_file.h | 5 + migration.c | 8 ++-- migration.h | 1 + 4 files changed, 6 insertions(+), 15 deletions(-) diff --git a/buffered_file.c b/buffered_fil

[Qemu-devel] [PATCH 08/41] savevm: Factorize ram globals reset in its own function

2012-10-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini Reviewed-by: Orit Wasserman --- arch_init.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch_init.c b/arch_init.c index 3fddb38..6b9f949 100644 --- a/arch_init.c +++ b/arch_init.c @@ -481,6 +481,14 @@

[Qemu-devel] [PATCH 17/41] buffered_file: rename opaque to migration_state

2012-10-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- buffered_file.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 7155800..33b700b 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -27,7 +27,7 @@ typedef stru

[Qemu-devel] [PATCH 13/41] ram: create trace event for migration sync bitmap

2012-10-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- arch_init.c | 6 ++ trace-events | 4 2 files changed, 10 insertions(+) diff --git a/arch_init.c b/arch_init.c index 3a5fecc..cec3ead 100644 --- a/arch_init.c +++ b/arch_init.c @@ -45,6 +45,7 @@ #include "hw/pcspk.h" #incl

[Qemu-devel] [PATCH 35/41] buffered_file: buffered_put_buffer() don't need to set last_error

2012-10-02 Thread Juan Quintela
Callers on savevm.c:qemu_fflush() will set it. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- buffered_file.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 77928f0..ed92df1 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -120,8

[Qemu-devel] [PATCH 29/41] savevm: Remove qemu_fseek()

2012-10-02 Thread Juan Quintela
It has no users, and is only half implemented. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- qemu-file.h | 1 - savevm.c| 21 - 2 files changed, 22 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index d8487cd..7fe7274 100644 --- a/qemu-file.h +++ b/

[Qemu-devel] [PATCH 03/41] migration: store end_time in a local variable

2012-10-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini Reviewed-by: Orit Wasserman --- migration.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migration.c b/migration.c index 22a05c4..7a11026 100644 --- a/migration.c +++ b/migration.c @@ -329,6 +329,7 @@ static void

[Qemu-devel] [PATCH v2 00/41] Migration cleanups, refactorings, stats, and more

2012-10-02 Thread Juan Quintela
Hi v2: (20121001) - fix qemu_in_vcpu_thread: marcelo - fix "fix migration sync on setup" - addressed all marcelo comments Please, review. v1: (20120921) This is the mergable part of migration thread work that I am doing. What it does: - cleanups left and right - 2nd patch is a (fix migration s

[Qemu-devel] [PATCH 11/41] ram: Export last_ram_offset()

2012-10-02 Thread Juan Quintela
Is the only way of knowing the RAM size. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- cpu-all.h | 2 ++ exec.c| 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu-all.h b/cpu-all.h index 74d3681..5408782 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -517,6 +

[Qemu-devel] [PATCH 16/41] BufferedFile: append, then flush

2012-10-02 Thread Juan Quintela
From: Paolo Bonzini Simplify the logic for pushing data from the buffer to the output pipe/socket. This also matches more closely what will be the operation of the migration thread. Signed-off-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Reviewed-by: Orit Wasserman Signed-off-by: Juan Quint

Re: [Qemu-devel] [PATCH v2 8/9] qmp: add NBD server commands

2012-10-02 Thread Luiz Capitulino
On Mon, 1 Oct 2012 16:52:23 +0200 Paolo Bonzini wrote: > Adding an NBD server inside QEMU is trivial, since all the logic is > in nbd.c and can be shared easily between qemu-nbd and QEMU itself. > The main difference is that qemu-nbd serves a single unnamed export, > while QEMU serves named expo

[Qemu-devel] [PATCH 10/41] ram: Introduce migration_bitmap_test_and_reset_dirty()

2012-10-02 Thread Juan Quintela
It just test if the dirty bit is set, and clears it. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini Reviewed-by: Orit Wasserman --- arch_init.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/arch_init.c b/arch_init.c index fa47051..90a722e 10

[Qemu-devel] [PATCH 32/41] savevm: unexport qemu_ftell()

2012-10-02 Thread Juan Quintela
It was unused out of savevm.c. Signed-off-by: Juan Quintela --- qemu-file.h | 3 --- savevm.c| 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/qemu-file.h b/qemu-file.h index 7fe7274..289849a 100644 --- a/qemu-file.h +++ b/qemu-file.h @@ -230,7 +230,4 @@ static inline voi

[Qemu-devel] [PATCH 34/41] savevm: Only qemu_fflush() can generate errors

2012-10-02 Thread Juan Quintela
Move the error check to the beggining of the callers. Once this is fixed qemu_file_set_if_error() is not used anymore, so remove it. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- savevm.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-)

[Qemu-devel] [PATCH 25/41] buffered_file: make buffered_flush return the error code

2012-10-02 Thread Juan Quintela
Or the amount of data written if there is no error. Adjust all callers. Signed-off-by: Juan Quintela --- buffered_file.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 747d672..d3bc160 100644 --- a

[Qemu-devel] [PATCH 23/41] buffered_file: We can access directly to bandwidth_limit

2012-10-02 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- buffered_file.c | 5 ++--- buffered_file.h | 3 +-- migration.c | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/buffered_file.c b/buffered_file.c index 4fca774..43e68b6 100644 --- a/buffered_file.c +++ b/buff

Re: [Qemu-devel] [PATCH 04/41] migration: print total downtime for final phase of migration

2012-10-02 Thread Eric Blake
On 10/02/2012 05:32 AM, Juan Quintela wrote: > Signed-off-by: Juan Quintela > > Reviewed-by: Paolo Bonzini > Reviewed-by: Orit Wasserman > --- > +++ b/qmp-commands.hx > @@ -2267,6 +2267,8 @@ The main json-object contains the following: > - "total-time": total amount of ms since migration star

[Qemu-devel] [PATCH 14/41] Separate migration bitmap

2012-10-02 Thread Juan Quintela
This patch creates a migration bitmap, which is periodically kept in sync with the qemu bitmap. A separate copy of the dirty bitmap for the migration limits the amount of concurrent access to the qemu bitmap from iothread and migration thread (which requires taking the big lock). We use the qemu b

[Qemu-devel] [PATCH 07/41] migration: print expected downtime in info migrate

2012-10-02 Thread Juan Quintela
Signed-off-by: Juan Quintela --- arch_init.c | 2 ++ hmp.c| 4 migration.c | 2 ++ migration.h | 1 + qapi-schema.json | 5 + qmp-commands.hx | 6 ++ 6 files changed, 20 insertions(+) diff --git a/arch_init.c b/arch_init.c index 1d6dda8..3fddb38 100644 --

[Qemu-devel] [PATCH 15/41] migration: Add dirty_pages_rate to query migrate output

2012-10-02 Thread Juan Quintela
It indicates how many pages were dirtied during the last second. Signed-off-by: Juan Quintela --- arch_init.c | 18 ++ hmp.c| 4 migration.c | 2 ++ migration.h | 1 + qapi-schema.json | 8 ++-- 5 files changed, 31 insertions(+), 2 deletion

Re: [Qemu-devel] [PATCH v2 9/9] hmp: add NBD server commands

2012-10-02 Thread Luiz Capitulino
On Mon, 1 Oct 2012 16:52:24 +0200 Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini Acked-by: Luiz Capitulino > --- > hmp-commands.hx | 29 + > hmp.c | 55 +++ > hmp.h | 2 ++ > 3 file mod

  1   2   >