Re: [PATCH 0/1] virtio: console: fix for early console

2011-09-22 Thread Rusty Russell
On Thu, 22 Sep 2011 20:59:13 +0200, Christian Borntraeger wrote: > On 22/09/11 20:14, Amit Shah wrote: > > Hi Rusty, > > > > This is a fix from Christian for early console handling with multiport > > support. Please apply. > > > > Christian, I've made some changes to the patch as noted in the

Re: inter VM / PF-VF communication

2011-09-22 Thread Sagar Borikar
> I'm not aware of any vendor these days that actually requires a PV driver > for PF-VF communications.  I know some toyed with the idea years ago but I > thought malboxes have become defacto standard. May be because Intel started the mailbox implementation ;). But just wondering from hypervisor po

Re: inter VM / PF-VF communication

2011-09-22 Thread Anthony Liguori
On 09/22/2011 10:23 AM, Sagar Borikar wrote: All, Sorry if I am not keeping up on the subject but wanted to know whether there is any effort going on for inter VM communication / PF-VF communication (in case of SR-IOV) I see that most of SR-IOV capable NIC supports mailboxes for that purpose to

Re: [PATCH] KVM: emulate lapic tsc deadline timer for guest

2011-09-22 Thread Marcelo Tosatti
On Thu, Sep 22, 2011 at 11:22:02PM +0800, Liu, Jinsong wrote: > Marcelo Tosatti wrote: > > On Thu, Sep 22, 2011 at 04:55:52PM +0800, Liu, Jinsong wrote: > >>> From 4d5b83aba40ce0d421add9a41a6c591a8590a32e Mon Sep 17 00:00:00 > >>> 2001 > >> From: Liu, Jinsong > >> Date: Thu, 22 Sep 2011 14:00:08

Re: [PATCH 0/1] virtio: console: fix for early console

2011-09-22 Thread Christian Borntraeger
On 22/09/11 20:14, Amit Shah wrote: > Hi Rusty, > > This is a fix from Christian for early console handling with multiport > support. Please apply. > > Christian, I've made some changes to the patch as noted in the commit > message. Nothing major, but an ACK would be nice. The changes look fin

Re: VNC and SDL/VGA simultaneously?

2011-09-22 Thread Erik Rull
Hi all, is there an update regarding simultaneous use of VNC and VGA output? Thanks. Best regards, Erik Bitman Zhou wrote: We tried before with both spice(QXL) and VNC enabled at the same time for the same VM. It works a little bit, I mean VNC session can hold some time. I use gtk-vnc and

[PATCH 1/1] virtio: console: wait for first console port for early console output

2011-09-22 Thread Amit Shah
From: Christian Borntraeger On s390 I have seen some random "Warning: unable to open an initial console" boot failure. Turns out that tty_open fails, because the hvc_alloc was not yet done. In former times this could not happen, since the probe function automatically called hvc_alloc. With newe

[PATCH 0/1] virtio: console: fix for early console

2011-09-22 Thread Amit Shah
Hi Rusty, This is a fix from Christian for early console handling with multiport support. Please apply. Christian, I've made some changes to the patch as noted in the commit message. Nothing major, but an ACK would be nice. Thanks. Christian Borntraeger (1): virtio: console: wait for first

[PATCH v2 2/2] pci-assign: Fix MSI-X capability test

2011-09-22 Thread Alex Williamson
Commit c4525754 added a capability check for KVM_CAP_DEVICE_MSIX, which is unfortunately not exposed, resulting in MSIX never being listed as a capability. This breaks anything depending on MSIX, such as igbvf. Instead let's use a dummy call to KVM_ASSIGN_SET_MSIX_NR which will return -EFAULT if

[PATCH v2 1/2] pci-assign: Re-order initfn for memory API

2011-09-22 Thread Alex Williamson
We now need to scan PCI capabilities and setup an MSI-X page before we walk the device resources since the overlay is now setup during init instead of at the first mapping by the guest. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 19 +++ 1 files changed, 11 ins

[PATCH v2 0/2] pci-assign: Fix MSI-X support

2011-09-22 Thread Alex Williamson
Assigned device MSI-X support hasn't been working, this fixes it. I believe this should also fix: https://bugs.launchpad.net/qemu/+bug/830558 v2: Incorporate comments from Jan WRT exposing KVM_CAP_DEVICE_MSIX, I'll send a patch with a big comment noting that we can't rely on it for older ker

[PATCH 2/2] adds cgroup tests on KVM guests with first test

2011-09-22 Thread Lukas Doktor
basic structure: * similar to general client/tests/cgroup/ test (imports from the cgroup_common.py) * uses classes for better handling * improved logging and error handling * checks/repair the guests after each subtest * subtest mapping is specified in test dictionary in cgroup.py * allows

[PATCH 1/2] cgroup: cgroup_common.py bugfixies and modifications

2011-09-22 Thread Lukas Doktor
[FIX] incorrect prop/dir variable usage [MOD] Use __del__() instead of cleanup - Simplifies the code with small drawback (failures can't be handled. Anyway, they are not critical and were never handled before...) Signed-off-by: Lukas Doktor --- client/tests/cgroup/cgroup_common.py | 41 +

[KVM-autotest][PATCH] cgroup test with KVM guest +first subtests

2011-09-22 Thread Lukas Doktor
Hi guys, Do you remember the discussion about cgroup testing in autotest vs. LTP? I hope there won't be any doubts about this one as ground_test (+ first 2 subtests) are strictly focused on cgroups features enforced on KVM guest systems. Also more subtests will follow if you approve the test st

inter VM / PF-VF communication

2011-09-22 Thread Sagar Borikar
All, Sorry if I am not keeping up on the subject but wanted to know whether there is any effort going on for inter VM communication / PF-VF communication (in case of SR-IOV) I see that most of SR-IOV capable NIC supports mailboxes for that purpose to avoid the security hole. Xen has virtual device

RE: [PATCH] KVM: emulate lapic tsc deadline timer for guest

2011-09-22 Thread Liu, Jinsong
Marcelo Tosatti wrote: > On Thu, Sep 22, 2011 at 04:55:52PM +0800, Liu, Jinsong wrote: >>> From 4d5b83aba40ce0d421add9a41a6c591a8590a32e Mon Sep 17 00:00:00 >>> 2001 >> From: Liu, Jinsong >> Date: Thu, 22 Sep 2011 14:00:08 +0800 >> Subject: [PATCH 2/2] KVM: emulate lapic tsc deadline timer for gu

Re: [PATCH] qemu: Fix inject-nmi

2011-09-22 Thread Jan Kiszka
On 2011-09-22 11:50, Lai Jiangshan wrote: > > From: KAMEZAWA Hiroyuki > Subject: [PATCH] Fix inject-nmi > > Now, inject-nmi sends NMI to all cpus...but this doesn't emulate > pc hardware 'NMI button', which triggers LINT1. > > So, now, LINT1 mask is ignored by inject-nmi and NMIs are sent to >

Re: [PATCH] KVM: emulate lapic tsc deadline timer for guest

2011-09-22 Thread Marcelo Tosatti
On Thu, Sep 22, 2011 at 04:55:52PM +0800, Liu, Jinsong wrote: > >From 4d5b83aba40ce0d421add9a41a6c591a8590a32e Mon Sep 17 00:00:00 2001 > From: Liu, Jinsong > Date: Thu, 22 Sep 2011 14:00:08 +0800 > Subject: [PATCH 2/2] KVM: emulate lapic tsc deadline timer for guest > > This patch emulate lapic

Re: [PATCH 0/4] acpi: fix up EJ0 in DSDT

2011-09-22 Thread Kevin O'Connor
On Thu, Sep 22, 2011 at 09:09:49AM +0300, Michael S. Tsirkin wrote: > On Thu, Sep 22, 2011 at 12:35:13AM -0400, Kevin O'Connor wrote: > > On Wed, Sep 21, 2011 at 03:44:13PM +0300, Michael S. Tsirkin wrote: > > > The correct way to suppress hotplug is not to have _EJ0, > > > so this is what this pat

Re: Best way to exchange data between host and guest?

2011-09-22 Thread Sasha Levin
On Thu, 2011-09-22 at 05:04 -0700, Anjali Kulkarni wrote: > Hi, > > What is the fastest way to exchange data between host and guest? > > Thanks > Anjali With regards to speed, I guess it's the ivshmem device. -- Sasha. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the

[PATCHv2] virtio-console: wait for console ports

2011-09-22 Thread Christian Borntraeger
On s390 I have seen some random "Warning: unable to open an initial console" boot failure. Turns out that tty_open fails, because the hvc_alloc was not yet done. In former times this could not happen, since the probe function automatically called hvc_alloc. With newer versions (multiport) some host

Best way to exchange data between host and guest?

2011-09-22 Thread Anjali Kulkarni
Hi, What is the fastest way to exchange data between host and guest? Thanks Anjali -- 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.org/majordomo-info.html

[PATCH] KVM: Enable "fast string operations" in MSR_IA32_MISC_ENABLE

2011-09-22 Thread Avi Kivity
Recent (3.0+) Linux guests check for the fast string bit in MSR_IA32_MISC_ENABLE before enabling rep/movs based memcpy and related on fam 6/model 13+ processors. Enable the bit by default, as required by the specification. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |2 ++ 1 files chan

[PATCHv2 3/3] acpi: remove _RMV

2011-09-22 Thread Michael S. Tsirkin
The macro gen_pci_device is used to add _RMV method to a slot device so it is no longer needed: presence of _EJ0 now indicates that the slot is ejectable. It is also placing two devices with the same _ADR on the same bus, which isn't defined by the ACPI spec. So let's remove it. Signed-off-by: Mic

[PATCHv2 2/3] acpi: EJ0 method name patching

2011-09-22 Thread Michael S. Tsirkin
Modify ACPI to only supply _EJ0 methods for PCI slots that support hotplug. This is done by runtime patching: - Instrument ASL code with ACPI_EXTRACT directives tagging _EJ0 and _ADR fields. - At compile time, tools/acpi_extract.py looks for these methods in ASL source finds the matching AML,

[PATCHv2 1/3] acpi: generate and parse mixed asl/aml listing

2011-09-22 Thread Michael S. Tsirkin
Use iasl -l flag to produce a mixed listing, where a source line is followed by matching AML. Add a tool tools/acpi_extract.py to process this listing. The tool looks for ACPI_EXTRACT tags in the ASL source and outputs matching AML offsets in an array. To make these directives pass through ASL wi

[PATCHv2 0/3] acpi: fix up EJ0 in DSDT

2011-09-22 Thread Michael S. Tsirkin
This is a second iteration of the patch. The patch has been significantly reworked to address (offline) comments by Gleb. I think the infrastructure created is generic enough to be generally useful beyond the specific bug that I would like to fix. Specifically it will be able to find S3 Name to p

Re: [RFC/PATCH] virtio-console: wait for console ports

2011-09-22 Thread Amit Shah
On (Thu) 22 Sep 2011 [13:20:07], Christian Borntraeger wrote: > On 22/09/11 12:08, Amit Shah wrote: > >> + /* If there was an early virtio console, assume that there are no > >> + * other consoles. We need to wait until the hvc_alloc matches the > >> + * hvc_instantiate, otherwise tty_open wil

Re: [RFC/PATCH] virtio-console: wait for console ports

2011-09-22 Thread Christian Borntraeger
On 22/09/11 12:08, Amit Shah wrote: >> +/* If there was an early virtio console, assume that there are no >> + * other consoles. We need to wait until the hvc_alloc matches the >> + * hvc_instantiate, otherwise tty_open will complain, resulting in >> + * a "Warning: unable to open a

[PATCH 2/2] nVMX: Fix warning-causing idt-vectoring-info behavior

2011-09-22 Thread Nadav Har'El
When L0 wishes to inject an interrupt while L2 is running, it emulates an exit to L1 with EXIT_REASON_EXTERNAL_INTERRUPT. This was explained in the original nVMX patch 23, titled "Correct handling of interrupt injection". Unfortunately, it is possible (though rare) that at this point there is vali

[PATCH 1/2] nVMX: Add KVM_REQ_IMMEDIATE_EXIT

2011-09-22 Thread Nadav Har'El
This patch adds a new vcpu->requests bit, KVM_REQ_IMMEDIATE_EXIT. This bit requests that when next entering the guest, we should run it only for as little as possible, and exit again. We use this new option in nested VMX: When L1 launches L2, but L0 wishes L1 to continue running so it can inject a

[PATCH 0/2] nVMX injection corrections

2011-09-22 Thread Nadav Har'El
The following two patches solve two injection-related nested VMX issues: 1. When we must run L2 next (namely on L1's VMLAUNCH/VMRESUME), injection into L1 was delayed for an unknown amount of time - until L2 exits. We now force (using a self IPI) an exit immediately after entry to L2,

Re: [RFC/PATCH] virtio-console: wait for console ports

2011-09-22 Thread Amit Shah
Hi Christian, On (Wed) 21 Sep 2011 [17:52:23], Christian Borntraeger wrote: > Amit, > > can you have a look at the patch below and give feedback or apply > if appropriate? The patch looks good. Just a couple of comments: > On s390 I have seen some random "Warning: unable to open an initial > c

[PATCH] qemu: Fix inject-nmi

2011-09-22 Thread Lai Jiangshan
From: KAMEZAWA Hiroyuki Subject: [PATCH] Fix inject-nmi Now, inject-nmi sends NMI to all cpus...but this doesn't emulate pc hardware 'NMI button', which triggers LINT1. So, now, LINT1 mask is ignored by inject-nmi and NMIs are sent to all cpus without checking LINT1 mask. Because Linux masks L

Virtualization for ARM CPUs

2011-09-22 Thread MatteoGmail
Hi to all, I'm interested in virtualization support for ARM architectures. After googling, examining /proc/cpuinfo and reading ARM related posts on this ml I still don't know the level of hardware virtualization support of the many ARM CPUs. Could anyone please point me to some detailed reso

Re: [PATCH 2/2] pci-assign: Fix MSI-X registration

2011-09-22 Thread Jan Kiszka
On 2011-09-22 05:12, Alex Williamson wrote: > Commit c4525754 added a capability check for KVM_CAP_DEVICE_MSIX, > which is unfortunately not exposed, resulting in MSIX never > being listed as a capability. Oops. Should we fix this nevertheless in the kernel? > This breaks anything depending on >

Re: [PATCH 1/2] pci-assign: Re-order initfn for memory API

2011-09-22 Thread Jan Kiszka
On 2011-09-22 05:12, Alex Williamson wrote: > We now need to scan PCI capabilities and setup an MSI-X page > before we walk the device resources since the overlay is now > setup during init instead of at the first mapping by the guest. > > Signed-off-by: Alex Williamson > --- > > hw/device-assi

[PATCH v4 03/11] KVM: x86: retry non-page-table writing instructions

2011-09-22 Thread Xiao Guangrong
If the emulation is caused by #PF and it is non-page_table writing instruction, it means the VM-EXIT is caused by shadow page protected, we can zap the shadow page and retry this instruction directly The idea is from Avi Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_emulate.h |

[PATCH] Qemu co-operation with kvm tsc deadline timer

2011-09-22 Thread Liu, Jinsong
>From 8c39f2ddbf7069342826a83e535c0c7b641d6501 Mon Sep 17 00:00:00 2001 From: Liu, Jinsong Date: Thu, 22 Sep 2011 16:28:13 +0800 Subject: [PATCH] Qemu co-operation with kvm tsc deadline timer KVM add emulation of lapic tsc deadline timer for guest. This patch is co-operation work at qemu side. S

[PATCH v4 11/11] KVM: MMU: improve write flooding detected

2011-09-22 Thread Xiao Guangrong
Detecting write-flooding does not work well, when we handle page written, if the last speculative spte is not accessed, we treat the page is write-flooding, however, we can speculative spte on many path, such as pte prefetch, page synced, that means the last speculative spte may be not point to the

[PATCH] KVM: emulate lapic tsc deadline timer for guest

2011-09-22 Thread Liu, Jinsong
>From 4d5b83aba40ce0d421add9a41a6c591a8590a32e Mon Sep 17 00:00:00 2001 From: Liu, Jinsong Date: Thu, 22 Sep 2011 14:00:08 +0800 Subject: [PATCH 2/2] KVM: emulate lapic tsc deadline timer for guest This patch emulate lapic tsc deadline timer for guest: Enumerate tsc deadline timer capability by C

[PATCH v4 10/11] KVM: MMU: fix detecting misaligned accessed

2011-09-22 Thread Xiao Guangrong
Sometimes, we only modify the last one byte of a pte to update status bit, for example, clear_bit is used to clear r/w bit in linux kernel and 'andb' instruction is used in this function, in this case, kvm_mmu_pte_write will treat it as misaligned access, and the shadow page table is zapped Signed

[PATCH v4 09/11] KVM: MMU: split kvm_mmu_pte_write function

2011-09-22 Thread Xiao Guangrong
kvm_mmu_pte_write is too long, we split it for better readable Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 194 1 files changed, 119 insertions(+), 75 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 7b22f3a

[PATCH v4 08/11] KVM: MMU: remove unnecessary kvm_mmu_free_some_pages

2011-09-22 Thread Xiao Guangrong
In kvm_mmu_pte_write, we do not need to alloc shadow page, so calling kvm_mmu_free_some_pages is really unnecessary Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 4128aba.

[PATCH] Add some pre-defination

2011-09-22 Thread Liu, Jinsong
>From cab4eb79efc498abbda19c5b10c7d0858349af5f Mon Sep 17 00:00:00 2001 From: Liu, Jinsong Date: Thu, 22 Sep 2011 09:49:05 +0800 Subject: [PATCH 1/2] Add some pre-defination This pre-defination is preparing for KVM tsc deadline timer emulation, but theirself are no-kvm-specific. Signed-off-by:

[PATCH v4 07/11] KVM: MMU: fast prefetch spte on invlpg path

2011-09-22 Thread Xiao Guangrong
Fast prefetch spte for the unsync shadow page on invlpg path Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |4 +--- arch/x86/kvm/mmu.c | 38 +++--- arch/x86/kvm/paging_tmpl.h | 30 ++ arch/x

[PATCH v4 06/11] KVM: MMU: cleanup FNAME(invlpg)

2011-09-22 Thread Xiao Guangrong
Directly Use mmu_page_zap_pte to zap spte in FNAME(invlpg), also remove the same code between FNAME(invlpg) and FNAME(sync_page) Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 16 ++-- arch/x86/kvm/paging_tmpl.h | 44 +--- 2

[PATCH v4 05/11] KVM: MMU: do not mark accessed bit on pte write path

2011-09-22 Thread Xiao Guangrong
In current code, the accessed bit is always set when page fault occurred, do not need to set it on pte write path Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |1 - arch/x86/kvm/mmu.c | 22 +- 2 files changed, 1 insertions(+), 22 deleti

[PATCH v4 04/11] KVM: x86: cleanup port-in/port-out emulated

2011-09-22 Thread Xiao Guangrong
Remove the same code between emulator_pio_in_emulated and emulator_pio_out_emulated Signed-off-by: Xiao Guangrong --- arch/x86/kvm/x86.c | 59 ++- 1 files changed, 26 insertions(+), 33 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/

[PATCH v4 02/11] KVM: x86: tag the instructions which are used to write page table

2011-09-22 Thread Xiao Guangrong
The idea is from Avi: | tag instructions that are typically used to modify the page tables, and | drop shadow if any other instruction is used. | The list would include, I'd guess, and, or, bts, btc, mov, xchg, cmpxchg, | and cmpxchg8b. This patch is used to tag the instructions and in the later p

[PATCH v4 01/11] KVM: MMU: avoid pte_list_desc running out in kvm_mmu_pte_write

2011-09-22 Thread Xiao Guangrong
kvm_mmu_pte_write is unsafe since we need to alloc pte_list_desc in the function when spte is prefetched, unfortunately, we can not know how many spte need to be prefetched on this path, that means we can use out of the free pte_list_desc object in the cache, and BUG_ON() is triggered, also some p

[PATCH v4 00/11] KVM: x86: optimize for writing guest page

2011-09-22 Thread Xiao Guangrong
This patchset is against https://github.com/avikivity/kvm.git next branch. In this version, some changes come from Avi's comments: - fix instruction retried for nested guest - skip write-flooding for the sp whose level is 1 - rename some functions -- To unsubscribe from this list: send the line "u

Re: [Autotest] [PATCH] KVM-test: Add two scripts to disable services for perf tests

2011-09-22 Thread Amos Kong
- Original Message - > On Wed, Sep 7, 2011 at 3:07 AM, Amos Kong wrote: > > System services on guest and host take uncertain resource, it > > effects > > the perf results. We can use the below two scripts to disable some > > services of host and guest. > > > > stop_serivices_perf.sh is use