https://bugzilla.kernel.org/show_bug.cgi?id=107561
John Brooks changed:
What|Removed |Added
CC||k...@fastquake.com
Hi,
I've been working adding support for split IRQ chip mode in QEMU.
http://lists.gnu.org/archive/html/qemu-devel/2015-11/msg00235.html
That work uncovered a few problems in the KVM implementation:
* There's a missing call to kvm_make_request in
kvm_vcpu_ioctl_interrupt.
* req_int_win
Aravinda Prasad writes:
>> Yeah, it would be good not to break this.
>
> I am not familiar with CAPI. Does this affect CAPI?
When a CAPI card experiences an EEH event, any cache lines it holds are
filled with SUEs (Special UEs, interpreted by the kernel the same as
On Fri, 30 Oct 2015 12:42:35 +0100
Greg Kurz wrote:
> The vq->is_le field is used to fix endianness when accessing the vring via
> the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
>
> 1) host is big endian and device is modern virtio
>
> 2)
On 12/11/2015 08:06, Jian Zhou wrote:
>>
>> I think you can just do this in kvm_x86_ops->set_msr. The old
>> implementation for DEBUGCTL MSR can be moved to svm.c.
>
> I think you mean "moved to vmx.c"?
No, the old implementation is moved from x86.c to svm.c.
The new implementation you
On 2015/11/11 23:23, Paolo Bonzini wrote:
On 23/10/2015 11:15, Jian Zhou wrote:
Changelog in v2:
(1) move the implementation into vmx.c
(2) migraton is supported
(3) add arrays in kvm_vcpu_arch struct to save/restore
LBR MSRs at vm exit/entry time.
(4) add a parameter of
On 12/11/2015 06:35, Paul Mackerras wrote:
> Paolo,
>
> I have two fixes for HV KVM which I would like to have included in
> v4.4-rc1. The first one is a fix for a bug identified by Red Hat
> which causes occasional guest crashes. The second one fixes a bug
> which causes host stalls and
Linus,
The following changes since commit a3eaa8649e4c6a6afdafaa04b9114fb230617bb1:
KVM: VMX: Fix commit which broke PML (2015-11-05 11:34:11 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
for you to fetch changes up to
Hey Paolo,
do we apply stuff like that below?
When booting guests all the time here, dmesg gets filled up with those
"unhandled rdmsr" useless warnings. The patch below shuts them up.
The only problem is that the IC CFG MSR has those fields
defined starting from F15h and I don't see a way to
https://bugzilla.kernel.org/show_bug.cgi?id=107561
Aaron Campbell changed:
What|Removed |Added
CC||aa...@monkey.org
---
2015-11-12 19:12 GMT+08:00 Paolo Bonzini :
> Signed-off-by: Paolo Bonzini
> ---
> lib/x86/processor.h | 16
> x86/tsc.c | 23 +++
> x86/unittests.cfg | 1 +
> 3 files changed, 40 insertions(+)
>
> diff
2015-11-12 19:12 GMT+08:00 Paolo Bonzini :
>
> Signed-off-by: Paolo Bonzini
> ---
> lib/x86/processor.h | 16
> x86/tsc.c | 23 +++
> x86/unittests.cfg | 1 +
> 3 files changed, 40 insertions(+)
>
> diff
This patch tries to poll for new added tx buffer or socket receive
queue for a while at the end of tx/rx processing. The maximum time
spent on polling were specified through a new kind of vring ioctl.
Signed-off-by: Jason Wang
---
drivers/vhost/net.c| 77
Hi all:
This series tries to add basic busy polling for vhost net. The idea is
simple: at the end of tx/rx processing, busy polling for new tx added
descriptor and rx receive socket for a while. The maximum number of
time (in us) could be spent on busy polling was specified ioctl.
Test were done
mmu_set_spte()'s code is based on the assumption that the emulate
parameter has a valid pointer value if set_spte() returns true and
write_fault is not zero. In other cases, emulate may be NULL, so a
NULL-check is needed.
Stop passing emulate pointer and make mmu_set_spte() return the emulate
Both __mmu_unsync_walk() and mmu_pages_clear_parents() have three line
code which clears a bit in the unsync child bitmap; the former places it
inside a loop block and uses a few goto statements to jump to it.
A new helper function, clear_unsync_child_bit(), makes the code cleaner.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c | 20 +++-
arch/x86/kvm/paging_tmpl.h | 4 ++--
2 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 33fe720..101e77d 100644
vgic_io_ops is only referenced within vgic.c, so it can be declared
static.
Signed-off-by: Jisheng Zhang
---
virt/kvm/arm/vgic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index 5335383..8ef7279 100644
---
This path introduces a helper which can give a hint for whether or not
there's a work queued in the work list.
Signed-off-by: Jason Wang
---
drivers/vhost/vhost.c | 7 +++
drivers/vhost/vhost.h | 1 +
2 files changed, 8 insertions(+)
diff --git a/drivers/vhost/vhost.c
Signed-off-by: Jason Wang
---
drivers/vhost/vhost.c | 26 +-
drivers/vhost/vhost.h | 1 +
2 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 163b365..b86c5aa 100644
---
On 12/11/2015 11:13, Borislav Petkov wrote:
> Hey Paolo,
>
> do we apply stuff like that below?
If we really need to, we do.
> When booting guests all the time here, dmesg gets filled up with those
> "unhandled rdmsr" useless warnings. The patch below shuts them up.
>
> The only problem is
Signed-off-by: Paolo Bonzini
---
lib/x86/processor.h | 16
x86/tsc.c | 23 +++
x86/unittests.cfg | 1 +
3 files changed, 40 insertions(+)
diff --git a/lib/x86/processor.h b/lib/x86/processor.h
index 7973879..b9cb753 100644
is_rmap_spte(), originally named is_rmap_pte(), was introduced when the
simple reverse mapping was implemented by commit cd4a4e5374110444
("[PATCH] KVM: MMU: Implement simple reverse mapping"). At that point,
its role was clear and only rmap_add() and rmap_remove() were using it
to select sptes
Hi Jason,
I understand your busy loop timeout is quite conservative at 50us. Did you try
any other values?
Also, did you measure how polling affects many VMs talking to each other (e.g.
20 VMs on each host, perhaps with several vNICs each, transmitting to a
corresponding VM/vNIC pair on
On Thu, Nov 12, 2015 at 11:59:58AM +0100, Borislav Petkov wrote:
> On Thu, Nov 12, 2015 at 11:33:33AM +0100, Paolo Bonzini wrote:
> > Yes, see guest_cpuid_has_* for an example of reading the CPUID values.
> >
> > But if it's defined for _all_ models starting at family 21, we can just
> > do it
On 12/11/2015 13:16, Borislav Petkov wrote:
>>> > > Yes, see guest_cpuid_has_* for an example of reading the CPUID values.
>>> > >
>>> > > But if it's defined for _all_ models starting at family 21, we can just
>>> > > do it unconditionally.
>> >
>> > The thing is, those bits are Reserved
On 11/12/2015 06:16 PM, Jason Wang wrote:
> Hi all:
>
> This series tries to add basic busy polling for vhost net. The idea is
> simple: at the end of tx/rx processing, busy polling for new tx added
> descriptor and rx receive socket for a while. The maximum number of
> time (in us) could be
Make kvm_mmu_alloc_page() do just what its name tells to do, and remove
the extra error check at its call site since the allocation cannot fail.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c | 15 ---
1 file changed, 8 insertions(+), 7
New struct kvm_rmap_head makes the code type-safe to some extent.
Signed-off-by: Takuya Yoshikawa
---
arch/x86/include/asm/kvm_host.h | 8 +-
arch/x86/kvm/mmu.c | 169 +---
arch/x86/kvm/mmu_audit.c|
On 12/11/2015 12:48, Takuya Yoshikawa wrote:
> v1->v2:
> Patch 5 and 7 are added based on Paolo's suggestions.
> Patch 8-10 are new.
>
> Patch 1/2/3/4: no change.
> Patch 5: Needed a bit more work than I had expected.
> Patch 6: Removed extra comment of v1 (patch 5 made it inappropriate).
>
On 2015/11/12 17:00, Paolo Bonzini wrote:
On 12/11/2015 08:06, Jian Zhou wrote:
I think you can just do this in kvm_x86_ops->set_msr. The old
implementation for DEBUGCTL MSR can be moved to svm.c.
I think you mean "moved to vmx.c"?
No, the old implementation is moved from x86.c to
On Thu, Nov 12, 2015 at 11:33:33AM +0100, Paolo Bonzini wrote:
> Yes, see guest_cpuid_has_* for an example of reading the CPUID values.
>
> But if it's defined for _all_ models starting at family 21, we can just
> do it unconditionally.
The thing is, those bits are Reserved again on the next
On Wed, Nov 11, 2015 at 11:30:27PM +0100, David Woodhouse wrote:
> On Wed, 2015-11-11 at 07:56 -0800, Andy Lutomirski wrote:
> >
> > Can you flesh out this trick?
> >
> > On x86 IIUC the IOMMU more-or-less defaults to passthrough. If the
> > kernel wants, it can switch it to a non-passthrough
Signed-off-by: Takuya Yoshikawa
---
arch/x86/kvm/mmu.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index e7c2c14..c3bbc82 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86/kvm/mmu.c
@@
v1->v2:
Patch 5 and 7 are added based on Paolo's suggestions.
Patch 8-10 are new.
Patch 1/2/3/4: no change.
Patch 5: Needed a bit more work than I had expected.
Patch 6: Removed extra comment of v1 (patch 5 made it inappropriate).
Patch 7: As expected, many places needed to be converted.
Every time kvm_mmu_get_page() is called with a non-NULL parent_pte
argument, link_shadow_page() follows that to set the parent entry so
that the new mapping will point to the returned page table.
Moving parent_pte handling there allows to clean up the code because
parent_pte is passed to
On Fri, 30 Oct 2015 12:42:35 +0100
Greg Kurz wrote:
> The vq->is_le field is used to fix endianness when accessing the vring via
> the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
>
> 1) host is big endian and device is modern virtio
>
> 2)
kvm_mmu_mark_parents_unsync() alone uses pte_list_walk(), witch does
nearly the same as the for_each_rmap_spte macro. The only difference
is that is_shadow_present_pte() checks cannot be placed there because
kvm_mmu_mark_parents_unsync() can be called with a new parent pointer
whose entry is not
At some call sites of rmap_get_first() and rmap_get_next(), BUG_ON is
placed right after the call to detect unrelated sptes which must not be
found in the reverse-mapping list.
Move this check in rmap_get_first/next() so that all call sites, not
just the users of the for_each_rmap_spte() macro,
On Thu, 2015-11-12 at 13:09 +0200, Michael S. Tsirkin wrote:
> On Wed, Nov 11, 2015 at 11:30:27PM +0100, David Woodhouse wrote:
> >
> > If the IOMMU is exposed, and enabled, and telling the guest kernel that
> > it *does* cover the virtio devices, then those virtio devices will
> > *not* be in
On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
>
>
> On Thursday 12 November 2015 10:13 AM, David Gibson wrote:
> > On Thu, Nov 12, 2015 at 10:02:10AM +0530, Aravinda Prasad wrote:
> >>
> >>
> >> On Thursday 12 November 2015 09:08 AM, David Gibson wrote:
> >>> On Thu, Nov 12,
On Friday 13 November 2015 07:20 AM, David Gibson wrote:
> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
[...]
>>
>> I overlooked it. I think I need to take into consideration whether guest
>> issued "ibm, nmi-register". If the guest has issued "ibm, nmi-register"
>> then we
On 13/11/15 07:26, Aravinda Prasad wrote:
>
> On Friday 13 November 2015 07:20 AM, David Gibson wrote:
>> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
[...]
>>> So thinking whether qemu should explicitly enable the new NMI
>>> behavior.
>>
>> So, I think the reasoning above
On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote:
> The vq->is_le field is used to fix endianness when accessing the vring via
> the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases:
>
> 1) host is big endian and device is modern virtio
>
> 2) host has cross-endian
On 2015-11-11 14:12, Austin S Hemmelgarn wrote:
> On 2015-11-11 08:07, Paolo Bonzini wrote:
>>
>>
>> On 11/11/2015 13:47, Austin S Hemmelgarn wrote:
>>> I just finished running a couple of tests in a KVM instance running
>>> nested on a Xen HVM instance, and found no issues, so for the set as
On 12/11/2015 12:56, Takuya Yoshikawa wrote:
> diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
> index 9d21b44..f414ca6 100644
> --- a/arch/x86/kvm/paging_tmpl.h
> +++ b/arch/x86/kvm/paging_tmpl.h
> @@ -598,7 +598,7 @@ static int FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t
On Thu, 12 Nov 2015 15:46:30 +0200
"Michael S. Tsirkin" wrote:
> On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote:
> > The vq->is_le field is used to fix endianness when accessing the vring via
> > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following
RDTSCP was never supported for AMD CPUs, which nobody noticed because
Linux does not use it. But exactly the fact that Linux does not
use it makes the implementation very simple; we can freely trash
MSR_TSC_AUX while running the guest.
Cc: Joerg Roedel
Signed-off-by: Paolo
On 12/11/2015 15:08, Jan Kiszka wrote:
> On 2015-11-11 14:12, Austin S Hemmelgarn wrote:
>> On 2015-11-11 08:07, Paolo Bonzini wrote:
>>>
>>>
>>> On 11/11/2015 13:47, Austin S Hemmelgarn wrote:
>
I just finished running a couple of tests in a KVM instance running
nested on a Xen
If we do not do this, it is not properly saved and restored across
migration. Windows notices due to its self-protection mechanisms,
and is very upset about it (blue screen of death).
Cc: Radim Krcmar
Cc: sta...@vger.kernel.org
Signed-off-by: Paolo Bonzini
Hi Paolo,
On Thu, Nov 12, 2015 at 02:49:16PM +0100, Paolo Bonzini wrote:
> RDTSCP was never supported for AMD CPUs, which nobody noticed because
> Linux does not use it. But exactly the fact that Linux does not
> use it makes the implementation very simple; we can freely trash
> MSR_TSC_AUX
On 2015/11/12 23:27, Paolo Bonzini wrote:
On 12/11/2015 12:56, Takuya Yoshikawa wrote:
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index 9d21b44..f414ca6 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -598,7 +598,7 @@ static int
On Friday 13 November 2015 03:07 AM, Daniel Axtens wrote:
> Aravinda Prasad writes:
>
>>> Yeah, it would be good not to break this.
>>
>> I am not familiar with CAPI. Does this affect CAPI?
>
> When a CAPI card experiences an EEH event, any cache lines it holds
On 11/11/15 22:27, Haozhong Zhang wrote:
> On 11/11/15 12:16, Eduardo Habkost wrote:
[...]
> > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > > index 2f8f396..858ed69 100644
> > > --- a/hw/i386/pc_q35.c
> > > +++ b/hw/i386/pc_q35.c
> > > @@ -385,6 +385,7 @@ static void
Poor #AC was so unimportant until a few days ago that we were
not even tracing its name correctly. But now it's all over
the place.
Cc: sta...@vger.kernel.org
Signed-off-by: Paolo Bonzini
---
arch/x86/kvm/trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
From: Jason Wang
Signed-off-by: Jason Wang
Reviewed-by: Michael S. Tsirkin
Signed-off-by: Michael S. Tsirkin
Acked-by: Paolo Bonzini
---
include/sysemu/kvm.h | 8
kvm-all.c|
On Thursday 12 November 2015 10:13 AM, David Gibson wrote:
> On Thu, Nov 12, 2015 at 10:02:10AM +0530, Aravinda Prasad wrote:
>>
>>
>> On Thursday 12 November 2015 09:08 AM, David Gibson wrote:
>>> On Thu, Nov 12, 2015 at 01:24:19PM +1100, Daniel Axtens wrote:
Aravinda Prasad
On 12/11/2015 15:27, Paolo Bonzini wrote:
> Here I think you can remove completely the
>
> if (sp)
> kvm_mmu_put_page(sp, it.sptep);
>
> later in FNAME(fetch). Apart from this nit, it's okay.
Removing this is of course not possible anymore if the other suggestion
works
On Thursday 12 November 2015 10:28 AM, Daniel Axtens wrote:
>
>> So, IIUC. Once the qemu pieces are in place as well it shouldn't
>> change this behaviour: KVM will exit to qemu, qemu will log the error
>> information (new), then reinject the MC to the guest which can still
>> handle it as you
From: Alex Bennée
The aim of these tests is to combine with an appropriate kernel
image (with symbol-file vmlinux) and check it behaves as it should.
Given a kernel it checks:
- single step
- software breakpoint
- hardware breakpoint
- access, read and write watchpoints
This adds basic support for HW assisted debug. The ioctl interface to
KVM allows us to pass an implementation defined number of break and
watch point registers. When KVM_GUESTDBG_USE_HW is specified these
debug registers will be installed in place on the world switch into the
guest.
The hardware
This adds support for single-step. There isn't much to do on the QEMU
side as after we set-up the request for single step via the debug ioctl
it is all handled within the kernel.
Signed-off-by: Alex Bennée
---
v2
- convert to using HSR_EC
v3
- use internals.h
These don't involve messing around with debug registers, just setting
the breakpoint instruction in memory. GDB will not use this mechanism if
it can't access the memory to write the breakpoint.
All the kernel has to do is ensure the hypervisor traps the breakpoint
exceptions and returns to
From: Alex Bennée
If we can't find details for the debug exception in our debug state
then we can assume the exception is due to debugging inside the guest.
To inject the exception into the guest state we re-use the TCG exception
code (do_interupt).
However while guest
As we haven't always had guest debug support we need to probe for it.
Additionally we don't do this in the start-up capability code so we
don't fall over on old kernels.
Signed-off-by: Alex Bennée
---
target-arm/kvm64.c | 18 ++
1 file changed, 18
Hi,
Here is the latest patch set to support debugging of KVM guests on
arm64. The main changes since the last post are that the kernel
patches have now been mainlined. As the recent master has synced up
headers they are no longer needed for this series.
I've add a GDB Python based test into
On 12/11/2015 15:45, Joerg Roedel wrote:
> Hi Paolo,
>
> On Thu, Nov 12, 2015 at 02:49:16PM +0100, Paolo Bonzini wrote:
>> RDTSCP was never supported for AMD CPUs, which nobody noticed because
>> Linux does not use it. But exactly the fact that Linux does not
>> use it makes the implementation
This patch adds a call to kvm_arch_interrupt_allowed to ensure ready for
interrupt is reported to user space correctly. This addresses a problem
observed in QEMU when kvm->ready_for_interrupt is set but the x86
interrupt flag is clear.
Additionally, test that the APIC is ready to accept an
Before this patch we incorrectly enter the guest without requesting an
interrupt window if the IRQ chip is split between user space and the
kernel.
Because lapic_in_kernel no longer implies the PIC is in the kernel, this
patch tests pic_in_kernel to determining whether an interrupt window
should
Set KVM_REQ_EVENT when a PIC in user space injects a local interrupt.
Currently a request is only made when neither the PIC nor the APIC is in
the kernel, which is not sufficient in the split IRQ chip case.
This addresses a problem in QEMU where interrupts are delayed until
another path invokes
Aravinda Prasad writes:
>> Yeah, it would be good not to break this.
>
> I am not familiar with CAPI. Does this affect CAPI?
When a CAPI card experiences an EEH event, any cache lines it holds are
filled with SUEs (Special UEs, interpreted by the kernel the same as
On 12/11/2015 06:35, Paul Mackerras wrote:
> Paolo,
>
> I have two fixes for HV KVM which I would like to have included in
> v4.4-rc1. The first one is a fix for a bug identified by Red Hat
> which causes occasional guest crashes. The second one fixes a bug
> which causes host stalls and
On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
>
>
> On Thursday 12 November 2015 10:13 AM, David Gibson wrote:
> > On Thu, Nov 12, 2015 at 10:02:10AM +0530, Aravinda Prasad wrote:
> >>
> >>
> >> On Thursday 12 November 2015 09:08 AM, David Gibson wrote:
> >>> On Thu, Nov 12,
On Friday 13 November 2015 07:20 AM, David Gibson wrote:
> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
[...]
>>
>> I overlooked it. I think I need to take into consideration whether guest
>> issued "ibm, nmi-register". If the guest has issued "ibm, nmi-register"
>> then we
On 13/11/15 07:26, Aravinda Prasad wrote:
>
> On Friday 13 November 2015 07:20 AM, David Gibson wrote:
>> On Thu, Nov 12, 2015 at 11:22:29PM +0530, Aravinda Prasad wrote:
[...]
>>> So thinking whether qemu should explicitly enable the new NMI
>>> behavior.
>>
>> So, I think the reasoning above
On Friday 13 November 2015 03:07 AM, Daniel Axtens wrote:
> Aravinda Prasad writes:
>
>>> Yeah, it would be good not to break this.
>>
>> I am not familiar with CAPI. Does this affect CAPI?
>
> When a CAPI card experiences an EEH event, any cache lines it holds
On Thursday 12 November 2015 10:13 AM, David Gibson wrote:
> On Thu, Nov 12, 2015 at 10:02:10AM +0530, Aravinda Prasad wrote:
>>
>>
>> On Thursday 12 November 2015 09:08 AM, David Gibson wrote:
>>> On Thu, Nov 12, 2015 at 01:24:19PM +1100, Daniel Axtens wrote:
Aravinda Prasad
On Thursday 12 November 2015 10:28 AM, Daniel Axtens wrote:
>
>> So, IIUC. Once the qemu pieces are in place as well it shouldn't
>> change this behaviour: KVM will exit to qemu, qemu will log the error
>> information (new), then reinject the MC to the guest which can still
>> handle it as you
78 matches
Mail list logo