[PATCH][v2] KVM: PPC: e500: Emulate TMCFG0 TMRN register

2015-09-25 Thread Laurentiu Tudor
Emulate TMCFG0 TMRN register exposing one HW thread per vcpu. Signed-off-by: Mihai Caraman [laurentiu.tu...@freescale.com: rebased on latest kernel, use define instead of hardcoded value, moved code in own function] Signed-off-by: Laurentiu Tudor

Re: [PATCH v3 0/4] scsi: cleanup ioctl headers and provide UAPI versions

2015-09-25 Thread Christoph Hellwig
The whole series looks good to me. Thanks for picking this work up! Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH] KVM: nVMX: emulate the INVVPID instruction

2015-09-25 Thread Bandan Das
Paolo Bonzini writes: > On 24/09/2015 17:45, Bandan Das wrote: >> > However, I have applied the patch to kvm/queue. Please send the changes >> > separately, and I will squash them in the existing VPID patch. >> >> Please don't do this. It's making it really difficult to

Re: Questions about KVM TSC trapping

2015-09-25 Thread David Matlack
On Wed, Sep 23, 2015 at 5:55 PM, yangoliver wrote: > > David, > > Sorry for late reply. See my inline comments. > > > On Tue, 15 Sep 2015, David Matlack wrote: > >> On Tue, Sep 15, 2015 at 12:04 AM, Oliver Yang >> wrote: >> > Hi Guys, >> > >> >

Re: [PATCH v3 4/4] scsi: provide UAPI version of scsi/sg.h and scsi/scsi_ioctl.h

2015-09-25 Thread Bart Van Assche
On 09/25/2015 02:28 AM, Paolo Bonzini wrote: Provide a UAPI version of the header in the kernel, making it easier for interested projects to use an up-to-date version of the header. The new headers are placed under uapi/linux/ so as not to conflict with the glibc-provided headers in

[GIT PULL] KVM fixes for 4.3-rc3

2015-09-25 Thread Paolo Bonzini
Linus, The following changes since commit 00cc1633816de8c95f337608a1ea64e228faf771: sched: access local runqueue directly in single_task_running (2015-09-18 13:47:59 +0200) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to

Re: [PATCH v9 00/18] Add VT-d Posted-Interrupts support - including prerequisite series

2015-09-25 Thread Paolo Bonzini
On 25/09/2015 03:49, Wu, Feng wrote: > Hi Paolo, > > Thanks for your review on this series! I'd like to confirm this series (plus > the patch fixing the compilation error) is okay to you and I don't need to > do extra things for it, right? Yes, can you check if branch vtd-pi of

Re: [Qemu-devel] [PATCH 2/3] Hw: timer: Remove unnecessary variable

2015-09-25 Thread Peter Maydell
On 25 September 2015 at 01:37, Shraddha Barke wrote: > Compress lines and remove the variable ret. > > Change made using Coccinelle script > diff --git a/hw/timer/tusb6010.c b/hw/timer/tusb6010.c > index 459c748..ba01050 100644 > --- a/hw/timer/tusb6010.c > +++

[PATCH v3 1/4] KVM: arm/arm64: rename pause into power_off

2015-09-25 Thread Eric Auger
The kvm_vcpu_arch pause field is renamed into power_off to prepare for the introduction of a new pause field. Also vcpu_pause is renamed into vcpu_sleep since we will sleep until both power_off and pause are false. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall

[PATCH v3 3/4] KVM: arm/arm64: check power_off in critical section before VCPU run

2015-09-25 Thread Eric Auger
In case a vcpu off PSCI call is called just after we executed the vcpu_sleep check, we can enter the guest although power_off is set. Let's check the power_off state in the critical section, just before entering the guest. Signed-off-by: Eric Auger Reported-by: Christoffer

[PATCH v3 4/4] KVM: arm/arm64: implement kvm_arm_[halt,resume]_guest

2015-09-25 Thread Eric Auger
We introduce kvm_arm_halt_guest and resume functions. They will be used for IRQ forward state change. Halt is synchronous and prevents the guest from being re-entered. We use the same mechanism put in place for PSCI former pause, now renamed power_off. A new flag is introduced in arch vcpu state,

[PATCH v3 2/4] KVM: arm/arm64: check power_off in kvm_arch_vcpu_runnable

2015-09-25 Thread Eric Auger
kvm_arch_vcpu_runnable now also checks whether the power_off flag is set. Signed-off-by: Eric Auger Reviewed-by: Christoffer Dall --- arch/arm/kvm/arm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kvm/arm.c

[PATCH v3 0/4] KVM: arm/arm64: guest synchronous halt/resume

2015-09-25 Thread Eric Auger
This series introduces the capability to synchronously exit the guest and prevent it from being re-entered. This modality will be used by IRQ forwarding series when changing the state of the IRQ. Former pause flag used when starting the vcpu in KVM_ARM_VCPU_POWER_OFF state, in PSCI calls and in

Re: [RFC 0/2] VFIO: Add virtual MSI doorbell support.

2015-09-25 Thread Christoffer Dall
On Tue, Sep 22, 2015 at 11:09:14PM +0100, Marc Zyngier wrote: > On Tue, 4 Aug 2015 06:52:01 +0100 > Bhushan Bharat wrote: > > > > > > > > -Original Message- > > > From: Pranavkumar Sawargaonkar [mailto:pranavku...@linaro.org] > > > Sent: Tuesday, August

Re: [PATCH] KVM: PPC: e6500: support powers of 2K TLB1 sizes

2015-09-25 Thread Scott Wood
On Fri, 2015-09-25 at 17:30 +0300, Laurentiu Tudor wrote: > On 09/24/2015 11:23 PM, Scott Wood wrote: > > On Thu, 2015-09-24 at 15:57 +0300, Laurentiu Tudor wrote: > > > Book-E MMUv2 present in e6500 cores supports > > > powers of 2K page sizes while older MMUv1 cores > > > support only powers of

Re: [PATCH v3 5/5] KVM: arm64: Implement vGICv3 CPU interface access

2015-09-25 Thread Andre Przywara
On 24/09/15 13:08, Pavel Fedin wrote: > Hello! > >> The only thing that is pure 64-bit is the MRS/MSR _instruction_ in >> Aarch64, which always takes a x register. >> So can you model the register size according to the spec and allow >> 32-bit accesses from userland? > > I would like to

Re: [PATCH v3 5/5] KVM: arm64: Implement vGICv3 CPU interface access

2015-09-25 Thread Peter Maydell
On 25 September 2015 at 15:27, Andre Przywara wrote: > On 24/09/15 13:08, Pavel Fedin wrote: >> Hello! >> >>> The only thing that is pure 64-bit is the MRS/MSR _instruction_ in >>> Aarch64, which always takes a x register. >>> So can you model the register size according

Re: [PATCH v3 5/5] KVM: arm64: Implement vGICv3 CPU interface access

2015-09-25 Thread Marc Zyngier
On Fri, 25 Sep 2015 15:33:44 -0700 Peter Maydell wrote: > On 25 September 2015 at 15:27, Andre Przywara wrote: > > On 24/09/15 13:08, Pavel Fedin wrote: > >> Hello! > >> > >>> The only thing that is pure 64-bit is the MRS/MSR _instruction_ in >

Re: [PATCH v3 1/4] scsi: remove old-style type names from sg.h

2015-09-25 Thread Hannes Reinecke
On 09/25/2015 11:27 AM, Paolo Bonzini wrote: > These will not be exported by the new linux/sg.h header, and scsi/sg.h will > not have any user API after linux/sg.h is created. Since they have no > user in the kernel, they can be zapped. > > Cc: James Bottomley > Cc:

Re: [PATCH v3 3/4] scsi: move all obsolete ioctls to scsi_ioctl.h

2015-09-25 Thread Hannes Reinecke
On 09/25/2015 11:27 AM, Paolo Bonzini wrote: > Some are in scsi.h. Keep them together in preparation for exposing them > in UAPI headers. > > Cc: James Bottomley > Cc: Christoph Hellwig > Cc: linux-s...@vger.kernel.org > Reviewed-by: Bart Van Assche

Re: [PATCH v3 2/4] scsi: cleanup scsi/scsi_ioctl.h

2015-09-25 Thread Hannes Reinecke
On 09/25/2015 11:27 AM, Paolo Bonzini wrote: > SCSI_REMOVAL_* goes together with other SCSI command constants in > include/scsi/scsi.h. It is also used outside the implementation > of the ioctls (and it is not part of the user API). > > scsi_fctargaddress/Scsi_FCTargAddress has had no in-tree

Re: [PATCH v3 4/4] scsi: provide UAPI version of scsi/sg.h and scsi/scsi_ioctl.h

2015-09-25 Thread Hannes Reinecke
On 09/25/2015 11:27 AM, Paolo Bonzini wrote: > Provide a UAPI version of the header in the kernel, making it easier > for interested projects to use an up-to-date version of the header. > > The new headers are placed under uapi/linux/ so as not to conflict > with the glibc-provided headers in

Re: [PATCH] KVM: x86: fix bogus warning about reserved bits

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 12:12, Borislav Petkov wrote: > On Thu, Sep 24, 2015 at 11:23:08AM +0800, Xiao Guangrong wrote: >>> +static inline bool >>> +boot_cpu_is_amd(void) >>> +{ >>> + WARN_ON_ONCE(!tdp_enabled); >>> + return shadow_x_mask != 0; >> >> shadow_x_mask != 0 is Intel's CPU. >> >> Borislav,

Re: [PATCH] KVM: nVMX: emulate the INVVPID instruction

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 17:45, Bandan Das wrote: > > However, I have applied the patch to kvm/queue. Please send the changes > > separately, and I will squash them in the existing VPID patch. > > Please don't do this. It's making it really difficult to review these > patches individually :( Why not let

[PATCH 1/3] Target-microblaze: Remove unnecessary variable

2015-09-25 Thread Shraddha Barke
Compress lines and remove the variable . Change made using Coccinelle script @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by:

[PATCH 3/3] Target-ppc: Remove unnecessary variable

2015-09-25 Thread Shraddha Barke
Compress lines and remove the variable. Change made using Coccinelle script @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by:

[PATCH 2/3] Hw: timer: Remove unnecessary variable

2015-09-25 Thread Shraddha Barke
Compress lines and remove the variable ret. Change made using Coccinelle script @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by:

Re: [PATCH 1/2] KVM: introduce __vmx_flush_tlb to handle specific vpid

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 18:12, Bandan Das wrote: > Not sure myself what's the right thing to do but this may be undesirable > in a nested environment. Assuming the processor supports global invalidation > only, this seems like a easy way for the nested guest to invalidate *all* > mappings - even the L1

Re: [PATCH] KVM: disable halt_poll_ns as default for s390x

2015-09-25 Thread Paolo Bonzini
On 24/09/2015 13:06, Christian Borntraeger wrote: > Am 18.09.2015 um 13:29 schrieb Paolo Bonzini: >> >> >> On 18/09/2015 12:54, Christian Borntraeger wrote: -/* halt polling only reduces halt latency by 5-7 us, 500us is enough */ -static unsigned int halt_poll_ns = 50; +/*

Re: [PATCH v2] Fix AF_PACKET ABI breakage in 4.2

2015-09-25 Thread Greg Kurz
On Thu, 24 Sep 2015 12:50:59 +0300 "Michael S. Tsirkin" wrote: > On Thu, Sep 24, 2015 at 09:25:45AM +0200, Greg Kurz wrote: > > On Wed, 23 Sep 2015 19:45:08 +0100 > > David Woodhouse wrote: > > > > > Commit 7d82410950aa ("virtio: add explicit big-endian

[kvm:vtd-pi 34/38] arch/x86/kvm/vmx.c:609:16: sparse: symbol 'vcpu_to_pi_desc' was not declared. Should it be static?

2015-09-25 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/virt/kvm/kvm.git vtd-pi head: 7690a83389ca993040950b6ed7b4b5efbd50a782 commit: 2d579d1d9677512d50d00f5864344331add3f9bc [34/38] KVM: x86: Update IRTE for posted-interrupts reproduce: # apt-get install sparse git checkout

[PATCH kvm] KVM: x86: vcpu_to_pi_desc() can be static

2015-09-25 Thread kbuild test robot
Signed-off-by: Fengguang Wu --- vmx.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 4480752..c1833e1 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -606,7 +606,7 @@ static inline

[PATCH v3 2/4] scsi: cleanup scsi/scsi_ioctl.h

2015-09-25 Thread Paolo Bonzini
SCSI_REMOVAL_* goes together with other SCSI command constants in include/scsi/scsi.h. It is also used outside the implementation of the ioctls (and it is not part of the user API). scsi_fctargaddress/Scsi_FCTargAddress has had no in-tree use since commit ca61f10ab2b8 ("[SCSI] remove broken

[PATCH v3 0/4] scsi: cleanup ioctl headers and provide UAPI versions

2015-09-25 Thread Paolo Bonzini
This is v3 of the series to provide an "official" sg.h header (and scsi_ioctl.h too, though it's basically obsolete) together with the other userspace API definitions. The change from v2 to v3 is that defaults for sg.c are not exported in include/uapi/linux/sg.c. Paolo 2.5.0 -- To unsubscribe

[PATCH v3 4/4] scsi: provide UAPI version of scsi/sg.h and scsi/scsi_ioctl.h

2015-09-25 Thread Paolo Bonzini
Provide a UAPI version of the header in the kernel, making it easier for interested projects to use an up-to-date version of the header. The new headers are placed under uapi/linux/ so as not to conflict with the glibc-provided headers in /usr/include/scsi. /dev/sgN default values are

[PATCH v3 1/4] scsi: remove old-style type names from sg.h

2015-09-25 Thread Paolo Bonzini
These will not be exported by the new linux/sg.h header, and scsi/sg.h will not have any user API after linux/sg.h is created. Since they have no user in the kernel, they can be zapped. Cc: James Bottomley Cc: Christoph Hellwig Cc:

[PATCH v3 3/4] scsi: move all obsolete ioctls to scsi_ioctl.h

2015-09-25 Thread Paolo Bonzini
Some are in scsi.h. Keep them together in preparation for exposing them in UAPI headers. Cc: James Bottomley Cc: Christoph Hellwig Cc: linux-s...@vger.kernel.org Reviewed-by: Bart Van Assche Signed-off-by: Paolo Bonzini

[PATCH v2] KVM: arm/arm64: BUG FIX: Do not inject spurious interrupts

2015-09-25 Thread Pavel Fedin
Commit 71760950bf3dc796e5e53ea3300dec724a09f593 ("arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn") introduced vgic_queue_irq_to_lr() function with additional vgic_dist_irq_is_pending() check before setting LR_STATE_PENDING bit. In some cases it started causing the following situation if the

RE: [PATCH] KVM: arm/arm64: BUG FIX: Do not inject spurious interrupts

2015-09-25 Thread Pavel Fedin
Hello! > The alternative is to just call compute_pending which does nothing more > than a few bitwise and/or operations plus a couple of handfuls of > load/stores on this IRQ injection path, so I don't see the problem doing > this. I looked at it, convinced. After all, resetting pending_on_cpu