public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jörg Thalheim" <joerg@thalheim.io>
To: eafanasova@gmail.com
Cc: kvm@vger.kernel.org
Subject: Re: [RFC v3 0/5] Introduce MMIO/PIO dispatch file descriptors  (ioregionfd)
Date: Wed, 14 Jul 2021 15:27:15 +0000	[thread overview]
Message-ID: <8231a065caffd539c6dee272d78b1df0@thalheim.io> (raw)

The patches does not compile because vcpu->ioregion_ctx is missing a len field.


arch/x86/kvm/x86.c: In function ‘complete_ioregion_fast_pio’:
arch/x86/kvm/x86.c:9680:58: error: ‘struct <anonymous>’ has no member named ‘len’
 9680 |   memcpy(&val, vcpu->ioregion_ctx.val, vcpu->ioregion_ctx.len);
      |                                                          ^


Gcc8 was also unhappy that the function would have no return values for cases.

---
 arch/x86/kvm/x86.c  | 1 +
 virt/kvm/ioregion.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 7dc1b80170f1..73205619cdd3 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -9709,6 +9709,7 @@ static int complete_ioregion_io(struct kvm_vcpu *vcpu)
 		return complete_ioregion_mmio(vcpu);
 	if (vcpu->arch.pio.count)
 		return complete_ioregion_pio(vcpu);
+	return 0;
 }
 #endif /* CONFIG_KVM_IOREGION */
 
diff --git a/virt/kvm/ioregion.c b/virt/kvm/ioregion.c
index d53e3d1cd2ff..e0a52b2a56df 100644
--- a/virt/kvm/ioregion.c
+++ b/virt/kvm/ioregion.c
@@ -311,6 +311,7 @@ get_ioregion_list(struct kvm *kvm, enum kvm_bus bus_idx)
 		return &kvm->ioregions_mmio;
 	if (bus_idx == KVM_PIO_BUS)
 		return &kvm->ioregions_pio;
+	return NULL;
 }
 
 /* check for not overlapping case and reverse */
-- 
2.32.0

             reply	other threads:[~2021-07-14 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-14 15:27 Jörg Thalheim [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-02-21 12:04 [RFC v3 0/5] Introduce MMIO/PIO dispatch file descriptors (ioregionfd) Elena Afanasova
2021-02-21 17:06 ` Paolo Bonzini
2021-02-22 16:40   ` Elena Afanasova
2021-02-24 11:34 ` Stefan Hajnoczi

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=8231a065caffd539c6dee272d78b1df0@thalheim.io \
    --to=joerg@thalheim.io \
    --cc=cover.1613828726.git.eafanasova@gmail.com \
    --cc=eafanasova@gmail.com \
    --cc=kvm@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