Re: [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 01:16 AM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 08:54:13AM +0800, Xiao Guangrong wrote: > >>Check if the input Arg3 is valid then store it into dsm_in if needed > >> > >>Signed-off-by: Xiao

[PATCH] KVM: x86: MMU: Initialize force_pt_level before calling mapping_level()

2015-10-19 Thread Takuya Yoshikawa
Commit fd1369021878 ("KVM: x86: MMU: Move mapping_level_dirty_bitmap() call in mapping_level()") forgot to initialize force_pt_level to false in FNAME(page_fault)() before calling mapping_level() like nonpaging_map() does. This can sometimes result in forcing page table level mapping

Re: [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 12:39:24PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 02:05 AM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 08:54:14AM +0800, Xiao Guangrong wrote: > >>__DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific Method) > >> > >>Function 0 is a query

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: > We reserve the memory region 0xFF0 ~ 0xFFF0 for NVDIMM ACPI > which is used as: > - the first page is mapped as MMIO, ACPI write data to this page to > transfer the control to QEMU > > - the second page is RAM-based which

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-19 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: > Changelog in v3: > There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, > Michael for their valuable comments, the patchset finally gets better shape. Thanks! This needs some changes in coding style, and more

Re: [PATCH v4 28/33] nvdimm acpi: support DSM_FUN_IMPLEMENTED function

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 03:06 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 12:39:24PM +0800, Xiao Guangrong wrote: On 10/19/2015 02:05 AM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 08:54:14AM +0800, Xiao Guangrong wrote: __DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific

Re: [PATCH v3 26/32] nvdimm: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 02:50 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:58AM +0800, Xiao Guangrong wrote: Check if the input Arg3 is valid then store it into dsm_in if needed We only do the save on NVDIMM device since we are not going to support any function on root device

Re: [PATCH v3 26/32] nvdimm: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 03:14:28PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 02:50 PM, Michael S. Tsirkin wrote: > >On Sun, Oct 11, 2015 at 11:52:58AM +0800, Xiao Guangrong wrote: > >>Check if the input Arg3 is valid then store it into dsm_in if needed > >> > >>We only do the save on

Re: just an observation about USB

2015-10-19 Thread Gerd Hoffmann
On Fr, 2015-10-16 at 11:48 -0400, Eric S. Johansson wrote: > > On 10/16/2015 07:55 AM, Stefan Hajnoczi wrote: > > QEMU can emulate PCI soundcards, including the Intel HD Audio codec > > cards (-device intel-hda or -soundhw hda might do the trick). Low > > latency and power consumption are

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: > >>+nvdimm_init_memory_state(>nvdimm_memory, system_memory, > >>machine, > >>+ TARGET_PAGE_SIZE); > >>+ > > > >Shouldn't this be conditional on presence of the nvdimm device? > > > > We will

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: +nvdimm_init_memory_state(>nvdimm_memory, system_memory, machine, + TARGET_PAGE_SIZE); + Shouldn't this be conditional on presence of the

Re: [PATCH v2] kvm: Allow the Hyper-V vendor ID to be specified

2015-10-19 Thread Paolo Bonzini
On 16/10/2015 17:38, Alex Williamson wrote: > According to Microsoft documentation, the signature in the standard > hypervisor CPUID leaf at 0x4000 identifies the Vendor ID and is > for reporting and diagnostic purposes only. We can therefore allow > the user to change it to whatever they

Re: [PATCH v3 26/32] nvdimm: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:58AM +0800, Xiao Guangrong wrote: > Check if the input Arg3 is valid then store it into dsm_in 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

Re: [PATCH v3 00/32] implement vNVDIMM

2015-10-19 Thread Michael S. Tsirkin
On Tue, Oct 13, 2015 at 01:29:48PM +0800, Xiao Guangrong wrote: > > > On 10/12/2015 07:55 PM, Michael S. Tsirkin wrote: > >On Sun, Oct 11, 2015 at 11:52:32AM +0800, Xiao Guangrong wrote: > >>Changelog in v3: > >>There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, >

Re: [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 01:16 AM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 08:54:13AM +0800, Xiao Guangrong wrote: > >>Check if the input Arg3 is valid then store it into dsm_in if needed > >> > >>Signed-off-by: Xiao

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 02:56 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: We reserve the memory region 0xFF0 ~ 0xFFF0 for NVDIMM ACPI which is used as: - the first page is mapped as MMIO, ACPI write data to this page to transfer the control

Re: [PATCH v3 26/32] nvdimm: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 03:47 PM, Michael S. Tsirkin wrote: aml_arg(3) is used many times below. Pls give it a name that makes sense (not arg3! what is it for?) Er. aml_arg(3) is just the fourth parameter of _DSM method. Will add some comments: /* * The fourth parameter (Arg3) of _DMS is a

[PATCH 2/3] kvmtool/build: introduce GUEST_PRE_INIT target

2015-10-19 Thread Oleg Nesterov
This comes as a separate patch because I do not really understand /usr/bin/make, probably it should be updated. Change the main Makefile so that if an arch defines ARCH_PRE_INIT then we - build $GUEST_INIT without "-static" - add -DCONFIG_GUEST_PRE_INIT to $CFLAGS - build

[PATCH 3/3] kvmtool/x86: implement guest_pre_init

2015-10-19 Thread Oleg Nesterov
Add the tiny x86/init.S which just mounts /host and execs /virt/init. NOTE: of course, the usage of CONFIG_GUEST_PRE_INIT is ugly, we need to cleanup this code. But I'd prefer to do this on top of this minimal/simple change. And I think this needs cleanups in any case, for example I think lkvm

[PATCH 1/3] kvmtool/setup: Introduce extract_file() helper

2015-10-19 Thread Oleg Nesterov
Turn kvm_setup_guest_init(guestfs_name) into a more generic helper, extract_file(guestfs_name, filename, data, size) and reimplement kvm_setup_guest_init() as a trivial wrapper. Signed-off-by: Oleg Nesterov --- builtin-setup.c | 24 ++-- 1 file changed, 14

[PATCH 0/3] kvmtool: tiny init fox x86_64

2015-10-19 Thread Oleg Nesterov
Hello, Yesterday I discovered kvmtool and it looks really cool! Thanks! Looks like, it does exactly what I need. But the static /virt/init doesn't look good. This series lessens the size of lkvm binary from 1045952 to 196200 bytes on x86_64, but this is minor. I want to write my /virt/init in

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: > +nvdimm_init_memory_state(>nvdimm_memory, system_memory, > machine, > +

Re: Network hangs when communicating with host

2015-10-19 Thread Andre Przywara
Hi Dmitry, On 19/10/15 10:05, Dmitry Vyukov wrote: > On Fri, Oct 16, 2015 at 7:25 PM, Sasha Levin wrote: >> On 10/15/2015 04:20 PM, Dmitry Vyukov wrote: >>> Hello, >>> >>> I am trying to run a program in lkvm sandbox so that it communicates >>> with a program on host. I

[PATCH v2] kvm: x86: zero EFER on INIT

2015-10-19 Thread Paolo Bonzini
Not zeroing EFER means that a 32-bit firmware cannot enter paging mode without clearing EFER.LME first (which it should not know about). Yang Zhang from Intel confirmed that the manual is wrong and EFER is cleared to zero on INIT. Fixes: d28bc9dd25ce023270d2e039e7c98d38ecbf7758 Cc:

Re: [PATCH v2 2/2] KVM/arm: enable enhanced armv7 fp/simd lazy switch

2015-10-19 Thread Christoffer Dall
On Sat, Sep 26, 2015 at 04:43:29PM -0700, Mario Smarduch wrote: > This patch enhances current lazy vfp/simd hardware switch. In addition to > current lazy switch, it tracks vfp/simd hardware state with a vcpu > lazy flag. > > vcpu lazy flag is set on guest access and trap to vfp/simd hardware

Re: [PATCH v2 1/2] KVM/arm: add hooks for armv7 fp/simd lazy switch support

2015-10-19 Thread Christoffer Dall
On Sat, Sep 26, 2015 at 04:43:28PM -0700, Mario Smarduch wrote: > This patch adds vcpu fields to track lazy state, save host FPEXC, and > offsets to fields. > > Signed-off-by: Mario Smarduch > --- > arch/arm/include/asm/kvm_host.h | 6 ++ >

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Igor Mammedov
On Mon, 19 Oct 2015 09:56:12 +0300 "Michael S. Tsirkin" wrote: > On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: [...] > > diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h > > index f6bd2c4..aa95961 100644 > > --- a/include/hw/mem/nvdimm.h > > +++

Re: Network hangs when communicating with host

2015-10-19 Thread Dmitry Vyukov
On Mon, Oct 19, 2015 at 11:22 AM, Andre Przywara wrote: > Hi Dmitry, > > On 19/10/15 10:05, Dmitry Vyukov wrote: >> On Fri, Oct 16, 2015 at 7:25 PM, Sasha Levin wrote: >>> On 10/15/2015 04:20 PM, Dmitry Vyukov wrote: Hello, I am

Re: [PATCH] KVM: x86: MMU: Initialize force_pt_level before calling mapping_level()

2015-10-19 Thread Paolo Bonzini
On 19/10/2015 08:13, Takuya Yoshikawa wrote: > Commit fd1369021878 ("KVM: x86: MMU: Move mapping_level_dirty_bitmap() > call in mapping_level()") forgot to initialize force_pt_level to false > in FNAME(page_fault)() before calling mapping_level() like > nonpaging_map() does. This can sometimes

[PATCH] kvm: x86: zero EFER on INIT

2015-10-19 Thread Paolo Bonzini
Not zeroing EFER means that a 32-bit firmware cannot enter paging mode without clearing EFER.LME first (which it should not know about). Yang Zhang from Intel confirmed that the manual is wrong and EFER is cleared to zero on INIT. Fixes: d28bc9dd25ce023270d2e039e7c98d38ecbf7758 Cc:

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 06:01:17PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 05:46 PM, Igor Mammedov wrote: > >On Mon, 19 Oct 2015 12:17:22 +0300 > >"Michael S. Tsirkin" wrote: > > > >>On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: > >>> > >>> > >>>On

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Igor Mammedov
On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: > On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: > > > > > > On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: > > >On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: > > +

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao

KVM: don't pointlessly leave KVM_COMPAT=y in non-KVM configs

2015-10-19 Thread Jan Beulich
The symbol was missing a KVM dependency. Signed-off-by: Jan Beulich --- virt/kvm/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 4.3-rc6/virt/kvm/Kconfig +++ 4.3-rc6-KVM_COMPAT-dependency/virt/kvm/Kconfig @@ -46,4 +46,4 @@ config

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Igor Mammedov
On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: > > > On 10/19/2015 05:46 PM, Igor Mammedov wrote: > > On Mon, 19 Oct 2015 12:17:22 +0300 > > "Michael S. Tsirkin" wrote: > > > >> On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong

Re: sanitizing kvmtool

2015-10-19 Thread Dmitry Vyukov
On Sat, Oct 17, 2015 at 4:16 PM, Sasha Levin wrote: > On 10/15/2015 06:21 AM, Dmitry Vyukov wrote: >> Hello, >> >> I've run a set of sanitizers on >> git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git commit >> 3695adeb227813d96d9c41850703fb53a23845eb. I've

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: > On Mon, 19 Oct 2015 09:56:12 +0300 > "Michael S. Tsirkin" wrote: > > > On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: > [...] > > > diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h >

Re: KVM: don't pointlessly leave KVM_COMPAT=y in non-KVM configs

2015-10-19 Thread Paolo Bonzini
On 19/10/2015 12:37, Jan Beulich wrote: > The symbol was missing a KVM dependency. > > Signed-off-by: Jan Beulich > --- > virt/kvm/Kconfig |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- 4.3-rc6/virt/kvm/Kconfig > +++

Re: [PATCH 0/4] VFIO platform reset module rework

2015-10-19 Thread Arnd Bergmann
On Sunday 18 October 2015 18:00:11 Eric Auger wrote: > This series fixes the current implementation by getting rid of the > usage of __symbol_get which caused a compilation issue with > CONFIG_MODULES disabled. On top of this, the usage of MODULE_ALIAS makes > possible to add a new reset module

Re: [PATCH 1/4] vfio: platform: add capability to register a reset function

2015-10-19 Thread Arnd Bergmann
On Sunday 18 October 2015 18:00:12 Eric Auger wrote: > > +struct list_head reset_list; > +LIST_HEAD(reset_list); > These two should be marked 'static'. Arnd -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 1/3] arm/arm64: KVM: Fix arch timer behavior for disabled interrupts

2015-10-19 Thread Eric Auger
Hi Christoffer, On 10/17/2015 10:30 PM, Christoffer Dall wrote: > We have an interesting issue when the guest disables the timer interrupt > on the VGIC, which happens when turning VCPUs off using PSCI, for > example. > > The problem is that because the guest disables the virtual interrupt at >

Re: [PATCH 1/3] arm/arm64: KVM: Fix arch timer behavior for disabled interrupts

2015-10-19 Thread Christoffer Dall
On Mon, Oct 19, 2015 at 03:27:42PM +0200, Eric Auger wrote: > On 10/19/2015 03:14 PM, Christoffer Dall wrote: > > On Mon, Oct 19, 2015 at 03:07:16PM +0200, Eric Auger wrote: > >> Hi Christoffer, > >> On 10/17/2015 10:30 PM, Christoffer Dall wrote: > >>> We have an interesting issue when the guest

Re: [PATCH 2/4] vfio: platform: reset: calxedaxgmac: add reset function registration

2015-10-19 Thread Eric Auger
On 10/19/2015 03:25 PM, Arnd Bergmann wrote: > On Monday 19 October 2015 15:17:30 Eric Auger wrote: >> Hi Arnd, >> On 10/19/2015 03:04 PM, Arnd Bergmann wrote: >>> On Sunday 18 October 2015 18:00:13 Eric Auger wrote: diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c

Re: sanitizing kvmtool

2015-10-19 Thread Sasha Levin
On 10/19/2015 04:37 AM, Dmitry Vyukov wrote: >> So in this case (and most of the other data race cases described in the full >> log) it >> > seems like ThreadSanitizer is mixing with different accesses by the guest >> > to one underlying >> > block of memory on the host. >> > >> > Here, for

Re: Network hangs when communicating with host

2015-10-19 Thread Sasha Levin
On 10/19/2015 05:28 AM, Dmitry Vyukov wrote: > On Mon, Oct 19, 2015 at 11:22 AM, Andre Przywara > wrote: >> Hi Dmitry, >> >> On 19/10/15 10:05, Dmitry Vyukov wrote: >>> On Fri, Oct 16, 2015 at 7:25 PM, Sasha Levin wrote: On 10/15/2015 04:20

Re: [PATCH 2/4] vfio: platform: reset: calxedaxgmac: add reset function registration

2015-10-19 Thread Arnd Bergmann
On Sunday 18 October 2015 18:00:13 Eric Auger wrote: > diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c > b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c > index 619dc7d..4f76b17 100644 > --- a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c > +++

Re: [PATCH 1/3] arm/arm64: KVM: Fix arch timer behavior for disabled interrupts

2015-10-19 Thread Christoffer Dall
On Mon, Oct 19, 2015 at 03:07:16PM +0200, Eric Auger wrote: > Hi Christoffer, > On 10/17/2015 10:30 PM, Christoffer Dall wrote: > > We have an interesting issue when the guest disables the timer interrupt > > on the VGIC, which happens when turning VCPUs off using PSCI, for > > example. > > > >

Re: [PATCH 2/4] vfio: platform: reset: calxedaxgmac: add reset function registration

2015-10-19 Thread Eric Auger
Hi Arnd, On 10/19/2015 03:04 PM, Arnd Bergmann wrote: > On Sunday 18 October 2015 18:00:13 Eric Auger wrote: >> diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c >> b/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c >> index 619dc7d..4f76b17 100644 >> ---

Re: [PATCH 1/3] arm/arm64: KVM: Fix arch timer behavior for disabled interrupts

2015-10-19 Thread Eric Auger
On 10/19/2015 03:14 PM, Christoffer Dall wrote: > On Mon, Oct 19, 2015 at 03:07:16PM +0200, Eric Auger wrote: >> Hi Christoffer, >> On 10/17/2015 10:30 PM, Christoffer Dall wrote: >>> We have an interesting issue when the guest disables the timer interrupt >>> on the VGIC, which happens when

Re: [PATCH 2/4] vfio: platform: reset: calxedaxgmac: add reset function registration

2015-10-19 Thread Arnd Bergmann
On Monday 19 October 2015 15:17:30 Eric Auger wrote: > Hi Arnd, > On 10/19/2015 03:04 PM, Arnd Bergmann wrote: > > On Sunday 18 October 2015 18:00:13 Eric Auger wrote: > >> diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c > >>

[PATCH] kvmtool/term: unexport term_set_tty, term_init, term_exit

2015-10-19 Thread Oleg Nesterov
According to git grep they can be static. term_got_escape can be static too, and we can even move it into term_getc(). "int term_escape_char" doesn't make sense at least until we allow to redefine it, turn it into preprocessor constant. Signed-off-by: Oleg Nesterov ---

Re: sanitizing kvmtool

2015-10-19 Thread Dmitry Vyukov
On Mon, Oct 19, 2015 at 4:35 PM, Sasha Levin wrote: > On 10/19/2015 10:24 AM, Dmitry Vyukov wrote: >> On Mon, Oct 19, 2015 at 4:19 PM, Sasha Levin wrote: >>> > On 10/19/2015 04:37 AM, Dmitry Vyukov wrote: > >>> So in this case (and most of the

Re: [PATCH v2] kvm: x86: zero EFER on INIT

2015-10-19 Thread Radim Krčmář
2015-10-19 11:35+0200, Paolo Bonzini: > Not zeroing EFER means that a 32-bit firmware cannot enter paging mode > without clearing EFER.LME first (which it should not know about). > Yang Zhang from Intel confirmed that the manual is wrong and EFER is > cleared to zero on INIT. Also in APM v2,

Re: sanitizing kvmtool

2015-10-19 Thread Sasha Levin
On 10/19/2015 10:47 AM, Dmitry Vyukov wrote: >> Right, the memory areas that are accessed both by the hypervisor and the >> guest >> > should be treated as untrusted input, but the hypervisor is supposed to >> > validate >> > the input carefully before using it - so I'm not sure how data races

Re: sanitizing kvmtool

2015-10-19 Thread Dmitry Vyukov
On Mon, Oct 19, 2015 at 4:19 PM, Sasha Levin wrote: > On 10/19/2015 04:37 AM, Dmitry Vyukov wrote: >>> So in this case (and most of the other data race cases described in the >>> full log) it >>> > seems like ThreadSanitizer is mixing with different accesses by the guest

Re: sanitizing kvmtool

2015-10-19 Thread Sasha Levin
On 10/19/2015 10:24 AM, Dmitry Vyukov wrote: > On Mon, Oct 19, 2015 at 4:19 PM, Sasha Levin wrote: >> > On 10/19/2015 04:37 AM, Dmitry Vyukov wrote: >>> So in this case (and most of the other data race cases described in >>> the full log) it > >>> > seems

Re: sanitizing kvmtool

2015-10-19 Thread Dmitry Vyukov
On Mon, Oct 19, 2015 at 5:08 PM, Sasha Levin wrote: > On 10/19/2015 10:47 AM, Dmitry Vyukov wrote: >>> Right, the memory areas that are accessed both by the hypervisor and the >>> guest >>> > should be treated as untrusted input, but the hypervisor is supposed to >>> >

[PATCH] kvmtool/run: append cfg.kernel_cmdline at the end of real_cmdline

2015-10-19 Thread Oleg Nesterov
This allows the user to always override the paramaters set by lkvm. Say, currently 'lkvm run -p ro' doesn't work. To keep the current logic we need to change strstr("root=") to check cfg.kernel_cmdline, not real_cmdline. And perhaps we can even add a simple helper add_param(name, val) to make

Re: [PATCH 2/3] arm/arm64: KVM: Clear map->active on pend/active clear

2015-10-19 Thread Christoffer Dall
On Mon, Oct 19, 2015 at 05:32:42PM +0200, Eric Auger wrote: > Hi, > On 10/17/2015 10:30 PM, Christoffer Dall wrote: > > When a guest reboots or offlines/onlines CPUs, it is not uncommon for it > > to clear the pending and active states of an interrupt through the > > emulated VGIC distributor.

Re: [PATCH 2/3] arm/arm64: KVM: Clear map->active on pend/active clear

2015-10-19 Thread Eric Auger
On 10/19/2015 05:39 PM, Christoffer Dall wrote: > On Mon, Oct 19, 2015 at 05:32:42PM +0200, Eric Auger wrote: >> Hi, >> On 10/17/2015 10:30 PM, Christoffer Dall wrote: >>> When a guest reboots or offlines/onlines CPUs, it is not uncommon for it >>> to clear the pending and active states of an

Re: [PATCH 2/3] arm/arm64: KVM: Clear map->active on pend/active clear

2015-10-19 Thread Eric Auger
Hi, On 10/17/2015 10:30 PM, Christoffer Dall wrote: > When a guest reboots or offlines/onlines CPUs, it is not uncommon for it > to clear the pending and active states of an interrupt through the > emulated VGIC distributor. However, since we emulate an edge-triggered > based on a level-triggered

Re: [Qemu-devel] [kvm-unit-tests PATCHv4 3/3] arm: pmu: Add CPI checking

2015-10-19 Thread Christopher Covington
Hi Drew, I appreciate your feedback on these patches. On 10/18/2015 02:28 PM, Andrew Jones wrote: >> --- a/arm/pmu.c >> +++ b/arm/pmu.c >> @@ -37,6 +37,18 @@ static inline unsigned long get_pmccntr(void) >> asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (cycles)); >> return cycles;

Re: [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Dan Williams
On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > I mean don't use ASL to comment C. It's not more readable. > Describe why the code is the way it is. Use variables by preference, > C does not have

Re: [PATCH 0/7] userfault21 update

2015-10-19 Thread Andrea Arcangeli
Hello Patrick, On Mon, Oct 12, 2015 at 11:04:11AM -0400, Patrick Donnelly wrote: > Hello Andrea, > > On Mon, Jun 15, 2015 at 1:22 PM, Andrea Arcangeli wrote: > > This is an incremental update to the userfaultfd code in -mm. > > Sorry I'm late to this party. I'm curious how

Re: [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Dan Williams
On Mon, Oct 19, 2015 at 2:19 PM, Michael S. Tsirkin wrote: > On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote: >> On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: >> > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: >> > I

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Tue, Oct 20, 2015 at 01:54:12AM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 06:25 PM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: > >>On Mon, 19 Oct 2015 09:56:12 +0300 > >>"Michael S. Tsirkin" wrote: > >> > >>>On Sun, Oct

Re: [RFC PATCH 2/2] block: enable dax for raw block devices

2015-10-19 Thread Dan Williams
On Sun, Oct 18, 2015 at 8:01 PM, Ross Zwisler wrote: > On Fri, Oct 16, 2015 at 08:49:41PM -0400, Dan Williams wrote: >> If an application wants exclusive access to all of the persistent memory >> provided by an NVDIMM namespace it can use this raw-block-dax facility

Re: [PATCH v4 27/33] nvdimm acpi: save arg3 for NVDIMM device _DSM method

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 10:29:50AM -0700, Dan Williams wrote: > On Mon, Oct 19, 2015 at 12:09 AM, Michael S. Tsirkin wrote: > > On Mon, Oct 19, 2015 at 12:04:48PM +0800, Xiao Guangrong wrote: > > I mean don't use ASL to comment C. It's not more readable. > > Describe why the code

Re: [PATCH 1/4] vfio: platform: add capability to register a reset function

2015-10-19 Thread Alex Williamson
On Sun, 2015-10-18 at 18:00 +0200, Eric Auger wrote: > In preparation for subsequent changes in reset function lookup, > lets introduce a dynamic list of reset combos (compat string, > reset module, reset function). The list can be populated/voided with > two new functions,

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:42 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:25 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: On Mon, 19 Oct 2015 09:56:12 +0300 "Michael S. Tsirkin" wrote: On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: [...] diff --git

Re: [RFT - PATCH v2 0/2] KVM/arm64: add fp/simd lazy switch support

2015-10-19 Thread Mario Smarduch
On 10/18/2015 2:07 PM, Christoffer Dall wrote: > On Mon, Oct 12, 2015 at 09:29:23AM -0700, Mario Smarduch wrote: >> Hi Christoffer, Marc - >> I just threw this test your way without any explanation. > > I'm confused. Did you send me something somewhere already? Yes in the last patchset

Re: [PATCH v2 1/2] KVM/arm: add hooks for armv7 fp/simd lazy switch support

2015-10-19 Thread Mario Smarduch
On 10/19/2015 1:53 AM, Christoffer Dall wrote: > On Sat, Sep 26, 2015 at 04:43:28PM -0700, Mario Smarduch wrote: >> This patch adds vcpu fields to track lazy state, save host FPEXC, and >> offsets to fields. >> >> Signed-off-by: Mario Smarduch >> --- >>

Re: [PATCH v2 2/2] KVM/arm: enable enhanced armv7 fp/simd lazy switch

2015-10-19 Thread Mario Smarduch
On 10/19/2015 3:14 AM, Christoffer Dall wrote: > On Sat, Sep 26, 2015 at 04:43:29PM -0700, Mario Smarduch wrote: >> This patch enhances current lazy vfp/simd hardware switch. In addition to >> current lazy switch, it tracks vfp/simd hardware state with a vcpu >> lazy flag. >> >> vcpu lazy flag

Steal time accounting in KVM. Benchmark.

2015-10-19 Thread Alexey Makhalov
Hi, I did benchmarking of scheduler fairness with enabled steal time accounting(STA) in KVM. And results are really interesting. Looks like STA provides worse scheduler fairness against disabled STA (no-steal-acc cmdline param) I created benchmark, main idea is: 2 cgroups with cpu.shares

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:42 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at

Greetings,

2015-10-19 Thread Invesco Perpetual
Greetings, We the Invesco Investment Company, We invite you to partner with us and benefit in our new Loan and Project funding program. We offer flexible loans and funding for various projects by passing the usual rigorGreetings, We the Invesco Investment Company, We invite you to partner with