From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Avi Kivity <avi@qumranet.com>, Carsten Otte <cotte@de.ibm.com>,
kvm <kvm@vger.kernel.org>, Olaf Schnapper <os@de.ibm.com>,
Hollis Blanchard <hollisb@us.ibm.com>
Subject: Re: [PATCH v2/RFC] libkvm-s390
Date: Thu, 17 Jul 2008 13:08:56 +0200 [thread overview]
Message-ID: <487F2848.3020303@linux.vnet.ibm.com> (raw)
In-Reply-To: <200807161728.58658.borntraeger@de.ibm.com>
Christian Borntraeger wrote:
> This is an update patch for libkvm to build and work on s390
[...]
> Index: kvm-userspace/libkvm/libkvm-s390.c
> ===================================================================
> --- /dev/null
> +++ kvm-userspace/libkvm/libkvm-s390.c
> @@ -0,0 +1,137 @@
> +/*
> + * This file contains the s390 specific implementation for the
> + * architecture dependent functions defined in kvm-common.h and
> + * libkvm.h
> + *
> + * Copyright (C) 2006 Qumranet
> + * Copyright IBM Corp. 2008
> + *
> + * Authors:
> + * Carsten Otte <cotte@de.ibm.com>
> + * Christian Borntraeger <borntraeger@de.ibm.com>
>
whitespace error - well just in the comment, but if you resubmit it
anyway this space could be removed ;-)
[...]
> +
> +int handle_dcr(struct kvm_run *run, kvm_context_t kvm, int vcpu)
> +{
> + fprintf(stderr, "%s: Operation not supported\n", __FUNCTION__);
> + return -1;
> +}
> +
>
I think Carsten started with the powerpc file here.
This function is powerpc only and even in our code only called later on
in this libkvm-$arch.c file.
Maybe we should patch our file and make it static to clarify that.
Since you don't have that call its superfluous, you should be able to
drop it without consequence.
[...]
> Index: kvm-userspace/libkvm/libkvm.c
> ===================================================================
> --- kvm-userspace.orig/libkvm/libkvm.c
> +++ kvm-userspace/libkvm/libkvm.c
> @@ -48,6 +48,10 @@
> #include "kvm-powerpc.h"
> #endif
>
> +#if defined(__s390__)
> +#include "kvm-s390.h"
> +#endif
> +
> int kvm_abi = EXPECTED_KVM_API_VERSION;
> int kvm_page_size;
>
> @@ -88,7 +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
>
>
This looks a bit complicated, but when thinking of the result this just
means that i is always 0 on s390.
Therefore I think it would look less confusing when the ifdef would not
be in the else part of that tss_ext if.
Since i will always be zero in s390 case you could do things like
- initialize i with 0 and let the whole block until the for loop run in
"if !defined(__s390__)"
That way you would additionally stop modifying the tss_ext variable
which is not used in the s390 case anyway.
[...]
--
Grüsse / regards,
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization
next prev parent reply other threads:[~2008-07-17 11:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 17:29 [PATCH] libkvm-s390 Carsten Otte
2008-07-13 8:29 ` Avi Kivity
2008-07-14 11:33 ` Christian Borntraeger
2008-07-14 11:44 ` Avi Kivity
2008-07-14 12:25 ` Christian Borntraeger
2008-07-14 15:34 ` Anthony Liguori
2008-07-14 17:00 ` Christian Borntraeger
2008-07-14 18:00 ` Anthony Liguori
2008-07-16 15:28 ` [PATCH v2/RFC] libkvm-s390 Christian Borntraeger
2008-07-17 11:08 ` Christian Ehrhardt [this message]
2008-07-17 15:28 ` [PATCH v3] libkvm-s390 Christian Borntraeger
2008-07-19 7:56 ` Avi Kivity
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=487F2848.3020303@linux.vnet.ibm.com \
--to=ehrhardt@linux.vnet.ibm.com \
--cc=avi@qumranet.com \
--cc=borntraeger@de.ibm.com \
--cc=cotte@de.ibm.com \
--cc=hollisb@us.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