Re: [PATCH v3 01/11] KVM: arm: plug guest debug exploit

2015-07-01 Thread Christoffer Dall
On Wed, Jul 01, 2015 at 03:04:00PM +0800, zichao wrote: On June 29, 2015 11:49:53 PM GMT+08:00, Christoffer Dall christoffer.d...@linaro.org wrote: On Mon, Jun 22, 2015 at 06:41:24PM +0800, Zhichao Huang wrote: Hardware debugging in guests is not intercepted currently, it means that a

Re: [PATCH v3 04/11] KVM: arm: common infrastructure for handling AArch32 CP14/CP15

2015-07-01 Thread Christoffer Dall
On Wed, Jul 01, 2015 at 03:09:35PM +0800, zichao wrote: On June 30, 2015 3:43:34 AM GMT+08:00, Christoffer Dall christoffer.d...@linaro.org wrote: On Mon, Jun 22, 2015 at 06:41:27PM +0800, Zhichao Huang wrote: As we're about to trap a bunch of CP14 registers, let's rework the CP15

[PATCH v3 1/2] vhost: extend memory regions allocation to vmalloc

2015-07-01 Thread Igor Mammedov
with large number of memory regions we could end up with high order allocations and kmalloc could fail if host is under memory pressure. Considering that memory regions array is used on hot path try harder to allocate using kmalloc and if it fails resort to vmalloc. It's still better than just

Re: [PATCH 05/10] KVM: arm/arm64: vgic: Relax vgic_can_sample_irq for edge IRQs

2015-07-01 Thread Marc Zyngier
On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:00PM +0100, Marc Zyngier wrote: We only set the irq_queued flag for level interrupts, meaning that !vgic_irq_is_queued(vcpu, irq) is a good enough predicate for all interrupts. This will allow us to inject edge HW

Re: [PATCH 10/10] KVM: arm/arm64: vgic: Allow non-shared device HW interrupts

2015-07-01 Thread Marc Zyngier
On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:05PM +0100, Marc Zyngier wrote: So far, the only use of the HW interrupt facility is the timer, implying that the active state is context-switched for each vcpu, as the device is is shared across all vcpus. This does

Re: [PATCH 10/10] KVM: arm/arm64: vgic: Allow non-shared device HW interrupts

2015-07-01 Thread Christoffer Dall
On Wed, Jul 01, 2015 at 09:26:59AM +0100, Marc Zyngier wrote: On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:05PM +0100, Marc Zyngier wrote: So far, the only use of the HW interrupt facility is the timer, implying that the active state is context-switched for each

[PATCH v3 2/2] vhost: add max_mem_regions module parameter

2015-07-01 Thread Igor Mammedov
it became possible to use a bigger amount of memory slots, which is used by memory hotplug for registering hotplugged memory. However QEMU crashes if it's used with more than ~60 pc-dimm devices and vhost-net enabled since host kernel in module vhost-net refuses to accept more than 64 memory

[PATCH v3 0/2] vhost: support more than 64 memory regions

2015-07-01 Thread Igor Mammedov
changes since v2: * drop cache patches for now as suggested * add max_mem_regions module parameter instead of unconditionally increasing limit * drop bsearch patch since it's already queued References to previous versions: v2: https://lkml.org/lkml/2015/6/17/276 v1:

Re: [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Paolo Bonzini
On 01/07/2015 18:06, Peter Hornyack wrote: If userspace is controlling the crash capabilities then HV_X64_MSR_CRASH_CTL_CONTENTS is not needed. Actually you still need to: userspace cannot write anything but 0 or (1ULL 63). However, the name makes less sense, so I'm in favor of removing the

[PATCH v7 05/11] KVM: arm64: guest debug, add SW break point support

2015-07-01 Thread Alex Bennée
This adds support for SW breakpoints inserted by userspace. We do this by trapping all guest software debug exceptions to the hypervisor (MDCR_EL2.TDE). The exit handler sets an exit reason of KVM_EXIT_DEBUG with the kvm_debug_exit_arch structure holding the exception syndrome information. It

[PATCH v7 04/11] KVM: arm: introduce kvm_arm_init/setup/clear_debug

2015-07-01 Thread Alex Bennée
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 in vcpu-arch.mdcr_el2. As the assembler used to previously mask and

Re: [PATCH 05/10] KVM: arm/arm64: vgic: Relax vgic_can_sample_irq for edge IRQs

2015-07-01 Thread Marc Zyngier
On 01/07/15 12:58, Christoffer Dall wrote: On Wed, Jul 01, 2015 at 10:17:52AM +0100, Marc Zyngier wrote: On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:00PM +0100, Marc Zyngier wrote: We only set the irq_queued flag for level interrupts, meaning that

[PATCH v7 01/11] KVM: add comments for kvm_debug_exit_arch struct

2015-07-01 Thread Alex Bennée
Bring into line with the comments for the other structures and their KVM_EXIT_* cases. Also update api.txt to reflect use in kvm_run documentation. Signed-off-by: Alex Bennée alex.ben...@linaro.org Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Reviewed-by: Andrew Jones drjo...@redhat.com

[PATCH v7 06/11] KVM: arm64: guest debug, add support for single-step

2015-07-01 Thread Alex Bennée
This adds support for single-stepping the guest. To do this we need to manipulate the guests PSTATE.SS and MDSCR_EL1.SS bits to trigger stepping. We take care to preserve MDSCR_EL1 and trap access to it to ensure we don't affect the apparent state of the guest. As we have to enable trapping of

[PATCH v7 11/11] KVM: arm64: add trace points for guest_debug debug

2015-07-01 Thread Alex Bennée
This includes trace points for: kvm_arch_setup_guest_debug kvm_arch_clear_guest_debug I've also added some generic register setting trace events and also a trace point to dump the array of hardware registers. Signed-off-by: Alex Bennée alex.ben...@linaro.org --- v3 - add trace event for

[PATCH v7 08/11] KVM: arm64: introduce vcpu-arch.debug_ptr

2015-07-01 Thread Alex Bennée
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. The new kvm_arm_reset_debug_ptr() sets the debug ptr to the guest context. This also entails updating the sys_regs code to access this new

[PATCH v7 10/11] KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG

2015-07-01 Thread Alex Bennée
Finally advertise the KVM capability for SET_GUEST_DEBUG. Once arm support is added this check can be moved to the common kvm_vm_ioctl_check_extension() code. Signed-off-by: Alex Bennée alex.ben...@linaro.org Acked-by: Christoffer Dall christoffer.d...@linaro.org --- v3: - separated capability

[PATCH v7 09/11] KVM: arm64: guest debug, HW assisted debug support

2015-07-01 Thread Alex Bennée
This adds support for userspace to control the HW debug registers for guest debug. In the debug ioctl we copy an IMPDEF registers into a new register set called host_debug_state. We use the recently introduced vcpu parameter debug_ptr to select which register set is copied into the real registers

[PATCH v7 07/11] KVM: arm64: re-factor hyp.S debug register code

2015-07-01 Thread Alex Bennée
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 substitution so it can be re-used for debug control and value registers.

[PATCH v7 00/11] KVM Guest Debug support for arm64

2015-07-01 Thread Alex Bennée
Here is V7 of the KVM Guest Debug support for arm64. The fixes are fairly minor aside from the re-factoring of sys_regs.c to have individual trap functions for each debug register. There is a lot of boiler plate but it does make the ugliness of the previous offset hacks go away. On top of that

[PATCH v7 03/11] KVM: arm: guest debug, add stub KVM_SET_GUEST_DEBUG ioctl

2015-07-01 Thread Alex Bennée
This commit adds a stub function to support the KVM_SET_GUEST_DEBUG ioctl. Any unsupported flag will return -EINVAL. For now, only KVM_GUESTDBG_ENABLE is supported, although it won't have any effects. Signed-off-by: Alex Bennée alex.ben...@linaro.org. Reviewed-by: Christoffer Dall

Re: [PATCH 0/1] KVM: s390: virtio-ccw: Fix config space values

2015-07-01 Thread Michael S. Tsirkin
On Wed, Jul 01, 2015 at 04:05:27PM +0200, Paolo Bonzini wrote: On 01/07/2015 15:45, Michael S. Tsirkin wrote: Paolo, here is fix targetted for kvm/master (4.2) that fixes an issue with virtio config space on s390. It mostly manifests in vhost-scsi not working properly on s390.

Re: [PATCH 1/1] KVM: s390: virtio-ccw: don't overwrite config space values

2015-07-01 Thread Paolo Bonzini
On 29/06/2015 16:44, Christian Borntraeger wrote: From: Cornelia Huck cornelia.h...@de.ibm.com Eric noticed problems with vhost-scsi and virtio-ccw: vhost-scsi complained about overwriting values in the config space, which was triggered by a broken implementation of virtio-ccw's config

Re: [PATCH 0/5] PPC: Current patch queue for HV KVM

2015-07-01 Thread Alexander Graf
On 24.06.15 13:18, Paul Mackerras wrote: This is my current queue of patches for HV KVM. This series is based on the kvm next branch. They have all been posted 6 weeks ago or more, though I have just added a 3-line fix to patch 2/5 to fix a bug that we found in testing migration, and I

Re: [PATCH 0/5] PPC: Current patch queue for HV KVM

2015-07-01 Thread Alexander Graf
On 24.06.15 13:18, Paul Mackerras wrote: This is my current queue of patches for HV KVM. This series is based on the kvm next branch. They have all been posted 6 weeks ago or more, though I have just added a 3-line fix to patch 2/5 to fix a bug that we found in testing migration, and I

Re: [PATCH] KVM: x86: remove data variable from kvm_get_msr_common

2015-07-01 Thread Paolo Bonzini
On 29/06/2015 12:39, Nicolas Iooss wrote: Commit 609e36d372ad (KVM: x86: pass host_initiated to functions that read MSRs) modified kvm_get_msr_common function to use msr_info-data instead of data but missed one occurrence. Replace it and remove the unused local variable. Fixes:

Re: [PATCH v3 1/2] arm64: KVM: Optimize arm64 skip 30-50% vfp/simd save/restore on exits

2015-07-01 Thread Christoffer Dall
On Wed, Jun 24, 2015 at 05:04:11PM -0700, Mario Smarduch wrote: This patch only saves and restores FP/SIMD registers on Guest access. To do this cptr_el2 FP/SIMD trap is set on Guest entry and later checked on exit. lmbench, hackbench show significant improvements, for 30-50% exits FP/SIMD

Re: [PATCH v3 0/9] HyperV equivalent of pvpanic driver

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to user space that allows to gather Windows guest

Re: [PATCH 0/1] KVM: s390: virtio-ccw: Fix config space values

2015-07-01 Thread Paolo Bonzini
On 01/07/2015 15:45, Michael S. Tsirkin wrote: Paolo, here is fix targetted for kvm/master (4.2) that fixes an issue with virtio config space on s390. It mostly manifests in vhost-scsi not working properly on s390. The problem itself might affect other things as well so cc

Re: [PATCH 0/3] KVM: x86: legacy NMI watchdog fixes

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 22:19, Radim Krčmář wrote: Until v2.6.37, Linux used NMI watchdog that utilized IO-APIC and LVT0. This series fixes some problems with APICv, restore, and concurrency while keeping the monster asleep. Queued for 4.2. Paolo -- To unsubscribe from this list: send the line

Re: [PATCH 3/3] KVM: x86: make vapics_in_nmi_mode atomic

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 22:19, Radim Krčmář wrote: Writes were a bit racy, but hard to turn into a bug at the same time. (Particularly because modern Linux doesn't use this feature anymore.) I suspect patch 2 makes this race much easier to trigger, so it deserves Cc: stable@ as well. Paolo

Re: [PATCH 0/1] KVM: s390: virtio-ccw: Fix config space values

2015-07-01 Thread Paolo Bonzini
On 01/07/2015 16:18, Michael S. Tsirkin wrote: On Wed, Jul 01, 2015 at 04:05:27PM +0200, Paolo Bonzini wrote: On 01/07/2015 15:45, Michael S. Tsirkin wrote: Paolo, here is fix targetted for kvm/master (4.2) that fixes an issue with virtio config space on s390. It mostly manifests in

Re: [PATCH 0/1] KVM: s390: virtio-ccw: Fix config space values

2015-07-01 Thread Michael S. Tsirkin
On Mon, Jun 29, 2015 at 04:44:00PM +0200, Christian Borntraeger wrote: Paolo, here is fix targetted for kvm/master (4.2) that fixes an issue with virtio config space on s390. It mostly manifests in vhost-scsi not working properly on s390. The problem itself might affect other things as well

Re: [PATCH v3 2/2] arm: KVM: keep arm vfp/simd exit handling consistent with arm64

2015-07-01 Thread Christoffer Dall
On Wed, Jun 24, 2015 at 05:04:12PM -0700, Mario Smarduch wrote: After enhancing arm64 FP/SIMD exit handling, ARMv7 VFP exit branch is moved to guest trap handling. This allows us to keep exit handling flow between both architectures consistent. Signed-off-by: Mario Smarduch

Re: [PATCH 2/3] KVM: x86: properly restore LVT0

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 22:19, Radim Krčmář wrote: Legacy NMI watchdog didn't work after migration/resume, because vapics_in_nmi_mode was left at 0. Signed-off-by: Radim Krčmář rkrc...@redhat.com --- arch/x86/kvm/lapic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/lapic.c

[PULL] virtio/vhost: cross endian support

2015-07-01 Thread Michael S. Tsirkin
The following changes since commit 8a7b19d8b542b87bccc3eaaf81dcc90a5ca48aea: include/uapi/linux/virtio_balloon.h: include linux/virtio_types.h (2015-06-01 15:46:54 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for

Re: [PATCH v3 0/2] arm/arm64: KVM: Optimize arm64 fp/simd, saves 30-50% on exits

2015-07-01 Thread Christoffer Dall
On Wed, Jun 24, 2015 at 05:04:10PM -0700, Mario Smarduch wrote: Currently we save/restore fp/simd on each exit. Fist patch optimizes arm64 save/restore, we only do so on Guest access. hackbench and several lmbench tests show anywhere from 30% to above 50% optimzation achieved. In second

Re: [PATCH 05/10] KVM: arm/arm64: vgic: Relax vgic_can_sample_irq for edge IRQs

2015-07-01 Thread Christoffer Dall
On Wed, Jul 01, 2015 at 10:17:52AM +0100, Marc Zyngier wrote: On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:00PM +0100, Marc Zyngier wrote: We only set the irq_queued flag for level interrupts, meaning that !vgic_irq_is_queued(vcpu, irq) is a good enough predicate

Re: [PATCH 06/10] KVM: arm/arm64: vgic: Allow dynamic mapping of physical/virtual interrupts

2015-07-01 Thread Christoffer Dall
On Wed, Jul 01, 2015 at 11:20:45AM +0100, Marc Zyngier wrote: On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:01PM +0100, Marc Zyngier wrote: In order to be able to feed physical interrupts to a guest, we need to be able to establish the virtual-physical mapping

Re: [PATCH 06/10] KVM: arm/arm64: vgic: Allow dynamic mapping of physical/virtual interrupts

2015-07-01 Thread Marc Zyngier
On 30/06/15 21:19, Christoffer Dall wrote: On Mon, Jun 08, 2015 at 06:04:01PM +0100, Marc Zyngier wrote: In order to be able to feed physical interrupts to a guest, we need to be able to establish the virtual-physical mapping between the two worlds. The mapping is kept in a rbtree, indexed

[PATCH 13/16] nvdimm: support NFIT_CMD_IMPLEMENTED function

2015-07-01 Thread Xiao Guangrong
__DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific Method) Function 0 is a query function. We do not support any function on root device and only 3 functions are support for NVDIMM device, NFIT_CMD_GET_CONFIG_SIZE, NFIT_CMD_GET_CONFIG_DATA and NFIT_CMD_SET_CONFIG_DATA, that means we

Re: [PATCH 8/9] kvm/x86: add sending hyper-v crash notification to user space

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: From: Andrey Smetanin asmeta...@virtuozzo.com Sending of notification is done by exiting vcpu to user space if KVM_REQ_HV_CRASH is enabled for vcpu. kvm_run structure will contains system_event with type KVM_SYSTEM_EVENT_CRASH and flag

Re: [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Denis V. Lunev
On 01/07/15 18:00, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: +#define HV_X64_MSR_CRASH_CTL_NOTIFY(1ULL 63) +#define HV_X64_MSR_CRASH_CTL_CONTENTS \ + (HV_X64_MSR_CRASH_CTL_NOTIFY) Why is HV_X64_MSR_CRASH_CTL_CONTENTS needed? Can I just remove

[kvm-ppc:kvm-ppc-queue 6/9] kernel/fork.c:99:0: warning: MAX_THREADS redefined

2015-07-01 Thread kbuild test robot
tree: git://github.com/agraf/linux-2.6.git kvm-ppc-queue head: cc75c6b1368c88977d6015fd67b02c85ee04e57c commit: c98d80c7b761a4b3bcbcc9314c4492f76585caa0 [6/9] KVM: PPC: Book3S HV: Implement dynamic micro-threading on POWER8 config: powerpc-defconfig (attached as .config) reproduce: wget

[PATCH 03/16] acpi: add aml_derefof

2015-07-01 Thread Xiao Guangrong
Implement DeRefOf term which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c

[PATCH 09/16] nvdimm: build ACPI NFIT table

2015-07-01 Thread Xiao Guangrong
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 tables: - SPA table, define the PMEM region info - MEM DEV table, it has the @handle which is used to associate specified ACPI NVDIMM device we will introduce in

[PATCH 00/16] implement vNVDIMM

2015-07-01 Thread Xiao Guangrong
== Background == NVDIMM (A Non-Volatile Dual In-line Memory Module) is going to be supported on Intel's platform. They are discovered via ACPI and configured by _DSM method of NVDIMM device in ACPI. There has some supporting documents which can be found at: ACPI 6:

[PATCH 08/16] nvdimm: init backend memory mapping and config data area

2015-07-01 Thread Xiao Guangrong
The parameter @file is used as backed memory for NVDIMM which is divided into two parts: - first parts is (0, size - 128K], which is used as PMEM (Persistent Memory) - 128K at the end of the file, which is used as Config Data Area, it's used to store Label namespace data The @file supports

[PATCH 06/16] pc: implement NVDIMM device abstract

2015-07-01 Thread Xiao Guangrong
Introduce pc-nvdimm device and it only has one parameter, @file, which is the backed memory file for NVDIMM device We can use -device pc-nvdimm,file=/dev/pmem in the Qemu command to create NVDIMM device for the guest Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com ---

[PATCH 02/16] i386/acpi-build: allow SSDT to operate on 64 bit

2015-07-01 Thread Xiao Guangrong
Only 512M is left for MMIO below 4G and that are used by PCI, BIOS etc. Other components also reserve regions from their internal usage, e.g, [0xFED0, 0xFED0 + 0x400) is reserved for HPET Switch SSDT to 64 bit to use the huge free room above 4G. In the later patches, we will dynamical

[PATCH 05/16] acpi: add aml_create_field

2015-07-01 Thread Xiao Guangrong
Implement CreateField term which are used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 15 insertions(+) diff --git a/hw/acpi/aml-build.c

[PATCH 04/16] acpi: add aml_sizeof

2015-07-01 Thread Xiao Guangrong
Implement SizeOf term which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c

[PATCH 01/16] acpi: allow aml_operation_region() working on 64 bit offset

2015-07-01 Thread Xiao Guangrong
Currently, the offset in OperationRegion is limited to 32 bit, extend it to 64 bit so that we can switch SSDT to 64 bit in later patch Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/acpi/aml-build.c | 2 +- include/hw/acpi/aml-build.h | 2 +- 2 files changed, 2

[PATCH 11/16] nvdimm: build ACPI nvdimm devices

2015-07-01 Thread Xiao Guangrong
NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices This is a root device under \_SB and specified NVDIMM device are under the root device. Each NVDIMM device has _ADR which return its handle used to associate MEMDEV table in NFIT We reserve handle 0 for root device. In this patch, we save

[PATCH 07/16] nvdimm: reserve address range for NVDIMM

2015-07-01 Thread Xiao Guangrong
NVDIMM reserves all the free range above 4G to do: - Persistent Memory (PMEM) mapping - implement NVDIMM ACPI device _DSM method Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/i386/pc.c | 11 +-- hw/mem/pc-nvdimm.c | 13 +

[PATCH 10/16] nvdimm: init the address region used by _DSM method

2015-07-01 Thread Xiao Guangrong
This memory range is used to transfer data between ACPI in guest and Qemu, it occupies two pages: - one is RAM-based used to save the input info of _DSM method and Qemu reuse it store output info - another one is MMIO-based, ACPI write data to this page to transfer the control to Qemu

[PATCH 16/16] nvdimm: support NFIT_CMD_SET_CONFIG_DATA

2015-07-01 Thread Xiao Guangrong
Function 6 is used to set Namespace Label Data Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/mem/pc-nvdimm.c | 37 + 1 file changed, 37 insertions(+) diff --git a/hw/mem/pc-nvdimm.c b/hw/mem/pc-nvdimm.c index 0498de3..0d2d9fb 100644 ---

[PATCH 15/16] nvdimm: support NFIT_CMD_GET_CONFIG_DATA

2015-07-01 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/mem/pc-nvdimm.c | 33 + 1 file changed, 33 insertions(+) diff --git a/hw/mem/pc-nvdimm.c b/hw/mem/pc-nvdimm.c index 7e5446c..0498de3 100644 ---

[PATCH 12/16] nvdimm: save arg3 for NVDIMM device _DSM method

2015-07-01 Thread Xiao Guangrong
Check if the function (Arg2) has additional input info (arg3) and save the info if needed We only do the save on NVDIMM device since we are not going to support any function on root device Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/mem/pc-nvdimm.c | 73

[PATCH 14/16] nvdimm: support NFIT_CMD_GET_CONFIG_SIZE function

2015-07-01 Thread Xiao Guangrong
Function 4 is used to get Namespace lable size Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com --- hw/mem/pc-nvdimm.c | 87 ++ 1 file changed, 87 insertions(+) diff --git a/hw/mem/pc-nvdimm.c b/hw/mem/pc-nvdimm.c index

Re: [PATCH 9/9] qemu/kvm: kvm hyper-v based guest crash event handling

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: +static int kvm_arch_handle_hv_crash(CPUState *cs) +{ +X86CPU *cpu = X86_CPU(cs); +CPUX86State *env = cpu-env; + +/* Mark that Hyper-v guest crash occurred */ +env-hv_crash_occurred = 1; This need not be a hv crash. You can

Re: [PATCH v3 0/9] HyperV equivalent of pvpanic driver

2015-07-01 Thread Denis V. Lunev
On 01/07/15 17:09, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to user

Re: [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: +#define HV_X64_MSR_CRASH_CTL_NOTIFY (1ULL 63) +#define HV_X64_MSR_CRASH_CTL_CONTENTS\ + (HV_X64_MSR_CRASH_CTL_NOTIFY) Why is HV_X64_MSR_CRASH_CTL_CONTENTS needed? Can I just remove it? Paolo -- To unsubscribe from

Re: [PATCH] MAINTAINERS: separate section for s390 virtio drivers

2015-07-01 Thread Paolo Bonzini
On 01/07/2015 17:15, Cornelia Huck wrote: The s390-specific virtio drivers have probably more to do with virtio than with kvm today; let's move them out into a separate section to reflect this and to be able to add relevant mailing lists. CC: Christian Borntraeger borntrae...@de.ibm.com

[PATCH] MAINTAINERS: separate section for s390 virtio drivers

2015-07-01 Thread Cornelia Huck
The s390-specific virtio drivers have probably more to do with virtio than with kvm today; let's move them out into a separate section to reflect this and to be able to add relevant mailing lists. CC: Christian Borntraeger borntrae...@de.ibm.com Signed-off-by: Cornelia Huck

Re: [PATCH 3/9] kvm: add hyper-v crash msrs values

2015-07-01 Thread Peter Hornyack
If userspace is controlling the crash capabilities then HV_X64_MSR_CRASH_CTL_CONTENTS is not needed. On Wed, Jul 1, 2015 at 8:53 AM, Denis V. Lunev d...@openvz.org wrote: On 01/07/15 18:00, Paolo Bonzini wrote: On 30/06/2015 13:33, Denis V. Lunev wrote: +#define HV_X64_MSR_CRASH_CTL_NOTIFY

Re: [PULL] virtio/vhost: cross endian support

2015-07-01 Thread Linus Torvalds
On Wed, Jul 1, 2015 at 2:31 AM, Michael S. Tsirkin m...@redhat.com wrote: virtio/vhost: cross endian support Ugh. Does this really have to be dynamic? Can't virtio do the sane thing, and just use a _fixed_ endianness? Doing a unconditional byte swap is faster and simpler than the crazy

Re: [PULL] virtio/vhost: cross endian support

2015-07-01 Thread Linus Torvalds
On Wed, Jul 1, 2015 at 12:02 PM, Linus Torvalds torva...@linux-foundation.org wrote: Doing a unconditional byte swap is faster and simpler than the crazy conditionals. Unconditional endianness not only makes for simpler and faster code, it also ends up being easier to debug and add things like

[PATCH v7 02/11] KVM: arm64: guest debug, define API headers

2015-07-01 Thread Alex Bennée
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 possible faulting address The type of debugging being used is controlled

Re: [PATCH 7/9] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers

2015-07-01 Thread Paolo Bonzini
On 30/06/2015 13:33, Denis V. Lunev wrote: +static int kvm_hv_msr_set_crash_ctl(struct kvm_vcpu *vcpu, u64 data, bool host) +{ + struct kvm_hv *hv = vcpu-kvm-arch.hyperv; + + if (host) + hv-hv_crash_ctl = data; + You need to check against

Re: [PATCH v3 06/11] KVM: arm: add trap handlers for 32-bit debug registers

2015-07-01 Thread zichao
On June 30, 2015 5:16:41 AM GMT+08:00, Christoffer Dall christoffer.d...@linaro.org wrote: On Mon, Jun 22, 2015 at 06:41:29PM +0800, Zhichao Huang wrote: Add handlers for all the 32-bit debug registers. Signed-off-by: Zhichao Huang zhichao.hu...@linaro.org ---

Re: [PATCH v3 04/11] KVM: arm: common infrastructure for handling AArch32 CP14/CP15

2015-07-01 Thread zichao
On June 30, 2015 3:43:34 AM GMT+08:00, Christoffer Dall christoffer.d...@linaro.org wrote: On Mon, Jun 22, 2015 at 06:41:27PM +0800, Zhichao Huang wrote: As we're about to trap a bunch of CP14 registers, let's rework the CP15 handling so it can be generalized and work with multiple tables.

Re: [PATCH v3 07/11] KVM: arm: add trap handlers for 64-bit debug registers

2015-07-01 Thread Zhichao Huang
On June 30, 2015 9:20:29 PM GMT+08:00, Christoffer Dall christoffer.d...@linaro.org wrote: On Mon, Jun 22, 2015 at 06:41:30PM +0800, Zhichao Huang wrote: Add handlers for all the 64-bit debug registers. There is an overlap between 32 and 64bit registers. Make sure that 64-bit registers

Re: [PATCH v3 01/11] KVM: arm: plug guest debug exploit

2015-07-01 Thread zichao
On June 29, 2015 11:49:53 PM GMT+08:00, Christoffer Dall christoffer.d...@linaro.org wrote: On Mon, Jun 22, 2015 at 06:41:24PM +0800, Zhichao Huang wrote: Hardware debugging in guests is not intercepted currently, it means that a malicious guest can bring down the entire machine by writing