RE: [PATCH v3 0/8] KVM-VFIO IRQ forward control

2014-11-24 Thread Wu, Feng
> -Original Message- > From: Eric Auger [mailto:eric.au...@linaro.org] > Sent: Monday, November 24, 2014 2:36 AM > To: eric.au...@st.com; eric.au...@linaro.org; christoffer.d...@linaro.org; > marc.zyng...@arm.com; linux-arm-ker...@lists.infradead.org; > kvm...@lists.cs.columbia.edu; kvm@v

Re: [PATCH v3 0/8] KVM-VFIO IRQ forward control

2014-11-24 Thread Eric Auger
On 11/24/2014 09:14 AM, Wu, Feng wrote: > > >> -Original Message- >> From: Eric Auger [mailto:eric.au...@linaro.org] >> Sent: Monday, November 24, 2014 2:36 AM >> To: eric.au...@st.com; eric.au...@linaro.org; christoffer.d...@linaro.org; >> marc.zyng...@arm.com; linux-arm-ker...@lists.inf

RE: [PATCH v3 0/8] KVM-VFIO IRQ forward control

2014-11-24 Thread Wu, Feng
> -Original Message- > From: Eric Auger [mailto:eric.au...@linaro.org] > Sent: Monday, November 24, 2014 4:27 PM > To: Wu, Feng; eric.au...@st.com; christoffer.d...@linaro.org; > marc.zyng...@arm.com; linux-arm-ker...@lists.infradead.org; > kvm...@lists.cs.columbia.edu; kvm@vger.kernel.or

Re: [RFC PATCH 0/6] ARM64: KVM: PMU infrastructure support

2014-11-24 Thread Anup Patel
On Fri, Nov 21, 2014 at 5:19 PM, Christoffer Dall wrote: > On Fri, Nov 21, 2014 at 04:06:05PM +0530, Anup Patel wrote: >> Hi Christoffer, >> >> On Fri, Nov 21, 2014 at 3:29 PM, Christoffer Dall >> wrote: >> > On Thu, Nov 20, 2014 at 08:17:32PM +0530, Anup Patel wrote: >> >> On Wed, Nov 19, 2014 a

Re: [question] lots of interrupts injected to vm when pressingsomekey w/o releasing

2014-11-24 Thread Zhang Haoyu
>On Thu, Nov 20, 2014 at 02:59:36PM +0800, Zhang Haoyu wrote: >> >On 20/11/2014 03:20, Zhang Haoyu wrote: >> >> Hi all, >> >> >> >> If I press the one of "Insert/Delete/Home/End/PageUp/PageDown/UpArrow/ >> >> DownArrow/LeftArrow/RightArrow" key w/o releasing, then lots of interrupts >> >> will be

Re: linux-next: build failure after merge of the kvm tree

2014-11-24 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/11/2014 07:19, Stephen Rothwell wrote: > Hi all, > > After merging the kvm tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > ERROR: "get_xsave_addr" [arch/x86/kvm/kvm.ko] undefined! > > Caused by commit 1d7fe1d1fb

[PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending

2014-11-24 Thread Christoffer Dall
When 'injecting' an edge-triggered interrupt with a falling edge we shouldn't clear the pending state on the distributor. In fact, we don't, because the check in vgic_validate_injection would prevent us from ever reaching this bit of code. Remove the unreachable snippet. Signed-off-by: Christoff

Re: [PATCH v4 0/3] irqfd support for arm/arm64

2014-11-24 Thread Christoffer Dall
On Sun, Nov 23, 2014 at 06:56:57PM +0100, Eric Auger wrote: > This patch series enables irqfd on arm and arm64. > > Irqfd framework enables to inject a virtual IRQ into a guest upon an > eventfd trigger. User-side uses KVM_IRQFD VM ioctl to provide KVM with > a kvm_irqfd struct that associates a V

Re: [PATCH v4 1/3] KVM: arm/arm64: unset CONFIG_HAVE_KVM_IRQCHIP

2014-11-24 Thread Christoffer Dall
On Sun, Nov 23, 2014 at 06:56:58PM +0100, Eric Auger wrote: > CONFIG_HAVE_KVM_IRQCHIP is needed to support IRQ routing (along > with irq_comm.c and irqchip.c usage). This is not the case for > arm/arm64 currently. > > This patch unsets the flag for both arm and arm64. > > Signed-off-by: Eric Auge

Re: [PATCH v4 2/3] KVM: arm: add irqfd support

2014-11-24 Thread Christoffer Dall
On Sun, Nov 23, 2014 at 06:56:59PM +0100, Eric Auger wrote: > This patch enables irqfd on arm. > > Both irqfd and resamplefd are supported. Injection is implemented > in vgic.c without routing. > > This patch enables CONFIG_HAVE_KVM_EVENTFD and CONFIG_HAVE_KVM_IRQFD. > > KVM_CAP_IRQFD is now adv

Re: [PATCH v4 3/3] KVM: arm64: add irqfd support

2014-11-24 Thread Christoffer Dall
On Sun, Nov 23, 2014 at 06:57:00PM +0100, Eric Auger wrote: > From: Joel Schopp > > This patch enables irqfd for arm64. > > Signed-off-by: Joel Schopp > Signed-off-by: Eric Auger > > --- > > [Eric Auger] > - originates from Joel's [RFC PATCH] arm64: KVM: add irqfd support > http://www.spin

[PATCH] KVM: x86: export get_xsave_addr

2014-11-24 Thread Paolo Bonzini
get_xsave_addr is the API to access XSAVE states, and KVM would like to use it. Export it. Cc: x...@kernel.org Cc: H. Peter Anvin Signed-off-by: Paolo Bonzini --- Peter, can you please ACK this for inclusion in the KVM tree? Thanks. --- arch/x86/kernel/xsave.c | 1 + 1 file cha

Re: [PATCH] KVM: x86: Remove FIXMEs in emulate.c

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 05:25, Nicholas Krause wrote: > Remove fixme comments about needing fault addresses to be returned. These > are propaagated from walk_addr_generic to gva_to_gpa and from there to > ops->read_std and ops->write_std. > > Signed-off-by: Nicholas Krause > --- > arch/x86/kvm/emulate.

Re: [PATCH v4 0/3] irqfd support for arm/arm64

2014-11-24 Thread Eric Auger
On 11/24/2014 10:47 AM, Christoffer Dall wrote: > On Sun, Nov 23, 2014 at 06:56:57PM +0100, Eric Auger wrote: >> This patch series enables irqfd on arm and arm64. >> >> Irqfd framework enables to inject a virtual IRQ into a guest upon an >> eventfd trigger. User-side uses KVM_IRQFD VM ioctl to prov

Re: Another Obsolete Fix me in trace.h?

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 05:36, nick wrote: > Greetings Again Gleb and others, > I am assuming in the code I am pasting below the fix me is obsolete now and I > can remove it. :) > Cheers Nick > TP_printk("%s (0x%x)", > __print_symbolic(__entry->exception, kvm_trace_sym_exc), >

Re: [CFT PATCH 2/2] KVM: x86: support XSAVES usage in the host

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 03:10, Wanpeng Li wrote: > Hi Paolo, > On Fri, Nov 21, 2014 at 07:31:18PM +0100, Paolo Bonzini wrote: > [...] >> +u64 feature = valid & -valid; >> +int index = fls64(feature) - 1; >> +void *src = get_xsave_addr(xsave, feature); >> + >> +

Re: Another Obsolete Fix me in trace.h?

2014-11-24 Thread Jan Kiszka
On 2014-11-24 11:12, Paolo Bonzini wrote: > On 24/11/2014 05:36, nick wrote: >> Greetings Again Gleb and others, >> I am assuming in the code I am pasting below the fix me is obsolete now and >> I can remove it. :) >> Cheers Nick >> TP_printk("%s (0x%x)", >> __print_symbolic(__en

Re: [PATCH] KVM: x86: export get_xsave_addr

2014-11-24 Thread Thomas Gleixner
On Mon, 24 Nov 2014, Paolo Bonzini wrote: > get_xsave_addr is the API to access XSAVE states, and KVM would > like to use it. Export it. > > Cc: x...@kernel.org > Cc: H. Peter Anvin > Signed-off-by: Paolo Bonzini > --- > Peter, can you please ACK this for inclusion in the KVM tree? Are y

Re: [PATCH] KVM: x86: export get_xsave_addr

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 11:45, Thomas Gleixner wrote: > On Mon, 24 Nov 2014, Paolo Bonzini wrote: >> get_xsave_addr is the API to access XSAVE states, and KVM would >> like to use it. Export it. >> >> Cc: x...@kernel.org >> Cc: H. Peter Anvin >> Signed-off-by: Paolo Bonzini >> --- >> Peter, can you

Re: [RFC 0/4] vgic additions for forwarded irq

2014-11-24 Thread Christoffer Dall
On Sun, Nov 23, 2014 at 07:12:49PM +0100, Eric Auger wrote: > This series applies on top of "ARM: Forwarding physical > interrupts to a guest VM" (http://lwn.net/Articles/603514/) > series. Marc and Eric, Does it make sense to review and look at these patches given the current state of the forwar

Re: [RFC 0/4] vgic additions for forwarded irq

2014-11-24 Thread Marc Zyngier
On 24/11/14 10:50, Christoffer Dall wrote: > On Sun, Nov 23, 2014 at 07:12:49PM +0100, Eric Auger wrote: >> This series applies on top of "ARM: Forwarding physical >> interrupts to a guest VM" (http://lwn.net/Articles/603514/) >> series. > > Marc and Eric, > > Does it make sense to review and loo

Re: [PATCH v4 2/3] KVM: arm: add irqfd support

2014-11-24 Thread Eric Auger
On 11/24/2014 11:00 AM, Christoffer Dall wrote: > On Sun, Nov 23, 2014 at 06:56:59PM +0100, Eric Auger wrote: >> This patch enables irqfd on arm. >> >> Both irqfd and resamplefd are supported. Injection is implemented >> in vgic.c without routing. >> >> This patch enables CONFIG_HAVE_KVM_EVENTFD an

Re: [RFC 0/4] vgic additions for forwarded irq

2014-11-24 Thread Eric Auger
On 11/24/2014 11:54 AM, Marc Zyngier wrote: > On 24/11/14 10:50, Christoffer Dall wrote: >> On Sun, Nov 23, 2014 at 07:12:49PM +0100, Eric Auger wrote: >>> This series applies on top of "ARM: Forwarding physical >>> interrupts to a guest VM" (http://lwn.net/Articles/603514/) >>> series. >> >> Marc

Re: [PATCH v4 1/3] KVM: arm/arm64: unset CONFIG_HAVE_KVM_IRQCHIP

2014-11-24 Thread Will Deacon
On Sun, Nov 23, 2014 at 05:56:58PM +, Eric Auger wrote: > CONFIG_HAVE_KVM_IRQCHIP is needed to support IRQ routing (along > with irq_comm.c and irqchip.c usage). This is not the case for > arm/arm64 currently. > > This patch unsets the flag for both arm and arm64. > > Signed-off-by: Eric Auge

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Peter Maydell
On 24 November 2014 at 11:16, Alex Bennée wrote: ^^^ :-) > Alex Bennée writes: >> * KVM ioctl KVM_GET_DEBUGREGS >> >> This is currently x86 only and looks like it's more aimed at debug >> registers than capability stuff. Also I'm not sure what the state of >> this ioctl is compared to KVM_SET_G

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alex Bennée
Fixed CC:kvmarm, Added: Alexander Graf, Fixed: my From: Replying to myself with additional information on each option Alex Bennée writes: > Hi, > > I've almost finished the ARMv8 guest debug support but I have one > problem left to solve. userspace needs to know how many hardware debug > regis

Re: [CFT PATCH 0/2] KVM: support XSAVES usage in the host

2014-11-24 Thread Paolo Bonzini
On 23/11/2014 09:16, Nadav Amit wrote: > I’ll try to check it tomorrow (I don’t have access to the failing machine at > the moment). Thanks, you'll need to squash this in: diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index 4c540c4719d8..0de1fae2bdf0 100644 --- a/arch/x86/kern

[PATCH v3 40/41] vhost/scsi: partial virtio 1.0 support

2014-11-24 Thread Michael S. Tsirkin
Include all endian conversions as required by virtio 1.0. Don't set virtio 1.0 yet, since that requires ANY_LAYOUT which we don't yet support. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/scsi.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/d

[PATCH v3 31/41] vhost/net: suppress compiler warning

2014-11-24 Thread Michael S. Tsirkin
len is always initialized since function is called with size > 0. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 984242e..54ffbb0 100644 --- a/drivers/vhost/net.c +++ b/

[PATCH v3 27/41] vhost: make features 64 bit

2014-11-24 Thread Michael S. Tsirkin
We need to use bit 32 for virtio 1.0 Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index b9032e8..1f321fd 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h

[PATCH v3 29/41] vhost/net: larger header for virtio 1.0

2014-11-24 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index cae22f9..1ac58d0 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -1027,7 +1027,8 @@ static int vhost_net_se

[PATCH v3 26/41] vhost: virtio 1.0 endian-ness support

2014-11-24 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 93 +++ 1 file changed, 56 insertions(+), 37 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index c90f437..4d379ed 100644 --- a/drivers/vhost/vhost.c +++ b/drive

[PATCH v3 30/41] vhost/net: enable virtio 1.0

2014-11-24 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 1ac58d0..984242e 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -61,7 +61,8 @@ MODULE_PARM_DESC(experiment

[PATCH v3 25/41] vhost/net: force len for TX to host endian

2014-11-24 Thread Michael S. Tsirkin
We use native endian-ness internally but never expose it to guest. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 8dae2f7..dce5c58 100644 --- a/drivers/vhost/

[PATCH v3 28/41] vhost/net: virtio 1.0 byte swap

2014-11-24 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index dce5c58..cae22f9 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -416,7 +416,7 @@ static void ha

[PATCH v3 24/41] vhost: add memory access wrappers

2014-11-24 Thread Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.h | 33 - 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index 3eda654..b9032e8 100644 --- a/drivers/vhost/vhost.h +++ b/drivers/vhost/vhost.h @@

Re: [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending

2014-11-24 Thread Andre Przywara
Hej Christoffer, On 24/11/14 09:41, Christoffer Dall wrote: > When 'injecting' an edge-triggered interrupt with a falling edge we > shouldn't clear the pending state on the distributor. In fact, we > don't, because the check in vgic_validate_injection would prevent us > from ever reaching this bi

Re: [question] lots of interrupts injected to vm when pressing some key w/o releasing

2014-11-24 Thread Zhang Haoyu
>Hi all, > >If I press the one of "Insert/Delete/Home/End/PageUp/PageDown/UpArrow/ >DownArrow/LeftArrow/RightArrow" key w/o releasing, then lots of interrupts >will be injected to vm(win7/win2008), about 8000/s, the system become very >slow, >bringing very bad experience. But the other keys are ok

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 12:21 PM, Peter Maydell wrote: > On 24 November 2014 at 11:16, Alex Bennée > > wrote: > > ^^^ :-) > >> Alex Bennée writes: >>> * KVM ioctl KVM_GET_DEBUGREGS >>> >>> This is currently x86 only and looks like it's more aimed at debug >>> registers than capability stuff. Als

Re: [question] lots of interrupts injected to vm when pressing some key w/o releasing

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 13:17, Zhang Haoyu wrote: >> Hi all, >> >> If I press the one of "Insert/Delete/Home/End/PageUp/PageDown/UpArrow/ >> DownArrow/LeftArrow/RightArrow" key w/o releasing, then lots of interrupts >> will be injected to vm(win7/win2008), about 8000/s, the system become very >> slow, >>

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alexander Graf
On 24.11.14 12:35, Alex Bennée wrote: > > Fixed CC:kvmarm, Added: Alexander Graf, Fixed: my From: > > Replying to myself with additional information on each option > > Alex Bennée writes: > >> Hi, >> >> I've almost finished the ARMv8 guest debug support but I have one >> problem left to solv

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Peter Maydell
On 24 November 2014 at 12:26, Alexander Graf wrote: > On 24.11.14 12:35, Alex Bennée wrote: >>> * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1) >> Nope, guest state API > > What's the problem with using ONE_REG for this? After all, the total > number of available guest debug register is a guest vcpu prop

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alexander Graf
> Am 24.11.2014 um 13:32 schrieb Peter Maydell : > >> On 24 November 2014 at 12:26, Alexander Graf wrote: >> On 24.11.14 12:35, Alex Bennée wrote: * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1) >>> Nope, guest state API >> >> What's the problem with using ONE_REG for this? After all, the total

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Peter Maydell
On 24 November 2014 at 12:41, Alexander Graf wrote: >> Am 24.11.2014 um 13:32 schrieb Peter Maydell : >> Yes, but we don't want to know about properties of the guest >> vCPU. In an ideal world QEMU could reserve say half the debug >> registers for debugging the VM on startup and have KVM expose >>

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alexander Graf
On 24.11.14 13:44, Peter Maydell wrote: > On 24 November 2014 at 12:41, Alexander Graf wrote: >>> Am 24.11.2014 um 13:32 schrieb Peter Maydell : >>> Yes, but we don't want to know about properties of the guest >>> vCPU. In an ideal world QEMU could reserve say half the debug >>> registers for de

Re: [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 12:04:11PM +, Andre Przywara wrote: > Hej Christoffer, > > On 24/11/14 09:41, Christoffer Dall wrote: > > When 'injecting' an edge-triggered interrupt with a falling edge we > > shouldn't clear the pending state on the distributor. In fact, we > > don't, because the ch

[patch] kvm: x86: potential shift wrapping bug

2014-11-24 Thread Dan Carpenter
cs.base is declared as a __u64 variable and vector is a u32 so this causes a static checker warning. I'm not very familiar with this code but my understanding is that the user can set "sipi_vector" to any u32 value in kvm_vcpu_ioctl_x86_set_vcpu_events(). Signed-off-by: Dan Carpenter diff --git

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alex Bennée
Alexander Graf writes: >> Am 24.11.2014 um 13:32 schrieb Peter Maydell : >> >>> On 24 November 2014 at 12:26, Alexander Graf wrote: >>> On 24.11.14 12:35, Alex Bennée wrote: > * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1) Nope, guest state API >>> >>> What's the problem with using ONE_REG

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 1:51 PM, Alexander Graf wrote: > > > On 24.11.14 13:44, Peter Maydell wrote: >> On 24 November 2014 at 12:41, Alexander Graf wrote: Am 24.11.2014 um 13:32 schrieb Peter Maydell : Yes, but we don't want to know about properties of the guest vCPU. In an ideal

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 1:53 PM, Alex Bennée wrote: > > Alexander Graf writes: > >>> Am 24.11.2014 um 13:32 schrieb Peter Maydell : >>> On 24 November 2014 at 12:26, Alexander Graf wrote: On 24.11.14 12:35, Alex Bennée wrote: >> * KVM ioctl GET_ONE_REG(ID_AA64DFR0_EL1) > Nope,

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alexander Graf
On 24.11.14 13:53, Christoffer Dall wrote: > On Mon, Nov 24, 2014 at 1:51 PM, Alexander Graf wrote: >> >> >> On 24.11.14 13:44, Peter Maydell wrote: >>> On 24 November 2014 at 12:41, Alexander Graf wrote: > Am 24.11.2014 um 13:32 schrieb Peter Maydell : > Yes, but we don't want to know

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 1:56 PM, Alexander Graf wrote: > > > On 24.11.14 13:53, Christoffer Dall wrote: >> On Mon, Nov 24, 2014 at 1:51 PM, Alexander Graf wrote: >>> >>> >>> On 24.11.14 13:44, Peter Maydell wrote: On 24 November 2014 at 12:41, Alexander Graf wrote: >> Am 24.11.2014 um 1

Re: [patch] kvm: x86: potential shift wrapping bug

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 13:53, Dan Carpenter wrote: > cs.base is declared as a __u64 variable and vector is a u32 so this > causes a static checker warning. I'm not very familiar with this code > but my understanding is that the user can set "sipi_vector" to any u32 > value in kvm_vcpu_ioctl_x86_set_vcpu_

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alex Bennée
Alex Bennée writes: > Alex Bennée writes: > >> Hi, >> >> I've almost finished the ARMv8 guest debug support but I have one >> problem left to solve. userspace needs to know how many hardware debug >> registers are available for GDB to use. This information is available >> from the ID_AA64DFR0_

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Alexander Graf
On 24.11.14 14:10, Christoffer Dall wrote: > On Mon, Nov 24, 2014 at 1:56 PM, Alexander Graf wrote: >> >> >> On 24.11.14 13:53, Christoffer Dall wrote: >>> On Mon, Nov 24, 2014 at 1:51 PM, Alexander Graf wrote: On 24.11.14 13:44, Peter Maydell wrote: > On 24 November 2014 at

Re: [PATCH] kvm: x86: move assigned-dev.c and iommu.c to arch/x86/

2014-11-24 Thread Radim Krčmář
2014-11-22 17:22+0100, Paolo Bonzini: > On 21/11/2014 22:21, Radim Krčmář wrote: > > - struct kvm_assigned_dev_kernel depends on struct kvm_irq_ack_notifier > > kvm_assign_device and kvm_deassign_device can also be moved to arch/x86, > in a new assigned-dev.h header. The header could include str

Re: [PATCH] kvm: x86: move ioapic.c and irq_comm.c back to arch/x86/

2014-11-24 Thread Eric Auger
On 11/20/2014 02:42 PM, Paolo Bonzini wrote: > ia64 does not need them anymore. > > Signed-off-by: Paolo Bonzini > --- > arch/x86/include/asm/kvm_host.h | 16 > arch/x86/kvm/Makefile | 5 ++--- > {virt => arch/x86}/kvm/ioapic.c | 0 > {virt => arch/x86}/kvm/ioa

Re: [PATCH v3 26/41] vhost: virtio 1.0 endian-ness support

2014-11-24 Thread Cedric Le Goater
Hi Michael, Do you have a tree from where I could pull these patches ? Thanks, C. On 11/24/2014 12:54 PM, Michael S. Tsirkin wrote: > Signed-off-by: Michael S. Tsirkin > --- > drivers/vhost/vhost.c | 93 > +++ > 1 file changed, 56 insertions(+

Re: [RFC PATCH 0/6] ARM64: KVM: PMU infrastructure support

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 02:14:48PM +0530, Anup Patel wrote: > On Fri, Nov 21, 2014 at 5:19 PM, Christoffer Dall > wrote: > > On Fri, Nov 21, 2014 at 04:06:05PM +0530, Anup Patel wrote: > >> Hi Christoffer, > >> > >> On Fri, Nov 21, 2014 at 3:29 PM, Christoffer Dall > >> wrote: > >> > On Thu, Nov

Re: Exposing host debug capabilities to userspace

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 03:07:35PM +0100, Alexander Graf wrote: > > > On 24.11.14 14:10, Christoffer Dall wrote: > > On Mon, Nov 24, 2014 at 1:56 PM, Alexander Graf wrote: > >> > >> > >> On 24.11.14 13:53, Christoffer Dall wrote: > >>> On Mon, Nov 24, 2014 at 1:51 PM, Alexander Graf wrote: > >>

Re: [CFT PATCH 0/2] KVM: support XSAVES usage in the host

2014-11-24 Thread Nadav Amit
> On Nov 24, 2014, at 13:39, Paolo Bonzini wrote: > > > > On 23/11/2014 09:16, Nadav Amit wrote: >> I’ll try to check it tomorrow (I don’t have access to the failing machine at >> the moment). > > Thanks, you'll need to squash this in: > > diff --git a/arch/x86/kernel/xsave.c b/arch/x86/ker

Re: [PATCH v4 2/3] KVM: arm: add irqfd support

2014-11-24 Thread Christoffer Dall
On Mon, Nov 24, 2014 at 12:02 PM, Eric Auger wrote: > On 11/24/2014 11:00 AM, Christoffer Dall wrote: >> On Sun, Nov 23, 2014 at 06:56:59PM +0100, Eric Auger wrote: >>> This patch enables irqfd on arm. >>> >>> Both irqfd and resamplefd are supported. Injection is implemented >>> in vgic.c without

Re: [CFT PATCH 0/2] KVM: support XSAVES usage in the host

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 16:28, Nadav Amit wrote: > Since kvm_load_guest_fpu is called before the guest_fpu is ever stored, there > are 2 more problems that currently cause #GP: > 1. XCOMP_BV[63] = 0 > 2. XSTATE_BV sets a bit (including bit 63) that is not set in XCOMP_BV > (XCOMP_BV is initialised to zer

[CFT PATCH v2 1/2] kvm: x86: mask out XSAVES

2014-11-24 Thread Paolo Bonzini
This feature is not supported inside KVM guests yet, because we do not emulate MSR_IA32_XSS. Mask it out. Cc: Nadav Amit Signed-off-by: Paolo Bonzini --- arch/x86/kvm/cpuid.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpu

[CFT PATCH v2 2/2] KVM: x86: support XSAVES usage in the host

2014-11-24 Thread Paolo Bonzini
Userspace is expecting non-compacted format for KVM_GET_XSAVE, but struct xsave_struct might be using the compacted format. Convert in order to preserve userspace ABI. Likewise, userspace is passing non-compacted format for KVM_SET_XSAVE but the kernel will pass it to XRSTORS, and we need to conv

[CFT PATCH v2 0/2] KVM: support XSAVES usage in the host

2014-11-24 Thread Paolo Bonzini
The first patch ensures that XSAVES is not exposed in the guest until we emulate MSR_IA32_XSS. The second exports XSAVE data in the correct format. I tested these on a non-XSAVES system so they should not be completely broken, but I need some help. I am not even sure which XSAVE states are _not_

Re: [PATCH] kvm: x86: move ioapic.c and irq_comm.c back to arch/x86/

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 15:26, Eric Auger wrote: >> > +#ifdef __KVM_HAVE_IOAPIC >> > +void kvm_vcpu_request_scan_ioapic(struct kvm *kvm); >> > +#else >> > +static inline void kvm_vcpu_request-scan_ioapic(struct kvm *kvm) > Hi Paolo, > > you have a typo above: "-" instead of "_". Indeed, thanks. The fixe

Re: [CFT PATCH 0/2] KVM: support XSAVES usage in the host

2014-11-24 Thread Paolo Bonzini
On 24/11/2014 16:28, Nadav Amit wrote: > > Since kvm_load_guest_fpu is called before the guest_fpu is ever stored, there > are 2 more problems that currently cause #GP: > 1. XCOMP_BV[63] = 0 > 2. XSTATE_BV sets a bit (including bit 63) that is not set in XCOMP_BV > (XCOMP_BV is initialised to

Re: [PATCH v4 0/3] irqfd support for arm/arm64

2014-11-24 Thread Andre Przywara
Hi, On 24/11/14 10:10, Eric Auger wrote: > On 11/24/2014 10:47 AM, Christoffer Dall wrote: >> On Sun, Nov 23, 2014 at 06:56:57PM +0100, Eric Auger wrote: >>> This patch series enables irqfd on arm and arm64. >>> >>> Irqfd framework enables to inject a virtual IRQ into a guest upon an >>> eventfd t

Re: [CFT PATCH 0/2] KVM: support XSAVES usage in the host

2014-11-24 Thread Nadav Amit
> On Nov 24, 2014, at 19:53, Paolo Bonzini wrote: > > > > On 24/11/2014 16:28, Nadav Amit wrote: >> >> Since kvm_load_guest_fpu is called before the guest_fpu is ever stored, >> there are 2 more problems that currently cause #GP: >> 1. XCOMP_BV[63] = 0 >> 2. XSTATE_BV sets a bit (including b

Re: [PATCH v14 3/7] KVM: x86: switch to kvm_get_dirty_log_protect

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:19 AM, Christoffer Dall wrote: > On Thu, Nov 13, 2014 at 05:57:44PM -0800, Mario Smarduch wrote: >> From: Paolo Bonzini >> >> We now have a generic function that does most of the work of >> kvm_vm_ioctl_get_dirty_log, now use it. >> >> Signed-off-by: Mario Smarduch >> --- >> arc

Re: [PATCH v14 6/7] KVM: arm: dirty logging write protect support

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:40 AM, Christoffer Dall wrote: > On Thu, Nov 13, 2014 at 05:57:47PM -0800, Mario Smarduch wrote: >> Add support to track dirty pages between user space KVM_GET_DIRTY_LOG ioctl >> calls. We call kvm_get_dirty_log_protect() function to do most of the work. >> >> Reviewed-by: Marc Zyn

Re: [PATCH v14 5/7] KVM: arm: Add initial dirty page locking support

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:33 AM, Christoffer Dall wrote: > On Thu, Nov 13, 2014 at 05:57:46PM -0800, Mario Smarduch wrote: >> Add support for initial write protection of VM memslots. This patch >> series assumes that huge PUDs will not be used in 2nd stage tables, which is >> always valid on ARMv7. >> >> Si

Fix Penguin Penalty 17th October2014 ( mail-archive.com )

2014-11-24 Thread hungering78393
Dear Sir Did your website get hit by Google Penguin update on October 17th 2014? What basically is Google Penguin Update? It is actually a code name for Google algorithm which aims at decreasing your websites search engine rankings that violate Google’s guidelines by using black hat SEO techniq

[PULL v2 02/15] pc: kvm: check if KVM has free memory slots to avoid abort()

2014-11-24 Thread Michael S. Tsirkin
From: Igor Mammedov When more memory devices are used than available KVM memory slots, QEMU crashes with: kvm_alloc_slot: no free slot available Aborted (core dumped) Fix this by checking that KVM has a free slot before attempting to map memory in guest address space. Signed-off-by: Igor Mamme

[PULL v2 05/15] memory: expose alignment used for allocating RAM as MemoryRegion API

2014-11-24 Thread Michael S. Tsirkin
From: Igor Mammedov introduce memory_region_get_alignment() that returns underlying memory block alignment or 0 if it's not relevant/implemented for backend. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/exec/exec-all.h | 2 +- inc

Re: [RESEND PATCH v14 7/7] KVM: arm: page logging 2nd stage fault handling

2014-11-24 Thread Mario Smarduch
On 11/22/2014 11:53 AM, Christoffer Dall wrote: > On Fri, Nov 14, 2014 at 01:54:44PM -0800, Mario Smarduch wrote: >> This patch adds support for handling 2nd stage page faults during migration, >> it disables faulting in huge pages, and dissolves huge pages to page tables. >> In case migration is c

KVM call for agenda for 2014-11-24

2014-11-24 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Thanks, Juan. Call details: 15:00 CEST 13:00 UTC 09:00 EDT Every two weeks By popular demand, a google calendar public entry with it https://www.google.com/calendar/embed?src=dG9iMXRqcXAzN3Y4ZXZwNzRoMHE4a3BqcXNAZ3JvdXAuY

Re: [PATCH v3 26/41] vhost: virtio 1.0 endian-ness support

2014-11-24 Thread Michael S. Tsirkin
On Mon, Nov 24, 2014 at 03:28:26PM +0100, Cedric Le Goater wrote: > Hi Michael, > > Do you have a tree from where I could pull these patches ? > > Thanks, > > C. Yes - vhost-next that linux-next includes. -- MST -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of

Re: [PATCH v3 6/8] KVM: kvm-vfio: wrapper to VFIO external API device helpers

2014-11-24 Thread Alex Williamson
On Sun, 2014-11-23 at 19:35 +0100, Eric Auger wrote: > Provide wrapper functions that allow KVM-VFIO device code to > interact with a vfio device: > - kvm_vfio_device_get_external_user gets a handle to a struct > vfio_device from the vfio device file descriptor and increments > its reference co

Re: [PATCH v3 8/8] KVM: arm: kvm-vfio: forwarding control

2014-11-24 Thread Alex Williamson
On Sun, 2014-11-23 at 19:36 +0100, Eric Auger wrote: > This patch sets __KVM_HAVE_ARCH_KVM_VFIO_FORWARD and implements > kvm_arch_vfio_set_forward for ARM. > > As a result the KVM-VFIO device now allows to forward/unforward a > VFIO device IRQ on ARM. > > kvm_arch_vfio_set_forward programs both g

Re: [PATCH v3 7/8] KVM: kvm-vfio: generic forwarding control

2014-11-24 Thread Alex Williamson
On Sun, 2014-11-23 at 19:35 +0100, Eric Auger wrote: > This patch introduces a new KVM_DEV_VFIO_DEVICE group. > > This is a new control channel which enables KVM to cooperate with > viable VFIO devices. > > Functions are introduced to check the validity of a VFIO device > file descriptor, increme

Re: Another Obsolete Fix me in trace.h?

2014-11-24 Thread Radim Krčmář
2014-11-24 11:40+0100, Jan Kiszka: > On 2014-11-24 11:12, Paolo Bonzini wrote: > > On 24/11/2014 05:36, nick wrote: > >> Greetings Again Gleb and others, > >> I am assuming in the code I am pasting below the fix me is obsolete now > >> and I can remove it. :) > >> Cheers Nick > >> TP_printk("%s (0

Using blktap2/blktap3 under KVM?

2014-11-24 Thread Zhuan Chen
Hi, I was wondering whether it is possible to use blktap2 or blktap3 (from the tools of Xen) as the block devices for KVM? Both blktap2 and blktap3 are the tools from Xen as the block devices. They are all outside of Xen. According to the blktap3 wiki page, blktap3 even does not require any kerne

Re: [PATCH v2 3/3] KVM: arm/arm64: Enable Dirty Page logging for ARMv8

2014-11-24 Thread Mario Smarduch
On 11/22/2014 12:02 PM, Christoffer Dall wrote: > On Sat, Nov 15, 2014 at 12:19:10AM -0800, m.smard...@samsung.com wrote: >> From: Mario Smarduch >> >> This patch enables ARMv8 ditry page logging support. Plugs ARMv8 into generic >> layer through Kconfig symbol, and drops earlier ARM64 constraints

Re: Another Obsolete Fix me in trace.h?

2014-11-24 Thread Steven Rostedt
On Mon, 24 Nov 2014 22:00:01 +0100 Radim Krčmář wrote: > 2014-11-24 11:40+0100, Jan Kiszka: > > On 2014-11-24 11:12, Paolo Bonzini wrote: > > > On 24/11/2014 05:36, nick wrote: > > >> Greetings Again Gleb and others, > > >> I am assuming in the code I am pasting below the fix me is obsolete now

[RFC PATCH 0/5] ARM: KVM: Enable the ioeventfd capability of KVM on ARM

2014-11-24 Thread Nikolay Nikolaev
The IOEVENTFD KVM capability is a prerequisite for vhost support, and is also used to implement improved interrupt handling in VFIO drivers. This series enables the ioeventfd KVM capability on ARM. The implementation routes MMIO access in the IO abort handler to the KVM IO bus. If there is alread

[RFC PATCH 3/5] KVM: ARM VGIC add kvm_io_bus_ frontend

2014-11-24 Thread Nikolay Nikolaev
In io_mem_abort remove the call to vgic_handle_mmio. The target is to have a single MMIO handling path - that is through the kvm_io_bus_ API. Register a kvm_io_device in kvm_vgic_init on the whole vGIC MMIO region. Both read and write calls are redirected to vgic_io_dev_access where kvm_exit_mmio

[RFC PATCH 5/5] ARM: enable KVM_CAP_IOEVENTFD

2014-11-24 Thread Nikolay Nikolaev
KVM on arm will support the eventfd extension. Signed-off-by: Nikolay Nikolaev --- arch/arm/kvm/arm.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index c3d0fbd..266b618 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c @@ -197,6 +197,9

[RFC PATCH 4/5] ARM: enable linking against eventfd and irqchip

2014-11-24 Thread Nikolay Nikolaev
This enables compilation of the eventfd feature on ARM. Signed-off-by: Nikolay Nikolaev --- arch/arm/kvm/Kconfig |1 + arch/arm/kvm/Makefile |2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/kvm/Kconfig b/arch/arm/kvm/Kconfig index 466bd29..a4b0312 100644 ---

[RFC PATCH 1/5] KVM: redesing kvm_io_bus_ API to pass VCPU structure to the callbacks.

2014-11-24 Thread Nikolay Nikolaev
This is needed in e.g. ARM vGIC emulation, where the MMIO handling depends on the VCPU that does the access. Signed-off-by: Nikolay Nikolaev --- arch/ia64/kvm/kvm-ia64.c |4 ++-- arch/powerpc/kvm/powerpc.c |4 ++-- arch/s390/kvm/diag.c |2 +- arch/x86/kvm/vmx.c |2

[RFC PATCH 2/5] ARM: on IO mem abort - route the call to KVM MMIO bus

2014-11-24 Thread Nikolay Nikolaev
On IO memory abort, try to handle the MMIO access thorugh the KVM registered read/write callbacks. This is done by invoking the relevant kvm_io_bus_* API. Signed-off-by: Nikolay Nikolaev --- arch/arm/kvm/mmio.c | 33 + 1 file changed, 33 insertions(+) diff --gi

Re: Another Obsolete Fix me in trace.h?

2014-11-24 Thread Radim Krčmář
2014-11-24 16:19-0500, Steven Rostedt: > On Mon, 24 Nov 2014 22:00:01 +0100 > Radim Krčmář wrote: > > > 2014-11-24 11:40+0100, Jan Kiszka: > > The format string has to be a string literal[1]; we could change it to > > allow expressions[2], but what we want is almost possible through a > > direct

Re: [RESEND PATCH v14 7/7] KVM: arm: page logging 2nd stage fault handling

2014-11-24 Thread Mario Smarduch
On 11/24/2014 12:02 PM, Mario Smarduch wrote: > On 11/22/2014 11:53 AM, Christoffer Dall wrote: >> On Fri, Nov 14, 2014 at 01:54:44PM -0800, Mario Smarduch wrote: >>> This patch adds support for handling 2nd stage page faults during migration, >>> it disables faulting in huge pages, and dissolves h

Re: [question] lots of interrupts injected to vm when pressing somekey w/o releasing

2014-11-24 Thread Zhang Haoyu
>>> Hi all, >>> >>> If I press the one of "Insert/Delete/Home/End/PageUp/PageDown/UpArrow/ >>> DownArrow/LeftArrow/RightArrow" key w/o releasing, then lots of interrupts >>> will be injected to vm(win7/win2008), about 8000/s, the system become very >>> slow, >>> bringing very bad experience. But t

RE: [PATCH v3 7/8] KVM: kvm-vfio: generic forwarding control

2014-11-24 Thread Wu, Feng
> -Original Message- > From: Eric Auger [mailto:eric.au...@linaro.org] > Sent: Monday, November 24, 2014 2:36 AM > To: eric.au...@st.com; eric.au...@linaro.org; christoffer.d...@linaro.org; > marc.zyng...@arm.com; linux-arm-ker...@lists.infradead.org; > kvm...@lists.cs.columbia.edu; kvm@v

Re: [question] lots of interrupts injected to vm when pressing somekey w/o releasing

2014-11-24 Thread Paolo Bonzini
On 25/11/2014 02:54, Zhang Haoyu wrote: > I tested win-server-2008 with "-cpu > core2duo,hv_spinlocks=0x,hv_relaxed,hv_time", > this problem still happened, about 200,000 vmexits per-second, > bringing very bad experience, just like being stuck. Please upload a full trace somewhere, or at

Re: [PATCH v4 4/6] hw_random: fix unregister race.

2014-11-24 Thread Amos Kong
On Wed, Nov 12, 2014 at 02:33:00PM +1030, Rusty Russell wrote: > Amos Kong writes: > > From: Rusty Russell > > > > The previous patch added one potential problem: we can still be > > reading from a hwrng when it's unregistered. Add a wait for zero > > in the hwrng_unregister path. > > > > v4: ad