From: Paolo Bonzini <pbonzini@redhat.com>
To: Ani Sinha <anisinha@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 0/2] kvm/i386: Some code refactoring and cleanups for kvm_arch_init
Date: Wed, 4 Sep 2024 14:31:06 +0200 [thread overview]
Message-ID: <20240904123105.283268-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20240903124143.39345-1-anisinha@redhat.com>
Queued patch 1 with just a small change:
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 599faf0ac6e..023af31ba3e 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -3064,10 +3064,9 @@ static int kvm_vm_set_nr_mmu_pages(KVMState *s)
return ret;
}
-static int kvm_vm_set_tss_addr(KVMState *s, uint64_t identity_base)
+static int kvm_vm_set_tss_addr(KVMState *s, uint64_t tss_base)
{
- /* Set TSS base one page after EPT identity map. */
- return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, identity_base);
+ return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, tss_base);
}
static int kvm_vm_enable_disable_exits(KVMState *s)
@@ -3268,6 +3267,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
return ret;
}
+ /* Set TSS base one page after EPT identity map. */
ret = kvm_vm_set_tss_addr(s, identity_base + 0x1000);
if (ret < 0) {
return ret;
For patch 2, it's better to remove the variable completely and make
it a constant. I'll send a patch.
Paolo
prev parent reply other threads:[~2024-09-04 12:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-03 12:41 [PATCH 0/2] kvm/i386: Some code refactoring and cleanups for kvm_arch_init Ani Sinha
2024-09-03 12:41 ` [PATCH 1/2] kvm/i386: refactor kvm_arch_init and split it into smaller functions Ani Sinha
2024-09-03 12:41 ` [PATCH 2/2] kvm/i386: do not initialize identity_base variable Ani Sinha
2024-09-04 12:31 ` Paolo Bonzini [this message]
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=20240904123105.283268-2-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=anisinha@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).