All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Villard <max@m00nbsd.net>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Kamil Rytarowski" <n54@gmx.com>,
	rth@twiddle.net, ehabkost@redhat.com, slp@redhat.com,
	pbonzini@redhat.com, peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2 3/4] Introduce the NVMM impl
Date: Wed, 5 Feb 2020 18:47:11 +0100	[thread overview]
Message-ID: <60390e82-6168-b2e3-7e5d-149af82c726a@m00nbsd.net> (raw)
In-Reply-To: <c0b0fcb2-c370-52f9-b3ee-adc15455b902@redhat.com>

Hi

Le 03/02/2020 à 12:51, Philippe Mathieu-Daudé a écrit :
>> +static void
>> +nvmm_io_callback(struct nvmm_io *io)
>> +{
>> +    MemTxAttrs attrs = { 0 };
>> +    int ret;
>> +
>> +    ret = address_space_rw(&address_space_io, io->port, attrs, io->data,
>> +        io->size, !io->in);
>> +    if (ret != MEMTX_OK) {
>> +        error_report("NVMM: I/O Transaction Failed "
>> +            "[%s, port=%u, size=%zu]", (io->in ? "in" : "out"),
>> +            io->port, io->size);
>> +    }
>> +
>> +    /* XXX Needed, otherwise infinite loop. */
> 
> This seems OK, why the XXX in comment?
> 
>> +    current_cpu->vcpu_dirty = false;
>> +}

Because the other implementations don't do that and avoid the infinite loop
somehow. I didn't completely understand why, so I left an XXX.

>> +static int
>> +nvmm_vcpu_loop(CPUState *cpu)
>> +{
>> +    struct CPUX86State *env = (CPUArchState *)cpu->env_ptr;
>> +    struct nvmm_machine *mach = get_nvmm_mach();
>> +    struct qemu_vcpu *qcpu = get_qemu_vcpu(cpu);
>> +    struct nvmm_vcpu *vcpu = &qcpu->vcpu;
>> +    X86CPU *x86_cpu = X86_CPU(cpu);
>> +    struct nvmm_vcpu_exit *exit = vcpu->exit;
>> +    int ret;
>> +
>> +    /*
>> +     * Some asynchronous events must be handled outside of the inner
>> +     * VCPU loop. They are handled here.
>> +     */
>> +    if (cpu->interrupt_request & CPU_INTERRUPT_INIT) {
>> +        nvmm_cpu_synchronize_state(cpu);
>> +        do_cpu_init(x86_cpu);
>> +        /* XXX: reset the INT/NMI windows */
> 
> What is the problem?

The int/nmi windows are not set back to the reset state. Not complicated
to do but I never got around to doing it. This can easily be addressed
in a future patch.

Maxime


  parent reply	other threads:[~2020-02-05 18:32 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200107124903.16505-1-n54@gmx.com>
2020-01-28 14:09 ` [PATCH v2 0/4] Implements the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-01-28 14:09   ` [PATCH v2 1/4] Add the NVMM vcpu API Kamil Rytarowski
2020-02-03 11:42     ` Philippe Mathieu-Daudé
2020-01-28 14:09   ` [PATCH v2 2/4] Add the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-02-03 11:41     ` Philippe Mathieu-Daudé
2020-02-03 11:56       ` Kamil Rytarowski
2020-02-03 12:10         ` Philippe Mathieu-Daudé
2020-03-02 17:12         ` Paolo Bonzini
2020-03-02 18:05           ` Kamil Rytarowski
2020-03-02 19:14             ` Maxime Villard
2020-03-02 19:40               ` Paolo Bonzini
2020-03-02 21:10                 ` Kamil Rytarowski
2020-03-02 22:45                   ` Paolo Bonzini
2020-03-02 17:11       ` Paolo Bonzini
2020-03-02 18:09         ` Kamil Rytarowski
2020-01-28 14:09   ` [PATCH v2 3/4] Introduce the NVMM impl Kamil Rytarowski
2020-02-03 11:51     ` Philippe Mathieu-Daudé
2020-02-05 17:22       ` Kamil Rytarowski
2020-02-05 17:47       ` Maxime Villard [this message]
2020-01-28 14:09   ` [PATCH v2 4/4] Add the NVMM acceleration enlightenments Kamil Rytarowski
2020-02-03 11:54     ` Philippe Mathieu-Daudé
2020-02-06 10:24       ` Kamil Rytarowski
2020-02-06 12:18         ` Philippe Mathieu-Daudé
2020-02-06 13:06         ` Markus Armbruster
2020-02-06 13:09           ` Philippe Mathieu-Daudé
2020-02-06 13:31             ` Kamil Rytarowski
2020-02-06 14:13               ` Markus Armbruster
2020-02-06 15:38                 ` Kamil Rytarowski
2020-02-06 16:07                   ` Philippe Mathieu-Daudé
2020-02-06 16:59                     ` Kamil Rytarowski
2020-02-03  9:52   ` [PATCH v2 0/4] Implements the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-02-06 11:57   ` [PATCH v3 " Kamil Rytarowski
2020-02-06 11:57     ` [PATCH v3 1/4] Add the NVMM vcpu API Kamil Rytarowski
2020-02-06 21:06       ` Jared McNeill
2020-02-06 11:57     ` [PATCH v3 2/4] Add the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-02-06 21:06       ` Jared McNeill
2020-02-06 11:57     ` [PATCH v3 3/4] Introduce the NVMM impl Kamil Rytarowski
2020-02-06 21:07       ` Jared McNeill
2020-02-06 11:57     ` [PATCH v3 4/4] Add the NVMM acceleration enlightenments Kamil Rytarowski
2020-02-06 21:07       ` Jared McNeill
2020-02-06 13:13     ` [PATCH v3 0/4] Implements the NetBSD Virtual Machine Monitor accelerator no-reply
2020-02-06 13:21       ` Kamil Rytarowski
2020-02-06 16:01         ` Philippe Mathieu-Daudé
2020-02-06 21:32     ` [PATCH v4 " Kamil Rytarowski
2020-02-06 21:32       ` [PATCH v4 1/4] Add the NVMM vcpu API Kamil Rytarowski
2020-08-11 12:47         ` [PATCH v5 " Kamil Rytarowski
2020-08-11 12:47           ` [PATCH v5 2/4] Add the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-08-11 12:47           ` [PATCH v5 3/4] Introduce the NVMM impl Kamil Rytarowski
2020-08-11 12:47           ` [PATCH v5 4/4] Add the NVMM acceleration enlightenments Kamil Rytarowski
2020-08-11 13:01         ` [PATCH v5 1/4] Add the NVMM vcpu API Kamil Rytarowski
2020-08-11 13:01           ` [PATCH v5 2/4] Add the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-08-11 13:01           ` [PATCH v5 3/4] Introduce the NVMM impl Kamil Rytarowski
2020-08-11 13:01           ` [PATCH v5 4/4] Add the NVMM acceleration enlightenments Kamil Rytarowski
2020-09-04 23:28           ` [PATCH v5 1/4] Add the NVMM vcpu API Kamil Rytarowski
2020-02-06 21:32       ` [PATCH v4 2/4] Add the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-02-06 21:32       ` [PATCH v4 3/4] Introduce the NVMM impl Kamil Rytarowski
2020-02-06 23:28         ` [PATCH v4 3/4 FIXUP] " Kamil Rytarowski
2020-03-02 18:13         ` [PATCH v4 3/4] " Paolo Bonzini
2020-03-02 19:28           ` Maxime Villard
2020-03-02 19:35             ` Paolo Bonzini
2020-03-10  6:45               ` Maxime Villard
2020-03-10 10:15                 ` Kamil Rytarowski
2020-03-10 10:58                 ` Paolo Bonzini
2020-03-10 19:14                   ` Maxime Villard
2020-03-11 18:03                     ` Paolo Bonzini
2020-03-11 20:14                       ` Maxime Villard
2020-03-11 20:42                         ` Paolo Bonzini
2020-03-11 21:21                           ` Maxime Villard
2020-03-11 21:22                             ` Kamil Rytarowski
2020-03-11 21:44                             ` Paolo Bonzini
2020-03-12  7:08                               ` Maxime Villard
2020-07-21 13:42                 ` Kamil Rytarowski
2020-02-06 21:32       ` [PATCH v4 4/4] Add the NVMM acceleration enlightenments Kamil Rytarowski
2020-02-17  9:07       ` [PATCH v4 0/4] Implements the NetBSD Virtual Machine Monitor accelerator Kamil Rytarowski
2020-02-24 15:17         ` Kamil Rytarowski
2020-03-02 17:02           ` Kamil Rytarowski
2020-03-02 17:10             ` Eduardo Habkost
2020-03-02 17:10               ` Kamil Rytarowski
2020-03-02 17:22                 ` Eduardo Habkost

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=60390e82-6168-b2e3-7e5d-149af82c726a@m00nbsd.net \
    --to=max@m00nbsd.net \
    --cc=ehabkost@redhat.com \
    --cc=n54@gmx.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=slp@redhat.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 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.