[PATCH] KVM: x86: Ignore reads to K7 EVNTSEL MSRs

2009-06-15 Thread Amit Shah
In commit 7fe29e0faacb650d31b9e9f538203a157bec821d we ignored the reads to the P6 EVNTSEL MSRs. That fixed crashes on Intel machines. Ignore the reads to K7 EVNTSEL MSRs as well to fix this on AMD hosts. This fixes Kaspersky antivirus crashing Windows guests on AMD hosts. Signed-off-by: Amit Sha

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Sun, 2009-06-14 at 12:34 +0300, Michael S. Tsirkin wrote: > On Fri, Jun 12, 2009 at 04:53:27PM +0100, Mark McLoughlin wrote: > > The other obvious piece to add to it would be PCI addresses, so that > > even if you remove a device, the addresses assigned to existing devices > > don't change. > >

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Sun, 2009-06-14 at 12:50 +0300, Michael S. Tsirkin wrote: > On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: > > However, in order to retain compat for that SCSI device (e.g. ensuring > > the PCI address doesn't change as other devices are added an removed), > > we're back to the

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 12:08 PM, Mark McLoughlin wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? Yep, most people seem to agree that it makes sense to allow this, but some believe it should only be vi

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/14/2009 12:47 PM, Michael S. Tsirkin wrote: Michael S. Tsirkin wrote: If we want to remove a device from under a running guest, you need hotplug. So we can't just remove several lines from the config and hope that it'll work simply because the PCI address is stable. Why not?

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/14/2009 12:50 PM, Michael S. Tsirkin wrote: On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: However, in order to retain compat for that SCSI device (e.g. ensuring the PCI address doesn't change as other devices are added an removed), we're back to the same problem ...

Re: [KVM PATCH v2 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-15 Thread Michael S. Tsirkin
On Sun, Jun 14, 2009 at 11:39:21PM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Sun, Jun 14, 2009 at 08:53:11AM -0400, Gregory Haskins wrote: > > > >> Michael S. Tsirkin wrote: > >> > >>> On Thu, Jun 04, 2009 at 08:48:12AM -0400, Gregory Haskins wrote: > >>> > >>>

Re: [PATCH 1/6] env->kvm_cpu_state.init is always zero here.

2009-06-15 Thread Avi Kivity
On 06/14/2009 01:52 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov --- qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 2aeb17c..ec911ef 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -412,7 +412,7 @@ static int kvm_main_loop_

Re: [PATCH 1/6] env->kvm_cpu_state.init is always zero here.

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 12:55:27PM +0300, Avi Kivity wrote: > On 06/14/2009 01:52 PM, Gleb Natapov wrote: >> Signed-off-by: Gleb Natapov >> --- >> qemu-kvm.c |2 +- >> 1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/qemu-kvm.c b/qemu-kvm.c >> index 2aeb17c..ec911ef 100644

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Avi Kivity
On 06/14/2009 01:52 PM, Gleb Natapov wrote: Instead of having special case in vcpu event loop. I'm a little worried about two vcpus INITing each other simultaneously and deadlocking. INIT/SIPI are async events, the initiator should not wait for them. -- error compiling committee.c: to

Re: [PATCH 1/6] env->kvm_cpu_state.init is always zero here.

2009-06-15 Thread Avi Kivity
On 06/15/2009 12:58 PM, Gleb Natapov wrote: On Mon, Jun 15, 2009 at 12:55:27PM +0300, Avi Kivity wrote: On 06/14/2009 01:52 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov --- qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qe

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Sun, 2009-06-14 at 10:58 +0300, Avi Kivity wrote: > Mark McLoughlin wrote: > > > > >> I think the point is that you don't need version numbers if you have a > >> proper device tree. > >> > > > > How do you add a new attribute to the device tree and, when a supplied > > device tree lac

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 01:03:39PM +0300, Avi Kivity wrote: > On 06/14/2009 01:52 PM, Gleb Natapov wrote: >> Instead of having special case in vcpu event loop. >> >> > > I'm a little worried about two vcpus INITing each other simultaneously > and deadlocking. INIT/SIPI are async events, the

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Avi Kivity
On 06/15/2009 01:11 PM, Gleb Natapov wrote: On Mon, Jun 15, 2009 at 01:03:39PM +0300, Avi Kivity wrote: On 06/14/2009 01:52 PM, Gleb Natapov wrote: Instead of having special case in vcpu event loop. I'm a little worried about two vcpus INITing each other simultaneously and

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 01:14:21PM +0300, Avi Kivity wrote: > On 06/15/2009 01:11 PM, Gleb Natapov wrote: >> On Mon, Jun 15, 2009 at 01:03:39PM +0300, Avi Kivity wrote: >> >>> On 06/14/2009 01:52 PM, Gleb Natapov wrote: >>> Instead of having special case in vcpu event loop.

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Avi Kivity
On 06/15/2009 01:16 PM, Gleb Natapov wrote: A generic on_vcpu_async() would need to allocate, that might be expoitable. Then what about processing events while waiting in on_vcpu()? Could work, but prefer a simpler solution. -- error compiling committee.c: too many arguments to fu

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 12:43:48PM +0300, Avi Kivity wrote: > On 06/14/2009 12:50 PM, Michael S. Tsirkin wrote: >> On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: >> >>> However, in order to retain compat for that SCSI device (e.g. ensuring >>> the PCI address doesn't change as

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 12:27:08PM +0300, Avi Kivity wrote: > On 06/15/2009 12:08 PM, Mark McLoughlin wrote: >>> This last option makes sense to me: in a real world the user has >>> control over where he places the device on the bus, so why >>> not with qemu? >>> >> >> Yep, most people seem t

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 01:32:49PM +0300, Michael S. Tsirkin wrote: > > You do need to export available slot numbers from qemu. > > Why would a slot be unavailable? > Because it does not exist? -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 01:44:56PM +0300, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 01:32:49PM +0300, Michael S. Tsirkin wrote: > > > You do need to export available slot numbers from qemu. > > > > Why would a slot be unavailable? > > > Because it does not exist? We can create a slot with an

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 01:46:53PM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 15, 2009 at 01:44:56PM +0300, Gleb Natapov wrote: > > On Mon, Jun 15, 2009 at 01:32:49PM +0300, Michael S. Tsirkin wrote: > > > > You do need to export available slot numbers from qemu. > > > > > > Why would a slot b

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 01:52:13PM +0300, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 01:46:53PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 15, 2009 at 01:44:56PM +0300, Gleb Natapov wrote: > > > On Mon, Jun 15, 2009 at 01:32:49PM +0300, Michael S. Tsirkin wrote: > > > > > You do need to ex

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 02:07:53PM +0300, Michael S. Tsirkin wrote: > On Mon, Jun 15, 2009 at 01:52:13PM +0300, Gleb Natapov wrote: > > On Mon, Jun 15, 2009 at 01:46:53PM +0300, Michael S. Tsirkin wrote: > > > On Mon, Jun 15, 2009 at 01:44:56PM +0300, Gleb Natapov wrote: > > > > On Mon, Jun 15, 200

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 01:32 PM, Michael S. Tsirkin wrote: You do need to export available slot numbers from qemu. Why would a slot be unavailable? A slot needs to be configured in ACPI, and not be taken by onboard chips (piix takes slot 0, for example). -- error compiling committee.c: to

[PATCH] Activate Virtualization On Demand v2

2009-06-15 Thread Alexander Graf
X86 CPUs need to have some magic happening to enable the virtualization extensions on them. This magic can result in unpleasant results for users, like blocking other VMMs from working (vmx) or using invalid TLB entries (svm). Currently KVM activates virtualization when the respective kernel modul

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 12:09 PM, Mark McLoughlin wrote: I think the point is that you don't need version numbers if you have a proper device tree. How do you add a new attribute to the device tree and, when a supplied device tree lacking said attribute, distinguish between a device tree from a

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 02:14:15PM +0300, Gleb Natapov wrote: > On Mon, Jun 15, 2009 at 02:07:53PM +0300, Michael S. Tsirkin wrote: > > On Mon, Jun 15, 2009 at 01:52:13PM +0300, Gleb Natapov wrote: > > > On Mon, Jun 15, 2009 at 01:46:53PM +0300, Michael S. Tsirkin wrote: > > > > On Mon, Jun 15, 200

Re: Configuration vs. compat hints

2009-06-15 Thread Markus Armbruster
Avi Kivity writes: > On 06/15/2009 12:08 PM, Mark McLoughlin wrote: >>> This last option makes sense to me: in a real world the user has >>> control over where he places the device on the bus, so why >>> not with qemu? >>> >> >> Yep, most people seem to agree that it makes sense to allow th

Re: [PATCH 2/4] Implement Hyper-V MSRs v2

2009-06-15 Thread Alexander Graf
On 19.05.2009, at 14:52, Avi Kivity wrote: Alexander Graf wrote: Hyper-V uses some MSRs, some of which are actually reserved for BIOS usage. But let's be nice today and have it its way, because otherwise it fails terribly. v2 changes: - remove the 0x4081 MSR definition - add pr_un

Re: Configuration vs. compat hints

2009-06-15 Thread Avi Kivity
(adding cc) On 06/15/2009 02:35 PM, Markus Armbruster wrote: Not really. QEMU gives just the host bridge a fixed slot[*]. All the other slots are available. qemu needs to export these two bits of information: the first free slot and the number of slots. More generally, which slots are

Re: [PATCH 4/4] Nested SVM: Improve interrupt injection v2

2009-06-15 Thread Alexander Graf
On 19.05.2009, at 15:22, Gleb Natapov wrote: On Tue, May 19, 2009 at 12:54:03PM +0200, Alexander Graf wrote: While trying to get Hyper-V running, I realized that the interrupt injection mechanisms that are in place right now are not 100% correct. This patch makes nested SVM's interrupt inje

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 02:27:14PM +0300, Avi Kivity wrote: > On 06/15/2009 01:32 PM, Michael S. Tsirkin wrote: >>> You do need to export available slot numbers from qemu. >>> >> >> Why would a slot be unavailable? >> > > A slot needs to be configured in ACPI, Can we configure all possib

Re: [PATCH 4/4] Nested SVM: Improve interrupt injection v2

2009-06-15 Thread Gleb Natapov
On Mon, Jun 15, 2009 at 01:47:08PM +0200, Alexander Graf wrote: > > On 19.05.2009, at 15:22, Gleb Natapov wrote: > >> On Tue, May 19, 2009 at 12:54:03PM +0200, Alexander Graf wrote: >>> While trying to get Hyper-V running, I realized that the interrupt >>> injection >>> mechanisms that are in pla

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 02:48 PM, Michael S. Tsirkin wrote: A slot needs to be configured in ACPI, Can we configure all possible 32 slots? That's what we do. But one is always taken. In the future, perhaps more. and not be taken by onboard chips (piix takes slot 0, for example). p

Re: [Qemu-devel] Re: Configuration vs. compat hints

2009-06-15 Thread Stefano Stabellini
Avi Kivity wrote: > (I'd be quite happy constructing the entire machine config on the > command line, but I realize it's just me) > It is not just you. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [KVM PATCH v2 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-15 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Sun, Jun 14, 2009 at 11:39:21PM -0400, Gregory Haskins wrote: > >> Michael S. Tsirkin wrote: >> >>> On Sun, Jun 14, 2009 at 08:53:11AM -0400, Gregory Haskins wrote: >>> >>> Michael S. Tsirkin wrote: > On Thu, Jun 04,

[KVM-AUTOTEST PATCH 0/5] Introducing kvm_subprocess

2009-06-15 Thread Michael Goldish
The following patches replace the run_bg() function and the kvm_spawn class with kvm_subprocess. The new module is intended to solve a problem with run_bg() (which loses track of the child process when the parent process exits) and allows for more flexibility in handling SSH/Telnet sessions (allows

[KVM-AUTOTEST PATCH 1/5] Add new module kvm_subprocess

2009-06-15 Thread Michael Goldish
This module is intended to be used for controlling all child processes in KVM tests: both QEMU processes and SSH/SCP/Telnet processes. Processes started with this module keep running and can be interacted with even after the parent process exits. The current run_bg() utility tracks a child process

[KVM-AUTOTEST PATCH 2/5] Modify kvm_vm and kvm_preprocessing to use the new kvm_subprocess module

2009-06-15 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_preprocessing.py | 17 +- client/tests/kvm/kvm_vm.py| 103 + 2 files changed, 44 insertions(+), 76 deletions(-) diff --git a/client/tests/kvm/kvm_preprocessing.py b/client/tests/kvm/kvm_pr

[KVM-AUTOTEST PATCH 3/5] Modify remote_login and remote_scp in kvm_utils to use kvm_subprocess

2009-06-15 Thread Michael Goldish
Also remove a reference to kvm_log that was left behind. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_utils.py | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 4bc8dc7..09af62d 1006

[KVM-AUTOTEST PATCH 4/5] Modify run_autotest() in kvm_tests.py to use the new kvm_subprocess module.

2009-06-15 Thread Michael Goldish
Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_tests.py |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/tests/kvm/kvm_tests.py b/client/tests/kvm/kvm_tests.py index 54d2a7a..ffe9116 100644 --- a/client/tests/kvm/kvm_tests.py +++ b/client/tests/kvm/

[KVM-AUTOTEST PATCH 5/5] Remove kvm_spawn and run_bg() from kvm_utils.py.

2009-06-15 Thread Michael Goldish
These are now provided by kvm_subprocess.py. Signed-off-by: Michael Goldish --- client/tests/kvm/kvm_utils.py | 477 + 1 files changed, 2 insertions(+), 475 deletions(-) diff --git a/client/tests/kvm/kvm_utils.py b/client/tests/kvm/kvm_utils.py index 09a

Re: [PATCH] Activate Virtualization On Demand v2

2009-06-15 Thread Christoph Hellwig
On Mon, Jun 15, 2009 at 01:30:05PM +0200, Alexander Graf wrote: > X86 CPUs need to have some magic happening to enable the virtualization > extensions on them. This magic can result in unpleasant results for > users, like blocking other VMMs from working (vmx) or using invalid TLB > entries (svm).

Re: [PATCH] Activate Virtualization On Demand v2

2009-06-15 Thread Alexander Graf
On 15.06.2009, at 14:17, Christoph Hellwig wrote: On Mon, Jun 15, 2009 at 01:30:05PM +0200, Alexander Graf wrote: X86 CPUs need to have some magic happening to enable the virtualization extensions on them. This magic can result in unpleasant results for users, like blocking other VMMs from w

Re: [PATCH] Activate Virtualization On Demand v2

2009-06-15 Thread Christoph Hellwig
On Mon, Jun 15, 2009 at 02:25:01PM +0200, Alexander Graf wrote: > I don't want to fight political battles here. So stop that crap. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.or

Re: [PATCH] KVM: x86: Ignore reads to K7 EVNTSEL MSRs

2009-06-15 Thread Avi Kivity
On 06/15/2009 10:55 AM, Amit Shah wrote: In commit 7fe29e0faacb650d31b9e9f538203a157bec821d we ignored the reads to the P6 EVNTSEL MSRs. That fixed crashes on Intel machines. Ignore the reads to K7 EVNTSEL MSRs as well to fix this on AMD hosts. This fixes Kaspersky antivirus crashing Windows gu

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 12:08 PM, Mark McLoughlin wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? Yep, most people seem to agree that it makes sense to allow this, but some believe i

[ kvm-Bugs-2803638 ] kvm-86: winxp guest + kvmnet.sys virtio unstable

2009-06-15 Thread SourceForge.net
Bugs item #2803638, was opened at 2009-06-09 19:45 Message generated for change (Comment added) made by thekozmo You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2803638&group_id=180599 Please note that this message will contain a full copy of the comment

Re: [Qemu-devel] Re: Configuration vs. compat hints

2009-06-15 Thread Markus Armbruster
Avi Kivity writes: > (adding cc) > > On 06/15/2009 02:35 PM, Markus Armbruster wrote: >> Not really. QEMU gives just the host bridge a fixed slot[*]. All the >> other slots are available. >> > > qemu needs to export these two bits of information: the first free > slot and the number of slot

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 02:56:42PM +0300, Avi Kivity wrote: > On 06/15/2009 02:48 PM, Michael S. Tsirkin wrote: >>> A slot needs to be configured in ACPI, >>> >> >> Can we configure all possible 32 slots? >> > > That's what we do. But one is always taken. In the future, perhaps more. >

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/14/2009 12:50 PM, Michael S. Tsirkin wrote: On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: However, in order to retain compat for that SCSI device (e.g. ensuring the PCI address doesn't change as other devices are added an removed), we're back to the

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 12:09 PM, Mark McLoughlin wrote: I think the point is that you don't need version numbers if you have a proper device tree. How do you add a new attribute to the device tree and, when a supplied device tree lacking said attribute, distinguish between

Re: [Qemu-devel] Re: Configuration vs. compat hints

2009-06-15 Thread Anthony Liguori
Markus Armbruster wrote: Avi Kivity writes: Paul/Anthony, can we have -vga pci_addr=, -usb-controller pci_addr=, and -drive pci_addr= (and later, -disk-controller)? Stalling while waiting for the ultimate config file is only generating pain and out-of-tree patches. Yup. I got bit-r

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the command line flags. qemu -show-available-pci-slots Why does the user care? Let QEMU allocate the PCI slot,

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the command line flags. qemu -show-available-pci-slots (the qemu equivalent to KVM_CHECK_EXTENSION) -- error compiling committee.

Re: [KVM PATCH v2 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 08:08:18AM -0400, Gregory Haskins wrote: > >> @@ -123,6 +124,7 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int > >> sync, void > >> *key) > >> > >> cleanup_srcu_struct(&irqfd->srcu); > >> kfree(irqfd); > >> + module_put

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:41 PM, Anthony Liguori wrote: Yep, most people seem to agree that it makes sense to allow this, but some believe it should only be via a machine description file, not the command line. I don't understand this opposition. It's clear a machine config file is a long way in our f

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:45 PM, Anthony Liguori wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? Yes, the user build the machine using the command line and monitor (or, in 2017, the machine configuration f

Re: Configuration vs. compat hints

2009-06-15 Thread Markus Armbruster
Anthony Liguori writes: > Avi Kivity wrote: >> On 06/15/2009 12:08 PM, Mark McLoughlin wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? >>> >>> Yep, most people seem to agree

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:52 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the command line flags. qemu -show-available-pci-slots Why does the us

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:48 PM, Anthony Liguori wrote: device tree lacking said attribute, distinguish between a device tree from an old version of qemu (i.e. use the old default) and a partial device tree from the VM manager (i.e. use the new default) ? -baseline 0.10 That's a version number :-) (I

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Gerd Hoffmann
Hi, Yes, the user build the machine using the command line and monitor (or, in 2017, the machine configuration file), Considering pbrook just posted a machine config for arm, I think it would be rather sad if pc wasn't converted to it by 2017... It shouldn't last until 2017, but the proces

[PATCH 0/4] Add rudimentary Hyper-V guest support v3

2009-06-15 Thread Alexander Graf
Now that we have nested SVM in place, let's make use of it and virtualize something non-kvm. The first interesting target that came to my mind here was Hyper-V. This patchset makes Windows Server 2008 boot with Hyper-V, which runs the "dom0" in virtualized mode already. It hangs somewhere in IDE c

[PATCH 1/4] Add definition for IGNNE MSR

2009-06-15 Thread Alexander Graf
Hyper-V tried to access MSR_IGNNE, so let's at least have a definition for it in our headers. Signed-off-by: Alexander Graf --- arch/x86/include/asm/msr-index.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-in

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 03:45 PM, Anthony Liguori wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? Yes, the user build the machine using the command line and monitor (or, in 2017, the mach

[PATCH 2/4] Implement Hyper-V MSRs

2009-06-15 Thread Alexander Graf
Hyper-V uses some MSRs, some of which are actually reserved for BIOS usage. But let's be nice today and have it its way, because otherwise it fails terribly. v2 changes: - remove the 0x4081 MSR definition - add pr_unimpl() on unimplemented writes Signed-off-by: Alexander Graf --- arch/

[PATCH 3/4] Nested SVM: Implement INVLPGA

2009-06-15 Thread Alexander Graf
SVM adds another way to do INVLPG by ASID which Hyper-V makes use of, so let's implement it! For now we just do the same thing invlpg does, as asid switching means we flush the mmu anyways. That might change one day though. v2 makes invlpga do the same as invlpg, not flush the whole mmu Signed-o

[PATCH 4/4] Nested SVM: Improve interrupt injection

2009-06-15 Thread Alexander Graf
While trying to get Hyper-V running, I realized that the interrupt injection mechanisms that are in place right now are not 100% correct. This patch makes nested SVM's interrupt injection behave more like on a real machine. v2 calls BUG_ON when svm_set_irq is called with GIF=0 Signed-off-by: Ale

[PATCH 2/8] Do not use env->halted to decide where halted state should be handled.

2009-06-15 Thread Gleb Natapov
Use kvm_irqchip_in_kernel() for that. If irq chip is not handled by userspace kernel should be entered even when CPU is halted. Signed-off-by: Gleb Natapov --- hw/apic.c |3 +-- qemu-kvm.c |6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/apic.c b/hw/apic.c in

[PATCH 0/8] Small cpu loop cleanups

2009-06-15 Thread Gleb Natapov
Also fix "info cpus" to show correct halt status with in kernel irq chip. I removed patch that uses on_vcpu() for init/sipi handling for now. Gleb Natapov (8): env->kvm_cpu_state.init is always zero here. Do not use env->halted to decide where halted state should be handled. Call kvm_ar

[PATCH 4/8] Rename kvm_(load|save)_mpstate to kvm_arch_(load|save)_mpstate

2009-06-15 Thread Gleb Natapov
To be consistent with other function naming. Signed-off-by: Gleb Natapov --- qemu-kvm-ia64.c |4 ++-- qemu-kvm-x86.c|4 ++-- qemu-kvm.h|2 ++ target-i386/machine.c |6 +++--- target-ia64/machine.c |4 ++-- 5 files changed, 11 insertions(+), 9 deletio

[PATCH 3/8] Call kvm_arch_load_regs() instead of kvm_load_registers()

2009-06-15 Thread Gleb Natapov
The call is done from vcpu thread. Signed-off-by: Gleb Natapov --- qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 7676e02..5fa7154 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -399,7 +399,7 @@ static int kvm_main_loop_cpu(CPUStat

[PATCH 1/8] env->kvm_cpu_state.init is always zero here.

2009-06-15 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 2aeb17c..ec911ef 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -412,7 +412,7 @@ static int kvm_main_loop_cpu(CPUState *env) if (env->kvm_cp

[PATCH 8/8] env->exit_request is not used by kvm.

2009-06-15 Thread Gleb Natapov
Remove its use from kvm code. Signed-off-by: Gleb Natapov --- qemu-kvm-x86.c |3 +-- qemu-kvm.c |3 --- vl.c |1 - 3 files changed, 1 insertions(+), 6 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 6865385..5460136 100644 --- a/qemu-kvm-x86.c +++ b/qem

[PATCH 5/8] Retrieve mp state info in cpu_synchronize_state()

2009-06-15 Thread Gleb Natapov
And set env->halted based on the value to show accurate vcpu state in QEMU monitor. Signed-off-by: Gleb Natapov --- qemu-kvm.c | 27 +++ qemu-kvm.h |2 ++ 2 files changed, 29 insertions(+), 0 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 5fa7154..3ae4b45

[PATCH 6/8] env->exception_index is not used by kvm code.

2009-06-15 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- qemu-kvm-ia64.c |2 -- qemu-kvm-x86.c |2 -- qemu-kvm.c |1 - 3 files changed, 0 insertions(+), 5 deletions(-) diff --git a/qemu-kvm-ia64.c b/qemu-kvm-ia64.c index 234602c..477d24c 100644 --- a/qemu-kvm-ia64.c +++ b/qemu-kvm-ia64.c @@ -35,7 +35,

[PATCH 7/8] s->cpu_env cannot be zero here.

2009-06-15 Thread Gleb Natapov
Remove redundant check. Signed-off-by: Gleb Natapov --- hw/apic.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index f186202..eac54fd 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -471,8 +471,7 @@ static void apic_init_ipi(APICState *s) s-

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 03:52 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the command line flags. qemu -show-available-pci-sl

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: Certainly preferable to -baseline. This is pretty easy to maintain with config files. Let's not tie the two together. I mentioned it because it suggests a good transition. We at least have to think through how things map to the post-config file world regardless of whet

Re: [Autotest] [KVM-AUTOTEST PATCH 1/4] Make all programs on kvm test use /usr/bin/python

2009-06-15 Thread Alexey Eromenko
- "Martin Bligh" wrote: > On Wed, Jun 10, 2009 at 4:01 AM, Alexey Eromenko > wrote: > > > > Even better would be to use "/usr/bin/python2". > > That doesn't seem to exist, on Ubuntu at least. > Red Hat systems have it. "/usr/bin/python2" is a symlink to "/usr/bin/python" (which is python

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:20 PM, Anthony Liguori wrote: then turns on the power. Command line options are the parts lying around when we start. btw, -drive needs to be separated: -controller type=lsi1234,pci_addr=foobar,name=blah -drive file=foo.img,controller=blah,index=0 -drive file=bar.img,

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 04:20 PM, Anthony Liguori wrote: It's not at all that simple. SCSI has a hierarchical address mechanism with 0-7 targets but then potentially multiple LUNs per target. Today, we always emulate a single LUN per target but if we ever wanted to support more than

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:23 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:52 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the com

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:24 PM, Anthony Liguori wrote: Avi Kivity wrote: Certainly preferable to -baseline. This is pretty easy to maintain with config files. Let's not tie the two together. I mentioned it because it suggests a good transition. We at least have to think through how things map t

Re: [PATCH 3/3] kvm-s390: streamline memslot handling - rebased

2009-06-15 Thread Christian Ehrhardt
Avi Kivity wrote: Marcelo Tosatti wrote: (continued below) Anyway, yeah, the set request / wait mechanism you implement here is quite similar to the idea mentioned earlier that could be used for x86. Just get rid of this explicit KVM_REQ_MMU_RELOAD knowledge in arch-independent code pl

[PATCH 3/3] kvm-s390: streamline memslot handling - rebased v2

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to applied version* - remove dependency to KVM_REQ_MMU_RELOAD in generic code - remove explicit barrier after test_and_clear_bit as it is implied - ensure the wait_on_bit

[PATCH 2/3] kvm-s390: update vcpu->cpu - rebased

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. kvm on s390 formerly ignored vcpu->cpu. This patch adds set/unset vcpu->cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let generic code not find -1 on

[PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state - rebased

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - ensure allocations (might_sleep) are out of atomic context - centralize consumption of vcpu->request bits To ensure vcpu's come out of guest

[PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling - rebased v2

2009-06-15 Thread ehrhardt
From: Christian Ehrhardt As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - remove dependency to KVM_REQ_MMU_RELOAD in generic code - remove explicit barrier after test_and_clear_bit as it is implied - ensure the wait

Re: [PATCH 0/8] Small cpu loop cleanups

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:23 PM, Gleb Natapov wrote: Also fix "info cpus" to show correct halt status with in kernel irq chip. Applied all, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a mess

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Avi Kivity wrote: On 06/15/2009 04:23 PM, Anthony Liguori wrote: How would qemu know which slots to optimize for? In practice, I don't see that as a real problem. We should (a) add an ioapic and four more pci links (b) recommend that slots be assigned in ascending order, and everything works

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Mark McLoughlin
On Mon, 2009-06-15 at 07:48 -0500, Anthony Liguori wrote: > Avi Kivity wrote: > > On 06/15/2009 12:09 PM, Mark McLoughlin wrote: > > I think the point is that you don't need version numbers if you > > have a > > proper device tree. > > > > > How do you add a new

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Dor Laor
Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 04:23 PM, Anthony Liguori wrote: How would qemu know which slots to optimize for? In practice, I don't see that as a real problem. We should (a) add an ioapic and four more pci links (b) recommend that slots be assigned in ascending ord

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:45 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 04:20 PM, Anthony Liguori wrote: It's not at all that simple. SCSI has a hierarchical address mechanism with 0-7 targets but then potentially multiple LUNs per target. Today, we always emulate a single LUN per ta

Re: slow guest performance with build load, looking for ideas

2009-06-15 Thread Erik Jacobson
> What is the host cpu type? On pre-Nehalem/Barcelona processors kvm has > poor scalability in mmu intensive workloads like kernel builds. Thanks for getting back to me. Today is pretty booked but I'm going to go find a Nehalem system and try to run similar tests to compare. I'll post my resu

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Mark McLoughlin wrote: On Mon, 2009-06-15 at 07:48 -0500, Anthony Liguori wrote: Eventually the default configuration becomes increasingly unusable and you need a new baseline. You must still be able to fall back to the old baseline for older guests. I don't think games with configuration

Re: Configuration vs. compat hints

2009-06-15 Thread Javier Guerra
On Mon, Jun 15, 2009 at 6:43 AM, Avi Kivity wrote: > (I'd be quite happy constructing the entire machine config on the command > line, but I realize it's just me) as a user-only (well, i'm a developer, but don't meddle in kernel affairs since 0.99pl9); I also like that kvm is totally CLI-managed.

Re: slow guest performance with build load, looking for ideas

2009-06-15 Thread Avi Kivity
On 06/15/2009 05:15 PM, Erik Jacobson wrote: What is the host cpu type? On pre-Nehalem/Barcelona processors kvm has poor scalability in mmu intensive workloads like kernel builds. Thanks for getting back to me. Today is pretty booked but I'm going to go find a Nehalem system and try to

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Anthony Liguori
Dor Laor wrote: Libvirt does not support r2d. I hope it won't start to support it. It supports mips, sparc, and ppc machines now. I don't see why it wouldn't support r2d. For ppcemb, I expect this same problem to occur. This sort of restriction is going to be common with embedded boards.

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Michael S. Tsirkin
On Mon, Jun 15, 2009 at 09:20:00AM -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: >> On Mon, 2009-06-15 at 07:48 -0500, Anthony Liguori wrote: >> Eventually the default configuration becomes increasingly unusable and you need a new baseline. You must still be able to fall bac

  1   2   >