Module Name: src
Committed By: martin
Date: Wed Oct 18 15:19:09 UTC 2023
Modified Files:
src/sys/arch/amd64/amd64 [netbsd-10]: locore.S
src/sys/arch/i386/i386 [netbsd-10]: locore.S
src/sys/arch/xen/include [netbsd-10]: hypervisor.h
Log Message:
Pull up following revision(s) (requested by bouyer in ticket #427):
sys/arch/xen/include/hypervisor.h: revision 1.58
sys/arch/i386/i386/locore.S: revision 1.197
sys/arch/amd64/amd64/locore.S: revision 1.224
Xen's start_info_t is larger than 512 bytes these days, so bump the copy
size to a whole PAGE_SIZE, and CTASSERT() that start_info_t is smaller.
Luckily we didn't use yet the parts skipped
To generate a diff of this commit:
cvs rdiff -u -r1.214.4.1 -r1.214.4.2 src/sys/arch/amd64/amd64/locore.S
cvs rdiff -u -r1.190.4.1 -r1.190.4.2 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/arch/xen/include/hypervisor.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.214.4.1 src/sys/arch/amd64/amd64/locore.S:1.214.4.2
--- src/sys/arch/amd64/amd64/locore.S:1.214.4.1 Sat May 13 13:26:57 2023
+++ src/sys/arch/amd64/amd64/locore.S Wed Oct 18 15:19:09 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.214.4.1 2023/05/13 13:26:57 martin Exp $ */
+/* $NetBSD: locore.S,v 1.214.4.2 2023/10/18 15:19:09 martin Exp $ */
/*
* Copyright-o-rama!
@@ -939,7 +939,7 @@ longmode_hi:
/* Copy start_info to a safe place. */
movq %rbx,%rsi
movq $_C_LABEL(start_info_union),%rdi
- movq $64,%rcx
+ movq $(PAGE_SIZE / 8),%rcx
rep
movsq
Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.190.4.1 src/sys/arch/i386/i386/locore.S:1.190.4.2
--- src/sys/arch/i386/i386/locore.S:1.190.4.1 Wed Feb 8 18:27:05 2023
+++ src/sys/arch/i386/i386/locore.S Wed Oct 18 15:19:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.190.4.1 2023/02/08 18:27:05 martin Exp $ */
+/* $NetBSD: locore.S,v 1.190.4.2 2023/10/18 15:19:08 martin Exp $ */
/*
* Copyright-o-rama!
@@ -128,7 +128,7 @@
*/
#include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.190.4.1 2023/02/08 18:27:05 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.190.4.2 2023/10/18 15:19:08 martin Exp $");
#include "opt_copy_symtab.h"
#include "opt_ddb.h"
@@ -1117,7 +1117,7 @@ begin:
/* Copy the necessary stuff from start_info structure. */
/* We need to copy shared_info early, so that sti/cli work */
movl $RELOC(start_info_union),%edi
- movl $128,%ecx
+ movl $(PAGE_SIZE / 4),%ecx
rep
movsl
Index: src/sys/arch/xen/include/hypervisor.h
diff -u src/sys/arch/xen/include/hypervisor.h:1.55.4.1 src/sys/arch/xen/include/hypervisor.h:1.55.4.2
--- src/sys/arch/xen/include/hypervisor.h:1.55.4.1 Mon Jul 31 15:23:02 2023
+++ src/sys/arch/xen/include/hypervisor.h Wed Oct 18 15:19:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hypervisor.h,v 1.55.4.1 2023/07/31 15:23:02 martin Exp $ */
+/* $NetBSD: hypervisor.h,v 1.55.4.2 2023/10/18 15:19:08 martin Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -58,6 +58,8 @@
#include "isa.h"
#include "pci.h"
+#include <machine/vmparam.h>
+
struct cpu_info;
int xen_hvm_init(void);
@@ -134,11 +136,13 @@ struct xen_npx_attach_args {
union start_info_union
{
start_info_t start_info;
- char padding[512];
+ char padding[PAGE_SIZE];
};
extern union start_info_union start_info_union;
#define xen_start_info (start_info_union.start_info)
+CTASSERT(sizeof(start_info_t) <= PAGE_SIZE);
+
extern struct hvm_start_info *hvm_start_info;
/* For use in guest OSes. */