linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathias Krause <minipli@googlemail.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mathias Krause <minipli@googlemail.com>
Subject: [PATCH 5/8] KVM: x86: constify read_write_emulator_ops
Date: Thu, 30 Aug 2012 01:30:17 +0200	[thread overview]
Message-ID: <1346283020-22385-6-git-send-email-minipli@googlemail.com> (raw)
In-Reply-To: <1346283020-22385-1-git-send-email-minipli@googlemail.com>

We never change those, make them r/o.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 arch/x86/kvm/x86.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f8b0148..79ac03c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3773,14 +3773,14 @@ static int write_exit_mmio(struct kvm_vcpu *vcpu, gpa_t gpa,
 	return X86EMUL_CONTINUE;
 }
 
-static struct read_write_emulator_ops read_emultor = {
+static const struct read_write_emulator_ops read_emultor = {
 	.read_write_prepare = read_prepare,
 	.read_write_emulate = read_emulate,
 	.read_write_mmio = vcpu_mmio_read,
 	.read_write_exit_mmio = read_exit_mmio,
 };
 
-static struct read_write_emulator_ops write_emultor = {
+static const struct read_write_emulator_ops write_emultor = {
 	.read_write_emulate = write_emulate,
 	.read_write_mmio = write_mmio,
 	.read_write_exit_mmio = write_exit_mmio,
@@ -3791,7 +3791,7 @@ static int emulator_read_write_onepage(unsigned long addr, void *val,
 				       unsigned int bytes,
 				       struct x86_exception *exception,
 				       struct kvm_vcpu *vcpu,
-				       struct read_write_emulator_ops *ops)
+				       const struct read_write_emulator_ops *ops)
 {
 	gpa_t gpa;
 	int handled, ret;
@@ -3840,7 +3840,7 @@ mmio:
 int emulator_read_write(struct x86_emulate_ctxt *ctxt, unsigned long addr,
 			void *val, unsigned int bytes,
 			struct x86_exception *exception,
-			struct read_write_emulator_ops *ops)
+			const struct read_write_emulator_ops *ops)
 {
 	struct kvm_vcpu *vcpu = emul_to_vcpu(ctxt);
 	gpa_t gpa;
-- 
1.7.10.4


  parent reply	other threads:[~2012-08-29 23:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-29 23:30 [PATCH 0/8] KVM: minor cleanups and optimizations Mathias Krause
2012-08-29 23:30 ` [PATCH 1/8] KVM: x86: minor size optimization Mathias Krause
2012-08-29 23:30 ` [PATCH 2/8] KVM: x86 emulator: use aligned variants of SSE register ops Mathias Krause
2012-09-04 12:09   ` Avi Kivity
2012-09-04 12:13     ` Avi Kivity
2012-09-04 12:51       ` Mathias Krause
2012-09-05  9:43         ` Avi Kivity
2012-08-29 23:30 ` [PATCH 3/8] KVM: x86: mark opcode tables const Mathias Krause
2012-08-29 23:30 ` [PATCH 4/8] KVM: x86: constify emulate_ops Mathias Krause
2012-08-29 23:30 ` Mathias Krause [this message]
2012-08-29 23:30 ` [PATCH 6/8] KVM: x86: more constification Mathias Krause
2012-08-29 23:30 ` [PATCH 7/8] KVM: VMX: constify lookup tables Mathias Krause
2012-08-29 23:30 ` [PATCH 8/8] KVM: SVM: " Mathias Krause

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=1346283020-22385-6-git-send-email-minipli@googlemail.com \
    --to=minipli@googlemail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --subject='Re: [PATCH 5/8] KVM: x86: constify read_write_emulator_ops' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).