Re: [PATCH 8/8] KVM:PPC:booke: Allow debug interrupt injection to guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/03/2013 10:48:29 PM, Bhushan Bharat-R65777 wrote:


> -----Original Message-----
> From: Wood Scott-B07421
> Sent: Saturday, February 02, 2013 4:09 AM
> To: Alexander Graf
> Cc: Bhushan Bharat-R65777; kvm-ppc@xxxxxxxxxxxxxxx; kvm@xxxxxxxxxxxxxxx > Subject: Re: [PATCH 8/8] KVM:PPC:booke: Allow debug interrupt injection to guest
>
> On 01/31/2013 06:11:32 PM, Alexander Graf wrote:
> > My main concern here is that we don't know when to remove MSR_DE again
> > from the (shadow) MSR. So how about this one instead?
>
> Why wouldn't you know this? if (vcpu->guest_debug) { you never remove it } else
> { just copy whatever's in guest MSR }

I think we are ok with shadow_msr on e500v2 but we can have problem on bookehv where we do not know when to clear MSR_DE in shared->msr.

How it works on e500mc:
(1) User-space makes ioctl to use debug resource, we set vcpu->guest_debug. (2) Before entering into the guest we check vcpu->guest_debug flag and if set we set MSR_DE in shared->msr. (3) Sometime later user-space releases the debug resource then in ioctl handling will clear vcpu->guest_debug. (4) Now when entering to guest we do not know what to do with MSR_DE in shared->msr as we do now know if guest might have tried to set/clear MSR_DE in between step (2) and step(3). What should be safe thing to do? Can we leave MSR_DE set or clear MSR_DE. If we want to clear MSR_DE then will it be good idea to clear this in step (3) above (in ioctl where we clear vcpu->guest_debug).

Oh, you want to support dynamically changing the debug mode? The hardware can't really deal with that, unless you paravirt MSR[DE], which doesn't seem worth it. There's also the issue of confusing the guest if it checks EDM before you give debug to the host (this one applies to e500v2 as well).

-Scott
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux