Re: [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio.

2012-08-10 Thread Heiko Carstens
On Thu, Aug 09, 2012 at 12:41:57PM +0200, Cornelia Huck wrote: > On Thu, 09 Aug 2012 13:03:57 +0300 > Avi Kivity wrote: > > > On 08/07/2012 05:52 PM, Cornelia Huck wrote: > > > Running under a kvm host does not necessarily imply the presence of > > > a page mapped above the main memory with the v

[PATCH] KVM: fix build warning within __kvm_set_memory_region() on s390

2011-01-17 Thread Heiko Carstens
From: Heiko Carstens Get rid of this warning: CC arch/s390/kvm/../../../virt/kvm/kvm_main.o arch/s390/kvm/../../../virt/kvm/kvm_main.c:596:12: warning: 'kvm_create_dirty_bitmap' defined but not used The only caller of the function is within a !CONFIG_S390 section, so add the

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-09 Thread Heiko Carstens
On Fri, Dec 09, 2011 at 12:23:36PM +0100, Carsten Otte wrote: > This patch introduces an interface to access the guest visible > storage keys. It supports three operations that model the behavior > that SSKE/ISKE/RRBE instructions would have if they were issued by > the guest. These instructions ar

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-09 Thread Heiko Carstens
On Fri, Dec 09, 2011 at 01:49:35PM +0100, Carsten Otte wrote: > This patch introduces an interface to access the guest visible > storage keys. It supports three operations that model the behavior > that SSKE/ISKE/RRBE instructions would have if they were issued by > the guest. These instructions ar

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-11 Thread Heiko Carstens
On Sat, Dec 10, 2011 at 01:35:39PM +0100, Carsten Otte wrote: > This patch introduces an interface to access the guest visible > storage keys. It supports three operations that model the behavior > that SSKE/ISKE/RRBE instructions would have if they were issued by > the guest. These instructions ar

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-15 Thread Heiko Carstens
On Thu, Dec 15, 2011 at 11:28:03AM +0100, Carsten Otte wrote: > New version below. Changes: > - __pmdp_for_addr and ptep_for_addr now take a vma as argument > - check if a vma exists has moved to gmap_fault and kvm_s390_keyop > - kvm_s390_keyop verifies that a vma is writable so that it's safe to >

Re: [patch 10/12] [PATCH] kvm-s390: storage key interface

2011-12-15 Thread Heiko Carstens
On Thu, Dec 15, 2011 at 05:49:19PM +0100, Christian Borntraeger wrote: > On 15/12/11 17:11, Heiko Carstens wrote: > > Why again is this needed? Or put in other words: what prevents a guest to > > change the storage key contents via sske of a page that is mapped read-only > > i

Re: [patch 3/3] kvm-s390: provide general purpose registers via kvm_run

2011-12-22 Thread Heiko Carstens
On Thu, Dec 22, 2011 at 12:56:49PM +0100, Christian Borntraeger wrote: > From: Christian Borntraeger > > The general purpose registers are often necessary to handle SIE exits. > Avoid additional ioctls by providing the guest registers in the r/w > section of the kvm_run structure. > > Signed-of

Re: [PATCH 3/3] kvm-s390: provide standard guest registers via kvm_run

2012-01-04 Thread Heiko Carstens
On Tue, Jan 03, 2012 at 04:50:58PM +0100, Christian Borntraeger wrote: > struct kvm_sync_rw_regs { > + __u64 gprs[16];/* general purpose registers */ > + s390_fp_regs fpregs; > + unsigned int acrs[16]; So, if I got this right, userspace is allowed to map this shar

[PATCH] kvm: add missing void __user * cast to access_ok() call

2011-05-23 Thread Heiko Carstens
From: Heiko Carstens fa3d315a "KVM: Validate userspace_addr of memslot when registered" introduced this new warning onn s390: kvm_main.c: In function '__kvm_set_memory_region': kvm_main.c:654:7: warning: passing argument 1 of '__access_ok' makes pointer from in

Re: [RFC 2/2] KVM: s390: add floating irq controller

2013-07-29 Thread Heiko Carstens
On Fri, Jul 26, 2013 at 06:47:59PM +0200, Jens Freimann wrote: > This patch adds a floating irq controller as a kvm_device. > It will be necesary for migration of floating interrupts as well > as for hardening the reset code by allowing user space to explicitly > remove all pending floating interru

Re: [PATCH 2/2] KVM: s390: add floating irq controller

2013-07-31 Thread Heiko Carstens
On Wed, Jul 31, 2013 at 11:08:15AM +0200, Cornelia Huck wrote: > On Mon, 29 Jul 2013 15:59:53 +0200 > Jens Freimann wrote: > > > This patch adds a floating irq controller as a kvm_device. > > It will be necesary for migration of floating interrupts as well > > as for hardening the reset code by a

Re: [GIT PULL] KVM changes for 3.12

2013-09-04 Thread Heiko Carstens
On Wed, Sep 04, 2013 at 06:08:08PM -0700, Linus Torvalds wrote: > On Tue, Sep 3, 2013 at 5:10 AM, Gleb Natapov wrote: > > > > This pull request adds tlb_gather_mmu() caller in S390 code, but 2b047252 > > in your tree added another parameter to the function, so the patch bellow > > have to be appli

Re: [RFC][patch 3/6] KVM: s390: Add GISA support

2014-09-04 Thread Heiko Carstens
On Thu, Sep 04, 2014 at 12:52:26PM +0200, frank.blasc...@de.ibm.com wrote: > +void kvm_s390_gisa_register_alert(struct kvm *kvm, u32 gisc) > +{ > + int bito = BITS_PER_BYTE * 7 + gisc; > + > + set_bit(bito ^ (BITS_PER_LONG - 1), &kvm->arch.iam); > +} Just a very minor nit: you could also u

Re: [GIT PULL 1/2] KVM: s390/facilities: allow TOD-CLOCK steering facility bit

2014-10-02 Thread Heiko Carstens
On Wed, Oct 01, 2014 at 08:27:38PM +0200, Christian Borntraeger wrote: > On 10/01/2014 04:17 PM, Alexander Graf wrote: > > > > > > On 01.10.14 16:02, Christian Borntraeger wrote: > >> There is nothing to do for KVM to support TOD-CLOCK steering. > >> > >> Signed-off-by: Christian Borntraeger > >

Re: [GIT PULL 10/11] KVM: s390: handle pending local interrupts via bitmap

2014-12-01 Thread Heiko Carstens
On Fri, Nov 28, 2014 at 02:25:38PM +0100, Christian Borntraeger wrote: > +static int __must_check __deliver_mchk_floating(struct kvm_vcpu *vcpu, > +struct kvm_s390_interrupt_info *inti) > +{ > + struct kvm_s390_mchk_info *mchk = &inti->mchk; > + int r

Re: [PATCH v2 2/7] s390/kvm: Add support for machine checks.

2012-09-05 Thread Heiko Carstens
On Tue, Sep 04, 2012 at 05:13:25PM +0200, Cornelia Huck wrote: Just some quick comments: [...] > int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code) > { > struct kvm_s390_local_interrupt *li = &vcpu->arch.local_int; > @@ -648,6 +747,12 @@ int kvm_s390_inject_vm(struct kvm *k

Re: [PATCH v2 3/5] KVM: s390: adapter interrupt sources

2014-03-18 Thread Heiko Carstens
On Mon, Mar 17, 2014 at 07:11:37PM +0100, Cornelia Huck wrote: > Add a new interface to register/deregister sources of adapter interrupts > identified by an unique id via the flic. Adapters may also be maskable > and carry a list of pinned pages. > > These adapters will be used by irq routing late

Re: [GIT PULL 1/6] KVM: s390: Handle MVPG partial execution interception

2014-04-30 Thread Heiko Carstens
On Tue, Apr 29, 2014 at 03:36:43PM +0200, Christian Borntraeger wrote: > +static int handle_mvpg_pei(struct kvm_vcpu *vcpu) > +{ > + unsigned long hostaddr, srcaddr, dstaddr; > + psw_t *psw = &vcpu->arch.sie_block->gpsw; > + struct mm_struct *mm = current->mm; > + int reg1, reg2, rc

[PATCH] kvm: fix compile warnings on s390

2009-09-03 Thread Heiko Carstens
From: Heiko Carstens CC arch/s390/kvm/../../../virt/kvm/kvm_main.o arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function '__kvm_set_memory_region': arch/s390/kvm/../../../virt/kvm/kvm_main.c:485: warning: unused variable 'j' arch/s390/kvm/../../../virt/kvm/kvm

Re: [PATCH 2/3] S390: Add virtio hotplug add support

2010-08-25 Thread Heiko Carstens
On Tue, Aug 24, 2010 at 03:48:51PM +0200, Alexander Graf wrote: > +static void hotplug_devices(struct work_struct *dummy) > +{ > + unsigned int i; > + struct kvm_device_desc *d; > + struct device *dev; > + > + for (i = 0; i < PAGE_SIZE; i += desc_size(d)) { This should be

Re: [PATCH 2/3] S390: Add virtio hotplug add support

2010-08-25 Thread Heiko Carstens
On Wed, Aug 25, 2010 at 10:20:03AM +0200, Alexander Graf wrote: > On 25.08.2010, at 10:16, Heiko Carstens wrote: > > On Tue, Aug 24, 2010 at 03:48:51PM +0200, Alexander Graf wrote: > >> +static void hotplug_devices(struct work_struct *dummy) > >> +{ > >&g

Re: [PATCH 2/3] S390: Add virtio hotplug add support

2010-08-25 Thread Heiko Carstens
On Wed, Aug 25, 2010 at 10:34:29AM +0200, Alexander Graf wrote: > On 25.08.2010, at 10:35, Heiko Carstens wrote: > > On Wed, Aug 25, 2010 at 10:20:03AM +0200, Alexander Graf wrote: > >> On 25.08.2010, at 10:16, Heiko Carstens wrote: > >>> On Tue, Aug 24, 2010 at 03

[PATCH] kvm: get rid of unused label warning

2009-12-18 Thread Heiko Carstens
From: Heiko Carstens arch/s390/kvm/../../../virt/kvm/kvm_main.c: In function 'kvm_create_vm': arch/s390/kvm/../../../virt/kvm/kvm_main.c:409: warning: label 'out_err' defined but not used Signed-off-by: Heiko Carstens --- Adds even more ifdefery... virt/kvm/kvm_main.

Re: [PATCHv2] kvm-s390: fix potential array overrun in intercept handling

2010-01-21 Thread Heiko Carstens
> - if (code & 3 || code > 0x48) > + if (code & 3 || (code >> 2) >= ARRAY_SIZE(intercept_funcs)) > return -ENOTSUPP; Not that it matters for this patch, but -ENOTSUPP should not leak to userspace. Not sure if it does somewhere, but it is used all over the place within arch/s

Re: [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch

2009-01-22 Thread Heiko Carstens
On Thu, 22 Jan 2009 10:27:38 +0100 Christian Borntraeger wrote: > KVM on s390 does not support the ESA/390 architecture. We refuse to > change the architecture mode and print a warning. While testing a > crashme for kvm, I spotted two problems with the printk: > > o A malicious can flood host d

Re: [PATCH 1/3] kvm-s390: Fix printk on SIGP set arch

2009-01-22 Thread Heiko Carstens
On Thu, 22 Jan 2009 12:26:11 +0100 Carsten Otte wrote: > Am Thu, 22 Jan 2009 12:17:07 +0100 > schrieb heica...@linux.vnet.ibm.com: > > Why don't you just remove the printk? IMHO it's rather pointless. > It is'nt: It infoms the user why his guest is going to crash > even though it has performed an

Re: [PATCH 2/2] show hypervisor information on sysfs

2009-02-07 Thread Heiko Carstens
On Fri, 6 Feb 2009 10:46:57 -0500 Glauber Costa wrote: > It is useful to easily grab information about whether or not > we're running on top of a hypervisor. And in case affirmative, > which one. > > This patch shows it in /sys/hypervisor (and as a site effect, allow > it to be directly selecta

Re: [PATCH 2/2] show hypervisor information on sysfs

2009-02-10 Thread Heiko Carstens
On Tue, 10 Feb 2009 11:20:23 -0200 Glauber Costa wrote: > > Anyway, just wanted to make you aware of what might come next. > > Why wouldn't it be extensible? So far, I've only added an attribute. But we > can easily add others, and directories with even more attributes if we must. Oh, sure it's

Re: [PATCH 2/5] KVM: s390: Add support for machine checks.

2012-12-19 Thread Heiko Carstens
of -EFAULT, which would be ignored by your code. I addressed that with a patch when trying to clean up the guest access functions. Maybe the patch below should be merged anyway. Christian? === >From db05454b6f3f49a7a10f5a1e546917303cf94532 Mon Sep 17 00:00:00 2001 From:

Re: [PATCH 2/5] KVM: s390: Add support for machine checks.

2012-12-19 Thread Heiko Carstens
On Wed, Dec 19, 2012 at 11:20:18AM +0100, Christian Borntraeger wrote: > On 19/12/12 10:44, Heiko Carstens wrote: > > On Fri, Dec 07, 2012 at 01:30:22PM +0100, Cornelia Huck wrote: > >> + rc = put_guest_u64(vcpu, __LC_MCCK_CODE, inti->mchk.mcic); > >>

Re: [GIT PULL 3/8] KVM: s390: fix get_all_floating_irqs

2015-03-31 Thread Heiko Carstens
On Tue, Mar 31, 2015 at 03:01:58PM +0200, Christian Borntraeger wrote: > From: Jens Freimann > > This fixes a bug introduced with commit c05c4186bbe4 ("KVM: s390: > add floating irq controller"). > > get_all_floating_irqs() does copy_to_user() while holding > a spin lock. Let's fix this by filli

Re: [PATCH/RFC 14/21] KVM: s390: clear the pfault queue if user space sets the invalid token

2015-01-17 Thread Heiko Carstens
On Thu, Jan 15, 2015 at 02:43:27PM +0100, Christian Borntraeger wrote: > From: David Hildenbrand > > We need a way to clear the async pfault queue from user space (e.g. > for resets and SIGP SET ARCHITECTURE). > > This patch simply clears the queue as soon as user space sets the > invalid pfault