Hi all,
Is it a good practice to always create vm with even number of VCPU?
What could be the impact if we create vms with odd number of CPU on
NUMA or SMP systems.Is there any recommendation
Thanks
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message t
Please consider upstream 3.12 commit
bfd0a56b90005f8c8a004baf407ad90045c2b11e "nEPT: Nested INVEPT" for
stable trees 3.4 and 3.10. This patch addresses CVE-2014-3645. It has
already been backported to 3.2 in 3.2.64.
commit bfd0a56b90005f8c8a004baf407ad90045c2b11e
Author: Nadav Har'El
Date: Mon
I just got this from a 3.17.4 host (approximately -- it's Fedora's version):
KVM internal error. Suberror: 3
extra data[0]: 8202
extra data[1]: 31
EAX=8be4df61 EBX=8be4df61 ECX=3ff6002c EDX=11d293ca
ESI=3f08e408 EDI=3e82df7c EBP=3e82deb8 ESP=3e82de7c
EIP=3ff51206 EFL=0002 [---] CPL=0 I
On 2014-12-12 19:49, Christoffer Dall wrote:
On Mon, Dec 08, 2014 at 01:19:15PM +, Marc Zyngier wrote:
On 08/12/14 12:58, Christoffer Dall wrote:
> On Mon, Dec 08, 2014 at 12:04:53PM +, Marc Zyngier wrote:
>> On 03/12/14 21:18, Christoffer Dall wrote:
>>> When a vcpu calls SYSTEM_OFF or
On Tue, 9 Dec 2014, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez"
>
> This lets you build a kernel which can support xen dom0
> or xen guests by just using:
>
>make xenconfig
>
> on both x86 and arm64 kernels. This also splits out the
> options which are available currently to be bu
On Fri, Dec 12, 2014 at 12:37:52PM +0100, Christoffer Dall wrote:
> On Fri, Dec 12, 2014 at 11:23:35AM +, Marc Zyngier wrote:
> > On 12/12/14 11:14, Christoffer Dall wrote:
> > > On Thu, Dec 11, 2014 at 06:35:40PM +, Marc Zyngier wrote:
> > >> On 09/12/14 15:44, Christoffer Dall wrote:
> >
Remove unused variable to get rid of compiler warning.
And remove commented out code (it can always be restored
from git logs).
Signed-off-by: Eugene Korenevsky
---
x86/vmx_tests.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
in
On Mon, Dec 08, 2014 at 01:19:15PM +, Marc Zyngier wrote:
> On 08/12/14 12:58, Christoffer Dall wrote:
> > On Mon, Dec 08, 2014 at 12:04:53PM +, Marc Zyngier wrote:
> >> On 03/12/14 21:18, Christoffer Dall wrote:
> >>> When a vcpu calls SYSTEM_OFF or SYSTEM_RESET with PSCI v0.2, the vcpus
>
On Mon, Dec 08, 2014 at 01:19:15PM +, Marc Zyngier wrote:
> On 08/12/14 12:58, Christoffer Dall wrote:
> > On Mon, Dec 08, 2014 at 12:04:53PM +, Marc Zyngier wrote:
> >> On 03/12/14 21:18, Christoffer Dall wrote:
> >>> When a vcpu calls SYSTEM_OFF or SYSTEM_RESET with PSCI v0.2, the vcpus
>
2014-12-10 15:57-0500, Marcelo Tosatti:
> For the hrtimer which emulates the tscdeadline timer in the guest,
> add an option to advance expiration, and busy spin on VM-entry waiting
> for the actual expiration time to elapse.
>
> This allows achieving low latencies in cyclictest (or any scenario
On Fri, Dec 12, 2014 at 05:06:07PM +0100, Andrew Jones wrote:
> This series applies report() to more x86 unit tests. It also
> cleans up some uses of it in vmx_tests. Finally, it also
> introduces report prefix support, and applies that a few places.
> There should be no functional changes with thi
Add some methods to report in order to manage output prefixes.
Also add strstr to string, as it was useful for implementing
report_prefix_pop. Prefixes can be useful, as test code
frequently has the following pattern
main()
{
foreach(subtest)
run(subtest)
}
But, if we want output lines to i
arm/selftest was already making use of prefixes, managing them
itself. Use the prefix support now built into report.
Signed-off-by: Andrew Jones
---
arm/selftest.c | 31 ---
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/arm/selftest.c b/arm/selftest.
So far only applied in a couple obvious places, where
temporary prefixes were already used.
Signed-off-by: Andrew Jones
---
x86/apic.c | 8 ++--
x86/pmu.c | 24
2 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/x86/apic.c b/x86/apic.c
index 2619d8594
Signed-off-by: Andrew Jones
---
x86/xsave.c | 150 +++-
1 file changed, 56 insertions(+), 94 deletions(-)
diff --git a/x86/xsave.c b/x86/xsave.c
index cd2cdceefca26..e471835b42fd9 100644
--- a/x86/xsave.c
+++ b/x86/xsave.c
@@ -65,134 +65,10
Signed-off-by: Andrew Jones
---
x86/tsc_adjust.c | 44 +---
1 file changed, 13 insertions(+), 31 deletions(-)
diff --git a/x86/tsc_adjust.c b/x86/tsc_adjust.c
index 0e9679235eafe..725e4ff75b4ba 100644
--- a/x86/tsc_adjust.c
+++ b/x86/tsc_adjust.c
@@ -7,35
Signed-off-by: Andrew Jones
---
x86/asyncpf.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/x86/asyncpf.c b/x86/asyncpf.c
index 5d269f7346159..304d015888cfd 100644
--- a/x86/asyncpf.c
+++ b/x86/asyncpf.c
@@ -37,7 +37,6 @@ volatile uint32_t apf_reason __attrib
Signed-off-by: Andrew Jones
---
x86/svm.c | 25 -
1 file changed, 8 insertions(+), 17 deletions(-)
diff --git a/x86/svm.c b/x86/svm.c
index 85bb1fa9d8315..1046ddf73732f 100644
--- a/x86/svm.c
+++ b/x86/svm.c
@@ -239,11 +239,10 @@ struct regs regs;
#define LOAD_GPR_C
Signed-off-by: Andrew Jones
---
x86/vmx_tests.c | 204 ++--
1 file changed, 49 insertions(+), 155 deletions(-)
diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 184fafc75f2d0..2630f23d1e33a 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
This series applies report() to more x86 unit tests. It also
cleans up some uses of it in vmx_tests. Finally, it also
introduces report prefix support, and applies that a few places.
There should be no functional changes with this series, except of
course the output formatting (which makes the chur
Signed-off-by: Andrew Jones
---
x86/hypercall.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/x86/hypercall.c b/x86/hypercall.c
index 0c9cccf09a169..1548421c840bf 100644
--- a/x86/hypercall.c
+++ b/x86/hypercall.c
@@ -76,5 +76,5 @@ int main(int ac, char **av)
report(
Signed-off-by: Andrew Jones
---
x86/pmu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/x86/pmu.c b/x86/pmu.c
index 5c85146810cb1..f116bafebf424 100644
--- a/x86/pmu.c
+++ b/x86/pmu.c
@@ -228,14 +228,12 @@ static void check_gp_counter(struct pmu_event *evt)
VT-d Posted-Interrupts is an enhancement to CPU side Posted-Interrupt.
With VT-d Posted-Interrupts enabled, external interrupts from
direct-assigned devices can be delivered to guests without VMM
intervention when guest is running in non-root mode.
You can find the VT-d Posted-Interrtups Spec. in
This patch adds a new interface irq_remapping_cap() to detect
whether irq remapping supports new features, such as VT-d
Posted-Interrupts. We export this function out, so that KVM
code can check this and use this mechanism properly.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86/inc
This patch adds a new member capability to struct irq_remap_ops,
this new function ops can be used to check whether some
features are supported, such as VT-d Posted-Interrupts.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86/include/asm/irq_remapping.h | 4
drivers/iommu/irq_rem
Implement irq_set_vcpu_affinity for intel_ir_chip.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86/include/asm/irq_remapping.h | 5 +
drivers/iommu/intel_irq_remapping.c | 35 +++
2 files changed, 40 insertions(+)
diff --git a/arch/x86/include/a
With Posted-Interrupts support in Intel CPU and IOMMU, an external
interrupt from assigned-devices could be directly delivered to a
virtual CPU in a virtual machine. Instead of hacking KVM and Intel
IOMMU drivers, we propose a platform independent interface to target
an interrupt to a specific virt
We don't need to migrate the irqs for VT-d Posted-Interrupts here.
When 'pst' is set in IRTE, the associated irq will be posted to
guests instead of interrupt remapping. The destination of the
interrupt is set in Posted-Interrupts Descriptor, and the migration
happens during vCPU scheduling.
Howev
Add the Intel side implementation for capability in
struct irq_remap_ops.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
drivers/iommu/intel_irq_remapping.c | 27 +++
drivers/iommu/irq_remapping.c | 2 ++
drivers/iommu/irq_remapping.h | 4
3 files c
Add a new irte_pi structure for VT-d Posted-Interrupts.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
include/linux/dmar.h | 32
1 file changed, 32 insertions(+)
diff --git a/include/linux/dmar.h b/include/linux/dmar.h
index 8473756..c7f9cda 100644
--- a/in
Change struct pi_desc for VT-d Posted-Interrupts.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 15 +--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 3e556c6..abdb84f 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/v
Implement irq_set_vcpu_affinity for pci_msi_ir_controller.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
arch/x86/kernel/apic/msi.c | 1 +
include/linux/irq.h| 3 +++
2 files changed, 4 insertions(+)
diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c
index da163da
This patch adds some helper functions to manipulate the
Posted-Interrupts Descriptor.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 26 ++
1 file changed, 26 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index abdb84f..0b1383e 100644
--- a/arch/x86
Add helper function to detect VT-d Posted-Interrupts capability.
Signed-off-by: Feng Wu
Reviewed-by: Jiang Liu
---
include/linux/intel-iommu.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index ecaf3a9..8174ae8 100644
--- a/includ
This patch defines a new interface kvm_find_dest_vcpu for
VT-d PI, which can returns the destination vCPU of the
interrupt for guests.
Since VT-d PI cannot handle broadcast/multicast interrupt,
Here we only handle Fixed and Lowest priority interrupts.
The current method of handling guest lowest p
This patch adds pi_clear_sn and pi_set_sn to struct kvm_x86_ops,
so we can set/clear SN outside vmx.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 3 +++
arch/x86/kvm/vmx.c | 13 +
2 files changed, 16 insertions(+)
diff --git a/arch/x86/include/asm/kvm_h
This patch adds and documents two new attributes
KVM_DEV_VFIO_DEVICE_POST_IRQ and KVM_DEV_VFIO_DEVICE_UNPOST_IRQ
in KVM_DEV_VFIO_DEVICE group. The new attributes are used for
VT-d Posted-Interrupts.
When guest OS changes the interrupt configuration for an
assigned device, such as, MSI/MSIx data/ad
This patch initializes the VT-d Posted-Interrupts Descriptor.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0b1383e..66ca275 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x
Move struct kvm_irq_routing_table from irqchip.c to kvm_host.h,
so we can use it outside of irqchip.c.
Signed-off-by: Feng Wu
---
include/linux/kvm_host.h | 19 +++
virt/kvm/irqchip.c | 11 ---
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/include
This patch defines macro __KVM_HAVE_ARCH_KVM_VFIO_POST and
implement kvm_arch_vfio_update_pi_irte for x86 architecture.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 2 ++
arch/x86/kvm/Makefile | 2 +-
arch/x86/kvm/kvm_vfio_x86.c | 77 ++
Define a wakeup worker thread for a vCPU.
Signed-off-by: Feng Wu
---
include/linux/kvm_host.h | 1 +
virt/kvm/kvm_main.c | 9 +
2 files changed, 10 insertions(+)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index ca9a393..3d7242c 100644
--- a/include/linux/kvm_h
This patch adds the kvm-vfio interface for VT-d Posted-Interrrupts.
When guests update MSI/MSI-x information for an assigned-device,
QEMU will use KVM_DEV_VFIO_DEVICE_POST_IRQ attribute to setup
IRTE for VT-d PI. Userspace program can also use
KVM_DEV_VFIO_DEVICE_UNPOST_IRQ to change back to irq re
Currently, we use a global vector as the Posted-Interrupts
Notification Event for all the vCPUs in the system. We need
to introduce another global vector for VT-d Posted-Interrtups,
which will be used to wakeup the sleep vCPU when an external
interrupt from a direct-assigned device happens for that
This patch updates the Posted-Interrupts Descriptor when vCPU
is preempted.
sched out:
- Set 'SN' to suppress furture non-urgent interrupts posted for
the vCPU.
sched in:
- Clear 'SN'
- Change NDST if vCPU is scheduled to a different CPU
- Set 'NV' to POSTED_INTR_VECTOR
Signed-off-by: Feng Wu
-
Make kvm_set_msi_irq() public, we can use this function outside.
Signed-off-by: Feng Wu
---
include/linux/kvm_host.h | 2 ++
virt/kvm/irq_comm.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index cfa85ac..5cd4420 1
This patch updates the Posted-Interrupts Descriptor when vCPU
is blocked.
pre-block:
- Add the vCPU to the blocked per-CPU list
- Clear 'SN'
- Set 'NV' to POSTED_INTR_WAKEUP_VECTOR
post-block:
- Remove the vCPU from the per-CPU list
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h |
Currently, we don't support urgent interrupt, all interrupts
are recognized as non-urgent interrupt, so we cannot send
posted-interrupt when 'SN' is set.
Signed-off-by: Feng Wu
---
arch/x86/kvm/vmx.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx
Enable VT-d Posted-Interrtups and add a command line
parameter for it.
Signed-off-by: Feng Wu
---
Documentation/kernel-parameters.txt | 1 +
drivers/iommu/irq_remapping.c | 12
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/kernel-parameters.txt
Define a interface to get PI descriptor address from the vCPU structure.
Signed-off-by: Feng Wu
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/vmx.c | 12
2 files changed, 13 insertions(+)
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kv
Hi,
On 11/12/14 17:15, Will Deacon wrote:
> On Thu, Dec 11, 2014 at 04:30:33PM +, Andre Przywara wrote:
>> Currently we describe every interrupt for each device in the FDT
>> as being edge triggered.
>> Add a parameter to the irq property generation to allow devices to
>> specify their interru
Do not pass size==0 unless the slot has been created before. This returns
EINVAL.
Signed-off-by: Paolo Bonzini
---
api/memmap.cc | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/api/memmap.cc b/api/memmap.cc
index c625852..041e84a 100644
--- a/api/memmap.cc
+++ b/
Signed-off-by: Paolo Bonzini
---
api/api-sample.cc| 8
config/config-x86-common.mak | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/api/api-sample.cc b/api/api-sample.cc
index 524ad7b..f523e47 100644
--- a/api/api-sample.cc
+++ b/api/api-sample.cc
@@ -1
Signed-off-by: Paolo Bonzini
---
api/dirty-log-perf.cc | 8 +++-
api/dirty-log.cc | 8 +++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/api/dirty-log-perf.cc b/api/dirty-log-perf.cc
index af0b27e..16990a6 100644
--- a/api/dirty-log-perf.cc
+++ b/api/dirty-log-perf
This will sign extend pointers that have bit 31 set. Go
through uintptr_t instead, so that the next conversion to
uint64_t will zero-extend.
Signed-off-by: Paolo Bonzini
---
api/dirty-log-perf.cc | 2 +-
api/dirty-log.cc | 2 +-
api/identity.cc | 4 ++--
api/kvmxx.cc | 2 +-
Holes across the 3GB mark can occur on 64-bit machines. Use posix_memalign
to reserve some space in the process's address space for the TSS, and
carve a second hole for it. The memory itself is not used---it's only
that we want the process to not use that area while in guest context,
and the easi
These are added already by the compiler.
Signed-off-by: Paolo Bonzini
---
config/config-arm.mak| 1 -
config/config-arm64.mak | 2 --
config/config-i386.mak | 1 -
config/config-x86_64.mak | 2 +-
4 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/config/config-arm.mak b/config
64-bit kernels have a slightly different memory map, which causes
problems with sign extensions. These patches make it possible to
run all three API tests on a 64-bit kernel, and also fix some bitrot.
Paolo Bonzini (6):
config: remove useless -D options
x86: api: fix bitrot
x86: api: avoid
On 10/12/2014 20:59, Andrew Jones wrote:
> This series adds support for aarch64 to the kvm-unit-tests framework,
> bringing it to the same level as the arm support. In the process a
> few tweaks to the arm support were made, as one of the main goals
> was to share as much code as possible between
On Fri, Dec 12, 2014 at 11:23:35AM +, Marc Zyngier wrote:
> On 12/12/14 11:14, Christoffer Dall wrote:
> > On Thu, Dec 11, 2014 at 06:35:40PM +, Marc Zyngier wrote:
> >> On 09/12/14 15:44, Christoffer Dall wrote:
> >>> Userspace assumes that it can wire up IRQ injections after having
> >>>
On 12/12/14 11:14, Christoffer Dall wrote:
> On Thu, Dec 11, 2014 at 06:35:40PM +, Marc Zyngier wrote:
>> On 09/12/14 15:44, Christoffer Dall wrote:
>>> Userspace assumes that it can wire up IRQ injections after having
>>> created all VCPUs and after having created the VGIC, but potentially
>>>
On Thu, Dec 11, 2014 at 06:35:40PM +, Marc Zyngier wrote:
> On 09/12/14 15:44, Christoffer Dall wrote:
> > Userspace assumes that it can wire up IRQ injections after having
> > created all VCPUs and after having created the VGIC, but potentially
> > before starting the first VCPU. This can cur
On Thu, Dec 11, 2014 at 01:38:16PM +0100, Eric Auger wrote:
> On 12/11/2014 01:01 PM, Christoffer Dall wrote:
> > On Wed, Dec 10, 2014 at 01:45:50PM +0100, Eric Auger wrote:
> >> On 12/09/2014 04:44 PM, Christoffer Dall wrote:
> >>> Userspace assumes that it can wire up IRQ injections after having
On 12/12/2014 10:56, Zhang Haoyu wrote:
> Strange, I didn't find this commit in
> https://git.kernel.org/cgit/virt/kvm/kvm.git/log/
> but found it from the repository downloaded by git clone
> git://git.kernel.org/pub/scm/virt/kvm/kvm.git
It's here:
https://git.kernel.org/cgit/virt/kvm/kvm.g
On 2014-12-11 19:06:33, Zhang, Yang Z wrote:
>Zhang Haoyu wrote on 2014-12-11:
>> Then?
>
>It's already in upstream KVM
>
Strange, I didn't find this commit in
https://git.kernel.org/cgit/virt/kvm/kvm.git/log/
but found it from the repository downloaded by git clone
git://git.kernel.org/pub/scm/
64 matches
Mail list logo