qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Tianrui Zhao <zhaotianrui@loongson.cn>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	Paolo Bonzini <pbonzini@redhat.com>,
	gaosong@loongson.cn
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	maobibo@loongson.cn
Subject: Re: [PATCH RFC v1 09/10] target/loongarch: Add kvm-stub.c
Date: Thu, 20 Apr 2023 12:04:01 +0200	[thread overview]
Message-ID: <a315b56d-a331-5e85-ff55-4dca96088bb9@linaro.org> (raw)
In-Reply-To: <20230420093606.3366969-10-zhaotianrui@loongson.cn>

On 20/4/23 11:36, Tianrui Zhao wrote:
> Add kvm-stub.c for loongarch, there are two stub functions:
> kvm_loongarch_reset_vcpu and kvm_loongarch_set_interrupt.
> 
> Signed-off-by: Tianrui Zhao <zhaotianrui@loongson.cn>
> ---
>   target/loongarch/kvm-stub.c      | 17 +++++++++++++++++
>   target/loongarch/kvm_loongarch.h |  1 +
>   2 files changed, 18 insertions(+)
>   create mode 100644 target/loongarch/kvm-stub.c
> 
> diff --git a/target/loongarch/kvm-stub.c b/target/loongarch/kvm-stub.c
> new file mode 100644
> index 0000000000..e28827ee07
> --- /dev/null
> +++ b/target/loongarch/kvm-stub.c
> @@ -0,0 +1,17 @@
> +/*
> + * QEMU KVM LoongArch specific function stubs
> + *
> + * Copyright (c) 2023 Loongson Technology Corporation Limited
> + */
> +#include "qemu/osdep.h"
> +#include "cpu.h"
> +
> +void kvm_loongarch_reset_vcpu(LoongArchCPU *cpu)

Where is kvm_loongarch_reset_vcpu() called?

> +{
> +    abort();
> +}
> +
> +void kvm_loongarch_set_interrupt(LoongArchCPU *cpu, int irq, int level)
> +{
> +    abort();

Please use g_assert_not_reached() which display more useful informations.

> +}

Add this stub in the previous patch "Implement set vcpu intr for kvm".

> diff --git a/target/loongarch/kvm_loongarch.h b/target/loongarch/kvm_loongarch.h
> index cdef980eec..c03f4bef0f 100644
> --- a/target/loongarch/kvm_loongarch.h
> +++ b/target/loongarch/kvm_loongarch.h
> @@ -8,6 +8,7 @@
>   #ifndef QEMU_KVM_LOONGARCH_H
>   #define QEMU_KVM_LOONGARCH_H
>   
> +void kvm_loongarch_reset_vcpu(LoongArchCPU *cpu);
>   int  kvm_loongarch_set_interrupt(LoongArchCPU *cpu, int irq, int level);
>   
>   #endif



  reply	other threads:[~2023-04-20 10:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20  9:35 [PATCH RFC v1 00/10] Add loongarch kvm accel support Tianrui Zhao
2023-04-20  9:35 ` [PATCH RFC v1 01/10] linux-headers: Add KVM headers for loongarch Tianrui Zhao
2023-04-20  9:49   ` Cornelia Huck
2023-04-20 12:59     ` Tianrui Zhao
2023-04-23  6:59       ` Tianrui Zhao
2023-04-20  9:35 ` [PATCH RFC v1 02/10] target/loongarch: Define some kvm_arch interfaces Tianrui Zhao
2023-04-20  9:35 ` [PATCH RFC v1 03/10] target/loongarch: Supplement vcpu env initial when vcpu reset Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 04/10] target/loongarch: Implement kvm get/set registers Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 05/10] target/loongarch: Implement kvm_arch_init function Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 06/10] target/loongarch: Implement kvm_arch_init_vcpu Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 07/10] target/loongarch: Implement kvm_arch_handle_exit Tianrui Zhao
2023-04-20 10:00   ` Philippe Mathieu-Daudé
2023-04-20 11:06     ` Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 08/10] target/loongarch: Implement set vcpu intr for kvm Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 09/10] target/loongarch: Add kvm-stub.c Tianrui Zhao
2023-04-20 10:04   ` Philippe Mathieu-Daudé [this message]
2023-04-20 11:13     ` Tianrui Zhao
2023-04-20  9:36 ` [PATCH RFC v1 10/10] target/loongarch: Add kvm file into meson build Tianrui Zhao

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=a315b56d-a331-5e85-ff55-4dca96088bb9@linaro.org \
    --to=philmd@linaro.org \
    --cc=cohuck@redhat.com \
    --cc=gaosong@loongson.cn \
    --cc=kvm@vger.kernel.org \
    --cc=maobibo@loongson.cn \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=zhaotianrui@loongson.cn \
    /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).