mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
KVM: x86: Move MMIO write tracing into vcpu_mmio_write()
Move the invocation of MMIO write tracepoint into vcpu_mmio_write() and drop its largely-useless wrapper to cull pointless code and to make the code symmetrical with respect to vcpu_mmio_read(). No functional change intended. Tested-by: Tom Lendacky <thomas.lendacky@gmail.com> Tested-by: Rick Edgecombe <rick.p.edgecombe@intel.com> Link: https://patch.msgid.link/20260225012049.920665-7-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
parent
cbbf8228c0
commit
72f36f9907
|
|
@ -7768,11 +7768,14 @@ static void kvm_init_msr_lists(void)
|
|||
}
|
||||
|
||||
static int vcpu_mmio_write(struct kvm_vcpu *vcpu, gpa_t addr, int len,
|
||||
const void *v)
|
||||
void *__v)
|
||||
{
|
||||
const void *v = __v;
|
||||
int handled = 0;
|
||||
int n;
|
||||
|
||||
trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, len, addr, __v);
|
||||
|
||||
do {
|
||||
n = min(len, 8);
|
||||
if (!(lapic_in_kernel(vcpu) &&
|
||||
|
|
@ -8130,12 +8133,6 @@ static int write_emulate(struct kvm_vcpu *vcpu, gpa_t gpa,
|
|||
return emulator_write_phys(vcpu, gpa, val, bytes);
|
||||
}
|
||||
|
||||
static int write_mmio(struct kvm_vcpu *vcpu, gpa_t gpa, int bytes, void *val)
|
||||
{
|
||||
trace_kvm_mmio(KVM_TRACE_MMIO_WRITE, bytes, gpa, val);
|
||||
return vcpu_mmio_write(vcpu, gpa, bytes, val);
|
||||
}
|
||||
|
||||
static const struct read_write_emulator_ops read_emultor = {
|
||||
.read_write_emulate = read_emulate,
|
||||
.read_write_mmio = vcpu_mmio_read,
|
||||
|
|
@ -8143,7 +8140,7 @@ static const struct read_write_emulator_ops read_emultor = {
|
|||
|
||||
static const struct read_write_emulator_ops write_emultor = {
|
||||
.read_write_emulate = write_emulate,
|
||||
.read_write_mmio = write_mmio,
|
||||
.read_write_mmio = vcpu_mmio_write,
|
||||
.write = true,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user