public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Jiri Slaby <jslaby@suse.cz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [ 17/53] s390/kvm: Fix store status for ACRS/FPRS
Date: Fri, 01 Mar 2013 08:50:29 +0100	[thread overview]
Message-ID: <51305DC5.7010201@de.ibm.com> (raw)
In-Reply-To: <512FD9B3.5000304@suse.cz>

On 28/02/13 23:26, Jiri Slaby wrote:
> On 02/27/2013 12:57 AM, Greg Kroah-Hartman wrote:
>> 3.0-stable review patch.  If anyone has any objections, please let me know.
>>
>> ------------------
>>
>> From: Christian Borntraeger <borntraeger@de.ibm.com>
>>
>> commit 15bc8d8457875f495c59d933b05770ba88d1eacb upstream.
>>
>> On store status we need to copy the current state of registers
>> into a save area. Currently we might save stale versions:
>> The sie state descriptor doesnt have fields for guest ACRS,FPRS,
>> those registers are simply stored in the host registers. The host
>> program must copy these away if needed. We do that in vcpu_put/load.
>>
>> If we now do a store status in KVM code between vcpu_put/load, the
>> saved values are not up-to-date. Lets collect the ACRS/FPRS before
>> saving them.
>>
>> This also fixes some strange problems with hotplug and virtio-ccw,
>> since the low level machine check handler (on hotplug a machine check
>> will happen) will revalidate all registers with the content of the
>> save area.
>>
>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>> Signed-off-by: Gleb Natapov <gleb@redhat.com>
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>
>> ---
>>  arch/s390/kvm/kvm-s390.c |    8 ++++++++
>>  1 file changed, 8 insertions(+)
>>
>> --- a/arch/s390/kvm/kvm-s390.c
>> +++ b/arch/s390/kvm/kvm-s390.c
>> @@ -584,6 +584,14 @@ int kvm_s390_vcpu_store_status(struct kv
>>  	} else
>>  		prefix = 0;
>>  
>> +	/*
>> +	 * The guest FPRS and ACRS are in the host FPRS/ACRS due to the lazy
>> +	 * copying in vcpu load/put. Lets update our copies before we save
>> +	 * it into the save area
>> +	 */
>> +	save_fp_regs(&vcpu->arch.guest_fpregs);
>> +	save_access_regs(vcpu->run->s.regs.acrs);
> 
> kvm_run structure does not have kvm_sync_regs in it in 3.0 yet. So this
> fails with:
> arch/s390/kvm/kvm-s390.c: In function 'kvm_s390_vcpu_store_status':
> arch/s390/kvm/kvm-s390.c:593: error: 'struct kvm_run' has no member
> named 's'
> 
> I believe the fix is just to remove save_access_regs, right?

Before the sync reg changes, the ACRS were saved in the vcpu->arch.
So the fix would look like 

	save_access_regs(vcpu->arch.guest_acrs);



  reply	other threads:[~2013-03-01  7:50 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 23:57 [ 00/53] 3.0.67-stable review Greg Kroah-Hartman
2013-02-26 23:57 ` [ 01/53] x86-32, mm: Remove reference to resume_map_numa_kva() Greg Kroah-Hartman
2013-02-26 23:57 ` [ 02/53] mm: fix pageblock bitmap allocation Greg Kroah-Hartman
2013-02-26 23:57 ` [ 03/53] timeconst.pl: Eliminate Perl warning Greg Kroah-Hartman
2013-02-27  2:46   ` Rob Landley
2013-02-26 23:57 ` [ 04/53] genirq: Avoid deadlock in spurious handling Greg Kroah-Hartman
2013-02-26 23:57 ` [ 05/53] posix-cpu-timers: Fix nanosleep task_struct leak Greg Kroah-Hartman
2013-02-26 23:57 ` [ 06/53] hrtimer: Prevent hrtimer_enqueue_reprogram race Greg Kroah-Hartman
2013-02-26 23:57 ` [ 07/53] ALSA: ali5451: remove irq enabling in pointer callback Greg Kroah-Hartman
2013-02-26 23:57 ` [ 08/53] ALSA: rme32.c irq enabling after spin_lock_irq Greg Kroah-Hartman
2013-02-26 23:57 ` [ 09/53] tty: set_termios/set_termiox should not return -EINTR Greg Kroah-Hartman
2013-02-26 23:57 ` [ 10/53] xen/netback: check correct frag when looking for head frag Greg Kroah-Hartman
2013-02-26 23:57 ` [ 11/53] xen: Send spinlock IPI to all waiters Greg Kroah-Hartman
2013-02-26 23:57 ` [ 12/53] Driver core: treat unregistered bus_types as having no devices Greg Kroah-Hartman
2013-02-26 23:57 ` [ 13/53] mm: mmu_notifier: have mmu_notifiers use a global SRCU so they may safely schedule Greg Kroah-Hartman
2013-02-26 23:57 ` [ 14/53] mm: mmu_notifier: make the mmu_notifier srcu static Greg Kroah-Hartman
2013-02-26 23:57 ` [ 15/53] mmu_notifier_unregister NULL Pointer deref and multiple ->release() callouts Greg Kroah-Hartman
2013-02-26 23:57 ` [ 16/53] KVM: s390: Handle hosts not supporting s390-virtio Greg Kroah-Hartman
2013-02-26 23:57 ` [ 17/53] s390/kvm: Fix store status for ACRS/FPRS Greg Kroah-Hartman
2013-02-28 22:26   ` Jiri Slaby
2013-03-01  7:50     ` Christian Borntraeger [this message]
2013-03-01  9:22       ` Jiri Slaby
2013-03-01 19:16         ` Greg Kroah-Hartman
2013-02-26 23:57 ` [ 18/53] inotify: remove broken mask checks causing unmount to be EINVAL Greg Kroah-Hartman
2013-02-26 23:57 ` [ 19/53] ocfs2: unlock super lock if lockres refresh failed Greg Kroah-Hartman
2013-02-26 23:57 ` [ 20/53] drivers/video/backlight/adp88?0_bl.c: fix resume Greg Kroah-Hartman
2013-02-26 23:57 ` [ 21/53] tmpfs: fix use-after-free of mempolicy object Greg Kroah-Hartman
2013-02-26 23:57 ` [ 22/53] mm/fadvise.c: drain all pagevecs if POSIX_FADV_DONTNEED fails to discard all pages Greg Kroah-Hartman
2013-02-26 23:57 ` [ 23/53] NLM: Ensure that we resend all pending blocking locks after a reclaim Greg Kroah-Hartman
2013-02-26 23:57 ` [ 24/53] p54usb: corrected USB ID for T-Com Sinus 154 data II Greg Kroah-Hartman
2013-02-26 23:57 ` [ 25/53] ALSA: usb-audio: fix Roland A-PRO support Greg Kroah-Hartman
2013-02-26 23:57 ` [ 26/53] ALSA: usb: Fix Processing Unit Descriptor parsers Greg Kroah-Hartman
2013-02-26 23:57 ` [ 27/53] ext4: Free resources in some error path in ext4_fill_super Greg Kroah-Hartman
2013-02-26 23:57 ` [ 28/53] ext4: add missing kfree() on error return path in add_new_gdb() Greg Kroah-Hartman
2013-02-26 23:57 ` [ 29/53] sunvdc: Fix off-by-one in generic_request() Greg Kroah-Hartman
2013-02-26 23:57 ` [ 30/53] drm/usb: bind driver to correct device Greg Kroah-Hartman
2013-02-26 23:58 ` [ 31/53] NLS: improve UTF8 -> UTF16 string conversion routine Greg Kroah-Hartman
2013-02-26 23:58 ` [ 32/53] drm/i915: disable shared panel fitter for pipe Greg Kroah-Hartman
2013-02-26 23:58 ` [ 33/53] staging: comedi: disallow COMEDI_DEVCONFIG on non-board minors Greg Kroah-Hartman
2013-02-26 23:58 ` [ 34/53] staging: vt6656: Fix URB submitted while active warning Greg Kroah-Hartman
2013-02-26 23:58 ` [ 35/53] ARM: PXA3xx: program the CSMSADRCFG register Greg Kroah-Hartman
2013-02-26 23:58 ` [ 36/53] powerpc/kexec: Disable hard IRQ before kexec Greg Kroah-Hartman
2013-02-26 23:58 ` [ 37/53] [PARISC] Purge existing TLB entries in set_pte_at and ptep_set_wrprotect Greg Kroah-Hartman
2013-02-26 23:58 ` [ 38/53] pcmcia/vrc4171: Add missing spinlock init Greg Kroah-Hartman
2013-02-26 23:58 ` [ 39/53] fbcon: dont lose the console font across generic->chip driver switch Greg Kroah-Hartman
2013-02-26 23:58 ` [ 40/53] fb: rework locking to fix lock ordering on takeover Greg Kroah-Hartman
2013-02-26 23:58 ` [ 41/53] fb: Yet another band-aid for fixing lockdep mess Greg Kroah-Hartman
2013-02-26 23:58 ` [ 42/53] bridge: set priority of STP packets Greg Kroah-Hartman
2013-02-26 23:58 ` [ 43/53] xen-netback: correctly return errors from netbk_count_requests() Greg Kroah-Hartman
2013-02-26 23:58 ` [ 44/53] xen-netback: cancel the credit timer when taking the vif down Greg Kroah-Hartman
2013-02-26 23:58 ` [ 45/53] ipv4: fix a bug in ping_err() Greg Kroah-Hartman
2013-02-26 23:58 ` [ 46/53] ipv6: use a stronger hash for tcp Greg Kroah-Hartman
2013-02-26 23:58 ` [ 47/53] dca: check against empty dca_domains list before unregister provider Greg Kroah-Hartman
2013-02-28 22:04   ` Jiri Slaby
2013-02-28 22:17     ` Jiri Slaby
2013-03-01 19:17       ` Greg Kroah-Hartman
2013-02-26 23:58 ` [ 48/53] USB: option: add and update Alcatel modems Greg Kroah-Hartman
2013-02-26 23:58 ` [ 49/53] USB: option: add Yota / Megafon M100-1 4g modem Greg Kroah-Hartman
2013-02-26 23:58 ` [ 50/53] USB: option: add Huawei "ACM" devices using protocol = vendor Greg Kroah-Hartman
2013-02-26 23:58 ` [ 51/53] USB: ehci-omap: Fix autoloading of module Greg Kroah-Hartman
2013-02-26 23:58 ` [ 52/53] USB: storage: properly handle the endian issues of idProduct Greg Kroah-Hartman
2013-02-26 23:58 ` [ 53/53] USB: usb-storage: unusual_devs update for Super TOP SATA bridge Greg Kroah-Hartman
2013-02-27 16:51 ` [ 00/53] 3.0.67-stable review Shuah Khan
2013-02-27 16:54   ` Greg Kroah-Hartman
2013-02-28 14:56 ` Satoru Takeuchi
2013-02-28 14:59   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51305DC5.7010201@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=gleb@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox