[PATCH] kvm: x86: default legacy PCI device assignment support to "n"

2015-06-04 Thread Paolo Bonzini
VFIO has proved itself a much better option than KVM's built-in device assignment. It is mature, provides better isolation because it enforces ACS, and even the userspace code is being tested on a wider variety of hardware these days than the legacy support. Disable legacy device assignment by de

[PATCH] kvm: x86: fix kvm_apic_has_events to check for NULL pointer

2015-06-04 Thread Paolo Bonzini
Malicious (or egregiously buggy) userspace can trigger it, but it should never happen in normal operation. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/lapic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 71b150cae5f9..9d8

Re: [PATCH 14/15] KVM: MTRR: do not map huage page for non-consistent range

2015-06-04 Thread Xiao Guangrong
On 06/03/2015 03:55 PM, Paolo Bonzini wrote: On 03/06/2015 04:56, Xiao Guangrong wrote: On 06/01/2015 05:36 PM, Paolo Bonzini wrote: On 30/05/2015 12:59, Xiao Guangrong wrote: Currently guest MTRR is completely prohibited if cache snoop is supported on IOMMU (!noncoherent_dma) and host

Re: [PATCH 14/15] KVM: MTRR: do not map huage page for non-consistent range

2015-06-04 Thread Xiao Guangrong
On 06/04/2015 04:23 PM, Xiao Guangrong wrote: On 06/03/2015 03:55 PM, Paolo Bonzini wrote: On 03/06/2015 04:56, Xiao Guangrong wrote: On 06/01/2015 05:36 PM, Paolo Bonzini wrote: On 30/05/2015 12:59, Xiao Guangrong wrote: Currently guest MTRR is completely prohibited if cache snoop

Re: [PATCH 14/15] KVM: MTRR: do not map huage page for non-consistent range

2015-06-04 Thread Paolo Bonzini
On 04/06/2015 10:26, Xiao Guangrong wrote: >> >> CR0.CD is always 0 in both host and guest, i guess it's why we cleared >> CR0.CD and CR0.NW in vmx_set_cr0(). > > It reminds me that we should check guest CR0.CD before check guest MTRR > and disable guest PAT if guest CR0.CD = 1. I think it can

Re: [PATCH 14/15] KVM: MTRR: do not map huage page for non-consistent range

2015-06-04 Thread Paolo Bonzini
On 04/06/2015 10:23, Xiao Guangrong wrote: >> >> So, why do you need to always use IPAT=0? Can patch 15 keep the current >> logic for RAM, like this: >> >> if (is_mmio || kvm_arch_has_noncoherent_dma(vcpu->kvm)) >> ret = kvm_mtrr_get_guest_memory_type(vcpu, gfn) << >> V

[PATCH] KVM: x86: clear hidden CPU state at reset time

2015-06-04 Thread Paolo Bonzini
This was noticed by Radim while reviewing the implementation of system management mode. Signed-off-by: Paolo Bonzini --- arch/x86/kvm/x86.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 79dde1656db6..bd6bcd54cd44 100644 --- a/arch/x86/kvm/x86

[PATCH v2 14/13] KVM: x86: latch INITs while in system management mode

2015-06-04 Thread Paolo Bonzini
Do not process INITs immediately while in system management mode, keep it instead in apic->pending_events. Tell userspace if an INIT is pending when they issue GET_VCPU_EVENTS, and similarly handle the new field in SET_VCPU_EVENTS. Note that the same treatment should be done while in VMX non-root

[PATCH v2 14/13] KVM: x86: latch INITs while in system management mode

2015-06-04 Thread Paolo Bonzini
Do not process INITs immediately while in system management mode, keep it instead in apic->pending_events. Tell userspace if an INIT is pending when they issue GET_VCPU_EVENTS, and similarly handle the new field in SET_VCPU_EVENTS. Note that the same treatment should be done while in VMX non-root

Re: [PATCH kernel v11 17/34] powerpc/spapr: vfio: Switch from iommu_table to new iommu_table_group

2015-06-04 Thread Alexey Kardashevskiy
On 06/01/2015 04:24 PM, David Gibson wrote: On Fri, May 29, 2015 at 06:44:41PM +1000, Alexey Kardashevskiy wrote: Modern IBM POWERPC systems support multiple (currently two) TCE tables per IOMMU group (a.k.a. PE). This adds a iommu_table_group container for TCE tables. Right now just one table i

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Christoffer Dall
On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: > The elr_el2 and spsr_el2 registers in fact contain the processor state > before entry into the hypervisor code. be careful with your use of the hypervisor, in the KVM design the hypervisor is split across EL1 and EL2. > In the case of

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Marc Zyngier
On 04/06/15 10:34, Christoffer Dall wrote: > On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: >> The elr_el2 and spsr_el2 registers in fact contain the processor state >> before entry into the hypervisor code. > > be careful with your use of the hypervisor, in the KVM design the > hype

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Alex Bennée
Marc Zyngier writes: > On 04/06/15 10:34, Christoffer Dall wrote: >> On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: >>> The elr_el2 and spsr_el2 registers in fact contain the processor state >>> before entry into the hypervisor code. >> >> be careful with your use of the hyperviso

Re: [PATCH v5 08/12] KVM: arm64: re-factor hyp.S debug register code

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:24AM +0100, Alex Bennée wrote: > This is a pre-cursor to sharing the code with the guest debug support. > This replaces the big macro that fishes data out of a fixed location > with a more general helper macro to restore a set of debug registers. It > uses macro substi

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Marc Zyngier
On 04/06/15 11:20, Alex Bennée wrote: > > Marc Zyngier writes: > >> On 04/06/15 10:34, Christoffer Dall wrote: >>> On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: The elr_el2 and spsr_el2 registers in fact contain the processor state before entry into the hypervisor code.

Re: [PATCH v5 08/12] KVM: arm64: re-factor hyp.S debug register code

2015-06-04 Thread Alex Bennée
Christoffer Dall writes: > On Fri, May 29, 2015 at 10:30:24AM +0100, Alex Bennée wrote: >> This is a pre-cursor to sharing the code with the guest debug support. >> This replaces the big macro that fishes data out of a fixed location >> with a more general helper macro to restore a set of debug

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Alex Bennée
Marc Zyngier writes: > On 04/06/15 11:20, Alex Bennée wrote: >> >> Marc Zyngier writes: >> >>> On 04/06/15 10:34, Christoffer Dall wrote: On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: > The elr_el2 and spsr_el2 registers in fact contain the processor state > before

Re: [PATCH] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Marc Zyngier
On 04/06/15 11:46, Alex Bennée wrote: > > Marc Zyngier writes: > >> On 04/06/15 11:20, Alex Bennée wrote: >>> >>> Marc Zyngier writes: >>> On 04/06/15 10:34, Christoffer Dall wrote: > On Thu, May 28, 2015 at 10:43:06AM +0100, Alex Bennée wrote: >> The elr_el2 and spsr_el2 registers

Re: [PATCH v5 2/6] target-arm: kvm64: introduce kvm_arm_init_debug()

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée wrote: > As we haven't always had guest debug support we need to probe for it. > Additionally we don't do this in the start-up capability code so we > don't fall over on old kernels. > > Signed-off-by: Alex Bennée > --- Reviewed-by: Peter Maydell thanks --

Re: [PATCH v5 09/12] KVM: arm64: introduce vcpu->arch.debug_ptr

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:25AM +0100, Alex Bennée wrote: > This introduces a level of indirection for the debug registers. Instead > of using the sys_regs[] directly we store registers in a structure in > the vcpu. As we are no longer tied to the layout of the sys_regs[] we > can make the copie

Re: [PATCH v5 3/6] target-arm: kvm - implement software breakpoints

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée wrote: > These don't involve messing around with debug registers, just setting > the breakpoint instruction in memory. GDB will not use this mechanism if > it can't access the memory to write the breakpoint. > > All the kernel has to do is ensure the hypervisor

Re: [PATCH v5 4/6] target-arm: kvm - support for single step

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée wrote: > This adds support for single-step. There isn't much to do on the QEMU > side as after we set-up the request for single step via the debug ioctl > it is all handled within the kernel. > > Signed-off-by: Alex Bennée > > --- > v2 > - convert to using H

Re: [PATCH v5 10/12] KVM: arm64: guest debug, HW assisted debug support

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:26AM +0100, Alex Bennée wrote: > This adds support for userspace to control the HW debug registers for > guest debug. In the debug ioctl we copy the IMPDEF defined number of > registers into a new register set called host_debug_state. There is now > a new vcpu paramete

Re: [PATCH v5 07/12] KVM: arm64: guest debug, add support for single-step

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:23AM +0100, Alex Bennée wrote: > This adds support for single-stepping the guest. To do this we need to > manipulate the guests PSTATE.SS and MDSCR_EL1.SS bits which we do in the > kvm_arm_setup/clear_debug() so we don't affect the apparent state of the > guest. Additi

Re: [PATCH v5 05/12] KVM: arm: introduce kvm_arm_init/setup/clear_debug

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:21AM +0100, Alex Bennée wrote: > This is a precursor for later patches which will need to do more to > setup debug state before entering the hyp.S switch code. The existing > functionality for setting mdcr_el2 has been moved out of hyp.S and now > uses the value kept i

Re: [PATCH v5 03/12] KVM: arm64: guest debug, define API headers

2015-06-04 Thread Christoffer Dall
On Fri, May 29, 2015 at 10:30:19AM +0100, Alex Bennée wrote: > This commit defines the API headers for guest debugging. There are two > architecture specific debug structures: > > - kvm_guest_debug_arch, allows us to pass in HW debug registers > - kvm_debug_exit_arch, signals exception and pos

Re: [PATCH v5 5/6] target-arm: kvm - add support for HW assisted debug

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée wrote: > This adds basic support for HW assisted debug. The ioctl interface to > KVM allows us to pass an implementation defined number of break and > watch point registers. When KVM_GUESTDBG_USE_HW_BP is specified these > debug registers will be installed in p

Re: [PATCH v5 08/12] KVM: arm64: re-factor hyp.S debug register code

2015-06-04 Thread Christoffer Dall
On Thu, Jun 04, 2015 at 11:34:46AM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Fri, May 29, 2015 at 10:30:24AM +0100, Alex Bennée wrote: > >> This is a pre-cursor to sharing the code with the guest debug support. > >> This replaces the big macro that fishes data out of a fixe

Re: [PATCH v5 6/6] target-arm: kvm - re-inject guest debug exceptions

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée wrote: > From: Alex Bennée > > If we can't find details for the debug exception in our debug state > then we can assume the exception is due to debugging inside the guest. > To inject the exception into the guest state we re-use the TCG exception > code (do_in

Re: [PATCH v2 06/13] KVM: x86: save/load state on SMM switch

2015-06-04 Thread Radim Krčmář
2015-06-04 08:14+0200, Paolo Bonzini: > On 03/06/2015 21:02, Radim Krčmář wrote: >>> + r = kvm_write_guest(vcpu->kvm, vcpu->arch.smbase + 0xfe00, buf, >>> sizeof(buf)); >> >> The state is saved in SMRAM, but we are accessing it using the non-SMM >> address space ... how did it pass testing? >>

Re: [PATCH v5 0/6] QEMU support for KVM Guest Debug on arm64

2015-06-04 Thread Peter Maydell
On 29 May 2015 at 16:19, Alex Bennée wrote: > You may be wondering what happened to v3 and v4. They do exist but > they didn't change much from the the original patches as I've been > mostly looking the kernel side of the equation. So in summary the > changes are: > > - updates to the kernel ABI

Re: [PATCH v2 00/13] SMM implementation for KVM

2015-06-04 Thread Radim Krčmář
2015-05-27 19:05+0200, Paolo Bonzini: > This brings together the remaining parts of SMM. For now I've left the > "weird" interaction between SMM and NMI blocking, and I'm using the same > format for the state save area (which is also the one used by QEMU) as > the RFC. > > It builds on the previo

[PATCH v2] KVM: arm64: fix misleading comments in save/restore

2015-06-04 Thread Alex Bennée
The elr_el2 and spsr_el2 registers in fact contain the processor state before entry into EL2. In the case of guest state it could be in either el0 or el1. Signed-off-by: Alex Bennée --- v2 - s/hypervisor code/EL2/ - comment: pc/pstate before entering/on return from el2 --- arch/arm64/kvm/hy

Re: [PATCH v5 07/12] KVM: arm64: guest debug, add support for single-step

2015-06-04 Thread Alex Bennée
Christoffer Dall writes: > On Fri, May 29, 2015 at 10:30:23AM +0100, Alex Bennée wrote: >> This adds support for single-stepping the guest. To do this we need to >> manipulate the guests PSTATE.SS and MDSCR_EL1.SS bits which we do in the >> kvm_arm_setup/clear_debug() so we don't affect the appa

Re: [PATCH v5 03/12] KVM: arm64: guest debug, define API headers

2015-06-04 Thread Alex Bennée
Christoffer Dall writes: > On Fri, May 29, 2015 at 10:30:19AM +0100, Alex Bennée wrote: >> This commit defines the API headers for guest debugging. There are two >> architecture specific debug structures: >> >> - kvm_guest_debug_arch, allows us to pass in HW debug registers >> - kvm_debug_e

Re: [PATCH v2 00/13] SMM implementation for KVM

2015-06-04 Thread Paolo Bonzini
On 04/06/2015 14:26, Radim Krčmář wrote: > A list of minor stuff I noticed (you'll probably agree with [12/13]): Good eyes. :) I'll fix at least these: > [06/13] get_smstate can't be a valid C function, CAPS would be clearer > [06/13] mangled whitespace in trace_kvm_enter_smm > [08/13] '(u16)'

Re: [PATCH v2 06/13] KVM: x86: save/load state on SMM switch

2015-06-04 Thread Paolo Bonzini
On 03/06/2015 21:02, Radim Krčmář wrote: > > + if (r < 0) > > + return; > > And if we fail to write it, is there other option than throwing an error > to userspace? (Unset HF_SMM_MASK and pretend that nothing happened > doesn't find much support in docs.) Just do nothing, I guess.

Re: [PATCH] kvm: x86: default legacy PCI device assignment support to "n"

2015-06-04 Thread Paolo Bonzini
On 04/06/2015 16:31, Bandan Das wrote: > > VFIO has proved itself a much better option than KVM's built-in > > device assignment. It is mature, provides better isolation because > > it enforces ACS, and even the userspace code is being tested on > > a wider variety of hardware these days than th

Re: [PATCH] kvm: x86: default legacy PCI device assignment support to "n"

2015-06-04 Thread Bandan Das
Paolo Bonzini writes: > VFIO has proved itself a much better option than KVM's built-in > device assignment. It is mature, provides better isolation because > it enforces ACS, and even the userspace code is being tested on > a wider variety of hardware these days than the legacy support. > > Dis

Re: [PATCH v5 03/12] KVM: arm64: guest debug, define API headers

2015-06-04 Thread Andrew Jones
On Thu, Jun 04, 2015 at 02:49:17PM +0100, Alex Bennée wrote: > > Christoffer Dall writes: > > > On Fri, May 29, 2015 at 10:30:19AM +0100, Alex Bennée wrote: > >> This commit defines the API headers for guest debugging. There are two > >> architecture specific debug structures: > >> > >> - kvm

Re: [PATCH] kvm: x86: default legacy PCI device assignment support to "n"

2015-06-04 Thread Alex Williamson
On Thu, 2015-06-04 at 16:33 +0200, Paolo Bonzini wrote: > > On 04/06/2015 16:31, Bandan Das wrote: > > > VFIO has proved itself a much better option than KVM's built-in > > > device assignment. It is mature, provides better isolation because > > > it enforces ACS, and even the userspace code is b

Re: [PATCH] kvm: x86: default legacy PCI device assignment support to "n"

2015-06-04 Thread Bandan Das
Paolo Bonzini writes: > On 04/06/2015 16:31, Bandan Das wrote: >> > VFIO has proved itself a much better option than KVM's built-in >> > device assignment. It is mature, provides better isolation because >> > it enforces ACS, and even the userspace code is being tested on >> > a wider variety of

[PATCH] kvmtool: don't use PCI config space IRQ line field

2015-06-04 Thread Andre Przywara
In PCI config space there is an interrupt line field (offset 0x3f), which is used to initially communicate the IRQ line number from firmware to the OS. _Hardware_ should never use this information, as the OS is free to write any information in there. But kvmtool uses this number when it triggers IR

Re: [PATCH v3 4/4] KVM: x86: Add support for local interrupt requests from userspace

2015-06-04 Thread Steve Rutherford
On Wed, Jun 03, 2015 at 11:38:21AM +0200, Paolo Bonzini wrote: > However, why is the roundtrip to userspace necessary? Could you pass > the extint index directly as an argument to KVM_INTERRUPT? It's > backwards-compatible, because KVM_INTERRUPT so far could not be used > together with an in-ke

Re: [PATCH v3 1/4] KVM: x86: Split the APIC from the rest of IRQCHIP.

2015-06-04 Thread Steve Rutherford
On Wed, Jun 03, 2015 at 10:54:41AM +0200, Paolo Bonzini wrote: > > > On 03/06/2015 01:51, Steve Rutherford wrote: > > First patch in a series which enables the relocation of the > > PIC/IOAPIC to userspace. > > > > Adds capability KVM_CAP_SPLIT_IRQCHIP; > > > > KVM_CAP_SPLIT_IRQCHIP enables the

Re: [PATCH v3 3/4] KVM: x86: Add EOI exit bitmap inference

2015-06-04 Thread Steve Rutherford
On Wed, Jun 03, 2015 at 11:16:16AM +0200, Paolo Bonzini wrote: > > > On 03/06/2015 01:51, Steve Rutherford wrote: > > +static inline void kvm_arch_irq_routing_update(struct kvm *kvm) > > +{ > > +} > > Please add the static inline to all arches instead of putting it in > #ifndef __KVM_HAVE_IOAPIC

Re: [PATCH kernel v11 33/34] vfio: powerpc/spapr: Register memory and define IOMMU v2

2015-06-04 Thread Gavin Shan
On Fri, May 29, 2015 at 06:44:57PM +1000, Alexey Kardashevskiy wrote: >The existing implementation accounts the whole DMA window in >the locked_vm counter. This is going to be worse with multiple >containers and huge DMA windows. Also, real-time accounting would requite >additional tracking of acco

Re: [PATCH kernel v11 05/34] powerpc/iommu: Always release iommu_table in iommu_free_table()

2015-06-04 Thread Gavin Shan
On Fri, May 29, 2015 at 06:44:29PM +1000, Alexey Kardashevskiy wrote: >At the moment iommu_free_table() only releases memory if >the table was initialized for the platform code use, i.e. it had >it_map initialized (which purpose is to track DMA memory space use). > >With dynamic DMA windows, we wil

Re: [PATCH kernel v11 16/34] powerpc/spapr: vfio: Replace iommu_table with iommu_table_group

2015-06-04 Thread Gavin Shan
On Fri, May 29, 2015 at 06:44:40PM +1000, Alexey Kardashevskiy wrote: >Modern IBM POWERPC systems support multiple (currently two) TCE tables >per IOMMU group (a.k.a. PE). This adds a iommu_table_group container >for TCE tables. Right now just one table is supported. > >This defines iommu_table_gro

Re: [PATCH kernel v11 20/34] powerpc/powernv/ioda2: Move TCE kill register address to PE

2015-06-04 Thread Gavin Shan
On Fri, May 29, 2015 at 06:44:44PM +1000, Alexey Kardashevskiy wrote: >At the moment the DMA setup code looks for the "ibm,opal-tce-kill" >property which contains the TCE kill register address. Writing to >this register invalidates TCE cache on IODA/IODA2 hub. > >This moves the register address fro

Re: [PATCH kernel v11 21/34] powerpc/powernv/ioda2: Add TCE invalidation for all attached groups

2015-06-04 Thread Gavin Shan
On Fri, May 29, 2015 at 06:44:45PM +1000, Alexey Kardashevskiy wrote: >The iommu_table struct keeps a list of IOMMU groups it is used for. >At the moment there is just a single group attached but further >patches will add TCE table sharing. When sharing is enabled, TCE cache >in each PE needs to be

Re: [PATCH kernel v11 21/34] powerpc/powernv/ioda2: Add TCE invalidation for all attached groups

2015-06-04 Thread Alexey Kardashevskiy
On 06/05/2015 10:27 AM, Gavin Shan wrote: On Fri, May 29, 2015 at 06:44:45PM +1000, Alexey Kardashevskiy wrote: The iommu_table struct keeps a list of IOMMU groups it is used for. At the moment there is just a single group attached but further patches will add TCE table sharing. When sharing is

[PATCH V4 2/4] KVM: x86/vPMU: Create vPMU interface for VMX and SVM

2015-06-04 Thread Wei Huang
This patch splits existing vPMU code into a common vPMU interface (pmc.c) and Intel specific vPMU code (pmu_intel.c) using the following steps: - Part of arechitectural vPMU code is extracted and moved to pmu_intel.c file. They are hooked up with the newly-defined intel_pmu_ops, which will be

[PATCH V4 4/4] KVM: x86/vPMU: Enable PMU handling for AMD PERFCTRn and EVNTSELn MSRs

2015-06-04 Thread Wei Huang
This patch enables AMD guest VM to access (R/W) PMU related MSRs, which include PERFCTR[0..3] and EVNTSEL[0..3]. Reviewed-by: Radim Krčmář Signed-off-by: Wei Huang --- arch/x86/kvm/x86.c | 51 +-- 1 file changed, 9 insertions(+), 42 deletions(-)

[PATCH V4 1/4] KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch

2015-06-04 Thread Wei Huang
This patch defines a new function pointer struct (kvm_pmu_ops) to support vPMU for both Intel and AMD. The functions pointers defined in this new struct will be linked with Intel and AMD functions later. In the meanwhile the struct that maps from event_sel bits to PERF_TYPE_HARDWARE events is renam

[PATCH V4 0/4] Consolidated KVM vPMU support for x86

2015-06-04 Thread Wei Huang
Currently KVM only supports vPMU for Intel CPUs. This patchset enables KVM vPMU support for AMD platform by creating a common PMU interface for x86. By refractoring, PMU related MSR accesses from guest VMs are dispatched to corresponding functions defined in arch specific files. V4: * Change vPM

[PATCH V4 3/4] KVM: x86/vPMU: Implement AMD vPMU code for KVM

2015-06-04 Thread Wei Huang
This patch replaces the empty AMD vPMU functions (in pmu_amd.c) with real implementation. Signed-off-by: Wei Huang --- arch/x86/kvm/pmu_amd.c | 122 ++--- 1 file changed, 116 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/pmu_amd.c b/arch/x86

Re: [PATCH V1 0/5] Enable ACPI support for KVM ARM

2015-06-04 Thread Wei Huang
Hi Christoffer and Marc, Ping. Any comments on this patchset for V2? Thanks, -Wei On 5/28/15 00:23, Wei Huang wrote: Initial ACPI support for ARM64 has been accepted into Linux kernel recently. Now it is a good time to re-visit ACPI support for KVM. This patchset enables ACPI for both arch_ti

Re: [PATCH 14/15] KVM: MTRR: do not map huage page for non-consistent range

2015-06-04 Thread Xiao Guangrong
[ CCed Zhang Yang ] On 06/04/2015 04:36 PM, Paolo Bonzini wrote: On 04/06/2015 10:23, Xiao Guangrong wrote: So, why do you need to always use IPAT=0? Can patch 15 keep the current logic for RAM, like this: if (is_mmio || kvm_arch_has_noncoherent_dma(vcpu->kvm)) ret = kvm_mtr