rpms/kernel-xen-2.6/F-7 xen-vpic-set-vector.patch, 1.1, 1.2 kernel-xen.spec, 1.27, 1.28

Eduardo Habkost (ehabkost) fedora-extras-commits at redhat.com
Thu May 24 16:43:20 UTC 2007


Author: ehabkost

Update of /cvs/pkgs/rpms/kernel-xen-2.6/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29652

Modified Files:
	kernel-xen.spec 
Added Files:
	xen-vpic-set-vector.patch 
Log Message:
Merge from private-ehabkost-sct-fv-patches-branch



xen-vpic-set-vector.patch:

Index: xen-vpic-set-vector.patch
===================================================================
RCS file: xen-vpic-set-vector.patch
diff -N xen-vpic-set-vector.patch
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ xen-vpic-set-vector.patch	24 May 2007 16:43:15 -0000	1.2
@@ -0,0 +1,73 @@
+Date: Tue, 22 May 2007 15:00:35 +0100
+From: "Stephen C. Tweedie" <sct at redhat.com>
+Subject: [patch 1/2] HV: allow HVM virtual PICs to have their interrupt vector reprogrammed
+
+
+Hi,
+
+> So the fix here is to first of all extend the virtual PIC provided by
+> the hypervisor, supporting a new 2-byte control sequence which lets the
+> guests change the interrupt vectors _without_ fully reinitialising the
+> PIC
+
+And this is the patch for that.  The new control sequence is:
+
+Write 0xff to ICW1: this is an otherwise unused value, since it has bit
+4 set (ie. it's an initialisation register write), and yet bits 5--7 are
+also set (only valid for MCS-80 mode, which the Xen vPIC doesn't emulate
+at all.)  This sets the PIC to expect ICW2 to follow, just as ICW1
+usually does, except that it does not reset the PIC internal state.
+
+Write the new vector to ICW2: completes the initialisation sequence.
+This the same as a normal ICW2 write, except that it does not expect to
+be followed by the usual ICW3/ICW4 writes.
+
+Note that the flag used to indicate this "special" ICW1 write is shared
+between the two vPICs (master and slave), so it is not legal for the
+guest to write 0xff to both master/slave ICW1 before following up with
+the ICW2 writes.  But since the only software that will use this is the
+modified vmxassist, that's OK.
+
+--Stephen
+
+---
+Index: xen/arch/x86/hvm/vpic.c
+===================================================================
+--- xen/arch/x86/hvm/vpic.c
++++ xen/arch/x86/hvm/vpic.c
+@@ -178,13 +178,23 @@ static void vpic_ioport_write(struct hvm
+ {
+     int priority, cmd, irq;
+     uint8_t mask;
++    static int custom_revector_flag = 0;
+ 
+     vpic_lock(vpic);
+ 
+     addr &= 1;
+     if ( addr == 0 )
+     {
+-        if ( val & 0x10 )
++	if ( val == 0xff ) {
++	    /* Extension to the PIC: lets us rewrite the icw2 vector
++	     * without fully reinitialising the PIC, used by vmxassist
++	     * to preserve icw2 vector translations across transitions
++	     * into and back out of 32-bit mode.
++	     */
++	    vpic->init_state = 1;
++	    custom_revector_flag = 1;
++	}
++        else if ( val & 0x10 )
+         {
+             /* ICW1 */
+             /* Clear edge-sensing logic. */
+@@ -268,6 +278,10 @@ static void vpic_ioport_write(struct hvm
+             /* ICW2 */
+             vpic->irq_base = val & 0xf8;
+             vpic->init_state++;
++	    if (custom_revector_flag) {
++		custom_revector_flag = 0;
++		vpic->init_state = 0;
++	    }
+             if ( !(vpic->init_state & 8) )
+                 break; /* CASCADE mode: wait for write to ICW3. */
+             /* SNGL mode: fall through (no ICW3). */


Index: kernel-xen.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/F-7/kernel-xen.spec,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- kernel-xen.spec	24 May 2007 16:16:28 -0000	1.27
+++ kernel-xen.spec	24 May 2007 16:43:15 -0000	1.28
@@ -487,6 +487,9 @@
 Patch20000: xen-compile-fix.patch
 Patch20001: xen-version-strings.patch
 
+# HV part for rawhide FV booting on rawhide Xen
+Patch20002: xen-vpic-set-vector.patch
+
 # END OF PATCH DEFINITIONS
 
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root-%{_target_cpu}
@@ -1123,6 +1126,7 @@
 # Any necessary hypervisor patches go here
 %patch20000 -p1
 %patch20001 -p1
+%patch20002 -p1
 
 # Update the Makefile version strings
 sed -i -e 's/\(^export XEN_BUILDER.*$\)/\1'%{?dist}'/' Makefile
@@ -2016,6 +2020,8 @@
 * Thu May 24 2007 Eduardo Habkost <ehabkost at redhat.com>
 - Disabled CONFIG_PROVE_LOCKING, as the xen code doesn't support it.
   See bug #239601
+- HV: allow HVM virtual PICs to have their interrupt vector reprogrammed
+  (part of fix for rawhide FV booting on rawhide Xen)
 
 * Tue May 22 2007 Eduardo Habkost <ehabkost at redhat.com>
 - Add patch from bug #209429: linux-2.6-xen-iscsi-x86_64-no_iommu_init.patch




More information about the fedora-extras-commits mailing list