From: David Hildenbrand <david@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Eduardo Habkost" <ehabkost@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Richard Henderson" <rth@twiddle.net>
Subject: [PATCH RFC 1/4] openpic_kvm: Use kvm_device_ioctl() instead of ioctl()
Date: Tue, 3 Mar 2020 15:19:36 +0100 [thread overview]
Message-ID: <20200303141939.352319-2-david@redhat.com> (raw)
In-Reply-To: <20200303141939.352319-1-david@redhat.com>
Let's use the official variant, which will e.g., trace the call.
Cc: Markus Armbruster <armbru@redhat.com>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
---
hw/intc/openpic_kvm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index e4bf47d885..0d8abc1604 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -70,7 +70,7 @@ static void kvm_openpic_write(void *opaque, hwaddr addr, uint64_t val,
attr.attr = addr;
attr.addr = (uint64_t)(unsigned long)&val32;
- ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
+ ret = kvm_device_ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
if (ret < 0) {
qemu_log_mask(LOG_UNIMP, "%s: %s %" PRIx64 "\n", __func__,
strerror(errno), attr.attr);
@@ -96,7 +96,7 @@ static uint64_t kvm_openpic_read(void *opaque, hwaddr addr, unsigned size)
attr.attr = addr;
attr.addr = (uint64_t)(unsigned long)&val;
- ret = ioctl(opp->fd, KVM_GET_DEVICE_ATTR, &attr);
+ ret = kvm_device_ioctl(opp->fd, KVM_GET_DEVICE_ATTR, &attr);
if (ret < 0) {
qemu_log_mask(LOG_UNIMP, "%s: %s %" PRIx64 "\n", __func__,
strerror(errno), attr.attr);
@@ -145,7 +145,7 @@ static void kvm_openpic_region_add(MemoryListener *listener,
attr.attr = KVM_DEV_MPIC_BASE_ADDR;
attr.addr = (uint64_t)(unsigned long)®_base;
- ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
+ ret = kvm_device_ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
if (ret < 0) {
fprintf(stderr, "%s: %s %" PRIx64 "\n", __func__,
strerror(errno), reg_base);
@@ -179,7 +179,7 @@ static void kvm_openpic_region_del(MemoryListener *listener,
attr.attr = KVM_DEV_MPIC_BASE_ADDR;
attr.addr = (uint64_t)(unsigned long)®_base;
- ret = ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
+ ret = kvm_device_ioctl(opp->fd, KVM_SET_DEVICE_ATTR, &attr);
if (ret < 0) {
fprintf(stderr, "%s: %s %" PRIx64 "\n", __func__,
strerror(errno), reg_base);
--
2.24.1
next prev parent reply other threads:[~2020-03-03 14:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 14:19 [PATCH RFC 0/4] kvm: Implement atomic memory region resizes David Hildenbrand
2020-03-03 14:19 ` David Hildenbrand [this message]
2020-03-03 14:19 ` [PATCH RFC 2/4] intc/s390_flic_kvm.c: Use kvm_device_ioctl() instead of ioctl() David Hildenbrand
2020-03-04 8:22 ` Christian Borntraeger
2020-03-04 8:30 ` David Hildenbrand
2020-03-03 14:19 ` [PATCH RFC 3/4] memory: Add region_resize() callback to memory notifier David Hildenbrand
2020-03-03 14:19 ` [PATCH RFC 4/4] kvm: Implement atomic memory region resizes via region_resize() David Hildenbrand
2020-03-06 9:50 ` Paolo Bonzini
2020-03-06 10:20 ` David Hildenbrand
2020-03-06 11:38 ` Paolo Bonzini
2020-03-06 12:18 ` David Hildenbrand
2020-03-06 14:30 ` David Hildenbrand
2020-03-06 14:39 ` Paolo Bonzini
2020-03-06 14:44 ` David Hildenbrand
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=20200303141939.352319-2-david@redhat.com \
--to=david@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).