Re: [libvirt] [PATCH v2] kvm: warn if num cpus is greater than num recommended

2013-09-03 Thread Gleb Natapov
On Fri, Aug 23, 2013 at 03:24:37PM +0200, Andrew Jones wrote: The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of vcpus that kvm supports. It is, but by always returning the maximum number supported. The

Re: [libvirt] [PATCH v2] kvm: warn if num cpus is greater than num recommended

2013-09-01 Thread Gleb Natapov
On Fri, Aug 23, 2013 at 03:24:37PM +0200, Andrew Jones wrote: The comment in kvm_max_vcpus() states that it's using the recommended procedure from the kernel API documentation to get the max number of vcpus that kvm supports. It is, but by always returning the maximum number supported. The

Re: [libvirt] [PATCH qom-cpu 4/7] target-i386/cpu: Introduce FeatureWord typedefs

2013-01-09 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 04:20:45PM -0200, Eduardo Habkost wrote: This introduces a FeatureWord enum, FeatureWordInfo struct (with generation information about a feature word), and a FeatureWordArray typedef, and changes add_flagname_to_bitmaps() code and cpu_x86_parse_featurestr() to use the

Re: [libvirt] [PATCH qom-cpu 0/7] disable kvm_mmu + -cpu enforce fixes (v3)

2013-01-09 Thread Gleb Natapov
would like to get this into QEMU 1.4. - The changes in this series should affect only users that are already using the enforce flag, and I believe whoever is using the enforce flag really want the strict behavior introduced by this series. Reviewed-by: Gleb Natapov g...@redhat.com

Re: [libvirt] [Qemu-devel] [Qemu PATCH v2] add a boot option to do strict boot

2013-01-09 Thread Gleb Natapov
On Wed, Jan 09, 2013 at 12:28:57PM -0500, Laine Stump wrote: On 01/09/2013 10:22 AM, Daniel P. Berrange wrote: On Wed, Jan 09, 2013 at 08:14:07AM -0700, Eric Blake wrote: On 01/09/2013 01:39 AM, Amos Kong wrote: Current seabios will try to boot from selected devices first, if they are all

Re: [libvirt] [PATCH qom-cpu 01/11] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 09:42:36AM -0200, Eduardo Habkost wrote: On Sun, Jan 06, 2013 at 01:32:34PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:02PM -0200, Eduardo Habkost wrote: This is a cleanup that tries to solve two small issues: - We don't need a separate

Re: [libvirt] [PATCH qom-cpu 11/11] target-i386: check/enforce: Check all feature words

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:06:21AM -0200, Eduardo Habkost wrote: On Sun, Jan 06, 2013 at 04:35:51PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:12PM -0200, Eduardo Habkost wrote: This adds the following feature words to the list of flags to be checked

Re: [libvirt] [PATCH qom-cpu 01/11] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:09:24AM -0200, Eduardo Habkost wrote: On Mon, Jan 07, 2013 at 01:42:53PM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 09:42:36AM -0200, Eduardo Habkost wrote: On Sun, Jan 06, 2013 at 01:32:34PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:02PM

Re: [libvirt] [PATCH qom-cpu 11/11] target-i386: check/enforce: Check all feature words

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:19:15AM -0200, Eduardo Habkost wrote: On Mon, Jan 07, 2013 at 02:06:38PM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 10:06:21AM -0200, Eduardo Habkost wrote: On Sun, Jan 06, 2013 at 04:35:51PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:12PM

Re: [libvirt] [PATCH qom-cpu 01/11] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 10:30:40AM -0200, Eduardo Habkost wrote: On Mon, Jan 07, 2013 at 02:15:59PM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 10:09:24AM -0200, Eduardo Habkost wrote: On Mon, Jan 07, 2013 at 01:42:53PM +0200, Gleb Natapov wrote: On Mon, Jan 07, 2013 at 09:42:36AM

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 10/11] target-i386: Call kvm_check_features_against_host() only if CONFIG_KVM is set

2013-01-07 Thread Gleb Natapov
On Mon, Jan 07, 2013 at 02:15:14PM +0100, Igor Mammedov wrote: On Mon, 7 Jan 2013 10:00:09 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Sun, Jan 06, 2013 at 04:27:19PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:11PM -0200, Eduardo Habkost wrote

Re: [libvirt] [PATCH qom-cpu 01/11] target-i386: Don't set any KVM flag by default if KVM is disabled

2013-01-06 Thread Gleb Natapov
...@redhat.com Cc: Gleb Natapov g...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Changes v2: - Coding style fix --- target-i386/cpu.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 82685dc..e6435da 100644

Re: [libvirt] [PATCH qom-cpu 02/11] target-i386: Disable kvm_mmu_op by default on pc-1.4

2013-01-06 Thread Gleb Natapov
hassle when libvirt start using the enforce option. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: k...@vger.kernel.org Cc: Michael S. Tsirkin m...@redhat.com Cc: Gleb Natapov g...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: libvir-list@redhat.com Cc: Jiri Denemark

Re: [libvirt] [PATCH qom-cpu 03/11] target-i386: kvm: -cpu host: Use GET_SUPPORTED_CPUID for SVM features

2013-01-06 Thread Gleb Natapov
feature is not supported by the host (after we fix kvm_check_features_against_host() to check SVM flags as well). Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com --- Changes v2: - Coding style (indentation) fix Cc: Gleb Natapov g...@redhat.com

Re: [libvirt] [PATCH qom-cpu 04/11] target-i386: kvm: Enable all supported KVM features for -cpu host

2013-01-06 Thread Gleb Natapov
refuse to start if kvm_pv_eoi is not supported by the host (after we fix kvm_check_features_against_host() to check KVM flags as well). Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com --- Changes v2: - Coding style (indentation) fix Cc: Gleb

Re: [libvirt] [PATCH qom-cpu 05/11] target-i386: check/enforce: Fix CPUID leaf numbers on error messages

2013-01-06 Thread Gleb Natapov
: host doesn't support requested feature: CPUID.8001H:ECX.fma4 [bit 16] Unable to find x86 CPU definition $ Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com But see the question below. --- Cc: Gleb Natapov g...@redhat.com Cc: Marcelo

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 05/11] target-i386: check/enforce: Fix CPUID leaf numbers on error messages

2013-01-06 Thread Gleb Natapov
On Sun, Jan 06, 2013 at 04:12:54PM +0200, Gleb Natapov wrote: On Fri, Jan 04, 2013 at 08:01:06PM -0200, Eduardo Habkost wrote: The -cpu check/enforce warnings are printing incorrect information about the missing flags. There are no feature flags on CPUID leaves 0 and 0x8000

Re: [libvirt] [PATCH qom-cpu 06/11] target-i386: check/enforce: Do not ignore hypervisor flag

2013-01-06 Thread Gleb Natapov
. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com --- My goal is to eliminate the check_feat field completely, as kvm_arch_get_supported_cpuid() should now really return all the bits we can set on all CPUID leaves. --- target-i386/cpu.c | 2 +- 1 file

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 07/11] target-i386: check/enforce: Check all CPUID.80000001H.EDX bits

2013-01-06 Thread Gleb Natapov
(that are explicitly copied from CPUID.01H.EDX), so we can make the code check/enforce all the CPUID.8001H.EDX bits. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com --- target-i386/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 08/11] target-i386: check/enforce: Check SVM flag support as well

2013-01-06 Thread Gleb Natapov
requested by the user or the CPU model, but not supported by the host. And on these cases we really want QEMU to abort if the enforce option is set. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com --- Cc: Joerg Roedel j...@8bytes.org Cc: k

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 09/11] target-i386: check/enforce: Eliminate check_feat field

2013-01-06 Thread Gleb Natapov
to ~0 on all entries. Signed-off-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Gleb Natapov g...@redhat.com --- Changes v2: - Coding style fix --- target-i386/cpu.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/target-i386/cpu.c b/target-i386

Re: [libvirt] [Qemu-devel] [PATCH qom-cpu 10/11] target-i386: Call kvm_check_features_against_host() only if CONFIG_KVM is set

2013-01-06 Thread Gleb Natapov
On Fri, Jan 04, 2013 at 08:01:11PM -0200, Eduardo Habkost wrote: This will be necessary once kvm_check_features_against_host() starts using KVM-specific definitions (so it won't compile anymore if CONFIG_KVM is not set). Signed-off-by: Eduardo Habkost ehabk...@redhat.com ---

Re: [libvirt] [PATCH qom-cpu 11/11] target-i386: check/enforce: Check all feature words

2013-01-06 Thread Gleb Natapov
the point of this patch: if a flag was not supported by the host and QEMU wasn't aborting, it was a bug in the enforce code. Signed-off-by: Eduardo Habkost ehabk...@redhat.com --- Cc: Gleb Natapov g...@redhat.com Cc: Marcelo Tosatti mtosa...@redhat.com Cc: k...@vger.kernel.org Cc: libvir-list

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-26 Thread Gleb Natapov
On Mon, Mar 26, 2012 at 11:08:16AM +0200, Avi Kivity wrote: Exactly. The types are no different, so there's no reason to discriminate against types that happen to live in qemu-provided data files vs. qemu code. They aren't instantiated, so we lose nothing by creating the factories (just

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-26 Thread Gleb Natapov
On Mon, Mar 26, 2012 at 01:59:05PM +0200, Avi Kivity wrote: On 03/26/2012 01:24 PM, Jiri Denemark wrote: ... The command line becomes unstable if you use -nodefconfig. -no-user-config solves this but I fully expect libvirt would continue to use -nodefconfig. Libvirt uses

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-25 Thread Gleb Natapov
On Thu, Mar 22, 2012 at 03:01:17PM -0500, Anthony Liguori wrote: On 03/22/2012 12:14 PM, Eduardo Habkost wrote: On Thu, Mar 22, 2012 at 11:37:39AM -0500, Anthony Liguori wrote: On 03/22/2012 04:32 AM, Gleb Natapov wrote: On Tue, Mar 13, 2012 at 11:53:19AM -0300, Eduardo Habkost wrote: So

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-25 Thread Gleb Natapov
On Thu, Mar 22, 2012 at 12:50:18PM -0300, Eduardo Habkost wrote: On Thu, Mar 22, 2012 at 04:30:55PM +0200, Gleb Natapov wrote: On Thu, Mar 22, 2012 at 10:31:21AM -0300, Eduardo Habkost wrote: On Thu, Mar 22, 2012 at 11:32:44AM +0200, Gleb Natapov wrote: What does this mean

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-25 Thread Gleb Natapov
On Sun, Mar 25, 2012 at 03:14:56PM +0200, Avi Kivity wrote: On 03/25/2012 03:12 PM, Anthony Liguori wrote: qemu -M pc Would effectively be short hand for -readconfig /usr/share/qemu/machines/pc.cfg In that case qemu -cpu westmere is shorthand for -readconfig

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-22 Thread Gleb Natapov
On Tue, Mar 13, 2012 at 11:53:19AM -0300, Eduardo Habkost wrote: So, trying to summarize what was discussed in the call: On Mon, Mar 12, 2012 at 10:08:10AM -0300, Eduardo Habkost wrote: Let's say we moved CPU definitions to /usr/share/qemu/cpu-models.xml. Obviously, we'd want a

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-22 Thread Gleb Natapov
On Thu, Mar 22, 2012 at 10:31:21AM -0300, Eduardo Habkost wrote: On Thu, Mar 22, 2012 at 11:32:44AM +0200, Gleb Natapov wrote: On Tue, Mar 13, 2012 at 11:53:19AM -0300, Eduardo Habkost wrote: So, trying to summarize what was discussed in the call: On Mon, Mar 12, 2012 at 10:08:10AM

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-12 Thread Gleb Natapov
On Mon, Mar 12, 2012 at 01:04:19PM +, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 09:52:27AM -0300, Eduardo Habkost wrote: On Sun, Mar 11, 2012 at 09:12:58AM -0500, Anthony Liguori wrote: On 03/11/2012 08:27 AM, Gleb Natapov wrote: On Sat, Mar 10, 2012 at 12:24:47PM -0600

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-12 Thread Gleb Natapov
On Mon, Mar 12, 2012 at 10:32:21AM -0300, Eduardo Habkost wrote: On Mon, Mar 12, 2012 at 03:15:32PM +0200, Gleb Natapov wrote: On Mon, Mar 12, 2012 at 01:04:19PM +, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 09:52:27AM -0300, Eduardo Habkost wrote: On Sun, Mar 11, 2012 at 09

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-12 Thread Gleb Natapov
On Mon, Mar 12, 2012 at 01:50:18PM +, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 03:15:32PM +0200, Gleb Natapov wrote: On Mon, Mar 12, 2012 at 01:04:19PM +, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 09:52:27AM -0300, Eduardo Habkost wrote: On Sun, Mar 11, 2012

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-12 Thread Gleb Natapov
On Mon, Mar 12, 2012 at 01:55:34PM +, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 03:53:38PM +0200, Gleb Natapov wrote: On Mon, Mar 12, 2012 at 01:50:18PM +, Daniel P. Berrange wrote: On Mon, Mar 12, 2012 at 03:15:32PM +0200, Gleb Natapov wrote: On Mon, Mar 12, 2012 at 01

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-12 Thread Gleb Natapov
On Mon, Mar 12, 2012 at 06:53:27PM +0100, Andreas Färber wrote: Am 12.03.2012 18:47, schrieb Peter Maydell: On 12 March 2012 17:41, Andreas Färber afaer...@suse.de wrote: Also keep in mind linux-user. There's no concept of a machine there, but there's a cpu_copy() function used for forking

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-12 Thread Gleb Natapov
On Mon, Mar 12, 2012 at 06:41:06PM +0100, Andreas Färber wrote: Am 12.03.2012 17:50, schrieb Eduardo Habkost: On Mon, Mar 12, 2012 at 04:49:47PM +0100, Andreas Färber wrote: Am 11.03.2012 17:16, schrieb Gleb Natapov: On Sun, Mar 11, 2012 at 10:33:15AM -0500, Anthony Liguori wrote: On 03

Re: [libvirt] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Fri, Mar 09, 2012 at 03:15:26PM -0600, Anthony Liguori wrote: On 03/09/2012 03:04 PM, Daniel P. Berrange wrote: On Fri, Mar 09, 2012 at 05:56:52PM -0300, Eduardo Habkost wrote: Resurrecting an old thread: I didn't see any clear conclusion in this thread (this is why I am resurrecting

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Sat, Mar 10, 2012 at 12:58:43PM -0300, Eduardo Habkost wrote: On Sat, Mar 10, 2012 at 12:42:46PM +, Daniel P. Berrange wrote: I could have sworn we had this discussion a year ago or so, and had decided that the default CPU models would be in something like

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Sat, Mar 10, 2012 at 12:24:47PM -0600, Anthony Liguori wrote: Let's step back here. Why are you writing these patches? It's probably not because you have a desire to say -cpu Westmere when you run QEMU on your laptop. I'd wager to say that no human has ever done that or that if they

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Sun, Mar 11, 2012 at 09:12:58AM -0500, Anthony Liguori wrote: On 03/11/2012 08:27 AM, Gleb Natapov wrote: On Sat, Mar 10, 2012 at 12:24:47PM -0600, Anthony Liguori wrote: Let's step back here. Why are you writing these patches? It's probably not because you have a desire to say -cpu

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Sun, Mar 11, 2012 at 09:16:49AM -0500, Anthony Liguori wrote: If libvirt assumes anything about what kvm actually supports it is working only by sheer luck. Well the simple answer for libvirt is don't use -nodefconfig and then it can reuse the CPU definitions (including any that the user

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Sun, Mar 11, 2012 at 10:33:15AM -0500, Anthony Liguori wrote: On 03/11/2012 09:56 AM, Gleb Natapov wrote: On Sun, Mar 11, 2012 at 09:12:58AM -0500, Anthony Liguori wrote: -cpu best wouldn't solve this. You need a read/write configuration file where QEMU probes the available CPU and records

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2012-03-11 Thread Gleb Natapov
On Sun, Mar 11, 2012 at 10:41:32AM -0500, Anthony Liguori wrote: On 03/11/2012 10:12 AM, Gleb Natapov wrote: On Sun, Mar 11, 2012 at 09:16:49AM -0500, Anthony Liguori wrote: If libvirt assumes anything about what kvm actually supports it is working only by sheer luck. Well the simple answer

Re: [libvirt] [Qemu-devel] Modern CPU models cannot be used with libvirt

2011-12-18 Thread Gleb Natapov
On Thu, Dec 15, 2011 at 03:42:44PM +, Daniel P. Berrange wrote: On Thu, Dec 15, 2011 at 03:54:15PM +0100, Jiri Denemark wrote: Hi, Recently I realized that all modern CPU models defined in /etc/qemu/target-x86_64.conf are useless when qemu is used through libvirt. That's because we

Re: [libvirt] [Qemu-devel] qemu and qemu.git - Migration + disk stress introduces qcow2 corruptions

2011-11-14 Thread Gleb Natapov
On Mon, Nov 14, 2011 at 11:29:18AM +, Daniel P. Berrange wrote: Do you have some more details on the kind of errors? Missing files, permissions, something like this? Or rather something related to the actual content of an image file? Missing files due to wrong/missing NFS mounts, or

Re: [libvirt] [PATCH 0/2] smbios fixes

2010-12-03 Thread Gleb Natapov
On Thu, Dec 02, 2010 at 08:12:23PM +, Daniel P. Berrange wrote: On Thu, Dec 02, 2010 at 10:04:59PM +0200, Gleb Natapov wrote: On Thu, Dec 02, 2010 at 07:56:03PM +, Daniel P. Berrange wrote: On Thu, Dec 02, 2010 at 09:44:47PM +0200, Gleb Natapov wrote: On Thu, Dec 02, 2010 at 10

Re: [libvirt] [PATCH 0/2] smbios fixes

2010-12-02 Thread Gleb Natapov
On Thu, Dec 02, 2010 at 10:36:59AM -0700, Eric Blake wrote: On 12/02/2010 05:47 AM, Daniel P. Berrange wrote: On Wed, Dec 01, 2010 at 05:12:08PM -0700, Eric Blake wrote: In testing smbios mode='host'/, I noticed a couple of problems. First, qemu rejected the command line we gave it (invalid

Re: [libvirt] [PATCH 0/2] smbios fixes

2010-12-02 Thread Gleb Natapov
On Thu, Dec 02, 2010 at 07:56:03PM +, Daniel P. Berrange wrote: On Thu, Dec 02, 2010 at 09:44:47PM +0200, Gleb Natapov wrote: On Thu, Dec 02, 2010 at 10:36:59AM -0700, Eric Blake wrote: On 12/02/2010 05:47 AM, Daniel P. Berrange wrote: On Wed, Dec 01, 2010 at 05:12:08PM -0700, Eric