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
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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.
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
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
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.
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
__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
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
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
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
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
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
== 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:
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
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
---
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
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
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
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
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
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 +
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
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
---
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
---
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
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
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
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
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
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
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
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
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
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
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
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
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
---
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.
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
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
74 matches
Mail list logo