From: Avi Kivity <avi@qumranet.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: kvm <kvm@vger.kernel.org>, Carsten Otte <cotte@de.ibm.com>,
Olaf Schnapper <os@de.ibm.com>,
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Subject: Re: [PATCH] kvm-userspace: fix memslot assignment
Date: Sun, 27 Jul 2008 11:18:26 +0300 [thread overview]
Message-ID: <488C2F52.4030209@qumranet.com> (raw)
In-Reply-To: <200807251738.29171.borntraeger@de.ibm.com>
Christian Borntraeger wrote:
> Hello Avi,
>
> seems that I mixed up the slot initialization, instead of making the first
> slot always 0 I made it always 1. Lets go back to Carstens variant, since I
> dont like nested ifdefs. The compiler will remove the dead code anyway.
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>
> ---
> libkvm.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> Index: libkvm/libkvm.c
> ===================================================================
> --- libkvm.orig/libkvm.c
> +++ libkvm/libkvm.c
> @@ -78,7 +78,7 @@ int get_free_slot(kvm_context_t kvm)
> int i;
> int tss_ext;
>
> -#if defined(KVM_CAP_SET_TSS_ADDR) && !defined(__s390__)
> +#if defined(KVM_CAP_SET_TSS_ADDR)
> tss_ext = ioctl(kvm->fd, KVM_CHECK_EXTENSION, KVM_CAP_SET_TSS_ADDR);
> #else
> tss_ext = 0;
>
This is really a no-op, since s390 will nack a KVM_CAP_SET_TSS_ADDR
query. Of course, the change is an improvement.
> @@ -92,8 +92,11 @@ int get_free_slot(kvm_context_t kvm)
> if (tss_ext > 0)
> i = 0;
> else
> +#if !defined(__s390__)
> i = 1;
> -
> +#else
> + i = 0;
> +#endif
>
ppc and ia64 also don't care about TSS_ADDR. Care to make this depend
on x86, rather than on s390?
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2008-07-27 8:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 15:38 [PATCH] kvm-userspace: fix memslot assignment Christian Borntraeger
2008-07-27 8:18 ` Avi Kivity [this message]
2008-07-28 16:55 ` Christian Borntraeger
2008-07-29 13:18 ` Avi Kivity
2008-07-31 8:01 ` Christian Borntraeger
2008-07-31 11:24 ` Avi Kivity
2008-07-31 12:03 ` Izik Eidos
2008-07-31 12:53 ` Christian Borntraeger
2008-07-31 13:00 ` Avi Kivity
2008-07-31 14:57 ` Christian Borntraeger
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=488C2F52.4030209@qumranet.com \
--to=avi@qumranet.com \
--cc=borntraeger@de.ibm.com \
--cc=cotte@de.ibm.com \
--cc=ehrhardt@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=os@de.ibm.com \
/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