From: Roman Bolshakov <roman@roolebo.dev>
To: Phil Dennis-Jordan <lists@philjordan.eu>
Cc: Phil Dennis-Jordan <phil@philjordan.eu>,
qemu-devel@nongnu.org, dirty@apple.com, rbolshakov@ddn.com,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 2/3] i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force exit
Date: Sun, 5 Nov 2023 20:51:33 +0530 [thread overview]
Message-ID: <ZUey_ZynRm9XwQLD@roolebo.dev> (raw)
In-Reply-To: <CAGCz3vt2VB9i8+o-qFPpDptu81p3r00-TKfCV3O+=dQ0r3d88w@mail.gmail.com>
On Fri, Oct 20, 2023 at 05:12:13PM +0200, Phil Dennis-Jordan wrote:
> Hi Roman, hi Paolo,
>
Hi Phil,
Pardon for not responding earlier. I was travelling the last three weeks.
I appreciate the time you spent on the rebase. I have compiled it and
observed the same issue with SVGA like with your third patch.
> Just an update on my investigation of the hv_vcpu_run ->
> hv_vcpu_run_until issue. The graphical issues with the Windows XP VM
> appear to be caused by the dirty memory page system not working as
> expected. The emulated (Cirrus) VGA adapter uses dirty page tracking
> to perform partial screen updates, so when pages aren't marked as
> dirty, they don't get updated on the host console.
>
That sounds awesome, I think you have tracked it down correctly. I have
also looked at SVGA code and the only idea I had is dirty tracking is
somehow not working properly.
I observed similar issue when tried to add GDB stub for x86 hvf. The
changes from GDB stub produced no apparent effect on the guest -
breakpoints were there, in the memory but did not stop the guest and so
on. I got lost why it didn't work back then.
> This got me digging into how dirty memory tracking is actually
> implemented in the Qemu hvf backend, and basically, it should never
> have worked in the first place. When we get a write fault, the code
> marks the *whole* 'logged' memory range as writable rather than just
> the page that's just been dirtied. It just so happens that hv_vcpu_run
> was causing EPT fault exits on those pages even after marking them
> writable (?), and hv_vcpu_run_until() no longer does that. So
> basically, this has been a Qemu bug masked by undesirable
> hv_vcpu_run() behaviour. I'll start putting together a fix for this.
>
Sounds good, have you got anything to test or review? Meanwhile, I'll
review the pending patches you sent.
Best regards,
Roman
next prev parent reply other threads:[~2023-11-05 15:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 14:09 [PATCH 0/3] hvf x86 correctness and efficiency improvements Phil Dennis-Jordan
2023-09-22 14:09 ` [PATCH 1/3] i386: hvf: Adds support for INVTSC cpuid bit Phil Dennis-Jordan
2023-10-08 18:07 ` Roman Bolshakov
2023-09-22 14:09 ` [PATCH 2/3] i386: hvf: In kick_vcpu use hv_vcpu_interrupt to force exit Phil Dennis-Jordan
2023-10-08 18:23 ` Roman Bolshakov
2023-10-08 18:39 ` Phil Dennis-Jordan
2023-10-08 19:19 ` Roman Bolshakov
2023-10-08 19:29 ` Phil Dennis-Jordan
2023-10-16 14:19 ` Phil Dennis-Jordan
2023-10-20 15:12 ` Phil Dennis-Jordan
2023-11-05 15:21 ` Roman Bolshakov [this message]
2023-11-06 14:15 ` Phil Dennis-Jordan
2023-09-22 14:09 ` [PATCH 3/3] i386: hvf: Updates API usage to use modern vCPU run function Phil Dennis-Jordan
2023-10-05 20:30 ` [PATCH 0/3] hvf x86 correctness and efficiency improvements Phil Dennis-Jordan
2023-10-16 14:39 ` Paolo Bonzini
2023-10-16 16:45 ` Phil Dennis-Jordan
2023-10-16 16:48 ` Paolo Bonzini
2023-10-16 20:05 ` Phil Dennis-Jordan
2023-10-16 21:08 ` 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=ZUey_ZynRm9XwQLD@roolebo.dev \
--to=roman@roolebo.dev \
--cc=dirty@apple.com \
--cc=lists@philjordan.eu \
--cc=pbonzini@redhat.com \
--cc=phil@philjordan.eu \
--cc=qemu-devel@nongnu.org \
--cc=rbolshakov@ddn.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;
as well as URLs for NNTP newsgroup(s).