Re: Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-04 Thread Jim Mattson
On Mon, Mar 4, 2024 at 6:11 PM Xu Liu wrote: > > Hey Alex and Paolo, > > I saw there is some code related to AVX > https://elixir.bootlin.com/linux/latest/source/arch/x86/kvm/emulate.c#L668 > > Does that mean in some special cases, kvm supports AVX instructions ? > I didn’t really know the big p

Re: [PATCH v4] x86: add etc/phys-bits fw_cfg file

2022-09-22 Thread Jim Mattson
On Thu, Sep 22, 2022 at 7:16 AM Gerd Hoffmann wrote: > > On Thu, Sep 22, 2022 at 02:38:02PM +0200, Paolo Bonzini wrote: > > On Thu, Sep 22, 2022 at 2:21 PM Gerd Hoffmann wrote: > > > No. This will basically inform the guest that host-phys-bits has been > > > enabled (and pass the number of bits)

Re: [PATCH 2/2] x86/cpu: Handle GUEST_MAXPHYADDR < HOST_MAXPHYADDR for hosts that don't support it

2020-07-09 Thread Jim Mattson
On Thu, Jul 9, 2020 at 2:44 AM Gerd Hoffmann wrote: > (2) GUEST_MAXPHYADDR < HOST_MAXPHYADDR > > Mostly fine. Some edge cases, like different page fault errors for > addresses above GUEST_MAXPHYADDR and below HOST_MAXPHYADDR. Which I > think Mohammed fixed in the kernel recently. D

Re: [PATCH] x86: Add CPUID KVM support for new instruction WBNOINVD

2019-10-01 Thread Jim Mattson
On Tue, Oct 1, 2019 at 10:54 AM Sean Christopherson wrote: > > On Tue, Oct 01, 2019 at 10:23:31AM -0700, Jim Mattson wrote: > > On Tue, Oct 1, 2019 at 10:06 AM Sean Christopherson > > wrote: > > > > > > On Tue, Oct 01, 2019 at 07:20:17AM -0700, Jim Mattson wr

Re: [PATCH] x86: Add CPUID KVM support for new instruction WBNOINVD

2019-10-01 Thread Jim Mattson
On Tue, Oct 1, 2019 at 10:06 AM Sean Christopherson wrote: > > On Tue, Oct 01, 2019 at 07:20:17AM -0700, Jim Mattson wrote: > > On Mon, Sep 30, 2019 at 5:45 PM Huang, Kai wrote: > > > > > > On Mon, 2019-09-30 at 12:23 -0700, Jim Mattson wrote: > > > >

Re: [PATCH] x86: Add CPUID KVM support for new instruction WBNOINVD

2019-10-01 Thread Jim Mattson
On Mon, Sep 30, 2019 at 5:45 PM Huang, Kai wrote: > > On Mon, 2019-09-30 at 12:23 -0700, Jim Mattson wrote: > > On Mon, Sep 30, 2019 at 10:54 AM Eduardo Habkost > > wrote: > > > CCing qemu-devel. > > > > > > On Tue, Sep 24, 2019 at 01:30:04PM -07

Re: [PATCH] x86: Add CPUID KVM support for new instruction WBNOINVD

2019-09-30 Thread Jim Mattson
On Mon, Sep 30, 2019 at 10:54 AM Eduardo Habkost wrote: > > CCing qemu-devel. > > On Tue, Sep 24, 2019 at 01:30:04PM -0700, Jim Mattson wrote: > > On Wed, Dec 19, 2018 at 1:02 PM Paolo Bonzini wrote: > > > > > > On 19/12/18 18:39, Jim Mattson wrote: > >

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Jim Mattson via Qemu-devel
On Mon, Nov 12, 2018 at 4:00 PM, Liran Alon wrote: > > >> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: >> >> On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: >>> * Daniel P. Berrangé (berra...@redhat.com) wrote: On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bo

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-07 Thread Jim Mattson via Qemu-devel
On Wed, Nov 7, 2018 at 4:13 PM, Liran Alon wrote: > Ping on my last reply. > I would like to reach to an agreement on how v3 should look like before just > implementing what I think is right. > > Thanks, > -Liran I have no attachments to the current design. I had used a data[] blob, because I di

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-02 Thread Jim Mattson via Qemu-devel
On Fri, Nov 2, 2018 at 9:58 AM, Daniel P. Berrangé wrote: > On Fri, Nov 02, 2018 at 09:44:54AM -0700, Jim Mattson via Qemu-devel wrote: >> On Fri, Nov 2, 2018 at 5:59 AM, Liran Alon wrote: >> > >> >> >>> Therefore, I don't think that we want this vers

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-02 Thread Jim Mattson via Qemu-devel
On Fri, Nov 2, 2018 at 5:59 AM, Liran Alon wrote: > >>> Therefore, I don't think that we want this versioning to be based on >>> KVM_CAP at all. >>> It seems that we would want the process to behave as follows: >>> 1) Mgmt-layer at dest queries dest host max supported nested_state size. >>> (W

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-02 Thread Jim Mattson via Qemu-devel
On Thu, Nov 1, 2018 at 8:46 PM, Liran Alon wrote: > Hmm this makes sense. > > This means though that the patch I have submitted here isn't good enough. > My patch currently assumes that when it attempts to get nested state from KVM, > QEMU should always set nested_state->size to max size supporte

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-01 Thread Jim Mattson via Qemu-devel
On Thu, Nov 1, 2018 at 12:07 PM, Dr. David Alan Gilbert wrote: > OK; the tricky thing is when you upgrade one host in a small cluster as > you start doing an upgrade, and then once it's got it's first VM you > can't migrate away from it until others are updated; that gets messy. One must always

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-01 Thread Jim Mattson via Qemu-devel
On Thu, Nov 1, 2018 at 8:56 AM, Dr. David Alan Gilbert wrote: > So if I have matching host kernels it should always work? > What happens if I upgrade the source kernel to increase it's maximum > nested size, can I force it to keep things small for some VMs? Any change to the format of the nested

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-12 Thread Jim Mattson via Qemu-devel
On Wed, Apr 12, 2017 at 7:54 AM, Alexander Graf wrote: > > > On 12.04.17 16:34, Jim Mattson wrote: >> >> Actually, we have rejected commit 87c00572ba05aa8c ("kvm: x86: emulate >> monitor and mwait instructions as nop"), so when we intercept >> MONITOR/M

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-12 Thread Jim Mattson via Qemu-devel
1, 2017 at 11:23 AM, Alexander Graf wrote: > > >> Am 11.04.2017 um 19:10 schrieb Jim Mattson : >> >> This might be more useful if it could be dynamically toggled on and >> off, depending on system load. > > What would trapping mwait (currently) buy you? > >

Re: [Qemu-devel] [PATCH v6] kvm: better MWAIT emulation for guests

2017-04-11 Thread Jim Mattson via Qemu-devel
This might be more useful if it could be dynamically toggled on and off, depending on system load. On Tue, Apr 11, 2017 at 4:45 AM, Alexander Graf wrote: > From: "Michael S. Tsirkin" > > Guests that are heavy on futexes end up IPI'ing each other a lot. That > can lead to significant slowdowns an