All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Reinoud Zandijk <reinoud@NetBSD.org>, qemu-devel@nongnu.org
Cc: Kamil Rytarowski <kamil@NetBSD.org>,
	Ryo ONODERA <ryoon@netbsd.org>,
	Richard Henderson <richard.henderson@linaro.org>,
	Eduardo Habkost <ehabkost@redhat.com>
Subject: Re: [PATCH v6 2/4] Add NVMM accelerator: x86 CPU support
Date: Thu, 1 Apr 2021 10:35:40 +0200	[thread overview]
Message-ID: <5afd10b1-bd32-2f06-b311-246815428bfc@redhat.com> (raw)
In-Reply-To: <20210331200800.24168-3-reinoud@NetBSD.org>

On 31/03/21 22:07, Reinoud Zandijk wrote:
> +void nvmm_vcpu_kick(CPUState *cpu);

Not defined anywhere.

> +{
> +#if NVMM_USER_VERSION == 1
> +    struct sigaction sigact;
> +    sigset_t set;
> +
> +    /* Install the IPI handler. */
> +    memset(&sigact, 0, sizeof(sigact));
> +    sigact.sa_handler = nvmm_ipi_signal;
> +    sigaction(SIG_IPI, &sigact, NULL);
> +
> +    /* Allow IPIs on the current thread. */
> +    sigprocmask(SIG_BLOCK, NULL, &set);
> +    sigdelset(&set, SIG_IPI);
> +    pthread_sigmask(SIG_SETMASK, &set, NULL);
> +#else
> +    /*
> +     * We use the nvmm_vcpu_stop() mechanism, and don't use signals.
> +     * Nothing to do.
> +     */
> +#endif

Since nvmm_vcpu_stop is very similar to KVM's immediate_exit mechanism, 
I think you still need to have a dummy signal handler to kick the VM out 
of the run loop *if it is in the kernel*.  The signal handler however 
can just do nothing.

Also, can you just drop support for NVMM_USER_VERSION == 1?

> diff --git a/target/i386/nvmm/meson.build b/target/i386/nvmm/meson.build
> new file mode 100644
> index 0000000000..c154e78014
> --- /dev/null
> +++ b/target/i386/nvmm/meson.build
> @@ -0,0 +1,4 @@
> +i386_softmmu_ss.add(when: 'CONFIG_NVMM', if_true: files(
> +  'nvmm-all.c',
> +  'nvmm-accel-ops.c',
> +))

The nvmm library should be added here.

Paolo



  reply	other threads:[~2021-04-01  8:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 20:07 [PATCH v6 0/4] Implements the NetBSD Virtual Machine Monitor accelerator Reinoud Zandijk
2021-03-31 20:07 ` [PATCH v6 1/4] Add NVMM accelerator: configure and build logic Reinoud Zandijk
2021-04-01  8:28   ` Paolo Bonzini
2021-04-01 12:17     ` Reinoud Zandijk
2021-04-01 12:44       ` Paolo Bonzini
2021-03-31 20:07 ` [PATCH v6 2/4] Add NVMM accelerator: x86 CPU support Reinoud Zandijk
2021-04-01  8:35   ` Paolo Bonzini [this message]
2021-04-01 12:32     ` Reinoud Zandijk
2021-04-01 12:48       ` Paolo Bonzini
2021-03-31 20:07 ` [PATCH v6 3/4] Add NVMM accelerator: acceleration enlightenments Reinoud Zandijk
2021-03-31 20:08 ` [PATCH v6 4/4] Add NVMM Accelerator: add maintainers for NetBSD/NVMM Reinoud Zandijk
2021-04-01  8:36 ` [PATCH v6 0/4] Implements the NetBSD Virtual Machine Monitor accelerator Paolo Bonzini

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=5afd10b1-bd32-2f06-b311-246815428bfc@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=kamil@NetBSD.org \
    --cc=qemu-devel@nongnu.org \
    --cc=reinoud@NetBSD.org \
    --cc=richard.henderson@linaro.org \
    --cc=ryoon@netbsd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.