public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: James Hogan <james.hogan@imgtec.com>
Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>,
	Gleb Natapov <gleb@kernel.org>,
	kvm@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, David Daney <david.daney@cavium.com>,
	Sanjay Lal <sanjayl@kymasys.com>
Subject: Re: [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite
Date: Fri, 30 May 2014 13:07:13 +0200	[thread overview]
Message-ID: <53886661.80602@redhat.com> (raw)
In-Reply-To: <1401355005-20370-1-git-send-email-james.hogan@imgtec.com>

Il 29/05/2014 11:16, James Hogan ha scritto:
> Here are a range of MIPS KVM T&E fixes, preferably for v3.16 but I know
> it's probably a bit late now. Changes are pretty minimal though since
> v1 so please consider. They can also be found on my kvm_mips_queue
> branch (and the kvm_mips_timer_v2 tag) here:
> git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/kvm-mips.git
>
> They originally served to allow it to work better on Ingenic XBurst
> cores which have some peculiarities which break non-portable assumptions
> in the MIPS KVM implementation (patches 1-4, 13).
>
> Fixing guest CP0_Count emulation to work without a running host
> CP0_Count (patch 13) however required a rewrite of the timer emulation
> code to use the kernel monotonic time instead, which needed doing anyway
> since basing it directly off the host CP0_Count was broken. Various bugs
> were fixed in the process (patches 10-12) and improvements made thanks to
> valuable feedback from Paolo Bonzini for the last QEMU MIPS/KVM patchset
> (patches 5-7, 15-16).
>
> Finally there are some misc cleanups which I did along the way (patches
> 17-23).
>
> Only the first patch (fixes MIPS KVM with 4K pages) is marked for
> stable. For KVM to work on XBurst it needs the timer rework which is a
> fairly complex change, so there's little point marking any of the XBurst
> specific changes for stable.
>
> All feedback welcome!
>
> Patches 1-4:
> 	Fix KVM/MIPS with 4K pages, missing RDHWR SYNCI (XBurst),
> 	unmoving CP0_Random (XBurst).
> Patches 5-9:
> 	Add EPC, Count, Compare, UserLocal, HWREna guest CP0 registers
> 	to KVM register ioctl interface.
> Patches 10-12:
> 	Fix a few potential races relating to timers.
> Patches 13-14:
> 	Rewrite guest timer emulation to use ktime_get().
> Patches 15-16:
> 	Add KVM virtual registers for controlling guest timer, including
> 	master timer disable, and timer frequency.
> Patches 17-23:
> 	Cleanups.
>
> Changes in v2 (tag:kvm_mips_timer_v2):
>  Patchset:
>  - Drop patch 4 "MIPS: KVM: Fix CP0_EBASE KVM register id" (David
>    Daney).
>  - Drop patch 14 "MIPS: KVM: Add nanosecond count bias KVM register".
>    The COUNT_CTL and COUNT_RESUME API is clean and sufficient.
>  - Add missing access to UserLocal and HWREna guest CP0 registers
>    (patches 15 and 16).
>  - Add export of local_flush_icache_range (patch 2).
>  Patch 12 MIPS: KVM: Migrate hrtimer to follow VCPU
>  - Move kvm_mips_migrate_count() into kvm_tlb.c to fix a link error when
>    KVM is built as a module, since kvm_tlb.c is built statically and
>    cannot reference symbols in kvm_mips_emul.c.
>  Patch 15 MIPS: KVM: Add master disable count interface
>  - Make KVM_REG_MIPS_COUNT_RESUME writable too so that userland can
>    control timer using master DC and without bias register. New values
>    are rejected if they refer to a monotonic time in the future.
>  - Expand on description of KVM_REG_MIPS_COUNT_RESUME about the effects
>    of the register and that it can be written.
>
> v1 (tag:kvm_mips_timer_v1):
>  see http://marc.info/?l=kvm&m=139843936102657&w=2
>
> James Hogan (23):
>   MIPS: KVM: Allocate at least 16KB for exception handlers
>   MIPS: Export local_flush_icache_range for KVM
>   MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst
>   MIPS: KVM: Use tlb_write_random
>   MIPS: KVM: Add CP0_EPC KVM register access
>   MIPS: KVM: Move KVM_{GET,SET}_ONE_REG definitions into kvm_host.h
>   MIPS: KVM: Add CP0_Count/Compare KVM register access
>   MIPS: KVM: Add CP0_UserLocal KVM register access
>   MIPS: KVM: Add CP0_HWREna KVM register access
>   MIPS: KVM: Deliver guest interrupts after local_irq_disable()
>   MIPS: KVM: Fix timer race modifying guest CP0_Cause
>   MIPS: KVM: Migrate hrtimer to follow VCPU
>   MIPS: KVM: Rewrite count/compare timer emulation
>   MIPS: KVM: Override guest kernel timer frequency directly
>   MIPS: KVM: Add master disable count interface
>   MIPS: KVM: Add count frequency KVM register
>   MIPS: KVM: Make kvm_mips_comparecount_{func,wakeup} static
>   MIPS: KVM: Whitespace fixes in kvm_mips_callbacks
>   MIPS: KVM: Fix kvm_debug bit-rottage
>   MIPS: KVM: Remove ifdef DEBUG around kvm_debug
>   MIPS: KVM: Quieten kvm_info() logging
>   MIPS: KVM: Remove redundant NULL checks before kfree()
>   MIPS: KVM: Remove redundant semicolon
>
>  arch/mips/Kconfig                 |  12 +-
>  arch/mips/include/asm/kvm_host.h  | 183 ++++++++++---
>  arch/mips/include/uapi/asm/kvm.h  |  35 +++
>  arch/mips/kvm/kvm_locore.S        |  32 ---
>  arch/mips/kvm/kvm_mips.c          | 140 +++++-----
>  arch/mips/kvm/kvm_mips_dyntrans.c |  15 +-
>  arch/mips/kvm/kvm_mips_emul.c     | 557 ++++++++++++++++++++++++++++++++++++--
>  arch/mips/kvm/kvm_tlb.c           |  77 +++---
>  arch/mips/kvm/kvm_trap_emul.c     |  86 +++++-
>  arch/mips/mm/cache.c              |   1 +
>  arch/mips/mti-malta/malta-time.c  |  14 +-
>  11 files changed, 920 insertions(+), 232 deletions(-)
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Gleb Natapov <gleb@kernel.org>
> Cc: kvm@vger.kernel.org
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: David Daney <david.daney@cavium.com>
> Cc: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
> Cc: Sanjay Lal <sanjayl@kymasys.com>
>

Applied, thanks.  I hope you'll get the QEMU patches ready in time for 
2.1! :)

Paolo

  parent reply	other threads:[~2014-05-30 11:07 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29  9:16 [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite James Hogan
2014-05-29  9:16 ` [PATCH v2 01/23] MIPS: KVM: Allocate at least 16KB for exception handlers James Hogan
2014-05-29  9:16 ` [PATCH v2 02/23] MIPS: Export local_flush_icache_range for KVM James Hogan
2014-05-30 10:18   ` Ralf Baechle
2014-05-29  9:16 ` [PATCH v2 03/23] MIPS: KVM: Use local_flush_icache_range to fix RI on XBurst James Hogan
2014-05-29  9:16 ` [PATCH v2 04/23] MIPS: KVM: Use tlb_write_random James Hogan
2014-05-29  9:16 ` [PATCH v2 05/23] MIPS: KVM: Add CP0_EPC KVM register access James Hogan
2014-05-29  9:16 ` [PATCH v2 06/23] MIPS: KVM: Move KVM_{GET,SET}_ONE_REG definitions into kvm_host.h James Hogan
2014-05-29  9:16 ` [PATCH v2 07/23] MIPS: KVM: Add CP0_Count/Compare KVM register access James Hogan
2014-05-29  9:16 ` [PATCH v2 08/23] MIPS: KVM: Add CP0_UserLocal " James Hogan
2014-05-29  9:16 ` [PATCH v2 09/23] MIPS: KVM: Add CP0_HWREna " James Hogan
2014-05-29  9:16 ` [PATCH v2 10/23] MIPS: KVM: Deliver guest interrupts after local_irq_disable() James Hogan
2014-05-29  9:16 ` [PATCH v2 11/23] MIPS: KVM: Fix timer race modifying guest CP0_Cause James Hogan
2014-05-29 10:36   ` Paolo Bonzini
2014-05-29 10:55     ` James Hogan
2014-05-29 11:31       ` Paolo Bonzini
2014-05-29  9:16 ` [PATCH v2 12/23] MIPS: KVM: Migrate hrtimer to follow VCPU James Hogan
2014-05-29  9:16 ` [PATCH v2 13/23] MIPS: KVM: Rewrite count/compare timer emulation James Hogan
2014-05-29  9:16 ` [PATCH v2 14/23] MIPS: KVM: Override guest kernel timer frequency directly James Hogan
2014-05-30 10:18   ` Ralf Baechle
2014-05-29  9:16 ` [PATCH v2 15/23] MIPS: KVM: Add master disable count interface James Hogan
2014-05-29  9:16 ` [PATCH v2 16/23] MIPS: KVM: Add count frequency KVM register James Hogan
2014-05-29  9:16 ` [PATCH v2 17/23] MIPS: KVM: Make kvm_mips_comparecount_{func,wakeup} static James Hogan
2014-05-29  9:16 ` [PATCH v2 18/23] MIPS: KVM: Whitespace fixes in kvm_mips_callbacks James Hogan
2014-05-29  9:16 ` [PATCH v2 19/23] MIPS: KVM: Fix kvm_debug bit-rottage James Hogan
2014-05-29  9:16 ` [PATCH v2 20/23] MIPS: KVM: Remove ifdef DEBUG around kvm_debug James Hogan
2014-05-29  9:16 ` [PATCH v2 21/23] MIPS: KVM: Quieten kvm_info() logging James Hogan
2014-05-29  9:16 ` [PATCH v2 22/23] MIPS: KVM: Remove redundant NULL checks before kfree() James Hogan
2014-05-29  9:16 ` [PATCH v2 23/23] MIPS: KVM: Remove redundant semicolon James Hogan
2014-05-29 10:36 ` [PATCH v2 00/23] MIPS: KVM: Fixes and guest timer rewrite Paolo Bonzini
2014-05-29 14:41   ` James Hogan
2014-05-29 15:23     ` Paolo Bonzini
2014-05-29 16:27       ` James Hogan
2014-05-29 17:03         ` Paolo Bonzini
2014-05-29 20:44           ` James Hogan
2014-05-30  7:57             ` Paolo Bonzini
2014-06-16 16:29               ` James Hogan
2014-06-16 16:33                 ` Paolo Bonzini
2014-05-30 11:07 ` Paolo Bonzini [this message]
2014-05-30 16:16   ` James Hogan

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=53886661.80602@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=andreas.herrmann@caviumnetworks.com \
    --cc=david.daney@cavium.com \
    --cc=gleb@kernel.org \
    --cc=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=sanjayl@kymasys.com \
    /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