Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 01:33:48PM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 28, 2013 at 01:22:45PM +0200, Gleb Natapov wrote: > > On Thu, Nov 28, 2013 at 01:18:54PM +0200, Avi Kivity wrote: > > > On 11/28/2013 01:02 PM, Gleb Natapov wrote: > > > >On Thu, Nov 28,

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 12:10:40PM +0100, Paolo Bonzini wrote: > Il 28/11/2013 12:09, Gleb Natapov ha scritto: > > > - if there are no callbacks, but there are readers, synchronize_srcu > > > busy-loops for some time checking if the readers complete. After a &

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 01:18:54PM +0200, Avi Kivity wrote: > On 11/28/2013 01:02 PM, Gleb Natapov wrote: > >On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: > >>On 11/28/2013 12:11 PM, Gleb Natapov wrote: > >>>On Thu, Nov 28, 2013 at 11:49:00AM +0200, Av

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 11:40:06AM +0100, Paolo Bonzini wrote: > Il 28/11/2013 11:16, Avi Kivity ha scritto: > >> The QRCU I linked would work great latency-wise (it has roughly the same > >> latency of an rwsem but readers are lock-free). However, the locked > >> operations in the read path would

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 12:12:55PM +0200, Avi Kivity wrote: > On 11/28/2013 12:11 PM, Gleb Natapov wrote: > >On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: > >>On 11/28/2013 11:19 AM, Gleb Natapov wrote: > >>>On Thu, Nov 28, 2013 at 09:55:42AM +0100, Pa

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 11:49:00AM +0200, Avi Kivity wrote: > On 11/28/2013 11:19 AM, Gleb Natapov wrote: > >On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: > >>Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: > >>>>>Without synchronize_rcu yo

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 10:29:36AM +0100, Paolo Bonzini wrote: > Il 28/11/2013 10:19, Gleb Natapov ha scritto: > > Not changing current behaviour is certainly safer, but I am still not 100% > > convinced we have to ensure this. > > > > Suppose guest does: > >

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 09:14:22AM +, Zhanghaoyu (A) wrote: > > No, this would be exactly the same code that is running now: > > > > mutex_lock(&kvm->irq_lock); > > old = kvm->irq_routing; > > kvm_irq_routing_update(kvm, new); > >>

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-28 Thread Gleb Natapov
On Thu, Nov 28, 2013 at 09:55:42AM +0100, Paolo Bonzini wrote: > Il 28/11/2013 07:27, Zhanghaoyu (A) ha scritto: > >> >Without synchronize_rcu you could have > >> > > >> >VCPU writes to routing table > >> > e = entry from IRQ routing table > >> >kvm_irq

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 06:05:37PM +0200, Michael S. Tsirkin wrote: > On Tue, Nov 26, 2013 at 02:56:10PM +0200, Gleb Natapov wrote: > > On Tue, Nov 26, 2013 at 01:47:03PM +0100, Paolo Bonzini wrote: > > > Il 26/11/2013 13:40, Zhanghaoyu (A) ha scritto: > > > > W

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 06:27:47PM +0200, Avi Kivity wrote: > On 11/26/2013 06:24 PM, Gleb Natapov wrote: > >On Tue, Nov 26, 2013 at 04:20:27PM +0100, Paolo Bonzini wrote: > >>Il 26/11/2013 16:03, Gleb Natapov ha scritto: > >>>>>>>>>I u

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 05:28:23PM +0100, Paolo Bonzini wrote: > Il 26/11/2013 17:24, Gleb Natapov ha scritto: > >> VCPU writes to routing table > >>e = entry from IRQ routing table > >> kvm_irq_routing_update(kv

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 04:20:27PM +0100, Paolo Bonzini wrote: > Il 26/11/2013 16:03, Gleb Natapov ha scritto: > >>>> > >>I understood the proposal was also to eliminate the > >>>> > >>synchronize_rcu(), > >>>> >

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 04:54:44PM +0200, Avi Kivity wrote: > On 11/26/2013 04:46 PM, Paolo Bonzini wrote: > >Il 26/11/2013 15:36, Avi Kivity ha scritto: > >> No, this would be exactly the same code that is running now: > >> > >> mutex_lock(&kvm->irq_lock); > >> old = kv

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 01:47:03PM +0100, Paolo Bonzini wrote: > Il 26/11/2013 13:40, Zhanghaoyu (A) ha scritto: > > When guest set irq smp_affinity, VMEXIT occurs, then the vcpu thread will > > IOCTL return to QEMU from hypervisor, then vcpu thread ask the hypervisor > > to update the irq routin

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 02:48:10PM +0200, Gleb Natapov wrote: > On Tue, Nov 26, 2013 at 12:40:36PM +, Zhanghaoyu (A) wrote: > > Hi all, > > > > When guest set irq smp_affinity, VMEXIT occurs, then the vcpu thread will > > IOCTL return to QEMU from hyperviso

Re: [Qemu-devel] [RFC] create a single workqueue for each vm to update vm irq routing table

2013-11-26 Thread Gleb Natapov
On Tue, Nov 26, 2013 at 12:40:36PM +, Zhanghaoyu (A) wrote: > Hi all, > > When guest set irq smp_affinity, VMEXIT occurs, then the vcpu thread will > IOCTL return to QEMU from hypervisor, then vcpu thread ask the hypervisor to > update the irq routing table, Why vcpu thread ask the hyperviso

[Qemu-devel] [PATCH 2/3] pci-assign: Remove dead code for direct I/O region access from userspace

2013-11-21 Thread Gleb Natapov
From: Jan Kiszka This feature was already deprecated back then in qemu-kvm, ie. before pci-assign went upstream. assigned_dev_ioport_rw will never be invoked with resource_fd < 0. Signed-off-by: Jan Kiszka Acked-by: Alex Williamson Signed-off-by: Gleb Natapov --- hw/i386/kvm/pci-assig

[Qemu-devel] [PATCH 0/3] [PULL] qemu-kvm.git uq/master queue

2013-11-21 Thread Gleb Natapov
The following changes since commit fc8ead74674b7129e8f31c2595c76658e5622197: Merge remote-tracking branch 'qemu-kvm/uq/master' into staging (2013-10-18 10:03:24 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master for you to fetch cha

[Qemu-devel] [PATCH 1/3] KVM: x86: fix typo in KVM_GET_XCRS

2013-11-21 Thread Gleb Natapov
From: Paolo Bonzini Only the first item of the array was ever looked at. No practical effect, but still worth fixing. Signed-off-by: Paolo Bonzini Signed-off-by: Gleb Natapov --- target-i386/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b

[Qemu-devel] [PATCH 3/3] kvm: Fix uninitialized cpuid_data

2013-11-21 Thread Gleb Natapov
: kvm_arch_init_vcpu (kvm.c:446) Instead of adding more memset calls for parts of cpuid_data, the existing calls were removed and cpuid_data is now initialized completely in one call. Signed-off-by: Stefan Weil Signed-off-by: Gleb Natapov --- target-i386/kvm.c | 9 ++--- 1 file changed, 2 insertions(+), 7

Re: [Qemu-devel] [PATCH 0/3] [PULL for 1.7?] qemu-kvm.git uq/master queue

2013-11-21 Thread Gleb Natapov
On Thu, Nov 21, 2013 at 07:11:46PM +0100, Paolo Bonzini wrote: > Il 21/11/2013 18:38, Stefan Weil ha scritto: > >> > Jan Kiszka (1): > >> > pci-assign: Remove dead code for direct I/O region access from > >> > userspace > >> > > >> > Paolo Bonzini (1): > >> > KVM: x86: fix typo in KVM_

Re: [Qemu-devel] question about VM kernel parameter idle=

2013-11-20 Thread Gleb Natapov
On Thu, Nov 21, 2013 at 09:01:39AM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 21, 2013 at 03:45:28AM +, Zhanghaoyu (A) wrote: > > Hi, all > > > > What's the difference of the linux guest kernel parameter > > idle=, especially in performance? > > > > Taking the performance into account, w

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-12 Thread Gleb Natapov
On Wed, Nov 13, 2013 at 12:27:10PM +1000, Richard Henderson wrote: > On 11/13/2013 08:53 AM, Paolo Bonzini wrote: > > Il 12/11/2013 19:54, Richard Henderson ha scritto: > >> For what it's worth, I think BOTH of the patches that have been posted > >> should be applied. That is, the patch that does

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-12 Thread Gleb Natapov
On Tue, Nov 12, 2013 at 02:57:49PM +0100, Paolo Bonzini wrote: > Il 12/11/2013 14:23, Gleb Natapov ha scritto: > >> If -O0 does not do that, let's move debug builds to -O1. > > > > Why not enable dce with -fdce? > > First, because clang doesn't have fine-

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-12 Thread Gleb Natapov
On Tue, Nov 12, 2013 at 01:21:51PM +, Peter Maydell wrote: > (Similarly, > you can put code that's a syntax error inside #if 0, > but that won't work inside an "if (0)". The solution > is not to do that.) > That's the advantage of using "if (0)" ins

Re: [Qemu-devel] [PATCH for-1.7] target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()

2013-11-12 Thread Gleb Natapov
On Tue, Nov 12, 2013 at 02:12:56PM +0100, Paolo Bonzini wrote: > Il 12/11/2013 13:16, Peter Maydell ha scritto: > > On 12 November 2013 12:09, Paolo Bonzini wrote: > >> Il 12/11/2013 12:07, Peter Maydell ha scritto: > >>> For the compiler to eliminate this we are relying on: > >>> * dead-code eli

Re: [Qemu-devel] [PATCH for 1.7] kvm: Fix uninitialized cpuid_data

2013-11-07 Thread Gleb Natapov
On Wed, Nov 06, 2013 at 10:35:27PM +0100, Stefan Weil wrote: > This error was reported by valgrind when running qemu-system-x86_64 > with kvm: > > ==975== Conditional jump or move depends on uninitialised value(s) > ==975==at 0x521C38: cpuid_find_entry (kvm.c:176) > ==975==by 0x5235BA: kvm

Re: [Qemu-devel] [PATCH uq/master] pci-assign: Remove dead code for direct I/O region access from userspace

2013-11-07 Thread Gleb Natapov
On Mon, Nov 04, 2013 at 02:42:55PM +0100, Jan Kiszka wrote: > This feature was already deprecated back then in qemu-kvm, ie. before > pci-assign went upstream. assigned_dev_ioport_rw will never be invoked > with resource_fd < 0. > > Signed-off-by: Jan Kiszka Applied, thanks. > --- > hw/i386/kvm

Re: [Qemu-devel] [PATCH uq/master] pci-assign: Remove dead code for direct I/O region access from userspace

2013-11-05 Thread Gleb Natapov
Alex can you review please? On Mon, Nov 04, 2013 at 02:42:55PM +0100, Jan Kiszka wrote: > This feature was already deprecated back then in qemu-kvm, ie. before > pci-assign went upstream. assigned_dev_ioport_rw will never be invoked > with resource_fd < 0. > > Signed-off-by: Jan Kiszka > --- >

Re: [Qemu-devel] [PATCH uq/master] KVM: x86: fix typo in KVM_GET_XCRS

2013-11-04 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 04:47:52PM +0200, Paolo Bonzini wrote: > Only the first item of the array was ever looked at. No > practical effect, but still worth fixing. > > Signed-off-by: Paolo Bonzini Applied, thanks. > --- > target-i386/kvm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deleti

Re: [Qemu-devel] [PATCH] import kvm-unittest in QEMU source tree

2013-10-31 Thread Gleb Natapov
On Wed, Oct 30, 2013 at 04:06:19PM -0700, Andrew Jones wrote: > On Wed, Oct 16, 2013 at 10:03:37PM +0300, Michael S. Tsirkin wrote: > > This simply imports kvm-unittest git into qemu source tree. > > > > We can next work on making make check run it > > automatically. > > > > Squashed 'kvm-unittes

Re: [Qemu-devel] [patch 2/2] i386: pc: align gpa<->hpa on 1GB boundary

2013-10-30 Thread Gleb Natapov
On Tue, Oct 29, 2013 at 07:21:59PM -0200, Marcelo Tosatti wrote: > > > Could add a warning to memory API: if memory region is larger than 1GB > > > and RAM is 1GB backed, and not properly aligned, warn. > > Perhaps it would be better do abort and ask user to fix configuration, > > and on hugepage a

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2013-10-29 Thread Gleb Natapov
On Tue, Oct 29, 2013 at 02:17:10PM +0200, Michael S. Tsirkin wrote: > On Tue, Oct 29, 2013 at 01:26:59PM +0200, Gleb Natapov wrote: > > On Tue, Oct 29, 2013 at 01:13:24PM +0200, Michael S. Tsirkin wrote: > > > On Tue, Oct 29, 2013 at 10:48:07AM +0100, Peter Lieven wro

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2013-10-29 Thread Gleb Natapov
On Tue, Oct 29, 2013 at 12:31:18PM +0100, Peter Lieven wrote: > On 29.10.2013 12:26, Gleb Natapov wrote: > >On Tue, Oct 29, 2013 at 01:13:24PM +0200, Michael S. Tsirkin wrote: > >>On Tue, Oct 29, 2013 at 10:48:07AM +0100, Peter Lieven wrote: > >>>Hi all, > >&g

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2013-10-29 Thread Gleb Natapov
On Tue, Oct 29, 2013 at 01:13:24PM +0200, Michael S. Tsirkin wrote: > On Tue, Oct 29, 2013 at 10:48:07AM +0100, Peter Lieven wrote: > > Hi all, > > > > this question might seem a bit weird, but does anyone see a good way to > > avoid > > that Windows is able to boot inside qemu? > > > > We have

Re: [Qemu-devel] kvm/hyper-v: obtaining client machine id

2013-10-29 Thread Gleb Natapov
On Mon, Oct 28, 2013 at 08:50:31AM +0100, Peter Lieven wrote: > Hi, > > do you know if it is possible to obtain the client machine id of a Windows > vServer via > a Hyper-V hypercall? I would need an information to check vServer activations > against > our KMS. > Have not idea, sorry. --

Re: [Qemu-devel] Prohibit Windows from running in QEMU

2013-10-29 Thread Gleb Natapov
On Tue, Oct 29, 2013 at 11:19:54AM +0100, Paolo Bonzini wrote: > Il 29/10/2013 11:11, Peter Lieven ha scritto: > > On 29.10.2013 10:59, Paolo Bonzini wrote: > >> Il 29/10/2013 10:48, Peter Lieven ha scritto: > >>> Hi all, > >>> > >>> this question might seem a bit weird, but does anyone see a good

Re: [Qemu-devel] [PATCH] kvm-unittest: fix build with gcc 4.3.X and older

2013-10-17 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 12:55:16PM +0200, Paolo Bonzini wrote: > Il 17/10/2013 08:27, Gleb Natapov ha scritto: > > On Wed, Oct 16, 2013 at 10:46:53PM +0300, Michael S. Tsirkin wrote: > >> Old GCC didn't let you reference variable by > >> number if it is

Re: [Qemu-devel] [PATCH] kvm-unittest: fix build with gcc 4.3.X and older

2013-10-17 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 12:44:46PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 17, 2013 at 12:33:39PM +0300, Gleb Natapov wrote: > > > > It just papers over the problem. Compiler should either complain that it > > > > does not know what %w0 or complain that var

Re: [Qemu-devel] [PATCH] kvm-unittest: fix build with gcc 4.3.X and older

2013-10-17 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 12:28:58PM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 17, 2013 at 11:34:41AM +0300, Gleb Natapov wrote: > > On Thu, Oct 17, 2013 at 11:27:37AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Oct 17, 2013 at 11:20:27AM +0300, Gleb Natapov wrote: >

Re: [Qemu-devel] [PATCH] kvm-unittest: fix build with gcc 4.3.X and older

2013-10-17 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 11:27:37AM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 17, 2013 at 11:20:27AM +0300, Gleb Natapov wrote: > > On Thu, Oct 17, 2013 at 11:12:31AM +0300, Michael S. Tsirkin wrote: > > > On Thu, Oct 17, 2013 at 09:27:51AM +0300, Gleb Natapov wrote: >

Re: [Qemu-devel] [PATCH] kvm-unittest: fix build with gcc 4.3.X and older

2013-10-17 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 11:12:31AM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 17, 2013 at 09:27:51AM +0300, Gleb Natapov wrote: > > On Wed, Oct 16, 2013 at 10:46:53PM +0300, Michael S. Tsirkin wrote: > > > Old GCC didn't let you reference variable by > > &g

Re: [Qemu-devel] [PATCH] kvm-unittest: fix build with gcc 4.3.X and older

2013-10-16 Thread Gleb Natapov
On Wed, Oct 16, 2013 at 10:46:53PM +0300, Michael S. Tsirkin wrote: > Old GCC didn't let you reference variable by > number if it is listed with a specific register > constraint, on the assumption you can just > use the register name explicitly. > > Build fails with errors like this: > a.c:6: erro

Re: [Qemu-devel] [PULL 42/43] piix4: add acpi pci hotplug support

2013-10-16 Thread Gleb Natapov
On Thu, Oct 17, 2013 at 08:32:14AM +0300, Michael S. Tsirkin wrote: > On Thu, Oct 17, 2013 at 12:25:32AM +0200, Paolo Bonzini wrote: > > Il 17/10/2013 00:03, Michael S. Tsirkin ha scritto: > > > On Wed, Oct 16, 2013 at 11:26:11PM +0200, Paolo Bonzini wrote: > > >> Il 16/10/2013 20:37, Michael S. Ts

Re: [Qemu-devel] RFC: KVM _CREATE_DEVICE considered harmful?

2013-10-16 Thread Gleb Natapov
On Wed, Oct 16, 2013 at 02:59:47PM +0200, Christian Borntraeger wrote: > Folks, > > from time to time I update valgrind or qemu to work reasonably well > with KVM. > > Now, newer KVMs have the ability to create subdevices of a KVM guest (e.g. an > in kernel > kvm interrupt controller) with the f

Re: [Qemu-devel] [PATCH] virtio: Introduce virtio-testdev

2013-10-15 Thread Gleb Natapov
On Tue, Oct 15, 2013 at 11:14:12AM +0100, Peter Maydell wrote: > On 15 October 2013 10:47, Anup Patel wrote: > > On Tue, Oct 15, 2013 at 2:06 PM, Andrew Jones wrote: > >> I'm not opposed to it, but at the moment I'm not sure how we would > >> utilize it within kvm-unit-tests. Maybe it would be us

Re: [Qemu-devel] problems with 1G hugepages and linux 3.12-rc3

2013-10-09 Thread Gleb Natapov
Copying Andrea, On Sun, Oct 06, 2013 at 02:47:41AM +0200, andy123 wrote: > Hi, > > as the subject states, I have some problems with 1G hugepages with > qemu(-vfio-git) on Linux 3.12-rc3. > > I start qemu like this, for example: > "/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -mem-path /dev/h

Re: [Qemu-devel] [PATCH uq/master] kvmvapic: Prevent reading beyond the end of guest RAM

2013-10-04 Thread Gleb Natapov
On Mon, Sep 30, 2013 at 12:35:13PM +0200, Jan Kiszka wrote: > rom_state_paddr is guest provided (caller address of outw(VAPIC_PORT) + > writen 16-bit value) and can be influenced to point beyond the end of > the host memory backing the guest's RAM. Make sure we do not use this > pointer to actually

Re: [Qemu-devel] [PATCH v3 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-03 Thread Gleb Natapov
On Thu, Oct 03, 2013 at 11:59:24AM +0200, Igor Mammedov wrote: > On Wed, 2 Oct 2013 17:54:57 +0200 > Paolo Bonzini wrote: > > > The data in leaf 0Dh depends on information from other feature bits. > > Instead of passing it blindly from the host, compute it based on > > whether these feature bits

Re: [Qemu-devel] [PATCH v3 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-02 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 05:54:57PM +0200, Paolo Bonzini wrote: > The data in leaf 0Dh depends on information from other feature bits. > Instead of passing it blindly from the host, compute it based on > whether these feature bits are enabled. > Applied both. Thanks. > Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH v2 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-02 Thread Gleb Natapov
On Wed, Oct 02, 2013 at 05:37:31PM +0200, Paolo Bonzini wrote: > Il 02/10/2013 17:21, Gleb Natapov ha scritto: > >> -if (kvm_enabled()) { > >> -KVMState *s = cs->kvm_state; > >> +kvm_mask = > >> +kvm

Re: [Qemu-devel] [PATCH v2 uq/master 2/2] x86: cpuid: reconstruct leaf 0Dh data

2013-10-02 Thread Gleb Natapov
On Fri, Sep 13, 2013 at 03:55:58PM +0200, Paolo Bonzini wrote: > The data in leaf 0Dh depends on information from other feature bits. > Instead of passing it blindly from the host, compute it based on > whether these feature bits are enabled. > > Signed-off-by: Paolo Bonzini > --- > target-i386/

Re: [Qemu-devel] [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2013-10-01 Thread Gleb Natapov
they do not it should be changed there. > On Tue, Oct 1, 2013 at 11:33 AM, Gleb Natapov wrote: > > On Tue, Oct 01, 2013 at 11:23:07AM -0500, Ben "Root" Anderson wrote: > >> Fair enough in itself, but if HPET is known to have problems with > >> arguably the

Re: [Qemu-devel] [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2013-10-01 Thread Gleb Natapov
from been optimal for any guest. > On Tue, Oct 1, 2013 at 10:56 AM, Gleb Natapov wrote: > > On Tue, Oct 01, 2013 at 09:34:06AM -, Ben A wrote: > >> Apparently this bug's still alive and kicking. > >> > > And no plans to fix it. Do not use hpet with w

Re: [Qemu-devel] [Bug 599958] Re: Timedrift problems with Win7: hpet missing time drift fixups

2013-10-01 Thread Gleb Natapov
On Tue, Oct 01, 2013 at 09:34:06AM -, Ben A wrote: > Apparently this bug's still alive and kicking. > And no plans to fix it. Do not use hpet with windows guests this buys you nothing. > There's an obvious clock skew problem on Windows 7; in the Date & Time > dialog, the clock jumps through s

Re: [Qemu-devel] [PATCH 1/6] kvm: Add KVM_GET_EMULATED_CPUID

2013-09-24 Thread Gleb Natapov
On Tue, Sep 24, 2013 at 11:57:00AM +0200, Borislav Petkov wrote: > On Mon, September 23, 2013 6:28 pm, Eduardo Habkost wrote: > > On Sun, Sep 22, 2013 at 04:44:50PM +0200, Borislav Petkov wrote: > >> From: Borislav Petkov > >> > >> Add a kvm ioctl which states which system functionality kvm emulat

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-22 Thread Gleb Natapov
On Sun, Sep 22, 2013 at 11:05:37AM +0300, Andriy Gapon wrote: > on 22/09/2013 09:31 Gleb Natapov said the following: > > Which kernel version is this? What BSD version? > > $ uname -a > Linux kvm 3.8.0-27-generic #40-Ubuntu SMP Tue Jul 9 00:17:05 UTC 2013 x86_64 > x8

Re: [Qemu-devel] [PATCH] target-i386: Enable x2apic by default on more recent CPU models

2013-09-21 Thread Gleb Natapov
ire some testing to ensure it won't confuse guests. > > This shouldn't affect TCG at all because features not supported by TCG > are automatically and silently disabled by QEMU when initializing the > CPU. > > Signed-off-by: Eduardo Habkost Acked-by: Gleb

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-21 Thread Gleb Natapov
On Thu, Sep 19, 2013 at 08:49:51PM +0300, Andriy Gapon wrote: > on 19/09/2013 19:53 Paolo Bonzini said the following: > > Il 19/09/2013 16:36, Andriy Gapon ha scritto: > >> Not sure how the code ends up at 0x9315 after that. > > > > Events are dropped, probably corresponding to more emulation. >

Re: [Qemu-devel] [PATCH] linux-headers: update to 3.11

2013-09-17 Thread Gleb Natapov
On Wed, Sep 18, 2013 at 01:04:01PM +1000, Alexey Kardashevskiy wrote: > On 09/05/2013 04:07 PM, Paolo Bonzini wrote: > > Il 05/09/2013 05:16, Alexey Kardashevskiy ha scritto: > >> Sorry for my ignorance, but this is The Kernel, it is already there, > >> broken > >> or not, even if it i

Re: [Qemu-devel] in_asm substitute for accel=kvm:tcg

2013-09-17 Thread Gleb Natapov
On Tue, Sep 17, 2013 at 05:33:57PM +0300, Andriy Gapon wrote: > on 17/09/2013 15:32 Andreas Färber said the following: > > Hi, > > > > Am 17.09.2013 13:37, schrieb Andriy Gapon: > >> > >> It seems that when qemu is run with accel=kvm:tcg then -d in_asm does not > >> produce anything. At least, wi

Re: [Qemu-devel] cpufreq and QEMU guests

2013-09-17 Thread Gleb Natapov
On Mon, Sep 16, 2013 at 08:42:58PM +0200, Benoît Canet wrote: > Le Monday 16 Sep 2013 à 18:58:40 (+0300), Gleb Natapov a écrit : > > On Mon, Sep 16, 2013 at 05:46:04PM +0200, Benoît Canet wrote: > > > Le Monday 16 Sep 2013 à 18:32:39 (+0300), Gleb Natapov a écrit : > > >

Re: [Qemu-devel] cpufreq and QEMU guests

2013-09-16 Thread Gleb Natapov
On Mon, Sep 16, 2013 at 05:46:04PM +0200, Benoît Canet wrote: > Le Monday 16 Sep 2013 à 18:32:39 (+0300), Gleb Natapov a écrit : > > On Mon, Sep 16, 2013 at 05:05:45PM +0200, Benoît Canet wrote: > > > Le Monday 16 Sep 2013 à 09:39:10 (-0500), Alexander Graf a écrit : > >

Re: [Qemu-devel] cpufreq and QEMU guests

2013-09-16 Thread Gleb Natapov
On Mon, Sep 16, 2013 at 05:05:45PM +0200, Benoît Canet wrote: > Le Monday 16 Sep 2013 à 09:39:10 (-0500), Alexander Graf a écrit : > > > > > > Am 16.09.2013 um 07:15 schrieb Benoît Canet : > > > > > > > > Hello, > > > > > > I know a cloud provider worried about the fact that the /proc/cpuinfo

Re: [Qemu-devel] [PATCH] qdev-monitor: Avoid exiting when hot-plugging two devices with the same bootindex value

2013-09-16 Thread Gleb Natapov
On Mon, Sep 16, 2013 at 12:54:39PM +0300, Marcel Apfelbaum wrote: > On Thu, 2013-09-12 at 13:04 +0200, Markus Armbruster wrote: > > Marcel Apfelbaum writes: > > > > > On Thu, 2013-09-12 at 11:43 +0200, Markus Armbruster wrote: > > >> Paolo Bonzini writes: > > >> > > >> > Il 11/09/2013 20:26, Ma

Re: [Qemu-devel] [PATCH v2 0/2] KVM: s390: add floating irq controller

2013-09-15 Thread Gleb Natapov
On Fri, Sep 06, 2013 at 03:30:38PM +0200, Christian Borntraeger wrote: > On 06/09/13 14:19, Jens Freimann wrote:> This series adds a kvm_device that > acts as a irq controller for floating > > interrupts. As a first step it implements functionality to retrieve and > > inject > > interrupts for t

Re: [Qemu-devel] [Bug 1180777] Re: Windows 7 VM freeze on Ubuntu 12.04 KVM

2013-09-14 Thread Gleb Natapov
On Fri, Sep 13, 2013 at 07:29:49PM -, Vasile Dumitrescu wrote: > I also see these EXACT symptoms, using kvm (VM managed through livirt > virsh) on Debian x64 host, guest is Windows 8, RedHat VirtIo network > driver. > Can you trace KVM [1] when hang happens next time? [1] http://www.linux-kvm

Re: [Qemu-devel] guest kernel 3.10 panic at boot (__mcheck_cpu_init_generic) with kvm64 vcpu + amd host cpu (qemu 1.4)

2013-09-11 Thread Gleb Natapov
On Wed, Sep 11, 2013 at 05:39:01AM +0200, Alexandre DERUMIER wrote: > Hi List, > I'm trying to boot a debian squeeze guest with a 3.10 kernel, and I have a > crash at boot > > This only happen with kvm64 vcpu + amd host (opteron 6100 or opteron 6300). > Check host dmesg for unhandled msrs. > ho

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 01:46:49PM +0200, Paolo Bonzini wrote: > >> Yes. QEMU unmarshals information from the XSAVE region and back, so it > >> cannot support MPX or AVX-512 yet (even if KVM were). Separate bug, > >> though. > >> > > IMO this is the main issue here, not separ

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 01:07:37PM +0200, Paolo Bonzini wrote: > In fact, another bug is that kvm_vcpu_ioctl_x86_set_xsave ignores > xstate_bv when XSAVE is not available. Instead, it should reset the > FXSAVE data to processor-reset values (except for MXCSR which always > come

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 01:54:50PM +0300, Gleb Natapov wrote: > On Mon, Sep 09, 2013 at 11:53:45AM +0200, Paolo Bonzini wrote: > > Il 09/09/2013 11:03, Gleb Natapov ha scritto: > > > On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: > > >> Il 08/09/2013

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 11:53:45AM +0200, Paolo Bonzini wrote: > Il 09/09/2013 11:03, Gleb Natapov ha scritto: > > On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: > >> Il 08/09/2013 13:40, Gleb Natapov ha scritto: > >>> On Thu, Sep 05, 2013 at 03:06:2

Re: [Qemu-devel] [PATCH uq/master 2/2] KVM: make XSAVE support more robust

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 11:50:03AM +0200, Paolo Bonzini wrote: > Il 09/09/2013 11:18, Gleb Natapov ha scritto: > > On Mon, Sep 09, 2013 at 10:51:58AM +0200, Paolo Bonzini wrote: > >> Il 08/09/2013 13:52, Gleb Natapov ha scritto: > >>> On Thu, Sep 05, 2013 at 03:06:2

Re: [Qemu-devel] [PATCH uq/master 2/2] KVM: make XSAVE support more robust

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 10:51:58AM +0200, Paolo Bonzini wrote: > Il 08/09/2013 13:52, Gleb Natapov ha scritto: > > On Thu, Sep 05, 2013 at 03:06:22PM +0200, Paolo Bonzini wrote: > >> QEMU moves state from CPUArchState to struct kvm_xsave and back when it > >> inv

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-09 Thread Gleb Natapov
On Mon, Sep 09, 2013 at 10:31:15AM +0200, Paolo Bonzini wrote: > Il 08/09/2013 13:40, Gleb Natapov ha scritto: > > On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: > >> On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, > >> and not restor

Re: [Qemu-devel] [PATCH uq/master 2/2] KVM: make XSAVE support more robust

2013-09-08 Thread Gleb Natapov
On Thu, Sep 05, 2013 at 03:06:22PM +0200, Paolo Bonzini wrote: > QEMU moves state from CPUArchState to struct kvm_xsave and back when it > invokes the KVM_*_XSAVE ioctls. Because it doesn't treat the XSAVE > region as an opaque blob, it might be impossible to set some state on > the destination if

Re: [Qemu-devel] [PATCH uq/master 1/2] x86: fix migration from pre-version 12

2013-09-08 Thread Gleb Natapov
On Thu, Sep 05, 2013 at 03:06:21PM +0200, Paolo Bonzini wrote: > On KVM, the KVM_SET_XSAVE would be executed with a 0 xstate_bv, > and not restore anything. > XRSTOR restores FP/SSE state to reset state if no bits are set in xstate_bv. This is what should happen on reset, no? > Since FP and SSE d

Re: [Qemu-devel] [KVM] segmentation fault happened when reboot VM after hot-uplug virtio NIC

2013-09-03 Thread Gleb Natapov
On Tue, Sep 03, 2013 at 12:06:33PM +, Zhanghaoyu (A) wrote: > Hi, all > > Segmentation fault happened when reboot VM after hot-unplug virtio NIC, which > can be reproduced 100%. > See similar bug report to https://bugzilla.redhat.com/show_bug.cgi?id=988256 > > test environment: > host: SLES1

Re: [Qemu-devel] [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: [Qemu-devel] [PATCH v2] cpu: Move cpu state syncs up into cpu_dump_state()

2013-09-01 Thread Gleb Natapov
pu.c. > Applied, thanks. > Signed-off-by: James Hogan > Cc: Andreas Färber > Cc: Alexander Graf > Cc: Gleb Natapov > Cc: qemu-...@nongnu.org > Cc: k...@vger.kernel.org > --- > Changes in v2 (was kvm: sync cpu state on internal error before dump) > - rewrite

Re: [Qemu-devel] [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: [Qemu-devel] [PATCH] KVM: always use MADV_DONTFORK

2013-09-01 Thread Gleb Natapov
On Thu, Jul 25, 2013 at 12:11:15PM +0200, Andrea Arcangeli wrote: > MADV_DONTFORK prevents fork to fail with -ENOMEM if the default > overcommit heuristics decides there's too much anonymous virtual > memory allocated. If the KVM secondary MMU is synchronized with MMU > notifiers or not, doesn't ma

Re: [Qemu-devel] PING^2 Re: [PATCH] KVM: always use MADV_DONTFORK

2013-08-30 Thread Gleb Natapov
On Fri, Aug 30, 2013 at 06:03:42PM +0200, Paolo Bonzini wrote: > Il 30/08/2013 17:52, Andreas Färber ha scritto: > > OK. The patch is mislabelled as "KVM:" though putting this in a common > > code path and touching exec.c only, so please put it on uq/master and > > fix that up before you set the hi

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Gleb Natapov
On Fri, Aug 30, 2013 at 01:58:59PM +0200, Paolo Bonzini wrote: > Il 30/08/2013 11:37, Laszlo Ersek ha scritto: > > Disclaimer: I don't know what I'm talking about. > > No problem. :) > > > So, Jordan's patch for OVMF (SVN r14494) builds the page tables (and > > finally writes the root to CR3) in

[Qemu-devel] [PATCH 06/10] kvm: Simplify kvm_handle_io

2013-08-28 Thread Gleb Natapov
From: Jan Kiszka Now that cpu_in/out is just a wrapper around address_space_rw, we can also call the latter directly. As host endianness == guest endianness, there is no need for the memory access helpers st*_p/ld*_p as well. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- kvm-all.

[Qemu-devel] [PATCH 05/10] kvm: x86: fix setting IA32_FEATURE_CONTROL with nested VMX disabled

2013-08-28 Thread Gleb Natapov
From: Liu Jinsong This patch is to fix the bug https://bugs.launchpad.net/qemu-kvm/+bug/1207623 IA32_FEATURE_CONTROL is pointless if not expose VMX or SMX bits to cpuid.1.ecx of vcpu. Current qemu-kvm will error return when kvm_put_msrs or kvm_get_msrs. Signed-off-by: Liu Jinsong Signed-off-by

[Qemu-devel] [PATCH 02/10] target-i386: remove tabs from target-i386/cpu.h

2013-08-28 Thread Gleb Natapov
From: Paolo Bonzini Signed-off-by: Paolo Bonzini --- target-i386/cpu.h | 192 ++--- 1 file changed, 96 insertions(+), 96 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3a52f94..af4c0f7 100644 --- a/target-i386/cpu.h +++ b/

[Qemu-devel] [PATCH 07/10] kvm-all.c: max_cpus should not exceed KVM vcpu limit

2013-08-28 Thread Gleb Natapov
From: Marcelo Tosatti maxcpus, which specifies the maximum number of hotpluggable CPUs, should not exceed KVM's vcpu limit. Signed-off-by: Marcelo Tosatti [Reword message. - Paolo] Signed-off-by: Paolo Bonzini --- kvm-all.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/kvm-all

[Qemu-devel] [PATCH 01/10] Initialize IA32_FEATURE_CONTROL MSR in reset and migration

2013-08-28 Thread Gleb Natapov
From: Arthur Chunqi Li The recent KVM patch adds IA32_FEATURE_CONTROL support. QEMU needs to clear this MSR when reset vCPU and keep the value of it when migration. This patch add this feature. Signed-off-by: Arthur Chunqi Li Signed-off-by: Gleb Natapov --- target-i386/cpu.h |2

[Qemu-devel] [PATCH 10/10] kvm-stub: fix compilation

2013-08-28 Thread Gleb Natapov
From: Paolo Bonzini Non-KVM targets fail compilation on the uq/master branch. Fix the prototype of kvm_irqchip_add_irqfd_notifier to match the one in kvm-all.c. Signed-off-by: Paolo Bonzini Signed-off-by: Gleb Natapov --- kvm-stub.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion

[Qemu-devel] [PATCH 04/10] kvm: add KVM_IRQFD_FLAG_RESAMPLE support

2013-08-28 Thread Gleb Natapov
From: Vincenzo Maffione Added an EventNotifier* parameter to kvm-all.c:kvm_irqchip_add_irqfd_notifier(), in order to give KVM another eventfd to be used as "resamplefd". See the documentation in the linux kernel sources in Documentation/virtual/kvm/api.txt (section 4.75) for more details. When th

[Qemu-devel] [PATCH 08/10] kvm: i386: fix LAPIC TSC deadline timer save/restore

2013-08-28 Thread Gleb Natapov
From: Marcelo Tosatti The configuration of the timer represented by MSR_IA32_TSCDEADLINE depends on: - APIC LVT Timer register. - TSC value. Change the order to respect the dependency. Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini --- target-i386/kvm.c | 29 +

[Qemu-devel] [PATCH 03/10] kvm: migrate vPMU state

2013-08-28 Thread Gleb Natapov
From: Paolo Bonzini Reviewed-by: Gleb Natapov Signed-off-by: Paolo Bonzini --- target-i386/cpu.h | 23 target-i386/kvm.c | 93 ++--- target-i386/machine.c | 44 +++ 3 files changed, 155 insertions(+), 5

[Qemu-devel] [PATCH 09/10] kvm: shorten the parameter list for get_real_device()

2013-08-28 Thread Gleb Natapov
From: Wei Yang get_real_device() has 5 parameters with the last 4 is contained in the first structure. This patch removes the last 4 parameters and directly use them from the first parameter. Acked-by: Alex Williamson Signed-off-by: Wei Yang Signed-off-by: Paolo Bonzini --- hw/i386/kvm/pci-

[Qemu-devel] [PATCH v3 00/10] [PULL] qemu-kvm.git uq/master queue

2013-08-28 Thread Gleb Natapov
Anthony, This obsoletes "[PULL v2 0/9] KVM changes for 2013-08-23" The following changes since commit f03d07d4683b2e8325a7cb60b4e14b977b1a869c: Merge remote-tracking branch 'quintela/migration.next' into staging (2013-07-23 10:57:23 -0500) are available in the git repository at: git://gi

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 03:35:33PM +0200, Benoît Canet wrote: > > > > If I understand correctly changing the CPUID L3 cache infos in QEMU > > > > will change > > > > the value displayed in the guest /proc/cpuinfo but will not change the > > > > size of > > > > the l3 cache used by the hardware. S

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 04:17:56PM +0300, Gleb Natapov wrote: > On Tue, Aug 27, 2013 at 03:18:16PM +0200, Benoît Canet wrote: > > > > Hello Eduardo, > > > > I read a bit about caches on wikipedia. > > > > If I understand correctly changing the CPUID

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-27 Thread Gleb Natapov
On Tue, Aug 27, 2013 at 03:18:16PM +0200, Benoît Canet wrote: > > Hello Eduardo, > > I read a bit about caches on wikipedia. > > If I understand correctly changing the CPUID L3 cache infos in QEMU will > change > the value displayed in the guest /proc/cpuinfo but will not change the size of > t

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-26 Thread Gleb Natapov
On Mon, Aug 26, 2013 at 02:49:41PM +0200, Benoît Canet wrote: > > Hi, > > Thanks for the answer. > > > On Tue, Aug 13, 2013 at 08:17:13PM +0200, Benoît Canet wrote: > > > > > > Hi, > > > > > > I noticed that the l3 cache size of a guest /proc/cpuinfo is not the same > > > as > > > the l3 cach

  1   2   3   4   5   6   7   8   9   10   >