Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Ankur Arora <ankur.a.arora@oracle.com>,
	linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org
Cc: pbonzini@redhat.com, boris.ostrovsky@oracle.com,
	sstabellini@kernel.org, joao.m.martins@oracle.com,
	konrad.wilk@oracle.com
Subject: Re: [Xen-devel] [RFC PATCH 13/16] drivers/xen: gnttab, evtchn, xenbus API changes
Date: Mon, 17 Jun 2019 12:07:05 +0200
Message-ID: <2c025112-aaeb-0918-ff01-10842d285314@suse.com> (raw)
In-Reply-To: <20190509172540.12398-14-ankur.a.arora@oracle.com>

On 09.05.19 19:25, Ankur Arora wrote:
> Mechanical changes, now most of these calls take xenhost_t *
> as parameter.
> 
> Co-developed-by: Joao Martins <joao.m.martins@oracle.com>
> Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
> ---
>   drivers/xen/cpu_hotplug.c     | 14 ++++++-------
>   drivers/xen/gntalloc.c        | 13 ++++++++----
>   drivers/xen/gntdev.c          | 16 +++++++++++----
>   drivers/xen/manage.c          | 37 ++++++++++++++++++-----------------
>   drivers/xen/platform-pci.c    | 12 +++++++-----
>   drivers/xen/sys-hypervisor.c  | 12 ++++++++----
>   drivers/xen/xen-balloon.c     | 10 +++++++---
>   drivers/xen/xenfs/xenstored.c |  7 ++++---
>   8 files changed, 73 insertions(+), 48 deletions(-)
> 
> diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c
> index afeb94446d34..4a05bc028956 100644
> --- a/drivers/xen/cpu_hotplug.c
> +++ b/drivers/xen/cpu_hotplug.c
> @@ -31,13 +31,13 @@ static void disable_hotplug_cpu(int cpu)
>   	unlock_device_hotplug();
>   }
>   
> -static int vcpu_online(unsigned int cpu)
> +static int vcpu_online(xenhost_t *xh, unsigned int cpu)

Do we really need xenhost for cpu on/offlinig?

> diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
> index 9a69d955dd5c..1655d0a039fd 100644
> --- a/drivers/xen/manage.c
> +++ b/drivers/xen/manage.c
> @@ -227,14 +227,14 @@ static void shutdown_handler(struct xenbus_watch *watch,
>   		return;
>   
>    again:
> -	err = xenbus_transaction_start(xh_default, &xbt);
> +	err = xenbus_transaction_start(watch->xh, &xbt);
>   	if (err)
>   		return;
>   
> -	str = (char *)xenbus_read(xh_default, xbt, "control", "shutdown", NULL);
> +	str = (char *)xenbus_read(watch->xh, xbt, "control", "shutdown", NULL);
>   	/* Ignore read errors and empty reads. */
>   	if (XENBUS_IS_ERR_READ(str)) {
> -		xenbus_transaction_end(xh_default, xbt, 1);
> +		xenbus_transaction_end(watch->xh, xbt, 1);
>   		return;
>   	}
>   
> @@ -245,9 +245,9 @@ static void shutdown_handler(struct xenbus_watch *watch,
>   
>   	/* Only acknowledge commands which we are prepared to handle. */
>   	if (idx < ARRAY_SIZE(shutdown_handlers))
> -		xenbus_write(xh_default, xbt, "control", "shutdown", "");
> +		xenbus_write(watch->xh, xbt, "control", "shutdown", "");
>   
> -	err = xenbus_transaction_end(xh_default, xbt, 0);
> +	err = xenbus_transaction_end(watch->xh, xbt, 0);
>   	if (err == -EAGAIN) {
>   		kfree(str);
>   		goto again;
> @@ -272,10 +272,10 @@ static void sysrq_handler(struct xenbus_watch *watch, const char *path,
>   	int err;
>   
>    again:
> -	err = xenbus_transaction_start(xh_default, &xbt);
> +	err = xenbus_transaction_start(watch->xh, &xbt);
>   	if (err)
>   		return;
> -	err = xenbus_scanf(xh_default, xbt, "control", "sysrq", "%c", &sysrq_key);
> +	err = xenbus_scanf(watch->xh, xbt, "control", "sysrq", "%c", &sysrq_key);
>   	if (err < 0) {
>   		/*
>   		 * The Xenstore watch fires directly after registering it and
> @@ -287,21 +287,21 @@ static void sysrq_handler(struct xenbus_watch *watch, const char *path,
>   		if (err != -ENOENT && err != -ERANGE)
>   			pr_err("Error %d reading sysrq code in control/sysrq\n",
>   			       err);
> -		xenbus_transaction_end(xh_default, xbt, 1);
> +		xenbus_transaction_end(watch->xh, xbt, 1);
>   		return;
>   	}
>   
>   	if (sysrq_key != '\0') {
> -		err = xenbus_printf(xh_default, xbt, "control", "sysrq", "%c", '\0');
> +		err = xenbus_printf(watch->xh, xbt, "control", "sysrq", "%c", '\0');
>   		if (err) {
>   			pr_err("%s: Error %d writing sysrq in control/sysrq\n",
>   			       __func__, err);
> -			xenbus_transaction_end(xh_default, xbt, 1);
> +			xenbus_transaction_end(watch->xh, xbt, 1);
>   			return;
>   		}
>   	}
>   
> -	err = xenbus_transaction_end(xh_default, xbt, 0);
> +	err = xenbus_transaction_end(watch->xh, xbt, 0);
>   	if (err == -EAGAIN)
>   		goto again;
>   
> @@ -324,14 +324,14 @@ static struct notifier_block xen_reboot_nb = {
>   	.notifier_call = poweroff_nb,
>   };
>   
> -static int setup_shutdown_watcher(void)
> +static int setup_shutdown_watcher(xenhost_t *xh)

I think shutdown is purely local, too.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply index

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 17:25 [Xen-devel] [RFC PATCH 00/16] xenhost support Ankur Arora
2019-05-09 17:25 ` [Xen-devel] [RFC PATCH 01/16] x86/xen: add xenhost_t interface Ankur Arora
2019-06-07 15:04   ` Juergen Gross
2019-06-11  7:16     ` Ankur Arora
2019-06-14 11:52       ` Juergen Gross
2019-05-09 17:25 ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 02/16] x86/xen: cpuid support in xenhost_t Ankur Arora
2019-05-09 17:25   ` [Xen-devel] " Ankur Arora
2019-06-12 21:09   ` Andrew Cooper
2019-05-09 17:25 ` [Xen-devel] [RFC PATCH 03/16] x86/xen: make hypercall_page generic Ankur Arora
2019-05-09 17:25 ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 04/16] x86/xen: hypercall support for xenhost_t Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-06-12 21:15   ` Andrew Cooper
2019-06-14  7:20     ` Ankur Arora
2019-06-14  7:35       ` Juergen Gross
2019-06-14  8:00         ` Andrew Cooper
2019-05-09 17:25 ` [RFC PATCH 05/16] x86/xen: add feature support in xenhost_t Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-05-09 17:25 ` [Xen-devel] [RFC PATCH 06/16] x86/xen: add shared_info support to xenhost_t Ankur Arora
2019-06-07 15:08   ` Juergen Gross
2019-06-08  5:01     ` Ankur Arora
2019-05-09 17:25 ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 07/16] x86/xen: make vcpu_info part of xenhost_t Ankur Arora
2019-05-09 17:25   ` [Xen-devel] " Ankur Arora
2019-06-14 11:53   ` Juergen Gross
2019-06-17  6:28     ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 08/16] x86/xen: irq/upcall handling with multiple xenhosts Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-06-14 12:01   ` Juergen Gross
2019-05-09 17:25 ` [RFC PATCH 09/16] xen/evtchn: support evtchn in xenhost_t Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-06-14 12:04   ` Juergen Gross
2019-06-17  6:09     ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 10/16] xen/balloon: support ballooning " Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-06-17  9:28   ` Juergen Gross
2019-06-19  2:24     ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 11/16] xen/grant-table: make grant-table xenhost aware Ankur Arora
2019-05-09 17:25   ` [Xen-devel] " Ankur Arora
2019-06-17  9:36   ` Juergen Gross
2019-06-19  2:25     ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 12/16] xen/xenbus: support xenbus frontend/backend with xenhost_t Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-06-17  9:50   ` Juergen Gross
2019-06-19  2:38     ` Ankur Arora
2019-05-09 17:25 ` [Xen-devel] [RFC PATCH 13/16] drivers/xen: gnttab, evtchn, xenbus API changes Ankur Arora
2019-06-17 10:07   ` Juergen Gross [this message]
2019-06-19  2:55     ` Ankur Arora
2019-05-09 17:25 ` Ankur Arora
2019-05-09 17:25 ` [Xen-devel] [RFC PATCH 14/16] xen/blk: " Ankur Arora
2019-06-17 10:14   ` Juergen Gross
2019-06-19  2:59     ` Ankur Arora
2019-05-09 17:25 ` Ankur Arora
2019-05-09 17:25 ` [RFC PATCH 15/16] xen/net: " Ankur Arora
2019-05-09 17:25 ` [Xen-devel] " Ankur Arora
2019-06-17 10:14   ` Juergen Gross
2019-05-09 17:25 ` [Xen-devel] [RFC PATCH 16/16] xen/grant-table: host_addr fixup in mapping on xenhost_r0 Ankur Arora
2019-06-17 10:55   ` Juergen Gross
2019-06-19  3:02     ` Ankur Arora
2019-05-09 17:25 ` Ankur Arora
2019-06-07 14:51 ` [Xen-devel] [RFC PATCH 00/16] xenhost support Juergen Gross
2019-06-07 15:22   ` Joao Martins
2019-06-07 16:21     ` Juergen Gross
2019-06-08  5:50       ` Ankur Arora
2019-06-08  5:33   ` Ankur Arora

Reply instructions:

You may reply publically 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=2c025112-aaeb-0918-ff01-10842d285314@suse.com \
    --to=jgross@suse.com \
    --cc=ankur.a.arora@oracle.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=joao.m.martins@oracle.com \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@lists.xen.org xen-devel@archiver.kernel.org
	public-inbox-index xen-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox